diff -Nru glurp-0.11.6/acconfig.h glurp-0.12.3/acconfig.h --- glurp-0.11.6/acconfig.h 2005-04-03 02:54:12.000000000 +0100 +++ glurp-0.12.3/acconfig.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -#undef ENABLE_NLS -#undef HAVE_CATGETS -#undef HAVE_GETTEXT -#undef GETTEXT_PACKAGE -#undef HAVE_LC_MESSAGES -#undef HAVE_STPCPY -#undef HAVE_LIBSM - -#undef GLURP_VERSION -#undef GLURP_DEBUG -#undef PACKAGE_DATA_DIR -#undef PACKAGE_PIXMAPS_DIR diff -Nru glurp-0.11.6/aclocal.m4 glurp-0.12.3/aclocal.m4 --- glurp-0.11.6/aclocal.m4 2005-06-05 16:24:00.000000000 +0100 +++ glurp-0.12.3/aclocal.m4 2010-04-17 23:28:53.000000000 +0100 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.5 -*- Autoconf -*- +# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,14 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, +[m4_warning([this file was generated for autoconf 2.64. +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'.])]) + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . @@ -44,7 +52,7 @@ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) + _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) @@ -56,29 +64,61 @@ fi[]dnl ])# PKG_PROG_PKG_CONFIG +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test "x$ac_cv_env_[]$1[]_set" = "xset"; then - pkg_cv_[]$1=$ac_cv_env_[]$1[]_value -elif test -n "$PKG_CONFIG"; then - if AC_RUN_LOG([$PKG_CONFIG --exists "$3" >/dev/null 2>&1]); then - pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - else - pkg_failed=yes - fi +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.in +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- @@ -88,45 +128,56 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_CACHE_CHECK([for $1][_CFLAGS], [pkg_cv_][$1][_CFLAGS], - [_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])]) -AC_CACHE_CHECK([for $1][_LIBS], [pkg_cv_][$1][_LIBS], - [_PKG_CONFIG([$1][_LIBS], [libs], [$2])]) +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met. +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details.])], - [$4]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. +_PKG_TEXT -To get pkg-config, see .])], +To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -136,14 +187,31 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# 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.9.5])]) +[AM_AUTOMAKE_VERSION([1.11])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 -*- @@ -223,14 +291,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -239,8 +307,11 @@ [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -254,15 +325,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 10 # 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, @@ -290,6 +360,7 @@ 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=]) @@ -318,6 +389,16 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -335,7 +416,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -345,18 +436,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -407,61 +503,74 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -492,14 +601,14 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# 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. @@ -516,16 +625,20 @@ # 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.58])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -545,6 +658,9 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -560,8 +676,8 @@ AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -569,20 +685,37 @@ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -593,18 +726,19 @@ # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,7 +749,14 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -642,27 +783,38 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# 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 +# can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other 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=no) + [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]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl + AC_SUBST([MAINT])dnl ] ) @@ -670,13 +822,13 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MAKE_INCLUDE() # ----------------- @@ -685,7 +837,7 @@ [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -695,24 +847,24 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -722,14 +874,14 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -745,7 +897,15 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " @@ -755,7 +915,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -763,70 +923,33 @@ # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([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 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -843,7 +966,7 @@ # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -853,14 +976,14 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_SANITY_CHECK # --------------- @@ -869,16 +992,29 @@ # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ @@ -928,9 +1064,28 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. diff -Nru glurp-0.11.6/AUTHORS glurp-0.12.3/AUTHORS --- glurp-0.11.6/AUTHORS 2005-06-05 16:26:16.000000000 +0100 +++ glurp-0.12.3/AUTHORS 2010-04-13 15:21:05.000000000 +0100 @@ -4,6 +4,7 @@ With contributions from: Qball Cow Daniel Lindenaar + Benoît Rouits (current maintainer) pixmaps/online.png and pixmaps/offline.png icons are based on icons from Sylpheed Claws (http://sylpheed-claws.sourceforge.net) diff -Nru glurp-0.11.6/ChangeLog glurp-0.12.3/ChangeLog --- glurp-0.11.6/ChangeLog 2005-06-05 20:03:56.000000000 +0100 +++ glurp-0.12.3/ChangeLog 2010-04-17 22:38:37.000000000 +0100 @@ -1,6 +1,75 @@ -2005-06-05 Andrej Kacian +2010-04-17 Benoît Rouits + * added possibility to remove a stream from history. + * bumped stream history to 30 urls. + +2010-04-14 Benoît Rouits + * Switched from libglade to GtkBuilder + * Switched volume button to a GtkVolumeButton + * Moved connect and output buttons under volume button + +2010-03-29 Benoît Rouits + * Added optional tray icon and tray menu. + * Fixed bug when refresh_rate is longer than 1sec. + * Replaced the button_time by a label_time (GtkLabel) to avoid tooltip drops. + * Fixed condense/normal behaviour for smart (buggy?) window-managers. + * Fixed stream list selection (now copy stream name to stream entry). + * Fixed bug when streams change song title on the fly. + +2005-11-11 Andrej Kacian + * Changed "config_file" CLI option to "config". + +2005-10-26 Daniel Lindenaar + * Fix last GTK_{WARNING,CRITICAL} due to the move to single window. + * Fix keyboard shortcuts, broken due to the move to single window. + * Better comply to GNOME-HIG by not changing the play into pause and + vice-versa. + +2005-10-24 Daniel Lindenaar + * Add row_activated signal handler for playlists treeview. + * Another speedup for playlist handling. + +2005-10-21 Daniel Lindenaar + * Some patches to allow build on win32 playform. + * Changed glurp's look to not use any dialogs. + * added NSIS installer script file to build a win32 installer. + * workaround crashes when having insufficient permissions (needs a + real implementation, though). + * Added commandline option --config-file=... to specify which config. + file to use; Usefull for multiple server connections. + * Improve playlist loading time. + +2005-09-01 Andrej Kacian + * Only request plchanges when playlist version changes (duh!) + +2005-08-31 Andrej Kacian + * Use strftime() from gmpc to form titles displayed in playlist and + current song bar. + * Store a pointer to mpd_Song inside GlurpSong. Do not show playlist + treeview headers. + * Updated libmpdclient.[ch] + * Reordered main control bar buttons a bit. + +2005-08-30 Andrej Kacian + * Made left/right buttons seek in current song. Based on patch by + Florian (oxifant at musicpd.org forums). + * Remember playlist visibility on exit, instead of having a config + option. + +2005-08-27 Andrej Kacian + * Rearranged GUI elements a bit, made button icons smaller. + +2005-08-21 Andrej Kacian + * Changed location of connect/disconnect button. + * Make outputs button non-sensitive instead of hiding it + * Do a proper cleanup on SIGINT. Patch sent by Daniel Lublin + . + * Call correct signal handler on playlist load button. + * Fix quicksearch to search entire playlist, not just songs below + cursor position. + +2005-06-05 Andrej Kacian * Fixed main window size remembering - * Applied patch from Daniel Lindenaar to add + * Applied patch from Daniel Lindenaar to add search capability to the add window. Modified the original patch so that the search results are displayed in a separate treeview item, instead of removing the database view. diff -Nru glurp-0.11.6/config.guess glurp-0.12.3/config.guess --- glurp-0.11.6/config.guess 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/config.guess 2009-05-05 09:45:31.000000000 +0100 @@ -0,0 +1,1561 @@ +#! /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 +# Free Software Foundation, Inc. + +timestamp='2009-04-27' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd | genuineintel) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru glurp-0.11.6/config.h.in glurp-0.12.3/config.h.in --- glurp-0.11.6/config.h.in 2005-06-05 16:24:13.000000000 +0100 +++ glurp-0.12.3/config.h.in 2010-04-17 23:29:10.000000000 +0100 @@ -1,16 +1,10 @@ /* config.h.in. Generated from configure.in by autoheader. */ -#undef ENABLE_NLS -#undef HAVE_CATGETS -#undef HAVE_GETTEXT -#undef GETTEXT_PACKAGE -#undef HAVE_LC_MESSAGES -#undef HAVE_STPCPY -#undef HAVE_LIBSM -#undef GLURP_VERSION +/* Wheter to enable debug statements */ #undef GLURP_DEBUG -#undef PACKAGE_DATA_DIR -#undef PACKAGE_PIXMAPS_DIR + +/* glurp's version */ +#undef GLURP_VERSION /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -24,6 +18,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff -Nru glurp-0.11.6/config.sub glurp-0.12.3/config.sub --- glurp-0.11.6/config.sub 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/config.sub 2009-05-05 09:45:31.000000000 +0100 @@ -0,0 +1,1686 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2009-04-17' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -Nru glurp-0.11.6/configure glurp-0.12.3/configure --- glurp-0.11.6/configure 2005-06-05 16:24:06.000000000 +0100 +++ glurp-0.12.3/configure 2010-04-17 23:28:58.000000000 +0100 @@ -1,81 +1,413 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.64. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # -# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -DUALCASE=1; export DUALCASE # for MKS sh -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_unset $as_var + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi -done + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` - -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -83,146 +415,107 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,38 +524,24 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= @@ -270,14 +549,135 @@ PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="configure.in" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP PKG_CONFIG ac_pt_PKG_CONFIG PACKAGE_CFLAGS PACKAGE_LIBS LIBOBJS LTLIBOBJS' +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +EXTRA_LDFLAGS +EXTRA_CFLAGS +PACKAGE_LIBS +PACKAGE_CFLAGS +PKG_CONFIG +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_debug +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +PKG_CONFIG +PACKAGE_CFLAGS +PACKAGE_LIBS' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -300,34 +700,48 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -349,33 +763,59 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -402,6 +842,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -426,13 +872,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -497,6 +946,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -547,26 +1006,36 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -586,26 +1055,25 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -614,31 +1082,36 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -652,7 +1125,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -665,86 +1138,72 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_PKG_CONFIG_set=${PKG_CONFIG+set} -ac_env_PKG_CONFIG_value=$PKG_CONFIG -ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set} -ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG -ac_env_PACKAGE_CFLAGS_set=${PACKAGE_CFLAGS+set} -ac_env_PACKAGE_CFLAGS_value=$PACKAGE_CFLAGS -ac_cv_env_PACKAGE_CFLAGS_set=${PACKAGE_CFLAGS+set} -ac_cv_env_PACKAGE_CFLAGS_value=$PACKAGE_CFLAGS -ac_env_PACKAGE_LIBS_set=${PACKAGE_LIBS+set} -ac_env_PACKAGE_LIBS_value=$PACKAGE_LIBS -ac_cv_env_PACKAGE_LIBS_set=${PACKAGE_LIBS+set} -ac_cv_env_PACKAGE_LIBS_value=$PACKAGE_LIBS +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -773,14 +1232,11 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -790,18 +1246,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -810,6 +1273,10 @@ --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi @@ -818,6 +1285,7 @@ cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful @@ -831,8 +1299,9 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PACKAGE_CFLAGS @@ -843,119 +1312,256 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.64 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_run +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -974,7 +1580,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -986,8 +1592,9 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS } >&5 @@ -1009,7 +1616,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1020,13 +1626,13 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1042,21 +1648,19 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1069,20 +1673,35 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1093,22 +1712,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1120,26 +1745,26 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. @@ -1147,40 +1772,46 @@ #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -for ac_site_file in $CONFIG_SITE; do +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1190,69 +1821,79 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1262,50 +1903,32 @@ +version=0.12.3 +am__api_version='1.11' - - - - - - - - - - - - - - - -version=0.11.6 - -am__api_version="1.9" ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1320,22 +1943,23 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -1343,7 +1967,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1353,30 +1977,43 @@ # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac -done + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1386,21 +2023,34 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&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=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -1410,11 +2060,8 @@ # 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". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -1423,81 +2070,206 @@ # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $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 mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" else - mkdir_p='$(install_sh) -d' + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" fi fi +{ $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. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -1507,55 +2279,59 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -1568,12 +2344,14 @@ fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi fi # test whether we have cygpath @@ -1607,96 +2385,6 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. @@ -1709,7 +2397,8 @@ - ac_config_headers="$ac_config_headers config.h" +ac_config_headers="$ac_config_headers config.h" + cat >>confdefs.h <<_ACEOF @@ -1717,20 +2406,19 @@ _ACEOF -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 - +fi -if test $USE_MAINTAINER_MODE = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -1741,63 +2429,62 @@ MAINT=$MAINTAINER_MODE_TRUE +user_CFLAGS=$CFLAGS DEPDIR="${am__leading_dot}deps" - ac_config_commands="$ac_config_commands depfiles" +ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi -fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -1806,7 +2493,6 @@ fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -1815,10 +2501,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1828,35 +2514,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1866,39 +2554,50 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1908,77 +2607,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1989,18 +2648,19 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2018,24 +2678,25 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2045,39 +2706,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2087,183 +2750,227 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC -fi + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then : + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } fi - ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2271,38 +2978,31 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2314,45 +3014,46 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2366,55 +3067,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2425,39 +3105,49 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ -ac_cv_prog_cc_g=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2473,18 +3163,14 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -2512,12 +3198,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2532,205 +3223,37 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2739,10 +3262,10 @@ depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -2767,6 +3290,11 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -2784,7 +3312,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -2794,18 +3332,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -2829,13 +3372,11 @@ fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -2847,129 +3388,59 @@ -echo "$as_me:$LINENO: checking for library containing strerror" >&5 -echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 -if test "${ac_cv_search_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if test "${ac_cv_search_strerror+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_strerror=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); int main () { -strerror (); +return strerror (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_strerror="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_strerror" = no; then - for ac_lib in cposix; do +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_strerror+set}" = set; then : + break +fi +done +if test "${ac_cv_search_strerror+set}" = set; then : -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror (); -int -main () -{ -strerror (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_strerror="-l$ac_lib" -break else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done + ac_cv_search_strerror=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 -echo "${ECHO_T}$ac_cv_search_strerror" >&6 -if test "$ac_cv_search_strerror" != no; then - test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } +ac_res=$ac_cv_search_strerror +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -2981,10 +3452,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2994,35 +3465,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3032,39 +3505,50 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3074,77 +3558,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3155,18 +3599,19 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -3184,24 +3629,25 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3211,39 +3657,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3253,71 +3701,83 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3331,55 +3791,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3390,40 +3829,50 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3438,18 +3887,14 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3477,12 +3922,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -3497,205 +3947,37 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3704,10 +3986,10 @@ depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3732,6 +4014,11 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3749,7 +4036,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -3759,18 +4056,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3794,13 +4096,11 @@ fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3819,10 +4119,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3832,35 +4132,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3870,39 +4172,50 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3912,77 +4225,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3993,18 +4266,19 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -4022,24 +4296,25 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4049,39 +4324,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4091,71 +4368,83 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4169,55 +4458,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4228,39 +4496,49 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ -ac_cv_prog_cc_g=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -4276,18 +4554,14 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4315,12 +4589,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -4335,205 +4614,37 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if test "x$ac_cv_prog_cc_c89" != xno; then : fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4542,10 +4653,10 @@ depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -4570,6 +4681,11 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4587,7 +4703,17 @@ done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -4597,18 +4723,23 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4632,13 +4763,11 @@ fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -4657,15 +4786,15 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -4679,11 +4808,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4692,68 +4817,24 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break @@ -4763,7 +4844,7 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -4775,8 +4856,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4786,11 +4867,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4799,68 +4876,24 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break @@ -4870,14 +4903,13 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -4887,31 +4919,142 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4926,51 +5069,23 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4980,18 +5095,14 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -5001,16 +5112,13 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -5030,59 +5138,118 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + -debug=0 -echo "$as_me:$LINENO: checking whether to enable debugging output" >&5 -echo $ECHO_N "checking whether to enable debugging output... $ECHO_C" >&6 -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" +debug=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging output" >&5 +$as_echo_n "checking whether to enable debugging output... " >&6; } +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; case "${enableval}" in yes) - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\_ACEOF -#define GLURP_DEBUG 1 -_ACEOF + if test x"$user_CFLAGS" = x; then + CFLAGS="-Wall -Werror -ggdb -O0" + echo -n Setting CFLAGS ... + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define GLURP_DEBUG /**/" >>confdefs.h debug=1 ;; @@ -5090,23 +5257,23 @@ else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi -fi; -#pkg_modules="gtk+-2.0 libglade-2.0 libxml-2.0 glib-2.0" -pkg_modules="gtk+-2.0 >= 2.4 glib-2.0 >= 2.4 libglade-2.0 >= 2.3 gmodule-2.0 >= 2.6" +pkg_modules="gtk+-2.0 >= 2.4 glib-2.0 >= 2.4 gmodule-2.0 >= 2.6 libmpd >= 0.0.9.8" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -5118,37 +5285,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -5160,29 +5328,39 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG - if test -n "$ac_pt_PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - PKG_CONFIG=$ac_pt_PKG_CONFIG + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi @@ -5190,112 +5368,106 @@ fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no -echo "$as_me:$LINENO: checking for PACKAGE_CFLAGS" >&5 -echo $ECHO_N "checking for PACKAGE_CFLAGS... $ECHO_C" >&6 -if test "${pkg_cv_PACKAGE_CFLAGS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$ac_cv_env_PACKAGE_CFLAGS_set" = "xset"; then - pkg_cv_PACKAGE_CFLAGS=$ac_cv_env_PACKAGE_CFLAGS_value -elif test -n "$PKG_CONFIG"; then - if { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists \"\$pkg_modules\" >/dev/null 2>&1") >&5 - ($PKG_CONFIG --exists "$pkg_modules" >/dev/null 2>&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` - else - pkg_failed=yes - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5 +$as_echo_n "checking for PACKAGE... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PACKAGE_CFLAGS"; then + pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` +else + pkg_failed=yes +fi + fi else pkg_failed=untried fi +if test -n "$PKG_CONFIG"; then + if test -n "$PACKAGE_LIBS"; then + pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` +else + pkg_failed=yes fi -echo "$as_me:$LINENO: result: $pkg_cv_PACKAGE_CFLAGS" >&5 -echo "${ECHO_T}$pkg_cv_PACKAGE_CFLAGS" >&6 -echo "$as_me:$LINENO: checking for PACKAGE_LIBS" >&5 -echo $ECHO_N "checking for PACKAGE_LIBS... $ECHO_C" >&6 -if test "${pkg_cv_PACKAGE_LIBS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$ac_cv_env_PACKAGE_LIBS_set" = "xset"; then - pkg_cv_PACKAGE_LIBS=$ac_cv_env_PACKAGE_LIBS_value -elif test -n "$PKG_CONFIG"; then - if { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists \"\$pkg_modules\" >/dev/null 2>&1") >&5 - ($PKG_CONFIG --exists "$pkg_modules" >/dev/null 2>&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` - else - pkg_failed=yes - fi + fi else pkg_failed=untried fi -fi -echo "$as_me:$LINENO: result: $pkg_cv_PACKAGE_LIBS" >&5 -echo "${ECHO_T}$pkg_cv_PACKAGE_LIBS" >&6 + + if test $pkg_failed = yes; then - PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` + +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 + PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$pkg_modules"` + else + PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` + fi # Put the nasty error message in config.log where it belongs - echo "$PACKAGE_PKG_ERRORS" 1>&5 + echo "$PACKAGE_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements ($pkg_modules) were not met. -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + as_fn_error "Package requirements ($pkg_modules) were not met: + +$PACKAGE_PKG_ERRORS -Alternatively you may set the PACKAGE_CFLAGS and PACKAGE_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details." >&5 -echo "$as_me: error: Package requirements ($pkg_modules) were not met. Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the PACKAGE_CFLAGS and PACKAGE_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details." >&2;} - { (exit 1); exit 1; }; } +Alternatively, you may set the environment variables PACKAGE_CFLAGS +and PACKAGE_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 - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it + { { $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 PACKAGE_CFLAGS and PACKAGE_LIBS environment variables -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." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +Alternatively, you may set the environment variables PACKAGE_CFLAGS +and PACKAGE_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -Alternatively you may set the PACKAGE_CFLAGS and PACKAGE_LIBS environment variables -to avoid the need to call pkg-config. See the pkg-config man page for -more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +To get pkg-config, see . +See \`config.log' for more details." "$LINENO" 5; } else PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } : fi @@ -5304,12 +5476,29 @@ if test "x${prefix}" = "xNONE"; then - packageprefix=${ac_default_prefix} + case $host in + *-*-mingw32* | *-*-cygwin* | *-*-windows) + packageprefix="c:/progra~1/glurp" ;; + *) + packageprefix=${ac_default_prefix} ;; + esac else packageprefix=${prefix} fi - ac_config_files="$ac_config_files Makefile pixmaps/Makefile src/Makefile" +EXTRA_CFLAGS= +EXTRA_LDFLAGS= +case $host in + *-*-mingw32* | *-*-windows) + EXTRA_CFLAGS="-mms-bitfields -mno-cygwin -mwindows" + EXTRA_LDFLAGS="-mms-bitfieds -mno-cygwin -export-all-symbols -mwindows" ;; + *-*-cygwin*) + EXTRA_LDFLAGS=-export-all-symbols ;; +esac + + +ac_config_files="$ac_config_files Makefile pixmaps/Makefile src/Makefile" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -5328,39 +5517,59 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -5369,80 +5578,61 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -5452,81 +5642,252 @@ debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -DUALCASE=1; export DUALCASE # for MKS sh -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` - -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -5534,148 +5895,123 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else - PATH_SEPARATOR=: + as_ln_s='cp -p' fi - rm -f conf$$.sh +else + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ - ;; + case $as_dir in #( + -*) as_dir=./$as_dir;; esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5684,31 +6020,20 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5716,45 +6041,46 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -5765,84 +6091,83 @@ Configuration commands: $config_commands -Report bugs to ." -_ACEOF +Report bugs to the package provider." -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; esac shift @@ -5856,41 +6181,53 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # -# INIT-COMMANDS section. +# INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "pixmaps/Makefile" ) CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -5902,816 +6239,680 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} { - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi -# -# CONFIG_FILES section. -# +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t -s,@PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t -s,@PACKAGE_LIBS@,$PACKAGE_LIBS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X$ac_file | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'`/stamp-h$_am_stamp_count -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} - { (exit 1); exit 1; }; }; } - - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" done -done +} ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -6731,7 +6932,11 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff -Nru glurp-0.11.6/configure.in glurp-0.12.3/configure.in --- glurp-0.11.6/configure.in 2005-06-05 16:23:54.000000000 +0100 +++ glurp-0.12.3/configure.in 2010-04-17 23:28:39.000000000 +0100 @@ -2,20 +2,22 @@ AC_INIT(configure.in) -version=0.11.6 +version=0.12.3 AM_INIT_AUTOMAKE(glurp, $version, andrej@kacian.sk) AM_CONFIG_HEADER(config.h) -AC_DEFINE_UNQUOTED(GLURP_VERSION, "${version}") +AC_DEFINE_UNQUOTED(GLURP_VERSION, "${version}", [glurp's version]) AM_MAINTAINER_MODE +user_CFLAGS=$CFLAGS AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC dnl AM_PROG_LIBTOOL +AC_CANONICAL_HOST debug=0 AC_MSG_CHECKING(whether to enable debugging output) @@ -24,8 +26,13 @@ [ case "${enableval}" in yes) - AC_MSG_RESULT(yes) - AC_DEFINE(GLURP_DEBUG) + if test x"$user_CFLAGS" = x; then + CFLAGS="-Wall -Werror -ggdb -O0" + echo -n Setting CFLAGS ... + AC_SUBST(CFLAGS) + fi + AC_MSG_RESULT(yes) + AC_DEFINE(GLURP_DEBUG, [], [Wheter to enable debug statements]) debug=1 ;; esac @@ -34,8 +41,7 @@ AC_MSG_RESULT(no) ]) -#pkg_modules="gtk+-2.0 libglade-2.0 libxml-2.0 glib-2.0" -pkg_modules="gtk+-2.0 >= 2.4 glib-2.0 >= 2.4 libglade-2.0 >= 2.3 gmodule-2.0 >= 2.6" +pkg_modules="gtk+-2.0 >= 2.4 glib-2.0 >= 2.4 gmodule-2.0 >= 2.6 libmpd >= 0.0.9.8" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) @@ -49,11 +55,28 @@ dnl Set PACKAGE PREFIX if test "x${prefix}" = "xNONE"; then - packageprefix=${ac_default_prefix} + dnl Check target host for prefix + case $host in + *-*-mingw32* | *-*-cygwin* | *-*-windows) + packageprefix="c:/progra~1/glurp" ;; + *) + packageprefix=${ac_default_prefix} ;; + esac else packageprefix=${prefix} fi +EXTRA_CFLAGS= +EXTRA_LDFLAGS= +case $host in + *-*-mingw32* | *-*-windows) + EXTRA_CFLAGS="-mms-bitfields -mno-cygwin -mwindows" + EXTRA_LDFLAGS="-mms-bitfieds -mno-cygwin -export-all-symbols -mwindows" ;; + *-*-cygwin*) + EXTRA_LDFLAGS=-export-all-symbols ;; +esac +AC_SUBST(EXTRA_CFLAGS) +AC_SUBST(EXTRA_LDFLAGS) AC_OUTPUT([ Makefile pixmaps/Makefile diff -Nru glurp-0.11.6/debian/changelog glurp-0.12.3/debian/changelog --- glurp-0.11.6/debian/changelog 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/changelog 2010-05-18 11:49:07.000000000 +0100 @@ -1,3 +1,22 @@ +glurp (0.12.3-1) unstable; urgency=medium + + * New upstream release (Closes: #333640, #379667, #385088, #359096, #581933). + * New maintainer: Stanislav Maslovski + * Debian packaging updated: + - updated copyright information (the source does not + include a copy of libmpdclient anymore). + - updated package description (Closes: #359094). + - removed libglade2-dev from builddeps, added libmpd-dev. + - outdated patches removed. + - added an xpm icon. + - menu section updated. + - bumped compat level to 5. + - bumped standards version to 3.8.4. + - added homepage field (thanks, lintian). + - manpage updated to match the new version. + + -- Stanislav Maslovski Mon, 17 May 2010 12:35:24 +0400 + glurp (0.11.6-4) unstable; urgency=low * Bug fix: "glurp: Manpage refers to gmpc", thanks to Andreas Metzler diff -Nru glurp-0.11.6/debian/compat glurp-0.12.3/debian/compat --- glurp-0.11.6/debian/compat 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/compat 2010-05-18 11:49:07.000000000 +0100 @@ -1 +1 @@ -4 +5 diff -Nru glurp-0.11.6/debian/control glurp-0.12.3/debian/control --- glurp-0.11.6/debian/control 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/control 2010-05-18 11:49:07.000000000 +0100 @@ -1,21 +1,22 @@ Source: glurp Section: x11 Priority: optional -Maintainer: Niv Altivanik (Debian Packages) -Build-Depends: debhelper (>= 4.1.0), libgtk2.0-dev (>= 2.4), libglib2.0-dev (>= 2.4), libglade2-dev (>= 2.3), cdbs -Standards-Version: 3.7.2 +Maintainer: Stanislav Maslovski +Build-Depends: debhelper (>= 5), libgtk2.0-dev (>= 2.4), libglib2.0-dev (>= 2.4), libmpd-dev, cdbs +Standards-Version: 3.8.4 +Homepage: http://sourceforge.net/projects/glurp/ Package: glurp Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: mpd Provides: mpd-client -Description: gtk2.4+ frontend to the Music Player Daemon (MPD) - glurps is a gtk2.4+ frontend to the MPD music daemon. - * Playlist support. - * Password connection to MPD. - * Adding/removing files from playlists. - * id3 editor. +Description: GTK+ frontend to the Music Player Daemon (MPD) + glurp is a GTK+ frontend to the MPD music daemon. It features: + * Playlist support with id3 tags display. + * Password-protected connection to MPD. + * Easy switching of MPD's audio output device. + * Easy operations with MPD's database/playlists/streams. Enhances: mpd Tag: uitoolkit::gtk diff -Nru glurp-0.11.6/debian/copyright glurp-0.12.3/debian/copyright --- glurp-0.11.6/debian/copyright 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/copyright 2010-05-18 11:49:07.000000000 +0100 @@ -1,67 +1,42 @@ This package was debianized by Niv ALTIVANIK on Wed, 8 Dec 2004 09:52:03 +0100. -It was downloaded from http://prdownloads.sourceforge.net/glurp/ +Updated packaging by Stanislav Maslovski on +Mon, 17 May 2010 12:24:37 +0400. -Copyright: 2004 2005 Andrej Kacian +It was downloaded from http://sourceforge.net/projects/glurp/ -Upstream Author: Andrej Kacian -The GPL header will be included in all source files in the next version -of glurp. Here are his words: +Upstream Author: -I hereby claim that I wish to redistribute Glurp source codes under GNU GPL -licence, despite forgetting to mention this fact in source files. + Andrej Kacian + +Other contributors: + + Qball Cow + Daniel Lindenaar + Benoît Rouits + +Copyright: + + Copyright (C) 2004, 2005 Andrej Kacian License: - This package 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; version 2 dated June, 1991. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301, USA. - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -This program uses libmpdclient - -Copyright: 2003 2004 Warren Dukes - -libmpdclient can be downloaded from http://http://www.musicpd.org/ - -Licence: - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Music Player Daemon nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +On Debian systems, the complete text of the GNU General Public License +version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is + © 2004 Niv Altivanik (Debian Packages) + © 2010 Stanislav Maslovski +and can be redistributed and/or modified under the terms of GNU GPL version 2 +(see above) or any later version. diff -Nru glurp-0.11.6/debian/glurp.1 glurp-0.12.3/debian/glurp.1 --- glurp-0.11.6/debian/glurp.1 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/glurp.1 2010-05-18 11:49:07.000000000 +0100 @@ -1,31 +1,29 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH GLURP 1 "December 8, 2004" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) +.TH GLURP 1 "May 18, 2010" .SH NAME -glurp \- GTK2.4+ based program for controlling Music Player Daemon (MPD) +glurp \- GTK+ frontend for controlling Music Player Daemon (MPD) .SH SYNOPSIS .B glurp +.RB [ \-v | \-\-version ] +.RB [ \-h | \-\-help ] +.RB [ \-\-config=\fIfile\fP ] .SH DESCRIPTION -glurp is a GTK-based client for MPD based around a single-window -interface with an attachable playlist. +glurp is a GTK+ client for MPD with a simple single-window +interface that features a playlist, a database list, a list of streams +and also other controls. .SH USAGE Using glurp should be intuitive since it is based around a simple -GUI. Simply run glurp and click the tools icon to configure and -connect it to a running MPD process. +GUI. Simply run glurp and choose the config tab to configure and +connect it to a running MPD process. +.SH OPTIONS +.TP +.B \-v, \-\-version +prints version string. +.TP +.B -h, \-\-help +prints short usage information. +.TP +.BI "\-\-config=" file +use the given \fIfile\fP as the config file instead of the default (\fI~/.glurp\fP). .SH SEE ALSO .BR mpd (1), .BR mpc (1). @@ -34,3 +32,5 @@ .PP This manual page was written by Niv ALTIVANIK , for the Debian project (but may be used by others). +.PP +Updated by Stanislav Maslovski . \ No newline at end of file diff -Nru glurp-0.11.6/debian/glurp.xpm glurp-0.12.3/debian/glurp.xpm --- glurp-0.11.6/debian/glurp.xpm 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/debian/glurp.xpm 2010-05-18 11:49:07.000000000 +0100 @@ -0,0 +1,153 @@ +/* XPM */ +static char * glurp_xpm[] = { +"32 32 118 2", +" c None", +". c #00000A", +"+ c #000009", +"@ c #000008", +"# c #000051", +"$ c #000072", +"% c #00006B", +"& c #00004B", +"* c #000017", +"= c #00006F", +"- c #000081", +"; c #000064", +"> c #000022", +", c #000007", +"' c #000000", +") c #000015", +"! c #00006A", +"~ c #000028", +"{ c #000005", +"] c #000014", +"^ c #000073", +"/ c #00003B", +"( c #000001", +"_ c #000079", +": c #00007F", +"< c #00007D", +"[ c #000080", +"} c #000068", +"| c #000046", +"1 c #000031", +"2 c #000032", +"3 c #00004C", +"4 c #000018", +"5 c #000044", +"6 c #00003D", +"7 c #000057", +"8 c #000006", +"9 c #00006C", +"0 c #000071", +"a c #000056", +"b c #000011", +"c c #00007C", +"d c #000003", +"e c #00001C", +"f c #00005B", +"g c #00005E", +"h c #00001D", +"i c #00001B", +"j c #000076", +"k c #00000E", +"l c #00000D", +"m c #000024", +"n c #00000C", +"o c #00002B", +"p c #000036", +"q c #000060", +"r c #000041", +"s c #000053", +"t c #000049", +"u c #00000B", +"v c #00002A", +"w c #000042", +"x c #00004D", +"y c #00001A", +"z c #000069", +"A c #000074", +"B c #000026", +"C c #000040", +"D c #000070", +"E c #00007A", +"F c #000010", +"G c #00007E", +"H c #000077", +"I c #000037", +"J c #000741", +"K c #000851", +"L c #000063", +"M c #00003F", +"N c #000947", +"O c #00AE00", +"P c #007008", +"Q c #00171F", +"R c #00B400", +"S c #00FF00", +"T c #00D101", +"U c #002A0D", +"V c #000A09", +"W c #00FB00", +"X c #007B01", +"Y c #001E00", +"Z c #00D900", +"` c #003400", +" . c #00FD00", +".. c #008E00", +"+. c #001F00", +"@. c #00D700", +"#. c #002300", +"$. c #001100", +"%. c #00F300", +"&. c #006800", +"*. c #002100", +"=. c #00002F", +"-. c #000945", +";. c #00FE00", +">. c #009E00", +",. c #00001F", +"'. c #00004A", +"). c #00005F", +"!. c #000048", +"~. c #000027", +"{. c #000903", +"]. c #00CE00", +"^. c #003100", +"/. c #001C00", +"(. c #000004", +"_. c #00A000", +":. c #005900", +"<. c #000400", +" . + + @ ", +" + # $ % & * @ ", +" @ = - - - - - ; > , ' ", +" ) - - - - - - - - ! ~ { { ' ", +" ] - - - - - - - - - - ^ / @ + { @ ' ( ", +" , _ - - - : < - - - - - - [ } | 1 2 3 4 ", +" . 5 - - - # ' 6 _ - - - - - - - - - 7 @ ", +" 8 9 - - : 4 ' , 6 0 - - - - - - a 8 ", +" b _ - - c * d 8 8 e 5 f g 3 h , ", +" , i c - - j k l l + ", +" 8 m : - - $ n ", +" , o [ - - ! , ", +" @ p - - - q 8 ", +" , r - - - s , ", +" 8 & - - - t @ ", +" + u v w x & / y ' ' & - - - / @ ", +" { 2 z - - - - - - - A B ' C - - [ o @ ", +" @ y D - - - - - - - - - - - t ' E - - c F ", +" + ~ G - - - - - - - - - - - - - c - - - - z , ", +" l c - - - - - - - - - - - - - - - - H H - - ~ ", +" I - - - - - - - - - - - - - - - - - J ' K - L u ", +" M - - - - - - - - - - - - - - - - - N O P Q 0 { ", +" h - - - - - - - - - - - - - - - - - N R S T U V ", +" { A - - - - - - - - - - - - - - - - N R S S W X Y ", +" 8 p - - - - - - - - - - - - - - - - N R S S S S Z ` ", +" @ z - - - - - - - - - - - - - - - N R S S S S S ...+. ", +" l = - - - - - - - - - - - - - - N R S S S S S S @.#.$.", +" @ L - - - - - - - - - - - - - N R S S S S %.&.*. ", +" { =.$ - - - - - - - - - - - -.R S S ;.>.#. ", +" { ,.'.} H - - c ^ ).!.~.{.R S ].^./. ", +" , l + (.(.(.@ . { _.:.Y ", +" <. "}; diff -Nru glurp-0.11.6/debian/install glurp-0.12.3/debian/install --- glurp-0.11.6/debian/install 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/install 2010-05-18 11:49:07.000000000 +0100 @@ -1,2 +1,3 @@ debian/glurp.desktop usr/share/applications/ debian/glurp.svg usr/share/pixmaps/ +debian/glurp.xpm usr/share/pixmaps/ diff -Nru glurp-0.11.6/debian/menu glurp-0.12.3/debian/menu --- glurp-0.11.6/debian/menu 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/menu 2010-05-18 11:49:07.000000000 +0100 @@ -1,2 +1,5 @@ -?package(glurp):needs="X11" section="Apps/Sound"\ - title="glurp" command="/usr/bin/glurp" +?package(glurp):needs="X11"\ + section="Applications/Sound"\ + title="Glurp"\ + icon="/usr/share/pixmaps/glurp.xpm"\ + command="/usr/bin/glurp" diff -Nru glurp-0.11.6/debian/patches/00_install_svg_icon.diff glurp-0.12.3/debian/patches/00_install_svg_icon.diff --- glurp-0.11.6/debian/patches/00_install_svg_icon.diff 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/patches/00_install_svg_icon.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,572 +0,0 @@ -diff -Nru debian/glurp-0.11.6/glurp.glade xaiki/glurp-0.11.6/glurp.glade ---- debian/glurp-0.11.6/glurp.glade 2005-06-05 12:38:09.000000000 -0300 -+++ xaiki/glurp-0.11.6/glurp.glade 2006-08-12 00:01:58.000000000 -0300 -@@ -13,11 +13,13 @@ - False - True - False -+ glurp.svg - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_STATIC -+ True - - - -@@ -88,6 +90,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -134,6 +140,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -304,6 +314,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -346,6 +360,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -390,6 +408,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -456,6 +478,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -532,6 +558,10 @@ - 0 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -548,6 +578,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -582,6 +616,10 @@ - 0 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - -@@ -598,6 +636,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - label_item -@@ -664,6 +706,10 @@ - 0 - 0 - volumebar -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -715,6 +761,9 @@ - True - False - False -+ False -+ False -+ False - - - -@@ -811,6 +860,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -854,6 +907,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -875,6 +932,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -918,6 +979,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -934,6 +999,8 @@ - Artist - Album - Filename -+ False -+ True - - - 0 -@@ -956,6 +1023,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1039,11 +1110,13 @@ - False - True - False -+ glurp.svg - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST -+ True - - - -@@ -1087,6 +1160,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1111,6 +1188,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1135,6 +1216,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1325,6 +1410,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1397,6 +1486,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - tab -@@ -1426,6 +1519,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1610,6 +1707,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - tab -@@ -1698,6 +1799,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1770,6 +1875,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -1803,11 +1912,13 @@ - False - True - False -+ glurp.svg - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST -+ True - - - -@@ -1835,6 +1946,9 @@ - False - False - True -+ False -+ False -+ False - - - -@@ -1866,6 +1980,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2006,6 +2124,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2081,6 +2203,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2156,6 +2282,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2231,6 +2361,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2281,11 +2415,13 @@ - 500 - True - False -+ glurp.svg - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST -+ True - - - -@@ -2313,6 +2449,9 @@ - True - False - False -+ False -+ False -+ False - - - -@@ -2344,6 +2483,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 2 -@@ -2385,6 +2528,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 3 -@@ -2400,6 +2547,8 @@ - Album - Title - Filename -+ False -+ True - - - 0 -@@ -2490,6 +2639,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2566,6 +2719,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2642,6 +2799,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2719,6 +2880,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2756,11 +2921,13 @@ - True - False - False -+ glurp.svg - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST -+ True - - - -@@ -2784,6 +2951,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2797,6 +2968,9 @@ - True - True - True -+ False -+ True -+ True - - - 0 -@@ -2861,6 +3035,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -@@ -2937,6 +3115,10 @@ - 0.5 - 0 - 0 -+ PANGO_ELLIPSIZE_NONE -+ -1 -+ False -+ 0 - - - 0 -diff -Nru debian/glurp-0.11.6/glurp.gladep xaiki/glurp-0.11.6/glurp.gladep ---- debian/glurp-0.11.6/glurp.gladep 1969-12-31 21:00:00.000000000 -0300 -+++ xaiki/glurp-0.11.6/glurp.gladep 2006-08-12 00:01:58.000000000 -0300 -@@ -0,0 +1,8 @@ -+ -+ -+ -+ -+ -+ -+ FALSE -+ diff -Nru glurp-0.11.6/debian/patches/01_glurp_svg_path.diff glurp-0.12.3/debian/patches/01_glurp_svg_path.diff --- glurp-0.11.6/debian/patches/01_glurp_svg_path.diff 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/patches/01_glurp_svg_path.diff 1970-01-01 01:00:00.000000000 +0100 @@ -1,47 +0,0 @@ ---- glurp.glade 2005-10-18 18:12:47.000000000 +0200 -+++ /usr/share/glurp/glurp.glade 2006-01-15 04:09:24.000000000 +0100 -@@ -13,7 +13,7 @@ - False - True - False -- glurp.svg -+ /usr/share/pixmaps/glurp.svg - True - False - False -@@ -1110,7 +1110,7 @@ - False - True - False -- glurp.svg -+ /usr/share/pixmaps/glurp.svg - True - False - False -@@ -1912,7 +1912,7 @@ - False - True - False -- glurp.svg -+ /usr/share/pixmaps/glurp.svg - True - False - False -@@ -2415,7 +2415,7 @@ - 500 - True - False -- glurp.svg -+ /usr/share/pixmaps/glurp.svg - True - False - False -@@ -2921,7 +2921,7 @@ - True - False - False -- glurp.svg -+ /usr/share/pixmaps/glurp.svg - True - False - False diff -Nru glurp-0.11.6/debian/rules glurp-0.12.3/debian/rules --- glurp-0.11.6/debian/rules 2010-05-18 11:49:07.000000000 +0100 +++ glurp-0.12.3/debian/rules 2010-05-18 11:49:07.000000000 +0100 @@ -2,5 +2,5 @@ # -*- makefile -*- include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/autotools.mk -include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/class/autotools.mk + diff -Nru glurp-0.11.6/depcomp glurp-0.12.3/depcomp --- glurp-0.11.6/depcomp 2005-03-09 01:34:36.000000000 +0000 +++ glurp-0.12.3/depcomp 2009-08-14 10:32:22.000000000 +0100 @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-02-09.22 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 @@ -16,9 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -86,12 +85,34 @@ depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -178,14 +199,14 @@ ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> $depfile - echo >> $depfile +' ' ' >> "$depfile" + echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -201,34 +222,39 @@ # 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. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -276,6 +302,51 @@ rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +359,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # 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 in $dir.libs/$base.o.d and + # 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 @@ -345,7 +416,7 @@ # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -396,32 +467,39 @@ "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -441,7 +519,7 @@ # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -467,7 +545,8 @@ done "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + 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" @@ -478,13 +557,27 @@ msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -497,16 +590,23 @@ ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -525,5 +625,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff -Nru glurp-0.11.6/glurp.glade glurp-0.12.3/glurp.glade --- glurp-0.11.6/glurp.glade 2005-06-05 16:38:09.000000000 +0100 +++ glurp-0.12.3/glurp.glade 2010-04-17 22:05:05.000000000 +0100 @@ -1,3096 +1,1981 @@ - - - - - - - True - True - GDK_BUTTON_RELEASE_MASK - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_STATIC - - - - - - - 1 - True - 1 - 1 - False - 0 - 0 - - - - True - False - 0 - - - - True - False - 0 - - - - True - False - 0 - - - - True - False - 0 - - - - 65 - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - --:-- - True - GTK_RELIEF_NONE - True - - - - - - - True - Time - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 5 - False - False - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - False - True - 0 - - True - * - False - - - - - - True - Track name - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 5 - True - True - - - - - 0 - False - False - - - - - - True - True - True - True - True - False - GTK_POS_TOP - 0 - GTK_UPDATE_CONTINUOUS - False - 8.22510822511 0 100 1 0 0 - - - - - - 0 - False - False - - - - - - True - False - 4 - - - - True - False - 0 - - - - True - Previous track (z) - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - - True - Play (x) - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - - True - Pause (c) - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - - True - Stop (v) - True - GTK_RELIEF_HALF - False - - - - - - - - 0 - False - False - - - - - - True - Next (b) - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Configuration - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Show/hide playlist (p) - True - GTK_RELIEF_NORMAL - False - False - False - - - - - - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Repeat (e) - True - GTK_RELIEF_NORMAL - False - False - False - - - - - - - - 0 - False - False - - - - - - True - Random (a) - True - GTK_RELIEF_NORMAL - False - False - False - - - - - - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Connect - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - - True - Disconnect - True - GTK_RELIEF_NORMAL - False - - - - - - - - 0 - False - False - - - - - 0 - False - True - - - - - - 70 - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - --- - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0 - 0 - 0 - - - - - - True - Bitrate - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - False - False - - - - - - 60 - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - True - --- - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0 - 0 - 0 - - - - - - True - Mode - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - label_item - - - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - True - True - False - GTK_POS_TOP - 0 - GTK_UPDATE_CONTINUOUS - True - 4.61538461538 0 100 1 0 0 - - - - 0 - False - True - - - - - - True - V -O -L -U -M -E - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - volumebar - - - 0 - False - True - - - - - 0 - False - False - - - - - - False - 0 - - - - 10 - True - - - 0 - False - True - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 150 - True - True - True - True - True - False - False - - - - - - - - - 0 - True - True - - - - - - 10 - True - - - 0 - False - True - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - Add to playlist - True - GTK_RELIEF_NONE - False - False - False - - - - - - - - 0 - False - False - - - - - - True - Remove from playlist - True - GTK_RELIEF_NONE - False - False - False - - - - - - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Load playlist (ctrl-l) - True - GTK_RELIEF_NONE - False - - - - - - - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Find: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - True - True - True - True - True - 0 - - True - * - True - - - - 0 - True - True - - - - - - True - in - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - All -Title -Artist -Album -Filename - - - 0 - False - False - - - - - - 5 - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - MPD outputs - True - GTK_RELIEF_NONE - False - False - False - - - - - - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - False - True - - - - - 0 - True - True - - - - - - True - False - - - 0 - False - False - - - - - 0 - 1 - 0 - 1 - - - - - - - - True - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - - - - - - 5 - True - False - 0 - - - - True - True - True - True - GTK_POS_TOP - False - False - - - - 3 - True - 11 - 3 - False - 0 - 0 - - - - True - Hostname: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - Port: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - Password: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - True - True - False - 0 - - True - * - True - - - 1 - 3 - 4 - 5 - - - - - - - True - True - True - True - 0 - - True - * - True - - - 1 - 3 - 2 - 3 - - - - - - - True - True - True - True - True - 0 - - True - * - True - - - 1 - 3 - 0 - 1 - - - - - - - True - - - 0 - 3 - 1 - 2 - 5 - fill - - - - - - - True - - - 0 - 3 - 3 - 4 - 5 - fill - fill - - - - - - True - - - 0 - 3 - 5 - 6 - 5 - fill - - - - - - 10 - True - - - 0 - 3 - 7 - 8 - fill - - - - - - True - True - Autoconnect to server on start - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 3 - 8 - 9 - fill - - - - - - - True - True - Show playlist on start - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 3 - 9 - 10 - fill - - - - - - - True - Refresh rate [ms]: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 2 - 6 - 7 - - - - - - - True - True - 100 - 0 - True - GTK_UPDATE_IF_VALID - True - False - 100 100 10000 100 1000 1000 - - - 2 - 3 - 6 - 7 - - - - - - - True - True - Remember main window size - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 3 - 10 - 11 - fill - - - - - - False - True - - - - - - True - Main - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - tab - - - - - - True - 8 - 1 - False - 0 - 0 - - - - True - <b>Choose columns you want displayed:</b> - - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - Title - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - Playlist position - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - Filename - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 7 - 8 - fill - - - - - - - True - True - Playlist ID - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - True - Name (Icyname for streams) - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - True - Artist - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 5 - 6 - fill - - - - - - - True - True - Album - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 1 - 6 - 7 - fill - - - - - - False - True - - - - - - True - Playlist columns - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - tab - - - - - 0 - True - True - - - - - - 6 - True - - - 0 - False - True - - - - - - True - GTK_BUTTONBOX_END - 0 - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-cancel - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Cancel - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - - - - True - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-yes - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - OK - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - - - 0 - False - True - - - - - - - - True - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - - - - - - True - False - 0 - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - False - False - True - - - - - - - 3 - True - True - - - - - - True - False - 0 - - - - True - Playlist name: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - True - True - True - True - 0 - - True - * - True - - - 0 - True - True - - - - - 0 - False - False - - - - - - 7 - True - - - 0 - True - True - - - - - - True - True - Append to current playlist - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - 7 - True - - - 0 - True - True - - - - - - True - False - 0 - - - - True - True - GTK_RELIEF_NORMAL - False - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-save - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Save - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - True - True - GTK_RELIEF_NORMAL - False - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-delete - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Delete - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - True - False - - - - - - True - True - GTK_RELIEF_NORMAL - False - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-cancel - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Close - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - True - True - GTK_RELIEF_NORMAL - False - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-redo - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Load - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - True - - - 0 - False - False - - - - - - - - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - False - 400 - 500 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - - - - - - True - False - 0 - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_ALWAYS - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - True - False - False - - - - - - - 0 - True - True - - - - - - True - False - 0 - - - - True - Find: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 2 - False - False - - - - - - True - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - - True - As - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 3 - False - False - - - - - - True - Artist -Album -Title -Filename - - - 0 - False - True - - - - - 2 - False - True - - - - - - 10 - True - - - 0 - False - False - - - - - - True - False - 0 - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-refresh - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Update database - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-find - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Find - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - True - False - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-cancel - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Close - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - True - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-add - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Add - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - 0 - False - False - - - - - - - - 350 - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - - - - - - 5 - True - False - 5 - - - - True - URL: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - True - True - - - 0 - True - True - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-cancel - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Close - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-add - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Add - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - - - - - - - True - Play this song - True - - - - - - - True - - - - - - True - Shuffle playlist - True - - - - - - - - True - Remove selected - True - - - - - - - True - Remove all but selected - True - - - - - - - True - Remove all - True - - - - - - - - - - True - Add selected - True - - - - - - - True - Update selected - True - - - - - - - - - - - True - Add file - True - - - - - - - - True - Add URL - True - - - - - - - - - - - - True - Remove selected - True - - - - - - - - True - Remove all - True - - - - - - - - True - Crop - True - - - - - - - + + + + + + + + + + + + Artist + + + Album + + + Title + + + Filename + + + + + + + + + + + All + + + Title + + + Artist + + + Album + + + Filename + + + + + True + True + GDK_BUTTON_RELEASE_MASK + static + + + + + + True + 1 + + + True + + + True + + + True + + + True + + + 65 + True + 0 + + + True + --:-- + + + + + True + Time + + + + + False + False + 0 + + + + + True + 0 + + + True + False + none + + + + + + True + Track name + + + + + 1 + + + + + False + False + 0 + + + + + True + True + True + True + True + adjustment3 + 0 + False + + + + + + + + False + False + 1 + + + + + True + 4 + + + True + + + True + True + False + Previous track (z) + none + False + + + + + + + False + False + 1 + 0 + + + + + True + True + False + Play (x) + none + False + + + + + + + False + False + 1 + 1 + + + + + True + True + False + Pause (c) + none + False + + + + + + + False + False + 1 + 2 + + + + + True + True + False + Stop (v) + none + False + + + + + + + False + False + 1 + 3 + + + + + True + True + False + Next (b) + none + False + + + + + + + False + False + 1 + 4 + + + + + True + + + False + False + 1 + 5 + + + + + True + True + False + Repeat (t) + none + False + + + + + + + False + False + 1 + 6 + + + + + True + True + False + Random (m) + none + False + + + + + + + False + False + 1 + 7 + + + + + True + + + False + False + 1 + 8 + + + + + True + True + False + Show/hide function notebook(ALT-p) + none + False + + + + + + + False + False + 1 + 9 + + + + + True + True + False + Condensed view + none + + + + + + + False + False + 1 + 10 + + + + + False + 0 + + + + + 70 + True + 0 + + + True + 0 + --- + + + + + True + Bitrate + + + + + False + False + 1 + + + + + 60 + True + 0 + + + True + 0 + --- + + + + + True + Mode + + + + + False + False + 2 + + + + + 2 + + + + + 0 + + + + + True + vertical + + + True + True + True + True + none + True + False + vertical + audio-volume-muted +audio-volume-high +audio-volume-low +audio-volume-medium + + + + False + False + 0 + + + + + True + True + True + none + False + + + + False + False + 1 + + + + + True + True + True + none + False + + + + False + False + 2 + + + + + True + True + True + none + False + + + + False + False + 3 + + + + + False + False + 1 + + + + + False + False + 0 + + + + + True + + + False + 2 + 1 + + + + + True + True + 1 + + + True + True + True + + + False + True + + + + + True + True + True + + + True + + + True + True + automatic + in + + + 150 + True + True + True + True + True + False + True + False + + + + + + + + + 0 + + + + + 10 + True + + + False + 1 + + + + + True + + + True + True + False + Remove from playlist + none + False + + + + + + + False + False + 0 + + + + + True + Find: + + + False + False + 1 + + + + + True + True + True + True + True + 0 + + + + 2 + + + + + True + in + + + False + False + 3 + + + + + True + liststore2 + + + + 0 + + + + + False + False + 4 + + + + + False + 2 + + + + + + + True + + + True + Play_list + True + move_playlist_tab + True + + + False + False + 0 + + + + + True + True + False + none + + + + + + + False + False + 1 + + + + + False + + + + + True + 1 + 2 + + + True + 2 + + + True + Find: + + + False + False + 2 + 0 + + + + + True + True + True + + + + 1 + + + + + True + as + + + False + False + 3 + 2 + + + + + True + liststore1 + + + + 0 + + + + + False + 3 + + + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-find + + + False + False + 0 + + + + + True + _Find + True + + + False + False + 1 + + + + + + + + + False + False + 4 + + + + + False + 0 + + + + + True + True + automatic + in + + + True + True + True + True + True + False + True + False + + + + + + + + 1 + + + + + True + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-refresh + + + False + False + 0 + + + + + True + _Update database + True + + + False + False + 1 + + + + + + + + + False + False + 0 + + + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-add + + + False + False + 0 + + + + + True + _Add + True + + + False + False + 1 + + + + + + + + + False + False + end + 1 + + + + + False + 2 + + + + + 1 + + + + + True + + + True + _Database + True + scrolledwindow_add + True + + + False + False + 0 + + + + + True + True + False + none + + + + + + + False + False + 1 + + + + + 1 + False + + + + + True + + + True + 1 + 5 + + + True + URL: + + + False + False + 0 + + + + + True + 0 + + + True + True + + + + + 1 + + + + + False + 0 + + + + + True + True + in + + + True + True + False + True + + + + + + + 1 + + + + + True + False + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-add + + + False + False + 0 + + + + + True + _Add + True + + + False + False + 1 + + + + + + + + + False + False + 2 + + + + + 2 + + + + + True + + + True + _Streams + True + scrolledwindow_streams + + + False + False + 0 + + + + + True + True + False + none + + + + + + + False + False + 1 + + + + + 2 + False + + + + + True + + + True + True + automatic + in + + + True + True + True + False + + + + + + + 3 + 0 + + + + + True + + + True + Playlist name: + + + False + False + 0 + + + + + True + True + True + True + + + 1 + + + + + False + False + 1 + + + + + 7 + True + + + False + 2 + + + + + True + + + Append to current playlist + True + True + False + True + True + + + 0 + + + + + True + True + False + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-save + + + False + False + 0 + + + + + True + _Save + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + True + True + False + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-delete + + + False + False + 0 + + + + + True + _Delete + True + + + False + False + 1 + + + + + + + + + False + False + 2 + + + + + True + True + False + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-redo + + + False + False + 0 + + + + + True + _Load + True + + + False + False + 1 + + + + + + + + + False + False + 3 + + + + + False + False + 3 + + + + + True + False + + + False + False + 4 + + + + + 3 + + + + + True + + + True + Pla_ylists + True + scrolledwindow_playlist_list + True + + + False + False + 0 + + + + + True + True + False + none + + + + + + + False + False + 1 + + + + + 3 + False + + + + + True + + + True + 3 + 11 + 3 + + + True + 0 + Hostname: + + + GTK_FILL + + + + + + True + 0 + Port: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Password: + + + 4 + 5 + GTK_FILL + + + + + + True + True + False + True + + + 1 + 3 + 4 + 5 + + + + + + True + True + True + + + 1 + 3 + 2 + 3 + + + + + + True + True + True + True + + + 1 + 3 + + + + + + True + + + 3 + 1 + 2 + GTK_FILL + + 5 + + + + + True + + + 3 + 3 + 4 + GTK_FILL + GTK_FILL + 5 + + + + + Autoconnect to server on start + True + True + False + True + True + + + 3 + 8 + 9 + GTK_FILL + + + + + + True + 0 + Refresh rate [ms]: + + + 2 + 6 + 7 + + + + + + True + True + adjustment1 + 100 + True + True + if-valid + + + 2 + 3 + 6 + 7 + + + + + + Remember main window size + True + True + False + True + True + + + 3 + 9 + 10 + GTK_FILL + + + + + + True + + + 3 + 5 + 6 + GTK_FILL + GTK_FILL + 5 + + + + + 10 + True + + + 3 + 7 + 8 + GTK_FILL + GTK_FILL + + + + + Display system-tray icon + True + True + False + True + True + + + 3 + 10 + 11 + GTK_FILL + + + + + + 0 + + + + + True + end + + + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-revert-to-saved + + + False + False + 0 + + + + + True + Revert + True + + + False + False + 1 + + + + + + + + + False + False + 0 + + + + + True + True + True + True + False + + + + True + 0 + 0 + + + True + 2 + + + True + gtk-apply + + + False + False + 0 + + + + + True + Apply + True + + + False + False + 1 + + + + + + + + + False + False + 1 + + + + + False + 1 + + + + + 4 + + + + + True + + + True + C_onfig + True + move_config_tab + True + + + False + False + 0 + + + + + True + True + False + none + + + + + + + False + False + 1 + + + + + 4 + False + + + + + True + True + + + + + 2 + + + + + True + + + False + False + 3 + + + + + + + + + + + True + Play this song + True + + + + + + True + + + + + True + Shuffle playlist + True + + + + + + + True + Remove selected + True + + + + + + True + Remove all but selected + True + + + + + + True + Remove all + True + + + + + + + + True + Add selected + True + + + + + + True + Update selected + True + + + + + + + + + True + Remove selected + True + + + + + + + True + Remove all + True + + + + + + + True + Crop + True + + + + + + + 100 + 100 + 10000 + 100 + 1000 + + + 4.61538461538 + 100 + 1 + + + 6.2251081466700002 + 100 + 1 + + + True + + + True + Remove selected + True + + + + + diff -Nru glurp-0.11.6/glurp.nsi glurp-0.12.3/glurp.nsi --- glurp-0.11.6/glurp.nsi 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/glurp.nsi 2010-04-13 15:09:36.000000000 +0100 @@ -0,0 +1,63 @@ +; glurp.nsi +; +; Glurp installation script for NSIS installer compiler +; By: Daniel Lindenaar + +;-------------------------------- + +Function .onInit + Push $R0 + ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Glurp" "UninstallString" + StrCmp $R0 "" Glurp_NOT_PRESENT + MessageBox MB_OK "Glurp is already installed. Installation will be aborted." + Pop $R0 + Abort + Glurp_NOT_PRESENT: + Pop $R0 +FunctionEnd + +; The name of the installer +Name "Glurp" + +; The file to write +OutFile "glurp_win32_installer.exe" + +; The default installation directory +InstallDir $PROGRAMFILES\glurp +InstallDirRegKey HKLM "Software\glurp" "InstallationDirectory" +;-------------------------------- + +; Pages + +Page directory +Page instfiles +UninstPage uninstConfirm +UninstPage instfiles +;-------------------------------- + +; The stuff to install +Section "Install" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Glurp" "DisplayName" "Glurp simulation tool" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Glurp" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Glurp" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Glurp" "NoRepair" 1 + + ; Set output path to the installation directory. + SetOutPath $INSTDIR + + ; Put file there + File src\glurp.exe + SetOutPath $INSTDIR\data + File pixmaps\*.png + File glurp.glade + + WriteRegStr HKLM "Software\glurp" "InstallationDirectory" $INSTDIR + WriteUninstaller "$INSTDIR\Uninstall.exe" + +SectionEnd ; end the section + +Section "Uninstall" + RMDir /r $INSTDIR + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Glurp" + DeleteRegKey HKLM "Software\glurp" +SectionEnd diff -Nru glurp-0.11.6/Makefile.am glurp-0.12.3/Makefile.am --- glurp-0.11.6/Makefile.am 2005-04-03 02:54:12.000000000 +0100 +++ glurp-0.12.3/Makefile.am 2010-04-17 17:49:04.000000000 +0100 @@ -2,7 +2,7 @@ SUBDIRS = src pixmaps -gladedir = ${datadir}/glurp -glade_DATA = glurp.glade +builderdir = ${datadir}/glurp +builder_DATA = glurp.glade -EXTRA_DIST = ${glade_DATA} +EXTRA_DIST = ${builder_DATA} glurp.nsi diff -Nru glurp-0.11.6/Makefile.in glurp-0.12.3/Makefile.in --- glurp-0.11.6/Makefile.in 2005-06-05 16:24:05.000000000 +0100 +++ glurp-0.12.3/Makefile.in 2010-04-17 23:28:57.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -34,37 +32,61 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - acconfig.h depcomp install-sh missing mkinstalldirs + config.guess config.sub depcomp install-sh missing \ + mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-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 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(gladedir)" -gladeDATA_INSTALL = $(INSTALL_DATA) -DATA = $(glade_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(builderdir)" +DATA = $(builder_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -72,16 +94,39 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -100,6 +145,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +EXTRA_CFLAGS = @EXTRA_CFLAGS@ +EXTRA_LDFLAGS = @EXTRA_LDFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -109,9 +158,8 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -120,6 +168,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -127,40 +176,60 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ SUBDIRS = src pixmaps -gladedir = ${datadir}/glurp -glade_DATA = glurp.glade -EXTRA_DIST = ${glade_DATA} +builderdir = ${datadir}/glurp +builder_DATA = glurp.glade +EXTRA_DIST = ${builder_DATA} glurp.nsi all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -171,15 +240,15 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -195,44 +264,47 @@ $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/acconfig.h - cd $(top_srcdir) && $(AUTOHEADER) +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 -uninstall-info-am: -install-gladeDATA: $(glade_DATA) +install-builderDATA: $(builder_DATA) @$(NORMAL_INSTALL) - test -z "$(gladedir)" || $(mkdir_p) "$(DESTDIR)$(gladedir)" - @list='$(glade_DATA)'; for p in $$list; do \ + test -z "$(builderdir)" || $(MKDIR_P) "$(DESTDIR)$(builderdir)" + @list='$(builder_DATA)'; test -n "$(builderdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ - $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(builderdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(builderdir)" || exit $$?; \ done -uninstall-gladeDATA: +uninstall-builderDATA: @$(NORMAL_UNINSTALL) - @list='$(glade_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ - rm -f "$(DESTDIR)$(gladedir)/$$f"; \ - done + @list='$(builder_DATA)'; test -n "$(builderdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(builderdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(builderdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -258,15 +330,14 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: +$(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -293,16 +364,16 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(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" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -310,14 +381,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -329,92 +400,113 @@ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + 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; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ 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; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -423,6 +515,14 @@ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -449,6 +549,10 @@ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -460,9 +564,11 @@ mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -484,13 +590,15 @@ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -512,8 +620,8 @@ all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(gladedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(builderdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive @@ -535,6 +643,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -554,18 +663,38 @@ html: html-recursive +html-am: + info: info-recursive info-am: -install-data-am: install-gladeDATA +install-data-am: install-builderDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -586,24 +715,27 @@ ps-am: -uninstall-am: uninstall-gladeDATA uninstall-info-am +uninstall-am: uninstall-builderDATA -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-recursive distclean-tags \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-gladeDATA \ - install-info install-info-am install-man install-strip \ + html-am info info-am install install-am install-builderDATA \ + 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-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-gladeDATA uninstall-info-am + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-builderDATA + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/add.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/add.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/condense.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/condense.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/config.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/config.png differ diff -Nru glurp-0.11.6/pixmaps/Makefile.am glurp-0.12.3/pixmaps/Makefile.am --- glurp-0.11.6/pixmaps/Makefile.am 2005-04-10 09:04:52.000000000 +0100 +++ glurp-0.12.3/pixmaps/Makefile.am 2010-04-13 15:09:36.000000000 +0100 @@ -11,9 +11,11 @@ player-next.png \ player-repeat.png \ player-random.png \ + player-tabswitch.png \ online.png offline.png \ outputs.png \ playlist.png playlists.png \ - remove.png + remove.png \ + condense.png EXTRA_DIST = $(glurp_pixmaps_DATA) diff -Nru glurp-0.11.6/pixmaps/Makefile.in glurp-0.12.3/pixmaps/Makefile.in --- glurp-0.11.6/pixmaps/Makefile.in 2005-06-05 16:24:03.000000000 +0100 +++ glurp-0.12.3/pixmaps/Makefile.in 2010-04-17 23:28:57.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -34,6 +32,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = pixmaps DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -43,6 +43,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -50,14 +51,26 @@ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(glurp_pixmapsdir)" -glurp_pixmapsDATA_INSTALL = $(INSTALL_DATA) DATA = $(glurp_pixmaps_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -76,6 +89,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +EXTRA_CFLAGS = @EXTRA_CFLAGS@ +EXTRA_LDFLAGS = @EXTRA_LDFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -85,9 +102,8 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -96,6 +112,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -103,36 +120,56 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ glurp_pixmapsdir = ${datadir}/glurp/pixmaps glurp_pixmaps_DATA = \ add.png \ @@ -145,10 +182,12 @@ player-next.png \ player-repeat.png \ player-random.png \ + player-tabswitch.png \ online.png offline.png \ outputs.png \ playlist.png playlists.png \ - remove.png + remove.png \ + condense.png EXTRA_DIST = $(glurp_pixmaps_DATA) all: all-am @@ -158,14 +197,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu pixmaps/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -183,24 +222,27 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: +$(am__aclocal_m4_deps): install-glurp_pixmapsDATA: $(glurp_pixmaps_DATA) @$(NORMAL_INSTALL) - test -z "$(glurp_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(glurp_pixmapsdir)" - @list='$(glurp_pixmaps_DATA)'; for p in $$list; do \ + test -z "$(glurp_pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(glurp_pixmapsdir)" + @list='$(glurp_pixmaps_DATA)'; test -n "$(glurp_pixmapsdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(glurp_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(glurp_pixmapsdir)/$$f'"; \ - $(glurp_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(glurp_pixmapsdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(glurp_pixmapsdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(glurp_pixmapsdir)" || exit $$?; \ done uninstall-glurp_pixmapsDATA: @$(NORMAL_UNINSTALL) - @list='$(glurp_pixmaps_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(glurp_pixmapsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(glurp_pixmapsdir)/$$f"; \ - done + @list='$(glurp_pixmaps_DATA)'; test -n "$(glurp_pixmapsdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(glurp_pixmapsdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(glurp_pixmapsdir)" && rm -f $$files tags: TAGS TAGS: @@ -209,29 +251,32 @@ distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -240,7 +285,7 @@ all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(glurp_pixmapsdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -262,6 +307,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -280,18 +326,38 @@ html: html-am +html-am: + info: info-am info-am: install-data-am: install-glurp_pixmapsDATA +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -310,17 +376,22 @@ ps-am: -uninstall-am: uninstall-glurp_pixmapsDATA uninstall-info-am +uninstall-am: uninstall-glurp_pixmapsDATA + +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-glurp_pixmapsDATA install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am \ + install-glurp_pixmapsDATA install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ - uninstall-glurp_pixmapsDATA uninstall-info-am + uninstall-glurp_pixmapsDATA + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/media-audiofile.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/media-audiofile.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/offline.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/offline.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/online.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/online.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/outputs.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/outputs.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/player-tabswitch.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/player-tabswitch.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/playlist.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/playlist.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/playlists.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/playlists.png differ Binary files /tmp/JlwqL0B3X1/glurp-0.11.6/pixmaps/remove.png and /tmp/m3K46mA1vY/glurp-0.12.3/pixmaps/remove.png differ diff -Nru glurp-0.11.6/src/comm.c glurp-0.12.3/src/comm.c --- glurp-0.11.6/src/comm.c 2005-06-05 16:44:09.000000000 +0100 +++ glurp-0.12.3/src/comm.c 2010-04-14 21:31:48.000000000 +0100 @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include "structs.h" @@ -31,400 +31,185 @@ #include "gui.h" extern GlurpState *glurp; -extern GladeXML *guixml, *plxml; +extern GtkBuilder *builder; gint glurp_connect() { - if(CONNECTED) { + if(mpd_check_connected(glurp->mpd)) { debug("Already connected"); statusbar_print("Already connected to server"); return 0; } - if(DISCONNECTING || CONNECTING) { - debug("Disconnecting"); - statusbar_print("Connecting or disconnecting from server, please wait"); - return 0; - } - if(!glurp->config->server_host || !strlen(glurp->config->server_host)) { debug("Can not connect, no server set in config"); statusbar_print("Can not connect, no server set in config"); return 0; } - if(!glurp->config->server_port || glurp->config->server_port > 65535) { + if(!glurp->config->server_port || + glurp->config->server_port > 65535 || glurp->config->server_port < 1 ) { debug("Invalid port specified in config"); return 0; } - glurp->conn_state = GLURP_CONN_STATE_CONNECTING; gui_set_connecting(); - glurp->conn = mpd_newConnection(glurp->config->server_host, glurp->config->server_port, 10); - - if(strlen(glurp->config->server_pass)) { - debug("Sending password to server"); - mpd_sendPasswordCommand(glurp->conn, glurp->config->server_pass); - mpd_finishCommand(glurp->conn); - } - - if( check_mpd_error() ) { - glurp_disconnect(); - return 0; + mpd_set_hostname(glurp->mpd, glurp->config->server_host); + mpd_set_password(glurp->mpd, glurp->config->server_pass); + debug("Using password: %s",glurp->config->server_pass); + mpd_set_port(glurp->mpd, glurp->config->server_port); + if (mpd_connect(glurp->mpd)!=MPD_OK) { + gui_set_disconnected(); + debug("Unable to connect"); + statusbar_print("Unable to connect to server: %s:%d", glurp->config->server_host, glurp->config->server_port); } - - debug("Connected to %s:%d", glurp->config->server_host, glurp->config->server_port); - statusbar_print("Connected to server %s:%d", glurp->config->server_host, glurp->config->server_port); - - debug("Server version: %d.%d.%d", glurp->conn->version[0], glurp->conn->version[1], glurp->conn->version[2]); - - title_print(glade_xml_get_widget(guixml, "glurp_window_main"), "%s:%d", glurp->config->server_host, glurp->config->server_port); - - if( !STREAM_CAPABLE_MPD ) { - debug("MPD VERSION TOO OLD, DISCONNECTING"); - glurp_disconnect(); - statusbar_print("MPD version too old, disconnecting"); + if (mpd_send_password(glurp->mpd)!=MPD_OK) { + debug("Invalid password"); + statusbar_print("Invalid password for %s:%d", glurp->config->server_host, glurp->config->server_port); } - - glurp->conn_state = GLURP_CONN_STATE_CONNECTED; - gui_set_connected(); - - debug("Adding a timeout call to gui_update()."); - g_timeout_add(glurp->config->refresh_rate, gui_update_cb, NULL); - return 1; } void glurp_disconnect() { - if( DISCONNECTED ) { - debug("Not connected"); - if( glurp->conn ) { - debug("Closing stale connection"); - mpd_closeConnection(glurp->conn); - glurp->conn = NULL; - } + if (mpd_check_connected(glurp->mpd)) { + mpd_disconnect(glurp->mpd); gui_set_disconnected(); return; } - if( CONNECTED || CONNECTING || DISCONNECTING ) { - glurp->conn_state = GLURP_CONN_STATE_DISCONNECTING; - debug("Disconnecting from server..."); - mpd_closeConnection(glurp->conn); - } - - glurp->conn = NULL; - glurp->prev_song_num = -1; glurp->playlist_version = 0; - glurp->conn_state = GLURP_CONN_STATE_DISCONNECTED; glurp->play_state = MPD_STATUS_STATE_STOP; debug("Disconnected"); gui_set_disconnected(); } -mpd_Status *get_status(gboolean standalone) { - mpd_Status *status = NULL; - - if( !glurp->conn ) { - debug("We're not connected"); - return NULL; - } - - if(standalone) mpd_sendStatusCommand(glurp->conn); - if( !(status = mpd_getStatus(glurp->conn)) ) { - debug("Cannot retrieve mpd status!"); - if( check_mpd_error() ) { - glurp_disconnect(); - return NULL; - } - if(standalone) mpd_finishCommand(glurp->conn); - return NULL; - } - if(standalone) mpd_finishCommand(glurp->conn); - - return status; -} -void update_playlist() { - mpd_InfoEntity *entity; +void update_playlist(long long oldid) { + MpdData *entity; - if( !glurp->conn ) { + if (!mpd_check_connected(glurp->mpd)) { debug("Not connected to server, returning"); return; } statusbar_print("Updating playlist..."); + debug("Updating playlist..."); - clear_playlist(); - - mpd_sendPlaylistInfoCommand(glurp->conn, -1); - - while( (entity = mpd_getNextInfoEntity(glurp->conn)) ) { - if( entity->type != MPD_INFO_ENTITY_TYPE_SONG ) { - mpd_freeInfoEntity(entity); - continue; + for (entity = mpd_playlist_get_changes(glurp->mpd, oldid);entity;entity = mpd_data_get_next(entity)) { + if( entity->type == MPD_DATA_TYPE_SONG ) { + add_song(entity->song); } - - add_song(entity->info.song); - - mpd_freeInfoEntity(entity); } - - mpd_finishCommand(glurp->conn); - if( !check_mpd_error() ) debug("playlist succesfully updated"); - else glurp_disconnect(); + debug("playlist succesfully updated"); + + fix_playlist_length(); } -void clear_playlist() { - GlurpSong *s, *ps = NULL; - - for( s = glurp->playlist; s; s = s->next ) { - if(ps) g_free(ps); - ps = s; - if(s && !s->next) g_free(s); +void fix_playlist_length() { + gint real_length = mpd_playlist_get_playlist_length(glurp->mpd); + gint our_length = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(glurp->gui_playlist), NULL); + GtkTreeIter iter; + while (real_length < our_length ) { + our_length--; + gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_playlist), &iter, NULL, our_length); + gtk_list_store_remove(glurp->gui_playlist, &iter); } - - glurp->playlist = NULL; } - + void get_playlist_list() { - mpd_InfoEntity *entity; - GlurpPl *npl, *pl; - - clear_playlist_list(); + MpdData *entity; + GlurpPl *npl, *pl=NULL; + - if( !glurp->conn ) { + if(! mpd_check_connected(glurp->mpd)) { debug("Not connected to server, returning"); return; } - mpd_sendLsInfoCommand(glurp->conn, ""); + - while( (entity = mpd_getNextInfoEntity(glurp->conn)) ) { - if( entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) { - npl = malloc(sizeof(GlurpPl)); - npl->name = g_strdup(entity->info.playlistFile->path); + for (entity = mpd_database_get_directory(glurp->mpd, "");entity;entity = mpd_data_get_next(entity)) { + if ( entity->type == MPD_DATA_TYPE_PLAYLIST ) { + npl = g_new(GlurpPl,1); + npl->name = g_strdup(entity->playlist->path); npl->next = NULL; debug("Received playlist '%s'", npl->name); - for( pl = glurp->playlists; pl && pl->next; pl = pl->next ) {} - - if(pl) pl->next = npl; - else glurp->playlists = npl; + if(pl) { + pl->next = npl; + } else { + glurp->playlists = npl; + } + + pl = npl; + } - mpd_freeInfoEntity(entity); } - mpd_finishCommand(glurp->conn); - if( !check_mpd_error() ) debug("list of playlists loaded"); - else glurp_disconnect(); -} - -void clear_playlist_list() { - GlurpPl *s, *ps = NULL; - - for( s = glurp->playlists; s; s = s->next ) { - if(ps) g_free(ps); - ps = s; - if(s && !s->next) g_free(s); - } - - glurp->playlists = NULL; } void load_playlist(gchar *name) { - if( !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(plxml, "checkbutton_append_playlist"))) ) { + if( !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "checkbutton_append_playlist"))) ) { debug("clearing mpd playlist"); - mpd_sendClearCommand(glurp->conn); - mpd_finishCommand(glurp->conn); - if( check_mpd_error() ) { - glurp_disconnect(); - return; - } + mpd_playlist_clear(glurp->mpd); } debug("loading playlist '%s'", name); - mpd_sendLoadCommand(glurp->conn, name); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return; - } + mpd_playlist_queue_load(glurp->mpd, name); + mpd_playlist_queue_commit(glurp->mpd); } -GlurpSong *glurp_get_nth_song(gint n) { - GlurpSong *s = NULL; - gint i = 0; - - for( s = glurp->playlist; s && inext, i++ ) {} - return s; -} -gboolean check_mpd_error() { - if( glurp && glurp->conn && glurp->conn->error ) { - debug("!!! MPD ERROR: %s", glurp->conn->errorStr); - statusbar_print("Server error: %s", glurp->conn->errorStr); - return TRUE; - } - return FALSE; -} void glurp_add_add_dir(gchar *path, GtkTreePath *gpath) { - mpd_InfoEntity *entity; + MpdData *entity; - if( !gpath && gtk_tree_model_iter_n_children(GTK_TREE_MODEL(glurp->gui_addtree), NULL) ) return; + if( !gpath && ( gtk_tree_model_iter_n_children(GTK_TREE_MODEL(glurp->gui_addtree), NULL) ) ) return; debug("Starting to list '%s'", path); - mpd_sendLsInfoCommand(glurp->conn, path); - - check_mpd_error(); - - while( (entity = mpd_getNextInfoEntity(glurp->conn)) ) { - switch(entity->type) { - case MPD_INFO_ENTITY_TYPE_DIRECTORY: - gui_add_append(g_strdup(entity->info.directory->path), gpath, FALSE); + if (mpd_check_connected(glurp->mpd)) { + + for (entity = mpd_database_get_directory(glurp->mpd, path);entity;entity = mpd_data_get_next(entity)) { + switch(entity->type) { + case MPD_DATA_TYPE_DIRECTORY: + gui_add_append(g_strdup(entity->directory), gpath, FALSE); break; - case MPD_INFO_ENTITY_TYPE_SONG: - gui_add_append(g_strdup(entity->info.song->file), gpath, TRUE); - break; - } - - mpd_freeInfoEntity(entity); - } - - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return; + case MPD_DATA_TYPE_SONG: + gui_add_append(g_strdup(entity->song->file), gpath, TRUE); + break; + default: + break; + } + } } - } void glurp_add_search_result_dir(const gchar *what, gint type, GtkTreePath *gpath) { - mpd_InfoEntity *entity; + MpdData *entity; debug("Starting to search for '%s' with type %d", what, type); if( what == NULL || !strlen(what) ) return; - mpd_sendSearchCommand(glurp->conn, type, what); - - check_mpd_error(); - - while( (entity = mpd_getNextInfoEntity(glurp->conn)) ) { + + for (entity = mpd_database_find(glurp->mpd, type, (gchar*)what, FALSE);entity;entity = mpd_data_get_next(entity)) { switch(entity->type) { - case MPD_INFO_ENTITY_TYPE_DIRECTORY: - gui_add_append(g_strdup(entity->info.directory->path), gpath, FALSE); + case MPD_DATA_TYPE_DIRECTORY: + gui_add_append(g_strdup(entity->directory), gpath, FALSE); + break; + case MPD_DATA_TYPE_SONG: + gui_add_append(g_strdup(entity->song->file), gpath, TRUE); + break; +// case MPD_DATA_TYPE_TAG: +// gui_add_Append(g_strdup(entity->tag), gpath, TRUE); + default: break; - case MPD_INFO_ENTITY_TYPE_SONG: - gui_add_append(g_strdup(entity->info.song->file), gpath, TRUE); - break; - } - - mpd_freeInfoEntity(entity); - } - - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return; - } -} - -gboolean glurp_process_plchanges(mpd_Status *status) { - mpd_InfoEntity *entity; - gboolean changed = FALSE; - - if( status->playlistLength != get_num_songs() ) changed = TRUE; - - while( (entity = mpd_getNextInfoEntity(glurp->conn)) ) { - switch(entity->type) { - case MPD_INFO_ENTITY_TYPE_SONG: - debug("Updating song (id:%d, pos:%d)", entity->info.song->id, entity->info.song->pos); - update_song(entity->info.song); - changed = TRUE; - break; } - mpd_freeInfoEntity(entity); } - - if( status->playlistLength < get_num_songs() ) { - glurp_trim_playlist_end(status->playlistLength - 1); - gui_trim_playlist_end(status->playlistLength - 1); - } - - if( changed ) debug_print_playlist(); - - glurp->playlist_version = status->playlist; - return changed; } -void glurp_update_song(mpd_Song *song) { - GlurpSong *s; - - if( !(s = get_song_by_pos(song->pos)) ) { - debug("Song not in playlist, adding"); - add_song(song); - return; - } - - debug("Updating song (pos:%d) to id:%d", song->pos, song->id); - - if( s->file && song->file && strcmp(s->file, song->file) ) g_free(s->file); - if( song->file ) s->file = g_strdup(song->file); - else s->file = g_strdup(""); - - if( s->artist && song->artist && strcmp(s->artist, song->artist) ) g_free(s->artist); - if( song->artist ) s->artist = g_strdup(song->artist); - else s->artist = g_strdup(""); - - if( s->title && song->title && strcmp(s->title, song->title) ) g_free(s->title); - if( song->title ) s->title = g_strdup(song->title); - else s->title = g_strdup(""); - - if( s->album && song->album && strcmp(s->album, song->album) ) g_free(s->album); - if( song->album ) s->album = g_strdup(song->album); - else s->album = g_strdup(""); - - if( s->track && song->track && strcmp(s->track, song->track) ) g_free(s->track); - if( song->track ) s->track = g_strdup(song->track); - else s->track = g_strdup(""); - - if( s->name && song->name && strcmp(s->name, song->name) ) g_free(s->name); - if( song->name ) s->name = g_strdup(song->name); - else s->name = g_strdup(""); - - s->pos = song->pos; - s->id = song->id; - - s->time = song->time; -} - -void glurp_trim_playlist_end(gint last) { - GlurpSong *lasts = get_song_by_pos(last), *s = lasts->next, *ns; - - debug("Starting trimming beyond pos:%d", last); - - /* cut the linked list */ - if( last == -1 ) { - debug("Purging entire playlist"); - s = glurp->playlist; - glurp->playlist = NULL; - } else if( lasts ) lasts->next = NULL; - - ns = s->next; - - while( s ) { - debug("killing id:%d", s->id); - g_free(s); - s = ns; - if( ns ) ns = ns->next; - } -} +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/comm.h glurp-0.12.3/src/comm.h --- glurp-0.11.6/src/comm.h 2005-06-05 16:43:50.000000000 +0100 +++ glurp-0.12.3/src/comm.h 2010-04-13 15:10:24.000000000 +0100 @@ -25,30 +25,18 @@ gint glurp_connect(); void glurp_disconnect(); -mpd_Status *get_status(gboolean standalone); -void update_playlist(); +void update_playlist(long long oldid); void clear_playlist(); void get_playlist_list(); void clear_playlist_list(); void load_playlist(gchar *name); -GlurpSong *glurp_get_nth_song(gint n); +mpd_Song *glurp_get_nth_song(gint n); gboolean check_mpd_error(); void glurp_add_add_dir(gchar *path, GtkTreePath *gpath); -void glurp_add_search_result_dir(const gchar *what, int type, GtkTreePath *gpath); +void glurp_add_search_result_dir( const gchar *what, gint type, GtkTreePath *gpath); gboolean glurp_process_plchanges(mpd_Status *status); void glurp_update_song(mpd_Song *song); -void glurp_trim_playlist_end(gint last); - -enum { - GLURP_CONN_STATE_DISCONNECTED, - GLURP_CONN_STATE_CONNECTING, - GLURP_CONN_STATE_CONNECTED, - GLURP_CONN_STATE_DISCONNECTING -}; - -#define DISCONNECTED (glurp->conn_state == GLURP_CONN_STATE_DISCONNECTED) -#define CONNECTING (glurp->conn_state == GLURP_CONN_STATE_CONNECTING) -#define CONNECTED (glurp->conn_state == GLURP_CONN_STATE_CONNECTED) -#define DISCONNECTING (glurp->conn_state == GLURP_CONN_STATE_DISCONNECTING) +void fix_playlist_length(); #endif /* __COMM_H */ +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/conf.c glurp-0.12.3/src/conf.c --- glurp-0.11.6/src/conf.c 2005-06-05 16:33:26.000000000 +0100 +++ glurp-0.12.3/src/conf.c 2010-04-14 22:44:57.000000000 +0100 @@ -23,37 +23,37 @@ #include #include #include -#include #include #include +#include "trayicon.h" #include "structs.h" #include "support.h" #include "conf.h" extern GlurpState *glurp; -extern GladeXML *guixml; +extern GtkBuilder *builder; const gboolean config_column_defaults[] = { - FALSE, /* filename */ - TRUE, /* artist */ - TRUE, /* title */ - FALSE, /* album */ - FALSE, /* trackno */ - FALSE, /* name */ - TRUE, /* pl. pos. */ - FALSE, /* id */ + FALSE, /* filename */ + TRUE, /* artist */ + TRUE, /* title */ + FALSE, /* album */ + FALSE, /* trackno */ + FALSE, /* name */ + TRUE, /* pl. pos. */ + FALSE, /* id */ }; gboolean config_column_ready[] = { - FALSE, /* filename */ - FALSE, /* artist */ - FALSE, /* title */ - FALSE, /* album */ - FALSE, /* trackno */ - FALSE, /* name */ - FALSE, /* pl. pos. */ - FALSE, /* id */ + FALSE, /* filename */ + FALSE, /* artist */ + FALSE, /* title */ + FALSE, /* album */ + FALSE, /* trackno */ + FALSE, /* name */ + FALSE, /* pl. pos. */ + FALSE, /* id */ }; GlurpConfig *config_init() { @@ -68,12 +68,13 @@ c->autoconnect = FALSE; c->playlist_vis_on_start = FALSE; c->time_display_left = FALSE; - c->refresh_rate = 500; + c->refresh_rate = 500.0; c->pos_x = -11000; c->pos_y = -11000; c->width = -1; c->height = -1; c->save_size = FALSE; + c->trayicon = FALSE; for( i = 0; i < PL_BOLD; i++ ) c->playlist_columns[i] = FALSE; @@ -86,8 +87,10 @@ gint i = 0; glurp->config = config_init(); - - conf_path = g_strdup_printf("%s/%s", g_strdup(g_get_home_dir()), GLURP_CONFIG_FILE); + if (glurp->alternate_config_file) + conf_path = g_strdup(glurp->alternate_config_file); + else + conf_path = g_strdup_printf("%s/%s", g_strdup(g_get_home_dir()), GLURP_CONFIG_FILE); if( g_file_test(conf_path, G_FILE_TEST_EXISTS) ) { if( !g_file_test(conf_path, G_FILE_TEST_IS_REGULAR) ) { @@ -103,7 +106,6 @@ } else { debug("Config file empty, continuing."); config_set_defaults(); - config_columns_set_remaining(); return TRUE; } @@ -118,14 +120,10 @@ i++; } - config_columns_set_remaining(); - return TRUE; } void config_load_item(const gchar *key, const gchar *value) { - gint i; - debug("%s = %s", key, value); if(!strcmp(key, "server")) { @@ -159,7 +157,7 @@ } if(!strcmp(key, "refresh-rate")) { - glurp->config->refresh_rate = atol(value); + glurp->config->refresh_rate = atof(value); if( glurp->config->refresh_rate < MIN_REFRESH_RATE ) glurp->config->refresh_rate = MIN_REFRESH_RATE; if( glurp->config->refresh_rate > MAX_REFRESH_RATE ) glurp->config->refresh_rate = MAX_REFRESH_RATE; return; @@ -170,14 +168,6 @@ return; } - if(!strcmp(key, "playlist-columns")) { - for( i = 0; i < PL_BOLD; i++ ) { - glurp->config->playlist_columns[i] = yesno(atoi(g_strdup_printf("%c", value[i]))); - config_column_ready[i] = TRUE; - } - return; - } - if(!strcmp(key, "vis-id")) { glurp->config->playlist_columns[PL_POS] = yesno(atoi(value)); config_column_ready[PL_ID] = TRUE; @@ -209,6 +199,11 @@ return; } + if(!strcmp(key, "trayicon")) { + glurp->config->trayicon = yesno(atoi(value)); + return; + } + debug("Invalid config item, ignoring."); return; } @@ -216,11 +211,13 @@ void config_save() { gchar *conf_path = NULL, *stream_history = NULL; FILE *f; - GtkWidget *window_main; - guint i; - gchar cols[PL_BOLD + 1] = ""; + GtkWidget *window_main, *w; + gboolean vis; - conf_path = g_strdup_printf("%s/%s", g_strdup(g_get_home_dir()), GLURP_CONFIG_FILE); + if (glurp->alternate_config_file) + conf_path = g_strdup(glurp->alternate_config_file); + else + conf_path = g_strdup_printf("%s/%s", g_strdup(g_get_home_dir()), GLURP_CONFIG_FILE); if( g_file_test(conf_path, G_FILE_TEST_EXISTS) ) { if( !g_file_test(conf_path, G_FILE_TEST_IS_REGULAR) ) { @@ -255,18 +252,22 @@ debug("autoconnect = %d", yesno(glurp->config->autoconnect)); } - if( glurp->config->playlist_vis_on_start ) { - g_fprintf(f, "playlist-visible-on-start = %d\n", yesno(glurp->config->playlist_vis_on_start)); - debug("playlist-visible-on-start = %d", yesno(glurp->config->playlist_vis_on_start)); - } + w = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_playlist")); +// if( glurp->config->playlist_vis_on_start ) { + if( (vis = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) ) { + debug("playlist visible"); + g_fprintf(f, "playlist-visible-on-start = %d\n", yesno(vis)); + debug("playlist-visible-on-start = %d", yesno(vis)); + } else + debug("playlist not visible"); if( glurp->config->time_display_left ) { g_fprintf(f, "time-display-left = %d\n", yesno(glurp->config->time_display_left)); debug("time-display-left = %d", yesno(glurp->config->time_display_left)); } - g_fprintf(f, "refresh-rate = %ld\n", glurp->config->refresh_rate); - debug("refresh-rate = %ld", glurp->config->refresh_rate); + g_fprintf(f, "refresh-rate = %f\n", glurp->config->refresh_rate); + debug("refresh-rate = %f", glurp->config->refresh_rate); if( glurp->stream_history ) { stream_history = dump_stream_history(); @@ -275,15 +276,15 @@ g_free(stream_history); } - window_main = glade_xml_get_widget(guixml, "glurp_window_main"); + window_main = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")); + -/* if( glurp->config->pos_x != -11000 && glurp->config->pos_y != -11000 ) { g_fprintf(f, "window-x = %d\nwindow-y = %d\n", glurp->config->pos_x, glurp->config->pos_y); debug("window-x = %d", glurp->config->pos_x); debug("window-y = %d", glurp->config->pos_y); } -*/ + if( glurp->config->save_size ) { g_fprintf(f, "save-size = %d\n", yesno(glurp->config->save_size)); @@ -296,11 +297,10 @@ debug("height = %d", glurp->config->height); } - for( i = 0; i < PL_BOLD; i++ ) - sprintf(cols + strlen(cols), "%d", glurp->config->playlist_columns[i]); - - g_fprintf(f, "playlist-columns = %s", cols); - debug("playlist-columns = %s", cols); + if( glurp->config->trayicon ) { + g_fprintf(f, "trayicon = %d\n", yesno(glurp->config->trayicon)); + debug("trayicon = %d", yesno(glurp->config->trayicon)); + } debug("Config file saved"); @@ -311,11 +311,4 @@ if( glurp->config->server_host ) g_free(glurp->config->server_host); glurp->config->server_host = g_strdup("localhost"); } - -void config_columns_set_remaining() { - gint i; - - for( i = 0; i < PL_BOLD; i++ ) { - if( !config_column_ready[i] ) glurp->config->playlist_columns[i] = config_column_defaults[i]; - } -} +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/conf.h glurp-0.12.3/src/conf.h --- glurp-0.11.6/src/conf.h 2005-04-03 03:50:36.000000000 +0100 +++ glurp-0.12.3/src/conf.h 2010-04-13 15:10:24.000000000 +0100 @@ -23,12 +23,12 @@ #ifndef __CONF_H #define __CONF_H -#define GLURP_CONFIG_FILE ".glurp" +#define GLURP_CONFIG_FILE ".glurp" -#define NUM_SETTINGS 50 -#define MPD_PORT 6600 -#define MIN_REFRESH_RATE 100 -#define MAX_REFRESH_RATE 10000 +#define NUM_SETTINGS 50 +#define MPD_PORT 6600 +#define MIN_REFRESH_RATE 100 +#define MAX_REFRESH_RATE 10000 GlurpConfig *config_init(); gboolean config_load(); @@ -37,7 +37,8 @@ void config_set_defaults(); void config_columns_set_remaining(); -#define yesno(i) (i ? TRUE : FALSE) -#define zeroone(expr) (expr ? 1 : 0) +#define yesno(i) (i ? TRUE : FALSE) +#define zeroone(expr) (expr ? 1 : 0) #endif /* __CONF_H */ +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/gui.c glurp-0.12.3/src/gui.c --- glurp-0.11.6/src/gui.c 2005-06-05 20:02:57.000000000 +0100 +++ glurp-0.12.3/src/gui.c 2010-04-17 17:49:40.000000000 +0100 @@ -21,9 +21,10 @@ */ #include +#include #include -#include #include +#include #include "structs.h" #include "support.h" @@ -31,14 +32,130 @@ #include "conf.h" #include "player.h" #include "gui.h" +#include "trayicon.h" +#include "traymenu.h" -extern GladeXML *guixml, *configxml, *plxml, *addxml, *streamxml; +#define SONG_SCROLL 500 + +extern GtkBuilder* builder; extern GlurpState *glurp; +void gui_build_icon_factory(){ + int i; + static char* image_files[] = + { "player-prev.png", + "player-play.png", + "player-pause.png", + "player-stop.png", + "player-next.png", + "player-repeat.png", + "player-random.png", + "player-tabswitch.png", + "playlist.png", + "online.png", + "offline.png", + "remove.png", + "outputs.png", + "condense.png", + "media-audiofile.png", + NULL + }; + static char* icon_names[] = + { "glurp-prev", + "glurp-play", + "glurp-pause", + "glurp-stop", + "glurp-next", + "glurp-repeat", + "glurp-random", + "glurp-tabswitch", + "glurp-playlist", + "glurp-online", + "glurp-offline", + "glurp-remove", + "glurp-outputs", + "glurp-condense", + "glurp-media-audiofile", + NULL + }; + + GtkIconSet* newSet; + + gtk_icon_size_register("glurp_condensed", 10, 10); + glurp->icon_factory = gtk_icon_factory_new(); + + for (i=0;image_files[i]!=NULL; i++) { + newSet = gtk_icon_set_new_from_pixbuf(get_pixbuf_from_name(image_files[i])); + gtk_icon_factory_add(glurp->icon_factory, icon_names[i], newSet); + } + gtk_icon_factory_add_default(glurp->icon_factory); +} + +void gui_show_song_name() { + gchar title[1024]; + + /* check if there is a current song */ + if (!glurp->current_song) return; + + mpd_song_markup(title, 1023, "[%artist% - %title%]|%name%|%file%", glurp->current_song); + gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder, "entry_trackname")), title); + trayicon_set_text(glurp->trayicon, title); + + debug("Moving playlist focus to #%d", glurp->current_song->pos); + g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_scroll_cb, GINT_TO_POINTER(glurp->current_song->pos), NULL); + g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_hilight_cb, GINT_TO_POINTER(glurp->current_song->pos), NULL); + //g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_hilight, GINT_TO_POINTER(status->song), NULL); + gui_check_scroll(); +} + +void gui_check_scroll() { + GtkWidget *wi = GTK_WIDGET(gtk_builder_get_object(builder, "entry_trackname")); + int width; + pango_layout_get_pixel_size(gtk_entry_get_layout(GTK_ENTRY(wi)), &width, NULL); + if( width > glurp->trackname_width ) { + debug("Starting song scroll"); + if (glurp->scroll == 0) g_timeout_add(SONG_SCROLL, gui_trackname_scroll, NULL); + glurp->scroll=1; + } else { + debug("Song changed, stopping titlebar scrolling"); + glurp->scroll = 0; + } +} + +void gui_init_notebooks() { + static gchar* tabs[][2] = { + {"move_playlist_tab","glurp_playlist_label"}, + {"move_database_tab","glurp_database_label"}, + {"move_streams_tab","glurp_streams_label"}, + {"move_playlists_tab","glurp_playlists_label"}, + {"move_config_tab","glurp_config_label"}}; + GtkNotebook *notebook = GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook1")); + GtkWidget* wi; + GtkRcStyle* style; + gint tab; + + for (tab=gtk_notebook_get_n_pages(notebook)-1; tab>=0; tab--) { + wi = gtk_notebook_get_nth_page(notebook, tab); + g_object_set(G_OBJECT(wi), "user_data", GINT_TO_POINTER(tab), NULL); + wi = GTK_WIDGET(gtk_builder_get_object(builder, tabs[tab][0])); + gtk_label_set_mnemonic_widget(GTK_LABEL(gtk_builder_get_object(builder,tabs[tab][1])), gtk_notebook_get_tab_label(notebook, wi)); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-tabswitch", gtk_icon_size_from_name ("glurp_condensed") ) ); + style = gtk_widget_get_modifier_style(wi); + style->xthickness = 0; + style->ythickness = 0; + gtk_widget_modify_style(wi, style); + gtk_widget_show_all(wi); + } +} + /* this should only be called at startup */ gboolean glurp_init_gui() { - GtkWidget *window_main = NULL; -/* PangoFontDescription *time_font; + gchar *builder_file; + GtkWidget *window_main = NULL, *wi = NULL; + GtkCellRenderer *rend; + GtkTreeViewColumn *col; + GtkTreeView *tv; + /* PangoFontDescription *time_font; time_font = pango_font_description_from_string("Sans 14");*/ @@ -46,222 +163,273 @@ glurp->gui_playlist = NULL; debug("Trying to load glurp.glade from installed directory first"); - - if( !(guixml = glade_xml_new( glade_path(), NULL, NULL )) ) { - debug("Could not load glade file, giving up. Goodnight."); + + builder_file = builder_path(); + debug("Using %s.", builder_file); + builder = gtk_builder_new (); + if(!gtk_builder_add_from_file(builder, builder_file, NULL)) { + debug("Could not load builder file, giving up. Goodnight."); } - - glade_xml_signal_autoconnect( guixml ); + g_free(builder_file); - create_playlist_liststore(); + gtk_builder_connect_signals (builder, NULL); - gtk_tree_view_set_reorderable(GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")), TRUE); + create_playlist_liststore(); - gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(guixml, "combobox_qsearch_type")), GLURP_QSEARCH_ALL); + gtk_tree_view_set_reorderable(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")), TRUE); -/* gtk_widget_modify_font(glade_xml_get_widget(guixml, "button_time"), time_font); */ + gtk_combo_box_set_active(GTK_COMBO_BOX(gtk_builder_get_object(builder, "combobox_qsearch_type")), GLURP_QSEARCH_ALL); + + gtk_notebook_set_current_page(GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook1")), 0); /* put correct icons to player control buttons */ + gui_build_icon_factory(); /* prev */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_prev")), gtk_image_new_from_file(DATADIR "pixmaps/player-prev.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_prev")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_prev")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-prev", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* play */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_play")), gtk_image_new_from_file(DATADIR "pixmaps/player-play.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_play")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_play")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-play", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* pause */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_pause")), gtk_image_new_from_file(DATADIR "pixmaps/player-pause.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_pause")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_pause")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-pause", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* stop */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_stop")), gtk_image_new_from_file(DATADIR "pixmaps/player-stop.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_stop")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_stop")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-stop", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* next */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_next")), gtk_image_new_from_file(DATADIR "pixmaps/player-next.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_next")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_next")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-next", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* connect/disconnect */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_server_disconnect")), gtk_image_new_from_file(DATADIR "pixmaps/offline.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_server_disconnect")); - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_server_connect")), gtk_image_new_from_file(DATADIR "pixmaps/online.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_server_connect")); - - /* config */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_config")), gtk_image_new_from_file(DATADIR "pixmaps/config.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_config")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_server_disconnect")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-offline", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_server_connect")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-online", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* playlist show/hide */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "togglebutton_playlist")), gtk_image_new_from_file(DATADIR "pixmaps/playlist.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "togglebutton_playlist")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_playlist")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-playlist", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* repeat */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "togglebutton_repeat")), gtk_image_new_from_file(DATADIR "pixmaps/player-repeat.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "togglebutton_repeat")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_repeat")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-repeat", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* random */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "togglebutton_random")), gtk_image_new_from_file(DATADIR "pixmaps/player-random.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "togglebutton_random")); - - /* add */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "togglebutton_pl_add")), gtk_image_new_from_file(DATADIR "pixmaps/add.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "togglebutton_pl_add")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_random")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-random", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* remove */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "togglebutton_pl_remove")), gtk_image_new_from_file(DATADIR "pixmaps/remove.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "togglebutton_pl_remove")); - - /* playlists */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "button_playlists")), gtk_image_new_from_file(DATADIR "pixmaps/playlists.png")); - gtk_widget_show_all(glade_xml_get_widget(guixml, "button_playlists")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_pl_remove")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-remove", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); /* outputs */ - gtk_container_add(GTK_CONTAINER(glade_xml_get_widget(guixml, "togglebutton_outputs")), gtk_image_new_from_file(DATADIR "pixmaps/outputs.png")); - + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_outputs")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-outputs", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); + gtk_widget_set_sensitive(wi, FALSE); + /* optionally show playlist */ show_gui_playlist(); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_playlist")); if(glurp->config->playlist_vis_on_start) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_playlist")), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wi), TRUE); } else { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_playlist")), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wi), FALSE); hide_gui_playlist(); } + gui_init_notebooks(); + /* condense */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_condense")); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-condense", GTK_ICON_SIZE_BUTTON) ); + gtk_widget_show_all(wi); + gui_set_disconnected(); - window_main = glade_xml_get_widget( guixml, "glurp_window_main" ); + window_main = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main" )); + glurp->window = window_main; title_print(window_main, NULL); - gui_refresh_playlist_columns(); - -/* a futile attempt to restore saved position - if( glurp->config->pos_x != -11000 && glurp->config->pos_y != -11000 ) - gtk_window_move(GTK_WINDOW(window_main), glurp->config->pos_x, glurp->config->pos_y); -*/ - /* restore window size if requested */ if( glurp->config->width >= 0 && glurp->config->height >= 0 && glurp->config->save_size ) gtk_window_resize(GTK_WINDOW(window_main), glurp->config->width, glurp->config->height); - gtk_window_set_icon(GTK_WINDOW(window_main), gdk_pixbuf_new_from_file(DATADIR "pixmaps/media-audiofile.png", NULL)); + gtk_window_set_icon(GTK_WINDOW(window_main), get_pixbuf_from_name("media-audiofile.png")); + + /* optionally show trayicon */ + glurp->trayicon = trayicon_new(glurp); + glurp->traymenu = traymenu_new(); + traymenu_append_image_item(glurp->traymenu, + GTK_STOCK_MEDIA_PLAY, + G_CALLBACK(traymenu_on_play), + NULL); + traymenu_append_image_item(glurp->traymenu, + GTK_STOCK_MEDIA_PAUSE, + G_CALLBACK(traymenu_on_pause), + NULL); + traymenu_append_image_item(glurp->traymenu, + GTK_STOCK_MEDIA_NEXT, + G_CALLBACK(traymenu_on_next), + NULL); + traymenu_append_image_item(glurp->traymenu, + GTK_STOCK_MEDIA_PREVIOUS, + G_CALLBACK(traymenu_on_prev), + NULL); + traymenu_append_image_item(glurp->traymenu, + GTK_STOCK_MEDIA_STOP, + G_CALLBACK(traymenu_on_stop), + NULL); + traymenu_append_image_item(glurp->traymenu, + GTK_STOCK_QUIT, + G_CALLBACK(traymenu_on_quit), + glurp); + + wi = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_display_trayicon")); + if(glurp->config->trayicon) { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wi), TRUE); + trayicon_show(glurp->trayicon); + } else { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wi), FALSE); + trayicon_hide(glurp->trayicon); + } + statusbar_print("Initializing..."); debug("Showing main window..."); + gtk_widget_show(window_main); + + /* now make sure the main window is actually shown before + * continuing to calculate stuff + */ + while (gtk_events_pending ()) + gtk_main_iteration (); + + debug("stored window position: %dx%d", glurp->config->pos_x, glurp->config->pos_y); + if( glurp->config->pos_x != -11000 && glurp->config->pos_y != -11000 ) + gtk_window_move(GTK_WINDOW(window_main), glurp->config->pos_x, glurp->config->pos_y); + + + /* populate the config tab */ + populate_config(); + /* create the database tab */ + create_gui_add_tree(); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "combo_add_find_type")); + gtk_combo_box_set_active(GTK_COMBO_BOX(wi), 0); + + create_stream_liststore(); + + /* create playlists tab */ + create_playlist_list_liststore(); + + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); + + rend = gtk_cell_renderer_text_new(); + + col = gtk_tree_view_column_new_with_attributes("#", rend, + "text", PL_POS, + "weight", PL_BOLD, + "weight-set", PL_BOLD_SET, + NULL); + gtk_tree_view_column_set_resizable(col, TRUE); + gtk_tree_view_append_column(tv, col); + + col = gtk_tree_view_column_new_with_attributes("Title", rend, + "text", PL_TITLE, + "weight", PL_BOLD, + "weight-set", PL_BOLD_SET, + NULL); + gtk_tree_view_column_set_resizable(col, TRUE); + gtk_tree_view_append_column(tv, col); + + /* workaround to stop a GTK_CRITICAL, + * TODO: need to properly debug that one + */ + gtk_widget_grab_focus(GTK_WIDGET(gtk_builder_get_object(builder, "button_stop"))); + return TRUE; } void populate_config() { GtkWidget *w; - w = glade_xml_get_widget(configxml, "entry_hostname"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "entry_hostname")); if(glurp->config->server_host) gtk_entry_set_text(GTK_ENTRY(w), glurp->config->server_host); - w = glade_xml_get_widget(configxml, "entry_port"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "entry_port")); if(glurp->config->server_port) gtk_entry_set_text(GTK_ENTRY(w), g_strdup_printf("%d", glurp->config->server_port)); - w = glade_xml_get_widget(configxml, "entry_password"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "entry_password")); if(glurp->config->server_pass) gtk_entry_set_text(GTK_ENTRY(w), glurp->config->server_pass); - w = glade_xml_get_widget(configxml, "checkbutton_autoconnect"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_autoconnect")); if(glurp->config->autoconnect) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - w = glade_xml_get_widget(configxml, "checkbutton_save_size"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_save_size")); if(glurp->config->autoconnect) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - w = glade_xml_get_widget(configxml, "checkbutton_playlist_vis"); - if(glurp->config->playlist_vis_on_start) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); + w = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_display_trayicon")); + if(glurp->config->trayicon) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - w = glade_xml_get_widget(configxml, "spinbutton_refresh_rate"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "spinbutton_refresh_rate")); gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), glurp->config->refresh_rate); - w = glade_xml_get_widget(configxml, "checkbutton_col_filename"); - if(glurp->config->playlist_columns[PL_FILENAME]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - - w = glade_xml_get_widget(configxml, "checkbutton_col_artist"); - if(glurp->config->playlist_columns[PL_ARTIST]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - - w = glade_xml_get_widget(configxml, "checkbutton_col_title"); - if(glurp->config->playlist_columns[PL_TITLE]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - - w = glade_xml_get_widget(configxml, "checkbutton_col_album"); - if(glurp->config->playlist_columns[PL_ALBUM]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - - w = glade_xml_get_widget(configxml, "checkbutton_col_name"); - if(glurp->config->playlist_columns[PL_NAME]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - - w = glade_xml_get_widget(configxml, "checkbutton_col_pos"); - if(glurp->config->playlist_columns[PL_POS]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - - w = glade_xml_get_widget(configxml, "checkbutton_col_id"); - if(glurp->config->playlist_columns[PL_ID]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 1); - else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), 0); - } void store_config() { GtkWidget *w; - long nr; + gdouble nr; g_free(glurp->config->server_host); - w = glade_xml_get_widget(configxml, "entry_hostname"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "entry_hostname")); glurp->config->server_host = g_strdup(gtk_entry_get_text(GTK_ENTRY(w))); - w = glade_xml_get_widget(configxml, "entry_port"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "entry_port")); glurp->config->server_port = atoi(gtk_entry_get_text(GTK_ENTRY(w))); g_free(glurp->config->server_pass); - w = glade_xml_get_widget(configxml, "entry_password"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "entry_password")); glurp->config->server_pass = g_strdup(gtk_entry_get_text(GTK_ENTRY(w))); - w = glade_xml_get_widget(configxml, "checkbutton_autoconnect"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_autoconnect")); glurp->config->autoconnect = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - w = glade_xml_get_widget(configxml, "checkbutton_playlist_vis"); - glurp->config->playlist_vis_on_start = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "spinbutton_refresh_rate"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "spinbutton_refresh_rate")); nr = gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)); if( nr != glurp->config->refresh_rate ) { - debug("Refresh rate changed, setting timeout to %dms", nr); + debug("Refresh rate changed, setting timeout to %fms", nr); glurp->refresh_rate_status++; /* a safety check to keep the counter in loop */ if( glurp->refresh_rate_status > 30000 ) glurp->refresh_rate_status = 0; - g_timeout_add(nr, gui_update_cb, GINT_TO_POINTER(glurp->refresh_rate_status)); + g_timeout_add((guint)nr, gui_update_cb, GINT_TO_POINTER((guint)glurp->refresh_rate_status)); glurp->config->refresh_rate = nr; } - w = glade_xml_get_widget(configxml, "checkbutton_save_size"); + w = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_save_size")); glurp->config->save_size = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - w = glade_xml_get_widget(configxml, "checkbutton_col_filename"); - glurp->config->playlist_columns[PL_FILENAME] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "checkbutton_col_artist"); - glurp->config->playlist_columns[PL_ARTIST] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "checkbutton_col_title"); - glurp->config->playlist_columns[PL_TITLE] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "checkbutton_col_album"); - glurp->config->playlist_columns[PL_ALBUM] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "checkbutton_col_name"); - glurp->config->playlist_columns[PL_NAME] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "checkbutton_col_pos"); - glurp->config->playlist_columns[PL_POS] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); - - w = glade_xml_get_widget(configxml, "checkbutton_col_id"); - glurp->config->playlist_columns[PL_ID] = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); + w = GTK_WIDGET(gtk_builder_get_object(builder, "checkbutton_display_trayicon")); + glurp->config->trayicon = yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); + if (yesno(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))) + trayicon_show(glurp->trayicon); + else + trayicon_hide(glurp->trayicon); } void create_playlist_liststore() { @@ -273,46 +441,32 @@ if(glurp->gui_playlist) return; liststore = gtk_list_store_new( - NUM_PL, - G_TYPE_STRING, /* filename */ - G_TYPE_STRING, /* artist */ - G_TYPE_STRING, /* title */ - G_TYPE_STRING, /* album */ - G_TYPE_STRING, /* track */ - G_TYPE_STRING, /* name */ - G_TYPE_INT, /* pos */ - G_TYPE_INT, /* id */ - - G_TYPE_INT, /* bold */ - G_TYPE_BOOLEAN /* bold-set */ - ); + NUM_PL, + G_TYPE_INT, + G_TYPE_STRING, /* title */ + G_TYPE_STRING, /* time */ + G_TYPE_INT, /* id */ + + G_TYPE_INT, /* bold */ + G_TYPE_BOOLEAN /* bold-set */ + ); debug("playlist liststore created"); - tv = glade_xml_get_widget(guixml, "treeview_playlist"); + tv = GTK_WIDGET(gtk_builder_get_object(builder, "treeview_playlist")); gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(liststore)); gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)), GTK_SELECTION_MULTIPLE); rend = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes("Filename", rend, "text", PL_FILENAME, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(column, TRUE); - - column = gtk_tree_view_column_new_with_attributes("Artist", rend, "text", PL_ARTIST, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); + column = gtk_tree_view_column_new_with_attributes("#", rend, "text", PL_POS, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); gtk_tree_view_column_set_resizable(column, TRUE); column = gtk_tree_view_column_new_with_attributes("Title", rend, "text", PL_TITLE, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); gtk_tree_view_column_set_resizable(column, TRUE); - column = gtk_tree_view_column_new_with_attributes("Album", rend, "text", PL_ALBUM, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(column, TRUE); - - column = gtk_tree_view_column_new_with_attributes("Track", rend, "text", PL_TRACK, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(column, FALSE); - - - column = gtk_tree_view_column_new_with_attributes("#", rend, "text", PL_POS, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); + column = gtk_tree_view_column_new_with_attributes("Time", rend, "text", PL_TIME, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); gtk_tree_view_column_set_resizable(column, TRUE); column = gtk_tree_view_column_new_with_attributes("Id", rend, "text", PL_ID, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); @@ -323,8 +477,9 @@ glurp->gui_playlist = liststore; } -void add_song_to_gui_playlist(GlurpSong *song, gint pos) { +void add_song_to_gui_playlist(mpd_Song *song, gint pos) { GtkTreeIter iter; + gchar title[1024]; if( !glurp->gui_playlist ) { debug("No playlist liststore!"); @@ -337,59 +492,38 @@ } gtk_list_store_append(glurp->gui_playlist, &iter); + mpd_song_markup(title, 1023, "[%artist% - %title%]|%name%|%file%", song); - gtk_list_store_set(glurp->gui_playlist, &iter, PL_POS, pos, -1); - - if(song->file && g_utf8_validate(song->file, -1, NULL)) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_FILENAME, song->file, -1); - - if(song->artist && g_utf8_validate(song->artist, -1, NULL)) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_ARTIST, song->artist, -1); - - if(song->title && g_utf8_validate(song->title, -1, NULL)) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_TITLE, song->title, -1); - - if(song->album && g_utf8_validate(song->album, -1, NULL)) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_ALBUM, song->album, -1); - - if(song->track && g_utf8_validate(song->track, -1, NULL)) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_TRACK, song->track, -1); - - if(song->name && g_utf8_validate(song->name, -1, NULL)) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_NAME, song->name, -1); - - if( song->pos ) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_POS, song->pos + 1, -1); - - if( song->id ) - gtk_list_store_set(glurp->gui_playlist, &iter, PL_ID, song->id, -1); + gtk_list_store_set(glurp->gui_playlist, &iter, + PL_POS, song->pos + 1, + PL_TITLE, title, + PL_ID, song->id, + -1); } -void populate_gui_playlist() { - GlurpSong *s = NULL; - gint i = 1; - - gtk_list_store_clear(glurp->gui_playlist); - - for( s = glurp->playlist; s; s = s->next ) { - add_song_to_gui_playlist(s, i); - i++; - } - - statusbar_print("Playlist updated from server"); +void detach_gui_playlist_liststore() { + g_object_ref(glurp->gui_playlist); + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")), NULL); +} +void attach_gui_playlist_liststore() { + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")), GTK_TREE_MODEL(glurp->gui_playlist)); + g_object_unref(glurp->gui_playlist); } + void hide_gui_playlist() { gint width, height; - gtk_widget_hide(glade_xml_get_widget(guixml, "vbox_playlist")); - gtk_window_get_size(GTK_WINDOW(glade_xml_get_widget(guixml, "glurp_window_main")), &width, &height); - gtk_window_resize(GTK_WINDOW(glade_xml_get_widget(guixml, "glurp_window_main")), width, 1); + gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_area"))); + gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(builder, "glurp_notebook_separator"))); + gtk_window_get_size(GTK_WINDOW(gtk_builder_get_object(builder, "glurp_window_main")), &width, &height); + gtk_window_resize(GTK_WINDOW(gtk_builder_get_object(builder, "glurp_window_main")), width, 1); } void show_gui_playlist() { - gtk_widget_show(glade_xml_get_widget(guixml, "vbox_playlist")); + gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder, "glurp_notebook_separator"))); + gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_area"))); } void create_playlist_list_liststore() { @@ -404,7 +538,7 @@ ls = gtk_list_store_new(1, G_TYPE_STRING); - tv = glade_xml_get_widget(plxml, "treeview_playlist_list"); + tv = GTK_WIDGET(gtk_builder_get_object(builder, "treeview_playlist_list")); gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(ls)); rend = gtk_cell_renderer_text_new(); @@ -421,64 +555,52 @@ } void gui_set_connecting() { - gtk_widget_hide(glade_xml_get_widget(guixml, "button_server_disconnect")); - gtk_widget_show(glade_xml_get_widget(guixml, "button_server_connect")); + gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_disconnect"))); + gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_connect"))); + statusbar_print("Connecting"); + gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder, "entry_trackname")), "Connecting..."); } void gui_set_connected() { - mpd_Status *status = NULL; - - if( !(status = get_status(TRUE)) ) { - debug("Couldn't get mpd state, disconnecting"); - glurp_disconnect(); - return; - } + debug("updating gui"); + gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_connect"))); + gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_disconnect"))); - if( status->repeat ) { - debug("MPD repeat is ON"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), TRUE); - } else { - debug("MPD repeat is OFF"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), FALSE); - } - - if( status->random ) { - debug("MPD random is ON"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), TRUE); - } else { - debug("MPD random is OFF"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), FALSE); - } + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "volumebar")), TRUE); - gtk_widget_set_sensitive(glade_xml_get_widget(guixml, "volumebar"), TRUE); - - if( OUTPUTS_CAPABLE_MPD ) - gtk_widget_show_all(glade_xml_get_widget(guixml, "togglebutton_outputs")); + if( OUTPUTS_CAPABLE_MPD(glurp->mpd) ) + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_outputs")), TRUE); + + populate_gui_add_tree(); + get_playlist_list(); + populate_gui_playlist_list(); + populate_stream_liststore(); } void gui_set_disconnected() { - gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(guixml, "entry_trackname")), "Not connected..."); + debug("updating gui"); + gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder, "entry_trackname")), "Not connected..."); - gtk_widget_set_sensitive(glade_xml_get_widget(guixml, "progressbar"), FALSE); - gtk_widget_set_sensitive(glade_xml_get_widget(guixml, "volumebar"), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "progressbar")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "volumebar")), FALSE); - gtk_range_set_value(GTK_RANGE(glade_xml_get_widget(guixml, "progressbar")), 0); - gtk_range_set_value(GTK_RANGE(glade_xml_get_widget(guixml, "volumebar")), 0); + gtk_range_set_value(GTK_RANGE(gtk_builder_get_object(builder, "progressbar")), 0); + gtk_scale_button_set_value(GTK_SCALE_BUTTON(gtk_builder_get_object(builder, "volumebar")), 0); - gtk_button_set_label(GTK_BUTTON(glade_xml_get_widget(guixml, "button_time")), "--:--"); - gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(guixml, "label_bitrate")), "---"); +// gtk_button_set_label(GTK_BUTTON(gtk_builder_get_object(builder, "button_time")), "--:--"); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_time")), "--:--"); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_bitrate")), "---"); - gtk_widget_hide(glade_xml_get_widget(guixml, "button_server_connect")); - gtk_widget_show(glade_xml_get_widget(guixml, "button_server_disconnect")); + gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_connect"))); + gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_disconnect"))); - gtk_widget_hide(glade_xml_get_widget(guixml, "button_pause")); - gtk_widget_show(glade_xml_get_widget(guixml, "button_play")); +// gtk_widget_hide(gtk_builder_get_object(builder, "button_pause")); +// gtk_widget_show(gtk_builder_get_object(builder, "button_play")); - gtk_widget_hide(glade_xml_get_widget(guixml, "togglebutton_outputs")); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_outputs")), FALSE); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), FALSE); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), FALSE); - clear_playlist(); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_repeat")), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_random")), FALSE); gtk_list_store_clear(glurp->gui_playlist); glurp->playlist_version = -1; glurp->scroll = 0; @@ -491,40 +613,22 @@ } gboolean gui_update(gint refresh_rate_status) { - gdouble pos = 0; - GlurpSong *s = NULL; - mpd_Status *status = NULL; - gint tel, e_min, e_sec; - gchar *title; - gboolean changed = FALSE, firstrun = FALSE; - - if( DISCONNECTED || DISCONNECTING ) { - debug("Resetting GUI to disconnected state."); - glurp_disconnect(); - return FALSE; - } + if (!mpd_check_connected(glurp->mpd)) return FALSE; + mpd_status_update(glurp->mpd); // this will call our mpd-callbacks if anything interesting happens + /* detect first run */ - if( !glurp->playlist_version ) firstrun = TRUE; - - if( refresh_rate_status != glurp->refresh_rate_status ) { - return FALSE; +/* if( !glurp->playlist_version || (glurp->playlist_version == -1) ) { + firstrun = TRUE; + debug("first playlist update run"); + update_playlist(); + populate_gui_playlist(); } - - mpd_sendCommandListOkBegin(glurp->conn); - mpd_sendStatusCommand(glurp->conn); - mpd_sendPlChangesCommand(glurp->conn, glurp->playlist_version); - mpd_sendCommandListEnd(glurp->conn); - if( (status = get_status(FALSE)) ) { - mpd_nextListOkCommand(glurp->conn); - changed = glurp_process_plchanges(status); - mpd_finishCommand(glurp->conn); - } else { - glurp_disconnect(); +*/ + if( refresh_rate_status != glurp->refresh_rate_status ) { return FALSE; } - glurp->play_state = status->state; /* PERIODIC: unhilight song */ if( !PLAYING && !PAUSED && glurp->prev_song_num != -1 ) { @@ -532,138 +636,6 @@ glurp->scroll = 0; } -/* PERIODIC: update volumebar */ - gtk_range_set_value(GTK_RANGE(glade_xml_get_widget(guixml, "volumebar")), status->volume); - - -/* PERIODIC: save number of current song */ - glurp->current_song = glurp_get_nth_song(status->song); - -/* PERIODIC: check to see if we need to update the playlist from MPD */ - if( glurp->playlist_version != status->playlist ) { - debug("Playlist version has changed, reloading from server..."); - update_playlist(); - populate_gui_playlist(); - glurp->playlist_version = status->playlist; - } - -/* PERIODIC: update progressbar if a song is playing or paused */ - if(!glurp->progress_dragging) { - if( PLAYING || PAUSED ) { - gtk_widget_set_sensitive(glade_xml_get_widget(guixml, "progressbar"), TRUE); - pos = ((double)status->elapsedTime/(double)status->totalTime)*100; - gtk_range_set_value(GTK_RANGE(glade_xml_get_widget(guixml, "progressbar")), pos); - } else { - gtk_widget_set_sensitive(glade_xml_get_widget(guixml, "progressbar"), FALSE); - gtk_range_set_value(GTK_RANGE(glade_xml_get_widget(guixml, "progressbar")), 0); - } - } - -/* PERIODIC: update song name */ - if( PLAYING || PAUSED ) { - if( !(s = get_nth_song_from_playlist(status->song)) ) { - debug("Could not get song #%d info from playlist", status->song + 1); - statusbar_print("Could not get current song information from server, disconnecting..."); - glurp_disconnect(); - return FALSE; - } - if( s->artist || s->title ) title = g_strdup_printf("%d. %s - %s", status->song + 1, (s->artist ? s->artist : ""), (s->title ? s->title : "")); - else title = g_strdup_printf("%d. %s", status->song + 1, strip_dirs(s->file)); - gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(guixml, "entry_trackname")), title); - g_free(title); - } else { - gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(guixml, "entry_trackname")), "Stopped..."); - } - -/* PERIODIC: update time display */ - if(glurp->config->time_display_left) tel = status->totalTime - status->elapsedTime; - else tel = status->elapsedTime; - e_min = tel/60; - e_sec = tel%60; - gtk_button_set_label(GTK_BUTTON(glade_xml_get_widget(guixml, "button_time")), (const gchar *)g_strdup_printf("%s%02d:%02d", - (glurp->config->time_display_left ? "-" : ""), e_min, e_sec)); - -/* PERIODIC: update bitrate and mode labels */ - if( PLAYING || PAUSED ) { - gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(guixml, "label_bitrate")), g_strdup_printf("%dkbps", status->bitRate)); - gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(guixml, "label_mode")), g_strdup_printf("%s", (status->channels > 2 ? "More" : (status->channels == 2 ? "Stereo" : "Mono" )))); - } else { - gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(guixml, "label_bitrate")), g_strdup("---kbps")); - gtk_label_set_text(GTK_LABEL(glade_xml_get_widget(guixml, "label_mode")), g_strdup("---")); - } - -/* PERIODIC: make display correct button from PLAY and PAUSE duo */ - if( PLAYING ) { - gtk_widget_hide(glade_xml_get_widget(guixml, "button_play")); - gtk_widget_show(glade_xml_get_widget(guixml, "button_pause")); - } else { - gtk_widget_hide(glade_xml_get_widget(guixml, "button_pause")); - gtk_widget_show(glade_xml_get_widget(guixml, "button_play")); - } - -/* PERIODIC: update repeat button */ - if( status->repeat ) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), TRUE); - } else { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), FALSE); - } - -/* PERIODIC: update random button */ - if( status->random ) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), TRUE); - } else { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), FALSE); - } - - if( changed && CONNECTED && (PLAYING || PAUSED) ) { - debug("Moving playlist focus to #%d", status->song); - g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_scroll_cb, GINT_TO_POINTER(status->song), NULL); - g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_hilight_cb, GINT_TO_POINTER(status->song), NULL); - } - -/* PERIODIC: update bold row when song changes */ - if( PLAYING || PAUSED ) { - if( status->song != glurp->prev_song_num ) { - g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_hilight, GINT_TO_POINTER(status->song), NULL); - } - } - -/* reset scrolling if song is changed */ - if( changed ) { - debug("Song changed, stopping titlebar scrolling"); - glurp->scroll = 0; - } - -/* PERIODIC: if appropriate, check that trackname is being scrolled */ - if( (PLAYING || PAUSED) && !glurp->scroll && \ - g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(guixml, "entry_trackname"))), -1) > TRACKNAME_SCROLL_START ) { - debug("Starting song scroll"); - g_timeout_add(200, gui_trackname_scroll, NULL); - glurp->scroll++; - } - -/* PERIODIC: reenable Add window controls if we just finished updating db (>=0.11.0) */ - if( NONBLOCKING_UPDATE_CAPABLE_MPD && !status->updatingDb && glurp->updating_db ) { - statusbar_print("Database updated"); - if( addxml ) { - gui_updating_enable_add_controls(); - populate_gui_add_tree(); - } - glurp->updating_db = FALSE; - } - - if( changed ) { - if( CONNECTED && (PLAYING || PAUSED) ) { - if( firstrun ) { - debug("Moving playlist focus"); -// g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_scroll_cb, GINT_TO_POINTER(status->song), NULL); - } - g_idle_add_full(G_PRIORITY_LOW, (GSourceFunc)gui_playlist_hilight_cb, GINT_TO_POINTER(status->song), NULL); - } - } - - mpd_freeStatus(status); - return TRUE; } @@ -688,7 +660,7 @@ void populate_gui_playlist_list() { GlurpPl *pl; GtkTreeView *tv; - GtkTreeModel *tm; + GtkTreeModel *tm = GTK_TREE_MODEL(glurp->gui_playlist_list); GtkTreePath *path; GtkTreeIter iter; @@ -701,8 +673,7 @@ add_playlist_to_gui_list(pl); } - tv = GTK_TREE_VIEW(glade_xml_get_widget(plxml, "treeview_playlist_list")); - tm = gtk_tree_view_get_model(tv); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist_list")); gtk_tree_model_get_iter_first(tm, &iter); path = gtk_tree_model_get_path(tm, &iter); @@ -714,9 +685,8 @@ } void playlists_window_destroyed() { - if(!plxml && !glurp->gui_playlist_list) return; + if(!glurp->gui_playlist_list) return; debug("playlists window destroyed, cleaning up"); - plxml = NULL; if( G_IS_OBJECT(glurp->gui_playlist_list) ) g_object_unref(G_OBJECT(glurp->gui_playlist_list)); glurp->gui_playlist_list = NULL; } @@ -729,14 +699,14 @@ debug("Scrolling to row #%d", pos + 1); - tv = GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); tm = gtk_tree_view_get_model(tv); gtk_tree_model_iter_nth_child(tm, &iter, NULL, pos); path = gtk_tree_model_get_path(tm, &iter); - gtk_tree_view_set_cursor(tv, path, gtk_tree_view_get_column(tv, PL_TRACK), FALSE); + gtk_tree_view_set_cursor(tv, path, gtk_tree_view_get_column(tv, PL_POS), FALSE); gtk_tree_path_free(path); } @@ -753,7 +723,7 @@ debug("Scrolling to row #%d", pos + 1); - tv = GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); tm = gtk_tree_view_get_model(tv); gtk_tree_model_iter_nth_child(tm, &iter, NULL, pos); @@ -761,7 +731,7 @@ path = gtk_tree_model_get_path(tm, &iter); gtk_tree_view_scroll_to_cell(tv, path, NULL, TRUE, 0.5, 0); - gtk_tree_view_set_cursor(tv, path, gtk_tree_view_get_column(tv, PL_TRACK), FALSE); + gtk_tree_view_set_cursor(tv, path, gtk_tree_view_get_column(tv, PL_POS), FALSE); gtk_tree_path_free(path); @@ -779,7 +749,7 @@ if( pos < -1 ) return FALSE; - tv = GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); tm = gtk_tree_view_get_model(tv); if(glurp->prev_song_num != -1) { @@ -798,25 +768,26 @@ } gboolean gui_trackname_scroll() { - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(guixml, "entry_trackname")); - gint length = g_utf8_strlen(gtk_entry_get_text(entry), -1); + GtkEntry *entry = GTK_ENTRY(gtk_builder_get_object(builder, "entry_trackname")); + gint length; + gint width; + if (!GTK_IS_ENTRY(entry)) return TRUE; + length = g_utf8_strlen(gtk_entry_get_text(entry), -1); + pango_layout_xy_to_index(gtk_entry_get_layout(entry), glurp->trackname_width*PANGO_SCALE, 0, &width, NULL); + width = gtk_entry_layout_index_to_text_index(entry, width); - if( !CONNECTED || !(PLAYING || PAUSED) || length < TRACKNAME_SCROLL_START ) { - debug("Scrolling not started"); - return FALSE; - } if( glurp->scroll == 1 ) { debug("Scrolling started, glurp->scroll = %d", glurp->scroll); - glurp->scroll = TRACKNAME_SCROLL_START; + glurp->scroll = width - 1; } if( glurp->scroll > 0 ) { - if( glurp->scroll <= length ) glurp->scroll++; - else glurp->scroll = - TRACKNAME_SCROLL_START; + if( glurp->scroll < length ) glurp->scroll++; + else glurp->scroll = - width; } else { if( -(glurp->scroll) < length ) glurp->scroll--; - else glurp->scroll = TRACKNAME_SCROLL_START; + else glurp->scroll = width - 1; } if( glurp->scroll > 0 ) @@ -825,45 +796,48 @@ gtk_editable_set_position(GTK_EDITABLE(entry), length + glurp->scroll); if( gtk_widget_is_focus(GTK_WIDGET(entry)) ) - gtk_widget_grab_focus(glade_xml_get_widget(guixml, "treeview_playlist")); + gtk_widget_grab_focus(GTK_WIDGET(gtk_builder_get_object(builder, "treeview_playlist"))); return TRUE; } void add_window_destroyed() { - if( !addxml ) return; debug("'add' window destroyed, cleaning up"); - addxml = NULL; + /* ? */ } void create_gui_add_tree() { GtkWidget *tv; GtkTreeViewColumn *column; GtkCellRenderer *rend, *prend; + GValue val={0}; debug("Creating 'add' treeview..."); if( !glurp->gui_addtree ) { glurp->gui_addtree = gtk_tree_store_new(4, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_INT, - GDK_TYPE_PIXBUF - ); + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_STRING + ); debug("'add' treestore created"); } - tv = glade_xml_get_widget(addxml, "treeview_add"); + tv = GTK_WIDGET(gtk_builder_get_object(builder, "treeview_add")); rend = gtk_cell_renderer_text_new(); prend = gtk_cell_renderer_pixbuf_new(); + g_value_init(&val, G_TYPE_UINT); + g_value_set_uint(&val, GTK_ICON_SIZE_SMALL_TOOLBAR); + g_object_set_property(G_OBJECT(prend), "stock-size", &val); column = gtk_tree_view_column_new(); gtk_tree_view_column_pack_end(column, rend, TRUE); gtk_tree_view_column_set_attributes(column, rend, "text", ADD_NAME, NULL); gtk_tree_view_column_pack_start(column, prend, FALSE); gtk_tree_view_column_set_title(column, "Database"); - gtk_tree_view_column_add_attribute(column, prend, "pixbuf", ADD_ICON); + gtk_tree_view_column_add_attribute(column, prend, "stock_id", ADD_ICON); gtk_tree_view_column_set_resizable(column, FALSE); gtk_tree_view_append_column(GTK_TREE_VIEW(tv), column); @@ -895,7 +869,7 @@ if( !glurp->updating_db ) { debug("Setting 'Add' treeview model"); - gtk_tree_view_set_model(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); } } @@ -911,37 +885,41 @@ /* remove last toplevel item if it's search results */ n = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(glurp->gui_addtree), NULL); - gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_addtree), &iter, NULL, n - 1); - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_addtree), &iter, ADD_NUM_DIRS, &nd, -1); - if( nd == -2 ) { /* last item is search results, let's ixnay it */ - debug("Removing previous search results treeview item"); - gtk_tree_store_remove(glurp->gui_addtree, &iter); + if ( n > 0 ) { + gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_addtree), &iter, NULL, n - 1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_addtree), &iter, ADD_NUM_DIRS, &nd, -1); + if( nd == -2 ) { /* last item is search results, let's ixnay it */ + debug("Removing previous search results treeview item"); + gtk_tree_store_remove(glurp->gui_addtree, &iter); + } } - combo_type = GTK_COMBO_BOX(glade_xml_get_widget(addxml, "combo_add_find_type")); + combo_type = GTK_COMBO_BOX(gtk_builder_get_object(builder, "combo_add_find_type")); debug("Adding a folder for find results"); - find_entry = GTK_ENTRY(glade_xml_get_widget(addxml, "entry_add_find_what")); + find_entry = GTK_ENTRY(gtk_builder_get_object(builder, "entry_add_find_what")); what = gtk_entry_get_text(find_entry); if( what && g_utf8_strlen(what, -1) ) { gtk_tree_store_append(glurp->gui_addtree, &iter, NULL); - gtk_tree_store_set(glurp->gui_addtree, &iter, ADD_ICON, gtk_widget_render_icon(glade_xml_get_widget(addxml, "glurp_window_add"), GTK_STOCK_FIND, GTK_ICON_SIZE_SMALL_TOOLBAR, "icon"), ADD_NAME, "Search results", ADD_NUM_DIRS, -2, -1); + gtk_tree_store_set(glurp->gui_addtree, &iter, ADD_ICON, GTK_STOCK_FIND, ADD_NAME, "Search results", ADD_NUM_DIRS, -2, -1); path = gtk_tree_model_get_path(GTK_TREE_MODEL(glurp->gui_addtree), &iter); glurp_add_search_result_dir( gtk_entry_get_text(find_entry), gtk_combo_box_get_active(combo_type), path); + gtk_tree_view_set_cursor(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), path, NULL, FALSE); } if( !glurp->updating_db ) { debug("Setting 'Add' treeview model"); - gtk_tree_view_set_model(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); } gtk_editable_select_region(GTK_EDITABLE(find_entry), 0, -1); + } void gui_load_selected() { GtkTreeIter iter; - GtkTreeView *tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); + GtkTreeView *tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")); GtkTreeModel *tm; GtkTreeSelection *ts; GList *selected_rows; @@ -960,7 +938,7 @@ gtk_tree_model_get_iter(tm, &iter, (GtkTreePath *)g_list_nth_data(selected_rows, i)); gui_load_song(tm, iter); } - + mpd_playlist_queue_commit(glurp->mpd); return; } @@ -985,15 +963,9 @@ if( fname && g_utf8_strlen(fname, -1) ) { debug("Adding song '%s'", fname); - mpd_sendAddCommand(glurp->conn, fname); - mpd_finishCommand(glurp->conn); + mpd_playlist_queue_add(glurp->mpd, fname); g_free(fname); - if( check_mpd_error() ) { - glurp_disconnect(); - return; - } - } else debug("Invalid song filename"); return; @@ -1001,26 +973,26 @@ void gui_updating_disable_add_controls() { debug("Disabling 'add' controls"); - gtk_widget_set_sensitive(glade_xml_get_widget(addxml, "scrolledwindow_add"), FALSE); - gtk_widget_set_sensitive(glade_xml_get_widget(addxml, "button_add_update"), FALSE); - gtk_widget_set_sensitive(glade_xml_get_widget(addxml, "button_add_add"), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "scrolledwindow_add")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "button_add_update")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "button_add_add")), FALSE); debug("Removing 'Add' treeview model"); - gtk_tree_view_set_model(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), NULL); + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), NULL); } void gui_updating_enable_add_controls() { debug("Enabling 'add' controls"); - gtk_widget_set_sensitive(glade_xml_get_widget(addxml, "scrolledwindow_add"), TRUE); - gtk_widget_set_sensitive(glade_xml_get_widget(addxml, "button_add_update"), TRUE); - gtk_widget_set_sensitive(glade_xml_get_widget(addxml, "button_add_add"), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "scrolledwindow_add")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "button_add_update")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "button_add_add")), TRUE); debug("Setting 'Add' treeview model"); - gtk_tree_view_set_model(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); } void gui_add_fill_dir(GtkTreeIter *iter, gboolean silent) { - GtkTreeView *tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); + GtkTreeView *tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")); GtkTreeModel *tm = gtk_tree_view_get_model(tv); GtkTreeIter child; gint nd; @@ -1065,73 +1037,29 @@ gboolean gui_get_iter_by_pos(GtkTreeIter *iter, gint pos) { GtkTreeModel *tm = GTK_TREE_MODEL(glurp->gui_playlist); - gint cpos = 0; - - if( !gtk_tree_model_get_iter_first(tm, iter) ) { - debug("Couldn't get first iter"); - return FALSE; - } + return gtk_tree_model_iter_nth_child(tm, iter, NULL, pos); +/* gint cpos = 0; + * + * if( !gtk_tree_model_get_iter_first(tm, iter) ) { + * debug("Couldn't get first iter"); + * return FALSE; + * } + * + * while( cpos < pos ) { + * if( !gtk_tree_model_iter_next(tm, iter) ) return FALSE;; + * cpos++; + * } + * return TRUE; + */ - while( cpos < pos ) { - if( !gtk_tree_model_iter_next(tm, iter) ) return FALSE;; - cpos++; - } - - return TRUE; } -void gui_update_song(gint id) { - GlurpSong *s = NULL; - GtkListStore *ls = glurp->gui_playlist; - GtkTreeModel *tm = GTK_TREE_MODEL(ls); - GtkTreeIter iter; - gint spos, i; - - /* get GlurpSong */ - if( !(s = get_song_by_id(id)) ) { - debug("Couldn't get song"); - return; - } - - /* get song position in internal playlist */ - spos = get_song_pos(s); - - if( !gui_get_iter_by_pos(&iter, spos) ) { - debug("Couldn't get requested iter, adding song"); - add_song_to_gui_playlist(s, spos + 1); - return; - } - - /* get GtkTreeIter */ - for(i = 0, gtk_tree_model_get_iter_first(tm, &iter); i < spos; i++, gtk_tree_model_iter_next(tm, &iter) ) {} - - debug("Modifying playlist row..."); - gtk_list_store_set(ls, &iter, PL_FILENAME, s->file, PL_ARTIST, s->artist, PL_TITLE, s->title, PL_ALBUM, s->album, PL_TRACK, s->track, PL_NAME, s->name, PL_POS, s->pos + 1, PL_ID, s->id, -1); -} - -void gui_trim_playlist_end(gint last) { - GtkTreeModel *tm = GTK_TREE_MODEL(glurp->gui_playlist); - GtkTreeIter iter, riter; - GtkTreePath *lpath; - gint i; - - if( last == -1 ) { - debug("Clearing GUI playlist"); - gtk_list_store_clear(glurp->gui_playlist); - return; - } - - /* get the path to last row we want to keep */ - for(i = 0, gtk_tree_model_get_iter_first(tm, &iter); i <= last - 1 && &iter; i++, gtk_tree_model_iter_next(tm, &iter) ) {} - lpath = gtk_tree_model_get_path(tm, &iter); - - while( gtk_tree_model_get_iter(tm, &riter, lpath) && gtk_tree_model_iter_next(tm, &riter) ) - gtk_list_store_remove(glurp->gui_playlist, &riter); -} void create_stream_liststore() { GtkListStore *ls; GtkWidget *tv; + GtkCellRenderer *rend; + GtkTreeViewColumn *col; if(glurp->gui_stream_list) { debug("Stream liststore exists, returning"); @@ -1141,14 +1069,17 @@ debug("Creating stream liststore..."); ls = gtk_list_store_new(1, G_TYPE_STRING); + tv = GTK_WIDGET(gtk_builder_get_object(builder, "streams_treeview")); - tv = glade_xml_get_widget(streamxml, "comboboxentry_stream_url"); + gtk_tree_view_set_model(GTK_TREE_VIEW(tv), GTK_TREE_MODEL(ls)); - gtk_entry_set_activates_default(GTK_ENTRY(GTK_BIN(glade_xml_get_widget(streamxml, "comboboxentry_stream_url"))->child), TRUE); - gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(glade_xml_get_widget(streamxml, "comboboxentry_stream_url"))->child)); + rend = gtk_cell_renderer_text_new(); - gtk_combo_box_set_model(GTK_COMBO_BOX(tv), GTK_TREE_MODEL(ls)); - gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(tv), 0); + col = gtk_tree_view_column_new_with_attributes("#", rend, + "text", 0, + NULL); + gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); + gtk_tree_view_append_column(GTK_TREE_VIEW(tv),col); glurp->gui_stream_list = ls; @@ -1172,9 +1103,8 @@ } void stream_window_destroyed() { - if(!streamxml && !glurp->gui_stream_list) return; + if(!glurp->gui_stream_list) return; debug("playlists window destroyed, cleaning up"); - streamxml = NULL; if( G_IS_OBJECT(glurp->gui_stream_list) ) g_object_unref(G_OBJECT(glurp->gui_stream_list)); glurp->gui_stream_list = NULL; } @@ -1183,86 +1113,26 @@ gchar *text = NULL; GtkWidget *cb = NULL; - if( !streamxml || !glurp->gui_stream_list ) { + if(!glurp->gui_stream_list ) { debug("No combobox"); return NULL; } - cb = glade_xml_get_widget(streamxml, "comboboxentry_stream_url"); - text = (gchar *)gtk_entry_get_text(GTK_ENTRY(GTK_BIN(cb)->child)); - + cb = GTK_WIDGET(gtk_builder_get_object(builder, "streams_entry")); + text = (gchar *)gtk_entry_get_text(GTK_ENTRY(cb)); return text; } -void gui_refresh_playlist_columns() { - GtkTreeViewColumn *col = NULL; - GtkCellRenderer *rend; - GtkTreeView *tv = GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")); - - debug("Starting to update playlist columns"); - - while( (col = gtk_tree_view_get_column(GTK_TREE_VIEW(tv), 0)) ) { - gtk_tree_view_remove_column(tv, col); - } - - rend = gtk_cell_renderer_text_new(); - - if( glurp->config->playlist_columns[PL_POS] ) { - col = gtk_tree_view_column_new_with_attributes("#", rend, "text", PL_POS, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - if( glurp->config->playlist_columns[PL_ID] ) { - col = gtk_tree_view_column_new_with_attributes("Id", rend, "text", PL_ID, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - if( glurp->config->playlist_columns[PL_TITLE] ) { - col = gtk_tree_view_column_new_with_attributes("Title", rend, "text", PL_TITLE, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - if( glurp->config->playlist_columns[PL_NAME] ) { - col = gtk_tree_view_column_new_with_attributes("Name", rend, "text", PL_TITLE, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - if( glurp->config->playlist_columns[PL_ARTIST] ) { - col = gtk_tree_view_column_new_with_attributes("Artist", rend, "text", PL_ARTIST, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - if( glurp->config->playlist_columns[PL_ALBUM] ) { - col = gtk_tree_view_column_new_with_attributes("Album", rend, "text", PL_ALBUM, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - if( glurp->config->playlist_columns[PL_FILENAME] ) { - col = gtk_tree_view_column_new_with_attributes("Filename", rend, "text", PL_FILENAME, "weight", PL_BOLD, "weight-set", PL_BOLD_SET, NULL); - gtk_tree_view_column_set_resizable(col, TRUE); - gtk_tree_view_append_column(tv, col); - } - - debug("Playlist columns updated"); - -} - GtkMenu *populate_outputs_menu() { GtkWidget *menu = gtk_menu_new(); GtkWidget *hbox, *label, *icon; GtkMenuItem *item = NULL; mpd_OutputEntity *output; + MpdData* entity; gint i; - mpd_sendOutputsCommand(glurp->conn); - - while( (output = mpd_getNextOutput(glurp->conn)) ) { + for (entity = mpd_server_get_output_devices(glurp->mpd);entity;entity = mpd_data_get_next(entity) ) { + output = entity->output_dev; debug("%d: %s", output->id, output->name); hbox = GTK_WIDGET(gtk_hbox_new(FALSE, 0)); gtk_widget_show(hbox); @@ -1282,22 +1152,14 @@ label = GTK_WIDGET(gtk_label_new(g_strdup_printf("%d: %s", output->id, output->name))); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - + item = GTK_MENU_ITEM(gtk_menu_item_new()); gtk_container_add(GTK_CONTAINER(item), hbox); gtk_menu_shell_append(GTK_MENU_SHELL(menu), GTK_WIDGET(item)); gtk_widget_show(GTK_WIDGET(item)); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(on_menu_output_activate), (gpointer)i); - g_free(output); - } - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return NULL; } - g_signal_connect(G_OBJECT(menu), "deactivate", G_CALLBACK(on_menu_outputs_deactivate), NULL); return GTK_MENU(menu); @@ -1318,18 +1180,205 @@ if( song ) { gtk_tree_store_append(glurp->gui_addtree, &iter, (gpath ? &iparent : NULL)); - gtk_tree_store_set(glurp->gui_addtree, &iter, 3, gdk_pixbuf_new_from_file(DATADIR "pixmaps/media-audiofile.png", NULL), -1); + gtk_tree_store_set(glurp->gui_addtree, &iter, ADD_ICON, "glurp-media-audiofile", -1); } else { gtk_tree_store_insert(glurp->gui_addtree, &iter, (gpath ? &iparent : NULL), (gpath ? nd : glurp->num_add_dirs)); - if( gpath ) gtk_tree_store_set(glurp->gui_addtree, &iparent, 2, nd+1, -1); + if( gpath ) gtk_tree_store_set(glurp->gui_addtree, &iparent, ADD_NUM_DIRS, nd+1, -1); else glurp->num_add_dirs++; - gtk_tree_store_set(glurp->gui_addtree, &iter, 3, gtk_widget_render_icon(glade_xml_get_widget(guixml, "glurp_window_main"), GTK_STOCK_OPEN, GTK_ICON_SIZE_SMALL_TOOLBAR, "icon"), -1); - gtk_tree_store_set(glurp->gui_addtree, &iter, ADD_NUM_DIRS, -1, -1); + gtk_tree_store_set(glurp->gui_addtree, &iter, ADD_ICON, GTK_STOCK_OPEN, ADD_NUM_DIRS, -1, -1); gtk_tree_store_insert(glurp->gui_addtree, &newchild, &iter, (gpath ? nd : glurp->num_add_dirs)); } gtk_tree_store_set(glurp->gui_addtree, &iter, ADD_NAME, glurp_filename(path), ADD_FILENAME, path, -1); if( gpath ) - gtk_tree_view_expand_row(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), gpath, FALSE); + gtk_tree_view_expand_row(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), gpath, FALSE); +} + +void find_notebook_page(GtkWidget* child, GtkNotebook** notebook, gint* page_num) { + GtkNotebook *notebooks[2] = { + GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook1")), + GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook2")) + }; + if ( ( *page_num = gtk_notebook_page_num(notebooks[0], child) ) >= 0) { + *notebook = notebooks[0]; + } else { + if ( ( *page_num = gtk_notebook_page_num(notebooks[1], child) ) >= 0) { + *notebook = notebooks[1]; + } else { + return; + } + } +} + +void glurp_switch_functional_page(GtkWidget* focus, gboolean next) { + GtkNotebook* notebooks[] = { + GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook1")), + GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook2")) + }; + gint n,nb,tab,tab2; + GtkWidget* w; + gpointer tab_indexp; + if (focus) { + if(GTK_IS_NOTEBOOK(focus)) { + tab = gtk_notebook_get_current_page(GTK_NOTEBOOK(focus)); + w = gtk_notebook_get_nth_page(GTK_NOTEBOOK(focus), tab); + } else { + w = focus; + while(gtk_widget_get_parent(w)) { + if (GTK_IS_NOTEBOOK(gtk_widget_get_parent(w))) { + break; + } else { + w = gtk_widget_get_parent(w); + } + } + if (!gtk_widget_get_parent(w)) w = NULL; + } + } else + w = NULL; + if (w) { + /* w is now the page which had focus while CTRL PG* was pressed */ + g_object_get(G_OBJECT(w), "user_data", &tab_indexp, NULL); + tab = GPOINTER_TO_INT(tab_indexp)+(next?1:-1); + + for (nb = 0; nb < 2; nb++) { + for (n = 0; n < gtk_notebook_get_n_pages(notebooks[nb]);n++) { + g_object_get(G_OBJECT(gtk_notebook_get_nth_page(notebooks[nb], n)), "user_data", &tab_indexp, NULL); + if (tab == GPOINTER_TO_INT(tab_indexp)) { + gtk_notebook_set_current_page(notebooks[nb], n); + gtk_widget_grab_focus(GTK_WIDGET(notebooks[nb])); + return; + } + } + } + return; + } else { + debug("PG{UP,DOWN} was pressed outside the functional area"); + /* something outside the functional notebooks had focus */ + w = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_notebook1")); + tab = gtk_notebook_get_current_page(GTK_NOTEBOOK(w)); + if (tab >= 0) { + g_object_get(G_OBJECT(gtk_notebook_get_nth_page(GTK_NOTEBOOK(w), tab)), "user_data", &tab_indexp, NULL); + tab = GPOINTER_TO_INT(tab_indexp); + } else { + gtk_widget_grab_focus(GTK_WIDGET(notebooks[1])); + return; + } + w = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_notebook2")); + tab2 = gtk_notebook_get_current_page(GTK_NOTEBOOK(w)); + if (tab2 >= 0) { + g_object_get(G_OBJECT(gtk_notebook_get_nth_page(GTK_NOTEBOOK(w), tab2)), "user_data", &tab_indexp, NULL); + tab2 = GPOINTER_TO_INT(tab_indexp); + } else { + gtk_widget_grab_focus(GTK_WIDGET(notebooks[0])); + return; + } + if (tab < tab2) + gtk_widget_grab_focus(GTK_WIDGET(notebooks[next?1:0])); + else + gtk_widget_grab_focus(GTK_WIDGET(notebooks[next?0:1])); + + return; + } +} + + + + +/*void glurp_switch_functional_page(gint tab, gboolean next) { + if ((tab < 0) || (tab > 4)) return; + tab += next?1:-1; + for (nb = 0; nb < 2; nb++) { + for (n = 0; n < gtk_notebook_get_n_pages(notebooks[nb]);n++) { + g_object_get(G_OBJECT(gtk_notebook_get_nth_page(notebooks[nb], n)), "user_data", &tab_indexp, NULL); + if (tab == GPOINTER_TO_INT(tab_indexp)) { + if (n == gtk_notebook_get_current_page(notebooks[nb])) + glurp_switch_functional_page(tab, next); + else + gtk_notebook_set_current_page(notebooks[nb], n); + return; + } + } + } +}*/ + +void functional_notebook_select_playlist() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "playlist_page")), ¬ebook, &page_num); + gtk_notebook_set_current_page(notebook, page_num); +} + +void functional_notebook_select_database() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "database_page")), ¬ebook, &page_num); + gtk_notebook_set_current_page( notebook, page_num ); +} + +void functional_notebook_select_playlists() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "playlists_page")), ¬ebook, &page_num); + gtk_notebook_set_current_page( notebook, page_num ); +} + +void functional_notebook_select_streams() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "streams_page")), ¬ebook, &page_num); + gtk_notebook_set_current_page( notebook, page_num ); +} + +void functional_notebook_select_config() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "config_page")), ¬ebook, &page_num); + gtk_notebook_set_current_page( notebook, page_num ); +} + +gboolean functional_notebook_playlist_selected() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "playlist_page")), ¬ebook, &page_num); + return ( gtk_notebook_get_current_page(notebook) == page_num ); +} + +gboolean functional_notebook_database_selected() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "database_page")), ¬ebook, &page_num); + return ( gtk_notebook_get_current_page(notebook) == page_num ); +} + +gboolean functional_notebook_config_selected() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "config_page")), ¬ebook, &page_num); + return ( gtk_notebook_get_current_page(notebook) == page_num ); +} + +gboolean functional_notebook_streams_selected() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "streams_page")), ¬ebook, &page_num); + return ( gtk_notebook_get_current_page(notebook) == page_num ); +} + +gboolean functional_notebook_playlists_selected() { + GtkNotebook* notebook; + gint page_num; + + find_notebook_page(GTK_WIDGET(gtk_builder_get_object(builder, "playlists_page")), ¬ebook, &page_num); + return ( gtk_notebook_get_current_page(notebook) == page_num ); } +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/gui-callbacks.c glurp-0.12.3/src/gui-callbacks.c --- glurp-0.11.6/src/gui-callbacks.c 2005-06-05 19:58:23.000000000 +0100 +++ glurp-0.12.3/src/gui-callbacks.c 2010-04-17 22:05:05.000000000 +0100 @@ -22,9 +22,13 @@ #include #include -#include +#include #include +#include +#include +#include + #include "structs.h" #include "support.h" #include "comm.h" @@ -32,15 +36,85 @@ #include "player.h" #include "conf.h" -extern GladeXML *guixml, *configxml, *plxml, *addxml, *streamxml; +extern GtkBuilder *builder; extern GlurpState *glurp; + + +void on_move_tab(GtkWidget* tab) { + GtkWidget *label; + GtkWidget *pane; + GtkNotebook *notebook[2] = { + GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook1")), + GTK_NOTEBOOK(gtk_builder_get_object(builder, "glurp_functional_notebook2")) + }; + gpointer tab_indexp; + gint page_num,notebook_num,tab_index, target_pos; + if ( ( page_num = gtk_notebook_page_num(notebook[0], tab) ) >= 0) { + notebook_num = 0; + } else { + if ( ( page_num = gtk_notebook_page_num(notebook[1], tab) ) >= 0) { + notebook_num = 1; + } else { + return; + } + } + /* get the position of this tab */ + g_object_get(G_OBJECT(tab), "user_data", &tab_indexp, NULL); + tab_index = GPOINTER_TO_INT(tab_indexp); + + label = gtk_notebook_get_tab_label(notebook[notebook_num], tab); + g_object_ref(tab); + g_object_ref(label); + gtk_notebook_remove_page(notebook[notebook_num], page_num); + for (target_pos = gtk_notebook_get_n_pages(notebook[1-notebook_num]) - 1 ; target_pos >= 0; target_pos--) { + g_object_get(G_OBJECT(gtk_notebook_get_nth_page(notebook[1-notebook_num], target_pos)), "user_data", &tab_indexp, NULL); + if (tab_index > GPOINTER_TO_INT(tab_indexp)) { + gtk_notebook_insert_page(notebook[1-notebook_num], tab, label, target_pos+1); + break; + } + } + if (target_pos < 0) + gtk_notebook_prepend_page(notebook[1-notebook_num], tab, label); + + if (gtk_notebook_get_n_pages(notebook[notebook_num])==0) { + pane = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_area")); + gtk_paned_set_position(GTK_PANED(pane), (notebook_num==1)?0:pane->allocation.width); + } + if ( gtk_notebook_get_n_pages( notebook[1-notebook_num] ) == 1) { + pane = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_area")); + gtk_paned_set_position(GTK_PANED(pane), pane->allocation.width/2); + } + g_object_unref(tab); + g_object_unref(label); +} + +void on_move_playlist_tab_clicked(GtkWidget *widget, gpointer user_data) { + on_move_tab(GTK_WIDGET(gtk_builder_get_object(builder, "playlist_page"))); +} +void on_move_database_tab_clicked(GtkWidget *widget, gpointer user_data) { + on_move_tab(GTK_WIDGET(gtk_builder_get_object(builder, "database_page"))); +} +void on_move_streams_tab_clicked(GtkWidget *widget, gpointer user_data) { + on_move_tab(GTK_WIDGET(gtk_builder_get_object(builder, "streams_page"))); +} +void on_move_playlists_tab_clicked(GtkWidget *widget, gpointer user_data) { + on_move_tab(GTK_WIDGET(gtk_builder_get_object(builder, "playlists_page"))); +} +void on_move_config_tab_clicked(GtkWidget *widget, gpointer user_data) { + on_move_tab(GTK_WIDGET(gtk_builder_get_object(builder, "config_page"))); +} + + void on_ui_quit(GtkWidget *widget, gpointer user_data) { debug("Quitting Glurp..."); - if( glurp->conn ) glurp_disconnect(); - + if (glurp->mpd) { + if( mpd_check_connected(glurp->mpd) ) glurp_disconnect(); + + mpd_free(glurp->mpd); + } config_save(); gtk_main_quit(); @@ -58,62 +132,215 @@ return FALSE; } -/* called when config button is pressed in main window */ -gboolean on_ui_press_config(GtkWidget *widget, gpointer user_data) { - GtkWidget *window_config; - - if(configxml) { - debug("Config window already shown, returning"); - return FALSE; - } - - debug("Displaying config window..."); - - configxml = glade_xml_new(glade_path(), "glurp_window_config", NULL); - glade_xml_signal_autoconnect(configxml); - - populate_config(); - - window_config = glade_xml_get_widget(configxml, "glurp_window_config"); - - title_print(window_config, "Config"); - - gtk_widget_show(window_config); +static void set_condensed_modifier_style(GtkWidget* widget, gboolean condensed) { + GtkRcStyle* style; + if (condensed) { + style = gtk_widget_get_modifier_style(widget); + style->xthickness = 0; + style->ythickness = 0; + gtk_widget_modify_style(widget, style); + } else + gtk_widget_modify_style(widget, gtk_rc_style_new()); +} + +gboolean on_condense_clicked(GtkWidget *widget, gpointer user_data) { + GtkWidget *wi, *wi2; + guint size; + gint x; + gint y; + + wi = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")); + gtk_window_get_position(GTK_WINDOW(wi), &x, &y); + gtk_widget_hide(wi); + + gboolean condensed = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + size = condensed?gtk_icon_size_from_name ("glurp_condensed"):GTK_ICON_SIZE_BUTTON; + if (condensed) { + debug("switching to condensed style"); + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "frame_bitrate"))); + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "frame_mode"))); + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "volumebar"))); + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "statusbar_main"))); + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "progressbar"))); + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_outputs"))); + if( mpd_check_connected(glurp->mpd) ) + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_connect"))); + else + gtk_widget_hide_all(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_disconnect"))); + + /* remove decoration, but add a border */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")); + gtk_window_set_decorated(GTK_WINDOW(wi), FALSE); + wi2 = gtk_bin_get_child(GTK_BIN(wi)); + g_object_ref(G_OBJECT(wi2)); + gtk_container_remove(GTK_CONTAINER(wi), wi2); + gtk_container_add(GTK_CONTAINER(wi), gtk_frame_new(NULL)); + wi = gtk_bin_get_child(GTK_BIN(wi)); + gtk_frame_set_shadow_type(GTK_FRAME(wi), GTK_SHADOW_ETCHED_OUT); + gtk_widget_show(wi); + gtk_container_add(GTK_CONTAINER(wi), wi2); + g_object_unref(wi2); + gtk_container_set_border_width(GTK_CONTAINER(wi2), 3); + /* remove frames */ + glurp->frame_time = GTK_WIDGET(gtk_builder_get_object(builder, "frame_time")); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "hbox_player_info")); + wi2 = gtk_bin_get_child(GTK_BIN(glurp->frame_time)); + g_object_ref(G_OBJECT(glurp->frame_time)); + g_object_ref(G_OBJECT(wi2)); + gtk_container_remove(GTK_CONTAINER(wi), glurp->frame_time); + gtk_container_remove(GTK_CONTAINER(glurp->frame_time), wi2); + gtk_box_pack_start(GTK_BOX(wi), wi2, FALSE, FALSE, 0); + g_object_unref(G_OBJECT(wi2)); + + glurp->frame_trackname = GTK_WIDGET(gtk_builder_get_object(builder, "frame_trackname")); + wi2 = gtk_bin_get_child(GTK_BIN(glurp->frame_trackname)); + g_object_ref(G_OBJECT(glurp->frame_trackname)); + g_object_ref(G_OBJECT(wi2)); + gtk_container_remove(GTK_CONTAINER(wi), glurp->frame_trackname); + gtk_container_remove(GTK_CONTAINER(glurp->frame_trackname), wi2); + gtk_box_pack_start(GTK_BOX(wi), wi2, TRUE, TRUE, 0); + g_object_unref(G_OBJECT(wi2)); + } else { + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "frame_bitrate"))); + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "frame_mode"))); + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "volumebar"))); + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "statusbar_main"))); + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "progressbar"))); + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_outputs"))); + if( mpd_check_connected(glurp->mpd) ) + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_connect"))); + else + gtk_widget_show_all(GTK_WIDGET(gtk_builder_get_object(builder, "button_server_disconnect"))); + /* replace decoration and remove the border */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")); + gtk_window_set_decorated(GTK_WINDOW(wi), TRUE); + wi = gtk_bin_get_child(GTK_BIN(wi)); + wi2 = gtk_bin_get_child(GTK_BIN(wi)); + g_object_ref(G_OBJECT(wi2)); + gtk_container_remove(GTK_CONTAINER(wi), wi2); + gtk_widget_destroy(wi); + wi = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")); + gtk_container_add(GTK_CONTAINER(wi), wi2); + g_object_unref(wi2); + gtk_container_set_border_width(GTK_CONTAINER(wi2), 0); + /* replace frames */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "hbox_player_info")); +// wi2 = GTK_WIDGET(gtk_builder_get_object(builder, "button_time")); + wi2 = GTK_WIDGET(gtk_builder_get_object(builder, "label_time")); + g_object_ref(G_OBJECT(wi2)); + gtk_container_remove(GTK_CONTAINER(wi), wi2); + gtk_box_pack_start(GTK_BOX(wi), glurp->frame_time, FALSE, FALSE, 5); + gtk_container_add(GTK_CONTAINER(glurp->frame_time), wi2); + g_object_unref(G_OBJECT(glurp->frame_time)); + g_object_unref(G_OBJECT(wi2)); + + wi2 = GTK_WIDGET(gtk_builder_get_object(builder, "entry_trackname")); + g_object_ref(G_OBJECT(wi2)); + gtk_container_remove(GTK_CONTAINER(wi), wi2); + gtk_box_pack_start(GTK_BOX(wi), glurp->frame_trackname, TRUE, TRUE, 5); + gtk_container_add(GTK_CONTAINER(glurp->frame_trackname), wi2); + g_object_unref(G_OBJECT(glurp->frame_trackname)); + g_object_unref(G_OBJECT(wi2)); + } + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_prev")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-prev", size)); + gtk_widget_show_all(wi); + /* prev */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_prev")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-prev", size) ); + gtk_widget_show_all(wi); + /* play */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_play")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-play", size) ); + gtk_widget_show_all(wi); + /* pause */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_pause")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-pause", size) ); + gtk_widget_show_all(wi); + /* stop */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_stop")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-stop", size) ); + gtk_widget_show_all(wi); + /* next */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "button_next")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-next", size) ); + gtk_widget_show_all(wi); + + /* playlist show/hide */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_playlist")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-playlist", size) ); + gtk_widget_show_all(wi); + + /* repeat */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_repeat")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-repeat", size) ); + gtk_widget_show_all(wi); + + /* random */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_random")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-random", size) ); + gtk_widget_show_all(wi); + + /* condense */ + wi = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_condense")); + set_condensed_modifier_style(wi, condensed); + gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(wi))); + gtk_container_add(GTK_CONTAINER(wi), gtk_image_new_from_stock("glurp-condense", size) ); + gtk_widget_show_all(wi); + if (condensed) + gtk_window_resize(GTK_WINDOW(gtk_builder_get_object(builder, "glurp_window_main")), 1,1); + + wi = GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")); + gtk_window_move(GTK_WINDOW(wi), x, y); + gtk_widget_show(wi); return FALSE; +}; + +void on_entry_trackname_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { + glurp->trackname_width = allocation->width; + gui_check_scroll(); } -gboolean on_button_config_cancel_clicked(GtkWidget *widget, gpointer user_data) { - GtkWidget *window_config = glade_xml_get_widget(configxml, "glurp_window_config"); +gboolean on_button_config_revert_clicked(GtkWidget *widget, gpointer user_data) { - debug("Cancel pressed, destroying config window..."); - gtk_widget_destroy(window_config); + debug("Revert, refilling config window..."); + populate_config(); return FALSE; } gboolean on_config_destroy(GtkWidget *widget, gpointer user_data) { - debug("freeing configxml"); - configxml = NULL; - - gui_refresh_playlist_columns(); - return FALSE; } -gboolean on_button_config_ok_clicked(GtkWidget *widget, gpointer user_data) { - GtkWidget *window_config; - - debug("OK pressed, hiding config window..."); +gboolean on_button_config_apply_clicked(GtkWidget *widget, gpointer user_data) { + + debug("Apply pressed, hiding config window..."); debug("Storing variables into GlurpConfig"); store_config(); config_save(); - window_config = glade_xml_get_widget(configxml, "glurp_window_config"); - gtk_widget_destroy(window_config); - statusbar_print("Config saved..."); return FALSE; @@ -130,62 +357,59 @@ } gboolean on_ui_volume_changed(GtkWidget *widget, gpointer user_data) { - gint i = gtk_range_get_value(GTK_RANGE(widget)); - - if( glurp->conn ) { - mpd_sendSetvolCommand(glurp->conn, i); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + gdouble i = gtk_scale_button_get_value(GTK_SCALE_BUTTON(widget)); - statusbar_print("Volume: %d%%", i); + if( mpd_check_connected(glurp->mpd) ) { + mpd_status_set_volume(glurp->mpd, (int)(i*100)); + + statusbar_print("Volume: %d%%", (int)(i*100)); } return FALSE; } gboolean on_ui_progress_change(GtkWidget *widget, gpointer user_data) { - mpd_Status *status = NULL; - double sec, pos, tt; - gint t_min, t_sec, s_min, s_sec; + double pos, tt; if(!glurp->progress_dragging) return FALSE; - status = get_status(TRUE); - - tt = status->totalTime; - - t_min = (int)tt/60; - t_sec = (int)tt%60; + tt = mpd_status_get_total_song_time(glurp->mpd); pos = gtk_range_get_value(GTK_RANGE(widget)); - sec = (pos / 100)*tt; - s_min = (int)sec/60; - s_sec = (int)sec%60; - - debug("Seeking to %d seconds", (gint)sec); - statusbar_print("Seek to %02d:%02d/%02d:%02d", s_min, s_sec, t_min, t_sec); - mpd_sendSeekCommand(glurp->conn, status->song, sec); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } - + debug("Seeking to %d seconds", (gint)pos); + statusbar_print("Seek to %02d:%02d/%02d:%02d", (gint)pos/60, (gint)pos%60, (gint)tt/60, (gint)tt%60); + mpd_player_seek(glurp->mpd, pos); debug("setting FALSE"); glurp->progress_dragging = FALSE; return FALSE; } +gboolean on_ui_progress_change_start_kb(GtkWidget *widget, GdkEventKey *event, + gpointer user_data) { + guint k = event->keyval; + + if( !glurp->progress_dragging && + !(event->state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK|GDK_MOD1_MASK)) && + ((k == GDK_KP_Left) || + (k == GDK_KP_Right) || + (k == GDK_Left) || + (k == GDK_Right) || + (k == GDK_Page_Up) || + (k == GDK_Page_Down) )) { + debug("setting TRUE"); + glurp->progress_dragging = TRUE; + } else if( glurp->progress_dragging ) + return FALSE; + return TRUE; +} + gboolean on_ui_progress_change_start(GtkWidget *widget, gpointer user_data) { - debug("setting TRUE"); - glurp->progress_dragging = TRUE; + if( !glurp->progress_dragging ) { + debug("setting TRUE"); + glurp->progress_dragging = TRUE; + } return FALSE; } @@ -199,7 +423,6 @@ } gboolean on_ui_player_play(GtkWidget *widget, gpointer user_data) { - mpd_Status *status = get_status(TRUE); GtkTreeView *tv; GtkTreeModel *tm; GtkTreeSelection *sel; @@ -208,21 +431,19 @@ gint id, pos, num; GList *selected_rows; - if(!status) { - debug("status == NULL"); - return FALSE; - } + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); + tm = gtk_tree_view_get_model(tv); - if(!glurp->playlist) { + if(!gtk_tree_model_iter_n_children(tm, NULL)) { debug("Nothing loaded in playlist, cannot play"); statusbar_print("Playlist empty"); return FALSE; } - if( status->state == MPD_STATUS_STATE_PAUSE ) player_pause(); + if( PAUSED ) + /* prone to race condition... should be made better. */ + player_pause(); else { - tv = GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")); - tm = gtk_tree_view_get_model(tv); sel = gtk_tree_view_get_selection(tv); @@ -246,7 +467,7 @@ } debug("Getting trackno. of selected song"); - gtk_tree_model_get(tm, &iter, PL_ID, &id, PL_TRACK, &pos, -1); + gtk_tree_model_get(tm, &iter, PL_ID, &id, PL_POS, &pos, -1); debug("Song number is %d, id %d", pos, id); if( num > 1 ) gui_playlist_set_cursor(pos - 1); @@ -281,16 +502,16 @@ return FALSE; } - +#if 0 gboolean on_ui_time_clicked(GtkWidget *widget, gpointer user_data) { if(glurp->config->time_display_left) glurp->config->time_display_left = FALSE; else glurp->config->time_display_left = TRUE; - gtk_widget_grab_focus(glade_xml_get_widget(guixml, "treeview_playlist")); + gtk_widget_grab_focus(GTK_WIDGET(gtk_builder_get_object(builder, "glurp_functional_notebook1"))); return FALSE; } - +#endif gboolean on_ui_playlist_row_activated(GtkTreeView *treeview, GtkTreePath *tp, GtkTreeViewColumn *col, gpointer user_data) { GtkTreeIter act; GtkTreeModel *model; @@ -298,7 +519,7 @@ debug("Playlist item activated."); - if(!glurp->conn) { + if(!mpd_check_connected(glurp->mpd)) { debug("We're not connected, cannot start playing anything."); return FALSE; } @@ -306,65 +527,13 @@ model = gtk_tree_view_get_model(treeview); gtk_tree_model_get_iter(model, &act, tp); gtk_tree_model_get(model, &act, PL_ID, &id, -1); - + player_stop(); player_play_song(id); return FALSE; } -gboolean on_ui_playlists_clicked(GtkWidget *widget, gpointer user_data) { - GtkWidget *window_playlist; - - if(plxml) { - debug("Playlists window already displayed, returning"); - return FALSE; - } - - if( !glurp->conn ) { - debug("we're not connected"); - return FALSE; - } - - plxml = glade_xml_new(glade_path(), "glurp_window_playlist_list", NULL); - glade_xml_signal_autoconnect(plxml); - - get_playlist_list(); - - create_playlist_list_liststore(); - - populate_gui_playlist_list(); - - window_playlist = glade_xml_get_widget(plxml, "glurp_window_playlist_list"); - - title_print(window_playlist, "Playlists"); - - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(plxml, "checkbutton_append_playlist")), FALSE); - - gtk_widget_show(window_playlist); - - return FALSE; -} - -gboolean on_ui_playlist_close(GtkWidget *widget, gpointer user_data) { - GtkWidget *w = glade_xml_get_widget(plxml, "glurp_window_playlist_list"); - - debug("Destroying playlist list window."); - gtk_widget_destroy(w); - - return FALSE; -} - -gboolean on_window_playlists_destroy(GtkWidget *widget, gpointer user_data) { - playlists_window_destroyed(); - return FALSE; -} - -gboolean on_window_add_destroy(GtkWidget *widget, gpointer user_data) { - add_window_destroyed(); - return FALSE; -} - gboolean on_ui_playlist_list_row_activated(GtkTreeView *treeview, GtkTreePath *tp, GtkTreeViewColumn *col, gpointer user_data) { GtkTreeIter act; GtkTreeModel *model; @@ -372,7 +541,7 @@ debug("playlist activated"); - if( !glurp->conn ) { + if( !mpd_check_connected(glurp->mpd) ) { debug("we're not connected, how can this be?"); return FALSE; } @@ -384,11 +553,6 @@ load_playlist(name); g_free(name); - debug("Destroying playlist list window."); - gtk_widget_destroy(glade_xml_get_widget(plxml, "glurp_window_playlist_list")); - - playlists_window_destroyed(); - return FALSE; } @@ -400,13 +564,12 @@ GtkTreeIter iter; gchar *name; - if( !glurp->conn ) { - debug("We're not connected, how can this be? Just closing the window"); - gtk_widget_destroy(glade_xml_get_widget(configxml, "glurp_window_playlist_list")); + if( !mpd_check_connected(glurp->mpd) ) { + debug("We're not connected, how can this be?"); return FALSE; } - tv = GTK_TREE_VIEW(glade_xml_get_widget(plxml, "treeview_playlist_list")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist_list")); tm = gtk_tree_view_get_model(tv); sel = gtk_tree_view_get_selection(tv); @@ -421,11 +584,6 @@ load_playlist(name); g_free(name); - debug("Destroying playlist list window."); - gtk_widget_destroy(glade_xml_get_widget(plxml, "glurp_window_playlist_list")); - - playlists_window_destroyed(); - return FALSE; } @@ -437,13 +595,12 @@ GtkTreeIter iter; gchar *name; - if( !glurp->conn ) { - debug("We're not connected, how can this be? Just closing the window"); - gtk_widget_destroy(glade_xml_get_widget(configxml, "glurp_window_playlist_list")); + if( !mpd_check_connected(glurp->mpd) ) { + debug("We're not connected, how can this be?"); return FALSE; } - tv = GTK_TREE_VIEW(glade_xml_get_widget(plxml, "treeview_playlist_list")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist_list")); tm = gtk_tree_view_get_model(tv); sel = gtk_tree_view_get_selection(tv); @@ -454,30 +611,22 @@ gtk_tree_model_get(tm, &iter, 0, &name, -1); - mpd_sendRmCommand(glurp->conn, name); - - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + mpd_database_delete_playlist(glurp->mpd, name); debug("Playlist '%s' deleted", name); g_free(name); get_playlist_list(); populate_gui_playlist_list(); - return FALSE; } gboolean on_ui_playlist_save(GtkWidget *widget, gpointer user_data) { - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(plxml, "entry_playlist_name")); + GtkEntry *entry = GTK_ENTRY(gtk_builder_get_object(builder, "entry_playlist_name")); gchar *name = (gchar *)gtk_entry_get_text(entry); GlurpPl *pl; - if( !glurp->conn ) { + if( !mpd_check_connected(glurp->mpd) ) { debug("We're not connected, how can this be? Ignoring"); return FALSE; } @@ -494,13 +643,7 @@ } } - mpd_sendSaveCommand(glurp->conn, name); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + mpd_database_save_playlist(glurp->mpd, name); debug("Playlist '%s' saved", name); get_playlist_list(); @@ -514,7 +657,7 @@ double sec, tt; gint t_min, t_sec, s_min, s_sec; - if( !glurp->conn || !glurp->current_song ) return FALSE; + //if( !glurp->conn || !glurp->current_song ) return FALSE; if( !glurp->progress_dragging ) return FALSE; @@ -523,7 +666,7 @@ t_min = (int)tt/60; t_sec = (int)tt%60; - sec = (pos / 100)*tt; + sec = pos; s_min = (int)sec/60; s_sec = (int)sec%60; @@ -539,13 +682,12 @@ GtkTreeIter iter; gchar *name; - if( !glurp->conn ) { - debug("We're not connected, how can this be? Just closing the window"); - gtk_widget_destroy(glade_xml_get_widget(configxml, "glurp_window_playlist_list")); + if( !mpd_check_connected(glurp->mpd) ) { + debug("We're not connected, how can this be?"); return FALSE; } - tv = GTK_TREE_VIEW(glade_xml_get_widget(plxml, "treeview_playlist_list")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist_list")); tm = gtk_tree_view_get_model(tv); sel = gtk_tree_view_get_selection(tv); @@ -556,42 +698,47 @@ gtk_tree_model_get(tm, &iter, 0, &name, -1); - gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(plxml, "entry_playlist_name")), name); + gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder, "entry_playlist_name")), name); g_free(name); return FALSE; } -gboolean on_ui_qsearch_activate(GtkWidget *widget, gpointer user_data) { +gboolean on_ui_qsearch_activate(GtkWidget *widget, gpointer user_data) +{ gchar *srch = (gchar *)gtk_entry_get_text(GTK_ENTRY(widget)); gchar *sample = NULL; - gint type = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(guixml, "combobox_qsearch_type"))); - gint cpos; - GtkTreeIter iter, siter; + gint type = gtk_combo_box_get_active(GTK_COMBO_BOX(gtk_builder_get_object(builder, "combobox_qsearch_type"))); GtkTreePath *path; + GtkTreeIter iter; + GtkTreeView *view = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); + gint cpos, spos; gboolean found = FALSE; + if( !srch || !g_utf8_strlen(srch, -1) ) + return FALSE; + debug("QSearch string: '%s'", srch); - gtk_tree_view_get_cursor(GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")), &path, NULL); + gtk_tree_view_get_cursor(view, &path, NULL); if( path ) { - cpos = atoi(gtk_tree_path_to_string(path)); - - gtk_tree_model_get_iter(GTK_TREE_MODEL(glurp->gui_playlist), &iter, path); - gtk_tree_model_get_iter(GTK_TREE_MODEL(glurp->gui_playlist), &siter, path); + /* Remember starting position */ + spos = cpos = atoi(gtk_tree_path_to_string(path)); gtk_tree_path_free(path); - - if( !gtk_tree_model_iter_next(GTK_TREE_MODEL(glurp->gui_playlist), &iter) ) return FALSE; } else { - cpos = 0; - if( !gtk_tree_model_get_iter_first(GTK_TREE_MODEL(glurp->gui_playlist), &iter) ) return FALSE; + spos = cpos = 0; } - + debug("Cursor position: %d", cpos + 1); cpos++; - do { + while( !found && cpos != spos ) { + if( !gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_playlist), &iter, NULL, cpos) ) { + cpos = 0; + continue; + } + switch(type) { case GLURP_QSEARCH_TITLE: gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); @@ -601,37 +748,37 @@ found = TRUE; } - break; + break; case GLURP_QSEARCH_ARTIST: - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_ARTIST, &sample, -1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); if( sample && srch && g_strrstr(g_ascii_strdown(sample, -1), g_ascii_strdown(srch, -1)) ) { debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; } - break; + break; case GLURP_QSEARCH_ALBUM: - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_ALBUM, &sample, -1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); if( sample && srch && g_strrstr(g_ascii_strdown(sample, -1), g_ascii_strdown(srch, -1)) ) { debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; } - break; + break; case GLURP_QSEARCH_FILENAME: - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_FILENAME, &sample, -1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); if( sample && srch && g_strrstr(g_ascii_strdown(sample, -1), g_ascii_strdown(srch, -1)) ) { debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; } - break; + break; case GLURP_QSEARCH_ALL: gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); @@ -639,38 +786,42 @@ debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; - break; + break; } - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_ARTIST, &sample, -1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); if( sample && srch && g_strrstr(g_ascii_strdown(sample, -1), g_ascii_strdown(srch, -1)) ) { debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; - break; + break; } - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_ALBUM, &sample, -1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); if( sample && srch && g_strrstr(g_ascii_strdown(sample, -1), g_ascii_strdown(srch, -1)) ) { debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; - break; + break; } - gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_FILENAME, &sample, -1); + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_TITLE, &sample, -1); if( sample && srch && g_strrstr(g_ascii_strdown(sample, -1), g_ascii_strdown(srch, -1)) ) { debug("Found suitable haystack: '%s'", sample); gui_playlist_scroll(cpos); found = TRUE; - break; + break; } break; } - } while( !found && gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_playlist), &iter, NULL, ++cpos) ); + cpos++; + + } + + if( !found ) debug("Nothing found..."); return FALSE; } @@ -680,16 +831,9 @@ } gboolean on_menu_pl_remove_all_activate(GtkWidget *widget, gpointer data) { - if(!CONNECTED) return FALSE; - - mpd_sendClearCommand(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + if(!mpd_check_connected(glurp->mpd)) return FALSE; + mpd_playlist_clear(glurp->mpd); return FALSE; } @@ -701,9 +845,9 @@ GtkTreeIter iter; GList *selected_rows; - if(!CONNECTED) return FALSE; + if(!mpd_check_connected(glurp->mpd)) return FALSE; - tv = glade_xml_get_widget(guixml, "treeview_playlist"); + tv = GTK_WIDGET(gtk_builder_get_object(builder, "treeview_playlist")); tm = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); ts = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); @@ -713,22 +857,13 @@ debug("Selected %d rows", num_sel); if( num_sel ) { - mpd_sendCommandListBegin(glurp->conn); for( i=0; iconn, id); - } - mpd_sendCommandListEnd(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; + mpd_playlist_queue_delete_id(glurp->mpd, id); } - + mpd_playlist_queue_commit(glurp->mpd); } - return FALSE; } @@ -737,11 +872,11 @@ GtkTreeModel *tm; GtkTreeSelection *ts; GtkTreeIter iter; - gint i = 0; + gint i = 0, id; - if(!CONNECTED) return FALSE; + if(!mpd_check_connected(glurp->mpd)) return FALSE; - tv = glade_xml_get_widget(guixml, "treeview_playlist"); + tv = GTK_WIDGET(gtk_builder_get_object(builder, "treeview_playlist")); tm = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); ts = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); @@ -750,66 +885,36 @@ return FALSE; } - mpd_sendCommandListBegin(glurp->conn); - do { - if( !gtk_tree_selection_iter_is_selected(ts, &iter) ) mpd_sendDeleteCommand(glurp->conn, i); + if( !gtk_tree_selection_iter_is_selected(ts, &iter) ) { + gtk_tree_model_get(tm, &iter, PL_ID, &id, -1); + mpd_playlist_queue_delete_id( glurp->mpd, id); + } else i++; } while( gtk_tree_model_iter_next(tm, &iter) ); - mpd_sendCommandListEnd(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + mpd_playlist_queue_commit(glurp->mpd); return FALSE; } -gboolean on_ui_add_close_clicked(GtkWidget *widget, gpointer data) { - GtkWidget *window_add = glade_xml_get_widget(addxml, "glurp_window_add"); - - g_object_ref(G_OBJECT(glurp->gui_addtree)); - - debug("Close pressed, destroying 'add' window..."); - gtk_widget_destroy(window_add); - - return FALSE; -} gboolean on_ui_add_update_clicked(GtkWidget *widget, gpointer data) { gtk_tree_store_clear(glurp->gui_addtree); debug("Removing 'Add' treeview model"); - gtk_tree_view_set_model(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), NULL); +//gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), NULL); + gui_updating_disable_add_controls(); + glurp->updating_db = TRUE; statusbar_print("Updating MPD database, please wait..."); debug("Starting to update MPD db..."); - if( NONBLOCKING_UPDATE_CAPABLE_MPD ) { - gui_updating_disable_add_controls(); - glurp->updating_db = TRUE; - } - - mpd_sendUpdateCommand(glurp->conn, ""); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } - - if( !NONBLOCKING_UPDATE_CAPABLE_MPD ) { - statusbar_print("Database updated"); - debug("MPD db updated"); - debug("Setting 'Add' treeview model back"); - gtk_tree_view_set_model(GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); - populate_gui_add_tree(); - } - + + mpd_database_update_dir(glurp->mpd, "/"); + mpd_check_error(glurp->mpd); + return FALSE; } @@ -818,9 +923,9 @@ GtkTreeModel *tm; GtkTreeSelection *ts; - if(!CONNECTED) return FALSE; + if(!mpd_check_connected(glurp->mpd)) return FALSE; - tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")); tm = gtk_tree_view_get_model(tv); if( !(ts = gtk_tree_view_get_selection(tv)) ) { debug("No selection, ignoring"); @@ -831,20 +936,13 @@ gui_load_selected(); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } - debug("Finished adding songs"); return FALSE; } gboolean on_ui_repeat_clicked(GtkWidget *widget, gpointer user_data) { - if( !CONNECTED ) { + if( !mpd_check_connected(glurp->mpd) ) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FALSE); return FALSE; } @@ -852,31 +950,18 @@ if( !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ) { statusbar_print("Repeat Off"); debug("Repeat Off"); - mpd_sendRepeatCommand(glurp->conn, 0); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + mpd_player_set_repeat(glurp->mpd, FALSE); } else { statusbar_print("Repeat On"); debug("Repeat On"); - mpd_sendRepeatCommand(glurp->conn, 1); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } - + mpd_player_set_repeat(glurp->mpd, TRUE); } return FALSE; } gboolean on_ui_random_clicked(GtkWidget *widget, gpointer user_data) { - if( !CONNECTED ) { + if( !mpd_check_connected(glurp->mpd) ) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FALSE); return FALSE; } @@ -884,144 +969,81 @@ if( !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ) { statusbar_print("Random Off"); debug("Random Off"); - mpd_sendRandomCommand(glurp->conn, 0); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } - + mpd_player_set_random(glurp->mpd, FALSE); } else { statusbar_print("Random On"); debug("Random On"); - mpd_sendRandomCommand(glurp->conn, 1); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } - + mpd_player_set_random(glurp->mpd, TRUE); } return FALSE; } + gboolean on_ui_add_row_expanded(GtkTreeView *tv, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) { + gchar *the_path; + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_addtree), iter, ADD_NAME, &the_path,-1); + debug("expanded path: %s", the_path); gui_add_fill_dir(iter, FALSE); return FALSE; } -gboolean on_ui_add_find_clicked( GtkWidget *widget, gpointer data) { - - if( !CONNECTED ) { - debug("Not connected, ignoring."); - statusbar_print("Not connected, cannot add"); - return FALSE; +void on_ui_add_row_activated(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data) { + GtkTreeModel *tm = gtk_tree_view_get_model( tv ); + GtkTreeIter iter; + + if (!tm) { + debug("Couldn't get the tree model for add tree"); + return; } - debug("Search started"); - populate_gui_add_search_tree(); - - return TRUE; + if (!gtk_tree_model_get_iter(tm, &iter, path)) { + debug("couldn't get a valid iter for the activated row (!)"); + return; + } + if( gtk_tree_model_iter_n_children(tm, &iter) > 0 ) { + /* this is a directory, so we expand it. */ + debug("A directory is activated in the add window"); + if ( gtk_tree_view_row_expanded(tv, path) ) { + gtk_tree_view_collapse_row(tv, path); + } else { + gtk_tree_view_expand_row(tv, path, FALSE); + } + } else { + /* this is a song, add it to the playlist + * fixme: should we add the activated song, or all selected songs? */ + debug("A song is activated in the add window"); + gui_load_song(tm, iter); + } } -gboolean on_menu_add_file_activate(GtkWidget *widget, gpointer data) { - GtkWidget *window_add; - GtkComboBox* combo_type; - if( !CONNECTED ) { +gboolean on_ui_add_find_clicked( GtkWidget *widget, gpointer data) { + + if( !mpd_check_connected(glurp->mpd)) { debug("Not connected, ignoring."); statusbar_print("Not connected, cannot add"); return FALSE; } - - if( addxml ) { - debug("'Add' window already shown, returning"); - return FALSE; - } - - debug("Add menu"); - - addxml = glade_xml_new(glade_path(), "glurp_window_add", NULL); - glade_xml_signal_autoconnect(addxml); - - window_add = glade_xml_get_widget(addxml, "glurp_window_add"); + debug("Search started"); - combo_type = GTK_COMBO_BOX(glade_xml_get_widget(addxml, "combo_add_find_type")); - gtk_combo_box_set_active(combo_type, 0); + populate_gui_add_search_tree(); + gtk_widget_grab_focus(GTK_WIDGET(gtk_builder_get_object(builder, "treeview_add"))); + return TRUE; - create_gui_add_tree(); - - debug("Populating 'add' treeview..."); - populate_gui_add_tree(); - - title_print(window_add, "Add songs to playlist"); - - gtk_widget_grab_focus(GTK_WIDGET(glade_xml_get_widget(addxml, "entry_add_find_what"))); - - gtk_widget_show(window_add); - - return FALSE; -} - -gboolean on_menu_add_url_activate(GtkWidget *widget, gpointer data) { - GtkWidget *window_stream; - - if( !CONNECTED ) return FALSE; - - print_stream_history(); - - if( !STREAM_CAPABLE_MPD ) { - statusbar_print("Sorry, this MPD cannot playback streams"); - debug("Sorry, this MPD cannot playback streams"); - return FALSE; - } - - if( streamxml ) { - debug("Stream window already shown, returning"); - return FALSE; - } - - streamxml = glade_xml_new(glade_path(), "glurp_window_stream", NULL); - glade_xml_signal_autoconnect(streamxml); - - create_stream_liststore(); - - populate_stream_liststore(); - - window_stream = glade_xml_get_widget(streamxml, "glurp_window_stream"); - - title_print(window_stream, "Add a stream to playlist"); - - gtk_widget_show(window_stream); - - return FALSE; } -gboolean on_stream_destroy(GtkWidget *widget, gpointer user_data) { - stream_window_destroyed(); - return FALSE; -} - -gboolean on_ui_stream_close_clicked(GtkWidget *widget, gpointer user_data) { - GtkWidget *window_stream = glade_xml_get_widget(streamxml, "glurp_window_stream"); - - debug("Close pressed, destroying stream window..."); - gtk_widget_destroy(window_stream); - - return FALSE; +void on_entry_add_find_what_activate( GtkWidget *widget, gpointer data) { + debug("relaying activation of the entry to the find button"); + g_signal_emit_by_name( (gpointer) gtk_builder_get_object(builder, "button_add_find"), "clicked"); } gboolean on_ui_stream_add_clicked(GtkWidget *widget, gpointer user_data) { - GtkWidget *window_stream = glade_xml_get_widget(streamxml, "glurp_window_stream"); gchar *url = get_selected_stream(); if( !url || !g_utf8_strlen(url, -1) ) { debug("No stream URL to add, ignoring"); - gtk_widget_destroy(window_stream); statusbar_print("No URL to add"); @@ -1029,14 +1051,10 @@ } debug("Adding URL: '%s'", url); - mpd_sendAddCommand(glurp->conn, url); - mpd_finishCommand(glurp->conn); - if( !check_mpd_error() ) { - statusbar_print("URL '%s' added", url); - push_stream(url); - } else glurp_disconnect(); - - gtk_widget_destroy(window_stream); + mpd_playlist_add(glurp->mpd, url); + statusbar_print("URL '%s' added", url); + push_stream(url); + populate_stream_liststore(); return FALSE; } @@ -1051,10 +1069,11 @@ GtkTreeViewDropPosition pos; GtkTreeModel *tm = GTK_TREE_MODEL(glurp->gui_playlist); GtkTreeIter iter; - gint did, sid, dpos, spos; - gboolean pos_ok = FALSE, first_iter = FALSE; + gint did, dpos, spos; + gint num_selected; + gint* path_indices; GtkTreeSelection *sel; - GList *selected_rows; + GList *selected_rows, *sel_rows_iterator; debug("DRAG DROP"); @@ -1069,53 +1088,48 @@ } gtk_tree_model_get(tm, &iter, PL_ID, &did, -1); + path_indices = gtk_tree_path_get_indices(path); + dpos = path_indices[gtk_tree_path_get_depth(path) - 1]; - if( pos == GTK_TREE_VIEW_DROP_AFTER ) { - debug("AFTER id:%d", did); - pos_ok = TRUE; - } + if( pos == GTK_TREE_VIEW_DROP_AFTER ) debug("AFTER id:%d", did); if( pos == GTK_TREE_VIEW_DROP_BEFORE ) debug("BEFORE id:%d", did); if( pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE ) debug("INTO OR BEFORE id:%d", did); if( pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER ) debug("INTO OR AFTER id:%d", did); - if( !pos_ok ) { - if( !gtk_tree_path_prev(path) || !gtk_tree_model_get_iter(tm, &iter, path) ) { - debug("Can't get prev iter, we're at the first one already"); - first_iter = TRUE; - } - } - - if( first_iter ) dpos = 0; - else { - gtk_tree_model_get(tm, &iter, PL_ID, &did, -1); - dpos = get_song_pos(get_song_by_id(did)); - } + if( pos == GTK_TREE_VIEW_DROP_AFTER ) debug("AFTER pos:%d", dpos); + if( pos == GTK_TREE_VIEW_DROP_BEFORE ) debug("BEFORE pos:%d", dpos); + if( pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE ) debug("INTO OR BEFORE pos:%d", dpos); + if( pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER ) debug("INTO OR AFTER pos:%d", dpos); + if( ( pos == GTK_TREE_VIEW_DROP_BEFORE ) || ( pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE ) ) dpos -= 1; +// if (dpos < 0) dpos = 0; sel = gtk_tree_view_get_selection(tree); - selected_rows = gtk_tree_selection_get_selected_rows(sel, &tm); - path = (GtkTreePath *)g_list_nth_data(selected_rows, 0); - gtk_tree_model_get_iter(tm, &iter, path); - gtk_tree_model_get(tm, &iter, PL_ID, &sid, -1); - - spos = get_song_pos(get_song_by_id(sid)); - if( spos > dpos ) dpos++; - - mpd_sendMoveIdCommand(glurp->conn, sid, dpos); - mpd_finishCommand(glurp->conn); - - if( !check_mpd_error() ) { - debug("Move succesful"); - return FALSE; - } else glurp_disconnect(); - - debug("MPD refused song move"); + sel_rows_iterator = selected_rows = gtk_tree_selection_get_selected_rows(sel, &tm); + num_selected = gtk_tree_selection_count_selected_rows(sel); + do { + path = (GtkTreePath*)sel_rows_iterator->data; + path_indices = gtk_tree_path_get_indices(path); + spos = path_indices[gtk_tree_path_get_depth(path) - 1]; + if( spos >= dpos ) { + dpos++; + debug("dropping backwards"); + } + debug("movig from pos %d to pos %d", spos, dpos); + mpd_playlist_move_pos(glurp->mpd, spos, dpos); + } while ( ( sel_rows_iterator = g_list_next(sel_rows_iterator) ) ); + + g_list_foreach( selected_rows, (GFunc)gtk_tree_path_free, NULL); + g_list_free( selected_rows ); + + gtk_tree_selection_unselect_all(sel); + return FALSE; } gboolean on_ui_playlist_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data) { GtkTreePath *path = NULL; GtkTreeSelection *sel = NULL; - GtkTreeView *tv = GTK_TREE_VIEW(glade_xml_get_widget(guixml, "treeview_playlist")); + GtkTreeView *tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_playlist")); if( event->button != 3 ) return FALSE; @@ -1130,39 +1144,39 @@ } debug("Displaying playlist popup menu"); - gtk_menu_popup(GTK_MENU(glade_xml_get_widget(guixml, "glurp_menu_playlist")), NULL, NULL, NULL, NULL, event->button, event->time); + gtk_menu_popup(GTK_MENU(gtk_builder_get_object(builder, "glurp_menu_playlist")), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } gboolean on_pmenu_playlist_play(GtkWidget *widget, gpointer data) { debug("POPUP: Playlist -> Play"); - on_ui_player_play(glade_xml_get_widget(guixml, "button_play"), NULL); + on_ui_player_play(GTK_WIDGET(gtk_builder_get_object(builder, "button_play")), NULL); return FALSE; } gboolean on_pmenu_playlist_remove_selected(GtkWidget *widget, gpointer data) { debug("POPUP: Playlist -> Remove selected"); - on_menu_pl_remove_selected_activate(glade_xml_get_widget(guixml, "button_play"), NULL); + on_menu_pl_remove_selected_activate(GTK_WIDGET(gtk_builder_get_object(builder, "button_play")), NULL); return FALSE; } gboolean on_pmenu_playlist_remove_crop(GtkWidget *widget, gpointer data) { debug("POPUP: Playlist -> Remove crop"); - on_menu_pl_remove_crop_activate(glade_xml_get_widget(guixml, "button_play"), NULL); + on_menu_pl_remove_crop_activate(GTK_WIDGET(gtk_builder_get_object(builder, "button_play")), NULL); return FALSE; } gboolean on_pmenu_playlist_remove_all(GtkWidget *widget, gpointer data) { debug("POPUP: Playlist -> Remove all"); - on_menu_pl_remove_all_activate(glade_xml_get_widget(guixml, "button_play"), NULL); + on_menu_pl_remove_all_activate(GTK_WIDGET(gtk_builder_get_object(builder, "button_play")), NULL); return FALSE; } gboolean on_ui_add_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data) { GtkTreePath *path = NULL; GtkTreeSelection *sel = NULL; - GtkTreeView *tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); + GtkTreeView *tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")); if( event->button != 3 ) return FALSE; @@ -1177,7 +1191,7 @@ } debug("Displaying add popup menu"); - gtk_menu_popup(GTK_MENU(glade_xml_get_widget(guixml, "glurp_menu_db")), NULL, NULL, NULL, NULL, event->button, event->time); + gtk_menu_popup(GTK_MENU(gtk_builder_get_object(builder, "glurp_menu_db")), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } @@ -1192,8 +1206,8 @@ debug("POPUP: DB -> Update selected"); - if(!CONNECTED) return FALSE; - tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); + if(!mpd_check_connected(glurp->mpd)) return FALSE; + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")); tm = gtk_tree_view_get_model(tv); if( !((ts = gtk_tree_view_get_selection(tv)) && (num = gtk_tree_selection_count_selected_rows(ts))) ) { debug("No selection, ignoring"); @@ -1205,35 +1219,16 @@ debug("Removing 'Add' treeview model"); gtk_tree_view_set_model(tv, NULL); - mpd_sendCommandListBegin(glurp->conn); - - if( NONBLOCKING_UPDATE_CAPABLE_MPD ) { - gui_updating_disable_add_controls(); - glurp->updating_db = TRUE; - } + gui_updating_disable_add_controls(); + glurp->updating_db = TRUE; for( i = 0; i < num; i++ ) { gtk_tree_model_get_iter(tm, &iter, (GtkTreePath *)g_list_nth_data(selected_rows, i)); gtk_tree_model_get(tm, &iter, 1, &path, -1); - mpd_sendUpdateCommand(glurp->conn, path); + mpd_database_update_dir(glurp->mpd, path); debug("**** Updating '%s'", path); g_free(path); - } - - mpd_sendCommandListEnd(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( !NONBLOCKING_UPDATE_CAPABLE_MPD ) { - statusbar_print("Database updated"); - debug("MPD db updated"); - debug("Setting 'Add' treeview model back"); - gtk_tree_view_set_model(tv, GTK_TREE_MODEL(glurp->gui_addtree)); - populate_gui_add_tree(); - } - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; + if (mpd_check_error(glurp->mpd)) break; } return FALSE; @@ -1241,7 +1236,7 @@ gboolean on_pmenu_db_add_selected(GtkWidget *widget, gpointer data) { debug("POPUP: DB -> Add selected"); - on_ui_add_add_clicked(glade_xml_get_widget(addxml, "button_add_add"), NULL); + on_ui_add_add_clicked(GTK_WIDGET(gtk_builder_get_object(builder, "button_add_add")), NULL); return FALSE; } @@ -1251,49 +1246,29 @@ } gboolean on_pmenu_playlist_shuffle_activate(GtkWidget *widget, gpointer data) { - if( !CONNECTED ) { + if( !mpd_check_connected(glurp->mpd) ) { debug("Not connected"); return FALSE; } - mpd_sendShuffleCommand(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; - } + mpd_playlist_shuffle(glurp->mpd); statusbar_print("Playlist shuffled."); return FALSE; } -gboolean on_togglebutton_pl_add_toggled(GtkWidget *widget, gpointer data) { - if( !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ) return FALSE; - - debug("Add button clicked"); - gtk_menu_popup(GTK_MENU(glade_xml_get_widget(guixml, "glurp_menu_pl_add")), NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time()); - return FALSE; -} - -gboolean on_menu_pl_add_deactivate(GtkWidget *widget, gpointer data) { - debug("Add menu hidden, deactivating togglebutton"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_pl_add")), FALSE); - return FALSE; -} - gboolean on_togglebutton_pl_remove_toggled(GtkWidget *widget, gpointer data) { if( !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ) return FALSE; debug("Remove button clicked"); - gtk_menu_popup(GTK_MENU(glade_xml_get_widget(guixml, "glurp_menu_pl_remove")), NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time()); + gtk_menu_popup(GTK_MENU(gtk_builder_get_object(builder, "glurp_menu_pl_remove")), NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time()); return FALSE; } gboolean on_menu_pl_remove_deactivate(GtkWidget *widget, gpointer data) { debug("Remove menu hidden, deactivating togglebutton"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_pl_remove")), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_pl_remove")), FALSE); return FALSE; } @@ -1312,7 +1287,7 @@ gboolean on_menu_outputs_deactivate(GtkWidget *widget, gpointer data) { debug("Outputs menu hidden, deactivating togglebutton"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_outputs")), FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_outputs")), FALSE); return FALSE; } @@ -1326,14 +1301,79 @@ debug("%s output %d", (enable ? "Enable" : "Disable"), i); statusbar_print("%s output %d", (enable ? "Enabling" : "Disabling"), i); - if( enable ) mpd_sendEnableOutputCommand(glurp->conn, i); - else mpd_sendDisableOutputCommand(glurp->conn, i); - mpd_finishCommand(glurp->conn); + mpd_server_set_output_device(glurp->mpd, i, enable); - if( check_mpd_error() ) { - glurp_disconnect(); - return FALSE; + return FALSE; +} + +gboolean on_ui_streams_row_activated(GtkTreeView *treeview, GtkTreePath *tp, GtkTreeViewColumn *col, gpointer user_data) { + GtkTreeIter act; + GtkTreeModel *model; + gchar* url; + GtkWidget* entry; + + model = gtk_tree_view_get_model(treeview); + gtk_tree_model_get_iter(model, &act, tp); + gtk_tree_model_get(model, &act, 0, &url, -1); + entry = GTK_WIDGET(gtk_builder_get_object(builder, "streams_entry")); + gtk_entry_set_text(GTK_ENTRY(entry), url); + g_free(url); + return FALSE; +} + +gboolean on_ui_streams_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data) { + GtkTreePath *path = NULL; + GtkTreeSelection *sel = NULL; + GtkTreeView *tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "streams_treeview")); + + if( event->button != 3 ) return FALSE; + + if( gtk_tree_view_get_path_at_pos(tv, (gint)event->x, (gint)event->y, &path, NULL, NULL, NULL) ) { + debug("[%d,%d]", (gint)event->x, (gint)event->y); + sel = gtk_tree_view_get_selection(tv); + if( !gtk_tree_selection_path_is_selected(sel, path) ) { + debug("User clicked on unselected row, selecting "); + gtk_tree_selection_unselect_all(sel); + gtk_tree_selection_select_path(sel, path); + } } + debug("Displaying stream popup menu"); + gtk_menu_popup(GTK_MENU(gtk_builder_get_object(builder, "glurp_menu_streams")), NULL, NULL, NULL, NULL, event->button, event->time); + + return TRUE; +} + + +gboolean on_menu_streams_remove_selected_activate(GtkWidget *widget, gpointer user_data) { + GtkWidget *tv; + GtkTreeModel *tm; + GtkTreeSelection *ts; + gint num_sel, i; + gchar* url; + GtkTreeIter iter; + GList *selected_rows; + + if(!mpd_check_connected(glurp->mpd)) return FALSE; + + tv = GTK_WIDGET(gtk_builder_get_object(builder, "streams_treeview")); + tm = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); + ts = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); + + num_sel = gtk_tree_selection_count_selected_rows(ts); + selected_rows = gtk_tree_selection_get_selected_rows(ts, NULL); + + debug("Selected %d rows", num_sel); + + if( num_sel ) { + for( i=0; i #include #include -#include +#include #include "structs.h" #include "support.h" #include "player.h" +#include "gui.h" -extern GladeXML *guixml, *configxml, *plxml, *addxml, *streamxml; +extern GtkBuilder *builder; extern GlurpState *glurp; +static void descend_ascend_helper(gboolean descend); + /* MAIN WINDOW SHORTCUTS */ gboolean on_main_key_pressed(GtkWidget *widget, GdkEventKey *key, gpointer data) { guint k = key->keyval; + GtkWidget *w; + const char *wname=NULL; - if( GTK_WIDGET_HAS_FOCUS(glade_xml_get_widget(guixml, "entry_qsearch")) ) - return FALSE; + if (!(key->state & (GDK_CONTROL_MASK|GDK_MOD1_MASK))) { + w = gtk_window_get_focus(GTK_WINDOW(widget)); + if (w) { + wname = gtk_widget_get_name(w); + if( (GTK_IS_ENTRY(w)) && ( (wname==NULL) || (strcmp(wname,"entry_trackname")!=0) ) ) { + debug("Passing keypress on towards the entry \"%s\" with focus", wname); + return FALSE; + } + } + } + + if ( functional_notebook_database_selected() && + GTK_WIDGET_HAS_FOCUS(gtk_builder_get_object(builder, "treeview_add") ) ) { + /* expand/move to first child */ + if( k == GDK_Right || k == GDK_KP_Right ) { + descend_ascend_helper(TRUE); + return TRUE; + } + /* collapse/move to parent */ + if( k == GDK_Left || k == GDK_KP_Left ) { + descend_ascend_helper(FALSE); + return TRUE; + } + } + w = GTK_WIDGET(gtk_builder_get_object(builder, "progressbar")); + if( !GTK_WIDGET_HAS_FOCUS(w) && + ( functional_notebook_playlist_selected() ) && + (k == GDK_Left || k == GDK_Right || k == GDK_KP_Left || k == GDK_KP_Right) && + !(key->state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK|GDK_MOD1_MASK)) ) + gtk_widget_grab_focus(w); + + if ( ( ( k == GDK_Page_Up ) || ( k == GDK_Page_Down ) ) && (key->state & GDK_CONTROL_MASK) && !(key->state & (GDK_SHIFT_MASK|GDK_MOD1_MASK))) { + debug("moving to %s page in the functional notebook", (k == GDK_Page_Down)?"next":"previous"); + w = gtk_window_get_focus(GTK_WINDOW(widget)); + glurp_switch_functional_page(w, k == GDK_Page_Down); + return TRUE; + } /* previous */ - if( k == GDK_Z || k == GDK_z ) { - if( !STOPPED ) g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "button_prev"), "clicked"); + if(( k == GDK_Z || k == GDK_z )){ + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "button_prev"), "clicked"); return TRUE; } /* play */ - if( k == GDK_X || k == GDK_x ) { - if( !PLAYING ) g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "button_play"), "clicked"); + if(( k == GDK_X || k == GDK_x )){ + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "button_play"), "clicked"); return TRUE; } /* pause */ - if( k == GDK_C || k == GDK_c ) { - if( PLAYING ) g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "button_pause"), "clicked"); + if(( k == GDK_C || k == GDK_c )){ + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "button_pause"), "clicked"); return TRUE; } /* stop */ - if( k == GDK_V || k == GDK_v ) { - if( !STOPPED ) g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "button_stop"), "clicked"); + if(( k == GDK_V || k == GDK_v )){ + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "button_stop"), "clicked"); return TRUE; } /* next */ - if( k == GDK_B || k == GDK_b ) { - if( !STOPPED ) g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "button_next"), "clicked"); + if(( k == GDK_B || k == GDK_b )){ + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "button_next"), "clicked"); return TRUE; } /* playlist show/hide */ - if( k == GDK_p ) { - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_playlist"))) ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_playlist")), FALSE); - else - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_playlist")), TRUE); + if(( k == GDK_p )){ + w = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_playlist")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)) ); - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "togglebutton_playlist"), "clicked"); + // don't emit this signal, it's emitted by gtk_toggle_button_set_active + //g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "togglebutton_playlist"), "clicked"); return TRUE; } - if( k == GDK_P ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "button_pl_shuffle"), "clicked"); +/* unimplemented idea?? + if(( k == GDK_P ) && ( key->state & GDK_MOD1_MASK ) ){ + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "button_pl_shuffle"), "clicked"); return TRUE; - } + } */ /* toggle repeat */ - if( k == GDK_E || k == GDK_e ) { - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat"))) ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), FALSE); - else - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_repeat")), TRUE); + if ( ( k == GDK_T || k == GDK_t ) ) { + w = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_repeat")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)) ); - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "togglebutton_repeat"), "clicked"); + // don't emit this signal, it's emitted by gtk_toggle_button_set_active + //g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "togglebutton_repeat"), "clicked"); return TRUE; } - /* toggle random */ - if( k == GDK_A || k == GDK_a ) { - if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random"))) ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), FALSE); - else - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(guixml, "togglebutton_random")), TRUE); + /* toggle random */ + if(( k == GDK_M || k == GDK_m ) ){ + w = GTK_WIDGET(gtk_builder_get_object(builder, "togglebutton_random")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)) ); - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "togglebutton_random"), "clicked"); + // don't emit this signal, it's emitted by gtk_toggle_button_set_active + //g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "togglebutton_random"), "clicked"); return TRUE; } /* add file */ - if( (k == GDK_Insert || k == GDK_KP_Insert) && !(key->state & GDK_SHIFT_MASK) ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "menu_add_file"), "activate"); + if( (k == GDK_Insert || k == GDK_KP_Insert) && !(key->state & ( GDK_SHIFT_MASK || GDK_CONTROL_MASK || GDK_MOD1_MASK ) ) ) { + functional_notebook_select_database(); return TRUE; } - - /* add url */ - if( (k == GDK_Insert || k == GDK_KP_Insert) && (key->state & GDK_SHIFT_MASK) ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "menu_add_url"), "activate"); - return TRUE; - } - - /* remove selected */ - if( (k == GDK_Delete || k == GDK_KP_Delete) && !(key->state & GDK_SHIFT_MASK) && !(key->state & GDK_CONTROL_MASK) ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "menu_remove_selected"), "activate"); - return TRUE; - } - - /* remove crop */ - if( (k == GDK_Delete || k == GDK_KP_Delete) && (key->state & GDK_SHIFT_MASK) && !(key->state & GDK_CONTROL_MASK) ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "menu_remove_crop"), "activate"); - return TRUE; + + if (functional_notebook_playlist_selected()) { + /* remove selected */ + if( (k == GDK_Delete || k == GDK_KP_Delete) && !(key->state & GDK_SHIFT_MASK) && !(key->state & GDK_CONTROL_MASK) ) { + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "menu_remove_selected"), "activate"); + return TRUE; + } + + /* remove crop */ + if( (k == GDK_Delete || k == GDK_KP_Delete) && (key->state & GDK_SHIFT_MASK) && !(key->state & GDK_CONTROL_MASK) ) { + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "menu_remove_crop"), "activate"); + return TRUE; + } + + /* remove all */ + if( (k == GDK_Delete || k == GDK_KP_Delete) && !(key->state & GDK_SHIFT_MASK) && (key->state & GDK_CONTROL_MASK) ) { + g_signal_emit_by_name((gpointer)gtk_builder_get_object(builder, "menu_remove_all"), "activate"); + return TRUE; + } } - /* remove all */ - if( (k == GDK_Delete || k == GDK_KP_Delete) && !(key->state & GDK_SHIFT_MASK) && (key->state & GDK_CONTROL_MASK) ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(guixml, "menu_remove_all"), "activate"); - return TRUE; - } /* debug("MAIN WINDOW KEYPRESS: %d", k); */ return FALSE; } -/*****************************************************************************/ -/* CONFIG WINDOW */ -gboolean on_config_key_pressed(GtkWidget *widget, GdkEventKey *key, gpointer data) { - guint k = key->keyval; - -/* debug("CONFIG WINDOW KEYPRESS: %d", k); */ - - /* escape to close config window */ - if( k == GDK_Escape ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(configxml, "button_config_cancel"), "activate"); - return TRUE; - } - - return FALSE; -} - -/*****************************************************************************/ -/* PLAYLISTS WINDOW */ -gboolean on_pllist_key_pressed(GtkWidget *widget, GdkEventKey *key, gpointer data) { - guint k = key->keyval; - -/* debug("PLAYLISTS WINDOW KEYPRESS: %d", k); */ - - /* escape to close config window */ - if( k == GDK_Escape ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(plxml, "button_playlist_close"), "clicked"); - return TRUE; - } - - return FALSE; -} - -/*****************************************************************************/ -/* ADD FILE WINDOW */ -gboolean on_add_key_pressed(GtkWidget *widget, GdkEventKey *key, gpointer data) { - guint k = key->keyval; - GtkTreeView *tv = NULL; - GtkTreeModel *tm = NULL; - GtkTreeSelection *sel = NULL; +static void descend_ascend_helper(gboolean descend) { + GtkTreeView *tv; + GtkTreeModel *tm; + GtkTreeSelection* sel; GtkTreePath *path; gint num; GList *selected_rows; + tv = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")); + tm = gtk_tree_view_get_model(tv); -/* debug("ADD FILE WINDOW KEYPRESS: %d", k); */ + sel = gtk_tree_view_get_selection(tv); - /* escape to close add window */ - if( k == GDK_Escape ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(addxml, "button_add_close"), "activate"); - return TRUE; - } + if( !(num = gtk_tree_selection_count_selected_rows(sel)) ) return; - /* enter to add selected */ - if( (k == GDK_Return) || (k == GDK_KP_Enter) ) { - if ( GTK_WIDGET_HAS_FOCUS(glade_xml_get_widget(addxml, "entry_add_find_what") ) ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(addxml, "button_add_find"), "activate"); - } else { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(addxml, "button_add_add"), "activate"); - } - return TRUE; + if( !(selected_rows = gtk_tree_selection_get_selected_rows(sel, &tm)) ) { + debug("Couldn't get selected rows"); + return; } - /* expand/move to first child */ - if( k == GDK_Right || k == GDK_KP_Right ) { - tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); - tm = gtk_tree_view_get_model(tv); - - sel = gtk_tree_view_get_selection(tv); - - if( !(num = gtk_tree_selection_count_selected_rows(sel)) ) return TRUE; - - if( !(selected_rows = gtk_tree_selection_get_selected_rows(sel, &tm)) ) { - debug("Couldn't get selected rows"); - return TRUE; - } - - path = (GtkTreePath *)g_list_nth_data(selected_rows, 0); + path = (GtkTreePath *)g_list_nth_data(selected_rows, 0); - if( gtk_tree_view_row_expanded(tv, path) ) { + if( gtk_tree_view_row_expanded(tv, path) ) { + if (descend) gtk_tree_path_down(path); - } else { - gtk_tree_view_expand_row(tv, path, FALSE); - } - - gtk_tree_view_set_cursor(tv, path, NULL, FALSE); - - return TRUE; - } - - /* collapse/move to parent */ - if( k == GDK_Left || k == GDK_KP_Left ) { - tv = GTK_TREE_VIEW(glade_xml_get_widget(addxml, "treeview_add")); - tm = gtk_tree_view_get_model(tv); - - sel = gtk_tree_view_get_selection(tv); - - if( !(num = gtk_tree_selection_count_selected_rows(sel)) ) return TRUE; - - if( !(selected_rows = gtk_tree_selection_get_selected_rows(sel, &tm)) ) { - debug("Couldn't get selected rows"); - return TRUE; - } - - path = (GtkTreePath *)g_list_nth_data(selected_rows, 0); - - if( gtk_tree_view_row_expanded(tv, path) ) { + else gtk_tree_view_collapse_row(tv, path); - } else { + } else { + if (descend) + gtk_tree_view_expand_row(tv, path, FALSE); + else gtk_tree_path_up(path); - } - - gtk_tree_view_set_cursor(tv, path, NULL, FALSE); - - return TRUE; } - - return FALSE; -} - -/*****************************************************************************/ -/* ADD STREAM WINDOW */ -gboolean on_stream_key_pressed(GtkWidget *widget, GdkEventKey *key, gpointer data) { - guint k = key->keyval; - -/* debug("STREAM WINDOW KEYPRESS: %d", k); */ - - /* escape to close config window */ - if( k == GDK_Escape ) { - g_signal_emit_by_name((gpointer)glade_xml_get_widget(streamxml, "button_stream_close"), "activate"); - return TRUE; - } - - return FALSE; + gtk_tree_view_set_cursor(tv, path, NULL, FALSE); } +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/libmpdclient.c glurp-0.12.3/src/libmpdclient.c --- glurp-0.11.6/src/libmpdclient.c 2005-04-03 02:56:08.000000000 +0100 +++ glurp-0.12.3/src/libmpdclient.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,1473 +0,0 @@ -/* libmpdclient - (c)2003-2004 by Warren Dukes (shank@mercury.chem.pitt.edu) - This project's homepage is: http://www.musicpd.org - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Music Player Daemon nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include "libmpdclient.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MPD_NO_IPV6 -#ifdef AF_INET6 -#define MPD_HAVE_IPV6 -#endif -#endif - -#ifndef MSG_DONTWAIT -#define MSG_DONTWAIT 0 -#endif - -#define COMMAND_LIST 1 -#define COMMAND_LIST_OK 2 - -#ifdef MPD_HAVE_IPV6 -int mpd_ipv6Supported() { - int s; - s = socket(AF_INET6,SOCK_STREAM,0); - if(s == -1) return 0; - close(s); - return 1; -} -#endif - - -char * mpd_sanitizeArg(const char * arg) { - size_t i; - int count=0; - char * ret; - - for(i=0;iname = strdup(name); - ret->value = strdup(value); - - return ret; -} - -void mpd_freeReturnElement(mpd_ReturnElement * re) { - free(re->name); - free(re->value); - free(re); -} - -void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout) { - connection->timeout.tv_sec = (int)timeout; - connection->timeout.tv_usec = (int)(timeout*1e6 - - connection->timeout.tv_sec*1000000+0.5); -} - -mpd_Connection * mpd_newConnection(const char * host, int port, float timeout) { - int err; - struct hostent * he; - struct sockaddr * dest; -#ifdef HAVE_SOCKLEN_T - socklen_t destlen; -#else - int destlen; -#endif - struct sockaddr_in sin; - char * rt; - char * output; - mpd_Connection * connection = malloc(sizeof(mpd_Connection)); - struct timeval tv; - fd_set fds; -#ifdef MPD_HAVE_IPV6 - struct sockaddr_in6 sin6; -#endif - strcpy(connection->buffer,""); - connection->buflen = 0; - connection->bufstart = 0; - strcpy(connection->errorStr,""); - connection->error = 0; - connection->doneProcessing = 0; - connection->commandList = 0; - connection->listOks = 0; - connection->doneListOk = 0; - connection->returnElement = NULL; - - if(!(he=gethostbyname(host))) { - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "host \"%s\" not found",host); - connection->error = MPD_ERROR_UNKHOST; - return connection; - } - - memset(&sin,0,sizeof(struct sockaddr_in)); - /*dest.sin_family = he->h_addrtype;*/ - sin.sin_family = AF_INET; - sin.sin_port = htons(port); -#ifdef MPD_HAVE_IPV6 - memset(&sin6,0,sizeof(struct sockaddr_in6)); - sin6.sin6_family = AF_INET6; - sin6.sin6_port = htons(port); -#endif - switch(he->h_addrtype) { - case AF_INET: - memcpy((char *)&sin.sin_addr.s_addr,(char *)he->h_addr, - he->h_length); - dest = (struct sockaddr *)&sin; - destlen = sizeof(struct sockaddr_in); - break; -#ifdef MPD_HAVE_IPV6 - case AF_INET6: - if(!mpd_ipv6Supported()) { - strcpy(connection->errorStr,"no IPv6 suuport but a " - "IPv6 address found\n"); - connection->error = MPD_ERROR_SYSTEM; - return connection; - } - memcpy((char *)&sin6.sin6_addr.s6_addr,(char *)he->h_addr, - he->h_length); - dest = (struct sockaddr *)&sin6; - destlen = sizeof(struct sockaddr_in6); - break; -#endif - default: - strcpy(connection->errorStr,"address type is not IPv4 or " - "IPv6\n"); - connection->error = MPD_ERROR_SYSTEM; - return connection; - break; - } - - if((connection->sock = socket(dest->sa_family,SOCK_STREAM,0))<0) { - strcpy(connection->errorStr,"problems creating socket"); - connection->error = MPD_ERROR_SYSTEM; - return connection; - } - - mpd_setConnectionTimeout(connection,timeout); - - /* connect stuff */ - { - int flags = fcntl(connection->sock, F_GETFL, 0); - fcntl(connection->sock, F_SETFL, flags | O_NONBLOCK); - - if(connect(connection->sock,dest,destlen)<0 && - errno!=EINPROGRESS) - { - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "problems connecting to \"%s\" on port" - " %i",host,port); - connection->error = MPD_ERROR_CONNPORT; - return connection; - } - } - - while(!(rt = strstr(connection->buffer,"\n"))) { - tv.tv_sec = connection->timeout.tv_sec; - tv.tv_usec = connection->timeout.tv_usec; - FD_ZERO(&fds); - FD_SET(connection->sock,&fds); - if((err = select(connection->sock+1,&fds,NULL,NULL,&tv)) == 1) { - int readed; - readed = recv(connection->sock, - &(connection->buffer[connection->buflen]), - MPD_BUFFER_MAX_LENGTH-connection->buflen,0); - if(readed<=0) { - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "problems getting a response from" - " \"%s\" on port %i : %s",host, - port, strerror(errno)); - connection->error = MPD_ERROR_NORESPONSE; - return connection; - } - connection->buflen+=readed; - connection->buffer[connection->buflen] = '\0'; - tv.tv_sec = connection->timeout.tv_sec; - tv.tv_usec = connection->timeout.tv_usec; - } - else if(err<0) { - switch(errno) { - case EINTR: - continue; - default: - snprintf(connection->errorStr, - MPD_BUFFER_MAX_LENGTH, - "problems connecting to \"%s\" on port" - " %i",host,port); - connection->error = MPD_ERROR_CONNPORT; - return connection; - } - } - else { - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "timeout in attempting to get a response from" - " \"%s\" on port %i",host,port); - connection->error = MPD_ERROR_NORESPONSE; - return connection; - } - } - - *rt = '\0'; - output = strdup(connection->buffer); - strcpy(connection->buffer,rt+1); - connection->buflen = strlen(connection->buffer); - - if(strncmp(output,MPD_WELCOME_MESSAGE,strlen(MPD_WELCOME_MESSAGE))) { - free(output); - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "mpd not running on port %i on host \"%s\"", - port,host); - connection->error = MPD_ERROR_NOTMPD; - return connection; - } - - { - char * test; - char * version[3]; - char * tmp = &output[strlen(MPD_WELCOME_MESSAGE)]; - char * search = "."; - int i; - - for(i=0;i<3;i++) { - char * tok; - if(i==3) search = " "; - version[i] = strtok_r(tmp,search,&tok); - if(!version[i]) { - free(output); - snprintf(connection->errorStr, - MPD_BUFFER_MAX_LENGTH, - "error parsing version number at " - "\"%s\"", - &output[strlen(MPD_WELCOME_MESSAGE)]); - connection->error = MPD_ERROR_NOTMPD; - return connection; - } - connection->version[i] = strtol(version[i],&test,10); - if(version[i]==test || *test!='\0') { - free(output); - snprintf(connection->errorStr, - MPD_BUFFER_MAX_LENGTH, - "error parsing version number at " - "\"%s\"", - &output[strlen(MPD_WELCOME_MESSAGE)]); - connection->error = MPD_ERROR_NOTMPD; - return connection; - } - tmp = NULL; - } - } - - free(output); - - connection->doneProcessing = 1; - - return connection; -} - -void mpd_clearError(mpd_Connection * connection) { - connection->error = 0; - connection->errorStr[0] = '\0'; -} - -void mpd_closeConnection(mpd_Connection * connection) { - close(connection->sock); - if(connection->returnElement) free(connection->returnElement); - free(connection); -} - -void mpd_executeCommand(mpd_Connection * connection, char * command) { - int ret; - struct timeval tv; - fd_set fds; - char * commandPtr = command; - int commandLen = strlen(command); - - if(!connection->doneProcessing && !connection->commandList) { - strcpy(connection->errorStr,"not done processing current command"); - connection->error = 1; - return; - } - - mpd_clearError(connection); - - FD_ZERO(&fds); - FD_SET(connection->sock,&fds); - tv.tv_sec = connection->timeout.tv_sec; - tv.tv_usec = connection->timeout.tv_usec; - - while((ret = select(connection->sock+1,NULL,&fds,NULL,&tv)==1) || - (ret==-1 && errno==EINTR)) { - ret = send(connection->sock,commandPtr,commandLen, -#ifdef WIN32 - ioctlsocket(connection->sock, commandLen, commandPtr)); -#endif -#ifndef WIN32 - MSG_DONTWAIT); -#endif - if(ret<=0) - { - if(ret==EAGAIN || ret==EINTR) continue; - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "problems giving command \"%s\"",command); - connection->error = MPD_ERROR_SENDING; - return; - } - else { - commandPtr+=ret; - commandLen-=ret; - } - - if(commandLen<=0) break; - } - - if(commandLen>0) { - perror(""); - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "timeout sending command \"%s\"",command); - connection->error = MPD_ERROR_TIMEOUT; - return; - } - - if(!connection->commandList) connection->doneProcessing = 0; - else if(connection->commandList == COMMAND_LIST_OK) { - connection->listOks++; - } -} - -void mpd_getNextReturnElement(mpd_Connection * connection) { - char * output = NULL; - char * rt = NULL; - char * name = NULL; - char * value = NULL; - fd_set fds; - struct timeval tv; - char * tok = NULL; - int readed; - char * bufferCheck = NULL; - int err; - - if(connection->returnElement) mpd_freeReturnElement(connection->returnElement); - connection->returnElement = NULL; - - if(connection->doneProcessing || (connection->listOks && - connection->doneListOk)) - { - strcpy(connection->errorStr,"already done processing current command"); - connection->error = 1; - return; - } - - bufferCheck = connection->buffer+connection->bufstart; - while(connection->bufstart>=connection->buflen || - !(rt = strchr(bufferCheck,'\n'))) { - if(connection->buflen>=MPD_BUFFER_MAX_LENGTH) { - memmove(connection->buffer, - connection->buffer+ - connection->bufstart, - connection->buflen- - connection->bufstart+1); - connection->buflen-=connection->bufstart; - connection->bufstart = 0; - } - if(connection->buflen>=MPD_BUFFER_MAX_LENGTH) { - strcpy(connection->errorStr,"buffer overrun"); - connection->error = MPD_ERROR_BUFFEROVERRUN; - connection->doneProcessing = 1; - connection->doneListOk = 0; - return; - } - bufferCheck = connection->buffer+connection->buflen; - tv.tv_sec = connection->timeout.tv_sec; - tv.tv_usec = connection->timeout.tv_usec; - FD_ZERO(&fds); - FD_SET(connection->sock,&fds); - if((err = select(connection->sock+1,&fds,NULL,NULL,&tv) == 1)) { - readed = recv(connection->sock, - connection->buffer+connection->buflen, - MPD_BUFFER_MAX_LENGTH-connection->buflen, -#ifdef WIN32 - ioctlsocket(connection->sock, - commandLen, - commandPtr)); -#endif -#ifndef WIN32 - MSG_DONTWAIT); -#endif - if(readed<0 && (errno==EAGAIN || errno==EINTR)) { - continue; - } - if(readed<=0) { - strcpy(connection->errorStr,"connection" - " closed"); - connection->error = MPD_ERROR_CONNCLOSED; - connection->doneProcessing = 1; - connection->doneListOk = 0; - return; - } - connection->buflen+=readed; - connection->buffer[connection->buflen] = '\0'; - } - else if(err<0 && errno==EINTR) continue; - else { - strcpy(connection->errorStr,"connection timeout"); - connection->error = MPD_ERROR_TIMEOUT; - connection->doneProcessing = 1; - connection->doneListOk = 0; - return; - } - } - - *rt = '\0'; - output = connection->buffer+connection->bufstart; - connection->bufstart = rt - connection->buffer + 1; - - if(strcmp(output,"OK")==0) { - if(connection->listOks > 0) { - strcpy(connection->errorStr, "expected more list_OK's"); - connection->error = 1; - } - connection->listOks = 0; - connection->doneProcessing = 1; - connection->doneListOk = 0; - return; - } - - if(strcmp(output, "list_OK") == 0) { - if(!connection->listOks) { - strcpy(connection->errorStr, - "got an unexpected list_OK"); - connection->error = 1; - } - else { - connection->doneListOk = 1; - connection->listOks--; - } - return; - } - - if(strncmp(output,"ACK",strlen("ACK"))==0) { - char * test; - char * needle; - int val; - - strcpy(connection->errorStr, output); - connection->error = MPD_ERROR_ACK; - connection->errorCode = MPD_ACK_ERROR_UNK; - connection->errorAt = MPD_ERROR_AT_UNK; - connection->doneProcessing = 1; - connection->doneListOk = 0; - - needle = strchr(output, '['); - if(!needle) return; - val = strtol(needle+1, &test, 10); - if(*test != '@') return; - connection->errorCode = val; - val = strtol(test+1, &test, 10); - if(*test != ']') return; - connection->errorAt = val; - return; - } - - name = strtok_r(output,":",&tok); - if(name && (value = strtok_r(NULL,"",&tok)) && value[0]==' ') { - connection->returnElement = mpd_newReturnElement(name,&(value[1])); - } - else { - if(!name || !value) { - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "error parsing: %s",output); - } - else { - snprintf(connection->errorStr,MPD_BUFFER_MAX_LENGTH, - "error parsing: %s:%s",name,value); - } - connection->errorStr[MPD_BUFFER_MAX_LENGTH] = '\0'; - connection->error = 1; - } -} - -void mpd_finishCommand(mpd_Connection * connection) { - while(!connection->doneProcessing) { - if(connection->doneListOk) connection->doneListOk = 0; - mpd_getNextReturnElement(connection); - } -} - -void mpd_finishListOkCommand(mpd_Connection * connection) { - while(!connection->doneProcessing && connection->listOks && - !connection->doneListOk ) - { - mpd_getNextReturnElement(connection); - } -} - -int mpd_nextListOkCommand(mpd_Connection * connection) { - mpd_finishListOkCommand(connection); - if(!connection->doneProcessing) connection->doneListOk = 0; - if(connection->listOks == 0 || connection->doneProcessing) return -1; - return 0; -} - -void mpd_sendStatusCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"status\n"); -} - -mpd_Status * mpd_getStatus(mpd_Connection * connection) { - mpd_Status * status; - - /*mpd_executeCommand(connection,"status\n"); - - if(connection->error) return NULL;*/ - - if(connection->doneProcessing || (connection->listOks && - connection->doneListOk)) - { - return NULL; - } - - if(!connection->returnElement) mpd_getNextReturnElement(connection); - - status = malloc(sizeof(mpd_Status)); - status->volume = -1; - status->repeat = 0; - status->random = 0; - status->playlist = -1; - status->playlistLength = -1; - status->state = -1; - status->song = 0; - status->elapsedTime = 0; - status->totalTime = 0; - status->bitRate = 0; - status->sampleRate = 0; - status->bits = 0; - status->channels = 0; - status->crossfade = -1; - status->error = NULL; - status->updatingDb = 0; - - if(connection->error) { - free(status); - return NULL; - } - while(connection->returnElement) { - mpd_ReturnElement * re = connection->returnElement; - if(strcmp(re->name,"volume")==0) { - status->volume = atoi(re->value); - } - else if(strcmp(re->name,"repeat")==0) { - status->repeat = atoi(re->value); - } - else if(strcmp(re->name,"random")==0) { - status->random = atoi(re->value); - } - else if(strcmp(re->name,"playlist")==0) { - status->playlist = strtol(re->value,NULL,10); - } - else if(strcmp(re->name,"playlistlength")==0) { - status->playlistLength = atoi(re->value); - } - else if(strcmp(re->name,"bitrate")==0) { - status->bitRate = atoi(re->value); - } - else if(strcmp(re->name,"state")==0) { - if(strcmp(re->value,"play")==0) { - status->state = MPD_STATUS_STATE_PLAY; - } - else if(strcmp(re->value,"stop")==0) { - status->state = MPD_STATUS_STATE_STOP; - } - else if(strcmp(re->value,"pause")==0) { - status->state = MPD_STATUS_STATE_PAUSE; - } - else { - status->state = MPD_STATUS_STATE_UNKNOWN; - } - } - else if(strcmp(re->name,"song")==0) { - status->song = atoi(re->value); - } - else if(strcmp(re->name,"songid")==0) { - status->songid = atoi(re->value); - } - else if(strcmp(re->name,"time")==0) { - char * tok; - char * copy; - char * temp; - copy = strdup(re->value); - temp = strtok_r(copy,":",&tok); - if(temp) { - status->elapsedTime = atoi(temp); - temp = strtok_r(NULL,"",&tok); - if(temp) status->totalTime = atoi(temp); - } - free(copy); - } - else if(strcmp(re->name,"error")==0) { - status->error = strdup(re->value); - } - else if(strcmp(re->name,"xfade")==0) { - status->crossfade = atoi(re->value); - } - else if(strcmp(re->name,"updating_db")==0) { - status->updatingDb = atoi(re->value); - } - else if(strcmp(re->name,"audio")==0) { - char * tok; - char * copy; - char * temp; - copy = strdup(re->value); - temp = strtok_r(copy,":",&tok); - if(temp) { - status->sampleRate = atoi(temp); - temp = strtok_r(NULL,":",&tok); - if(temp) { - status->bits = atoi(temp); - temp = strtok_r(NULL,"",&tok); - if(temp) status->channels = atoi(temp); - } - } - free(copy); - } - - mpd_getNextReturnElement(connection); - if(connection->error) { - free(status); - return NULL; - } - } - - if(connection->error) { - free(status); - return NULL; - } - else if(status->state<0) { - strcpy(connection->errorStr,"state not found"); - connection->error = 1; - free(status); - return NULL; - } - - return status; -} - -void mpd_freeStatus(mpd_Status * status) { - if(status->error) free(status->error); - free(status); -} - -void mpd_sendStatsCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"stats\n"); -} - -mpd_Stats * mpd_getStats(mpd_Connection * connection) { - mpd_Stats * stats; - - /*mpd_executeCommand(connection,"stats\n"); - - if(connection->error) return NULL;*/ - - if(connection->doneProcessing || (connection->listOks && - connection->doneListOk)) - { - return NULL; - } - - if(!connection->returnElement) mpd_getNextReturnElement(connection); - - stats = malloc(sizeof(mpd_Stats)); - stats->numberOfArtists = 0; - stats->numberOfAlbums = 0; - stats->numberOfSongs = 0; - stats->uptime = 0; - stats->dbUpdateTime = 0; - stats->playTime = 0; - stats->dbPlayTime = 0; - - if(connection->error) { - free(stats); - return NULL; - } - while(connection->returnElement) { - mpd_ReturnElement * re = connection->returnElement; - if(strcmp(re->name,"artists")==0) { - stats->numberOfArtists = atoi(re->value); - } - else if(strcmp(re->name,"albums")==0) { - stats->numberOfAlbums = atoi(re->value); - } - else if(strcmp(re->name,"songs")==0) { - stats->numberOfSongs = atoi(re->value); - } - else if(strcmp(re->name,"uptime")==0) { - stats->uptime = strtol(re->value,NULL,10); - } - else if(strcmp(re->name,"db_update")==0) { - stats->dbUpdateTime = strtol(re->value,NULL,10); - } - else if(strcmp(re->name,"playtime")==0) { - stats->playTime = strtol(re->value,NULL,10); - } - else if(strcmp(re->name,"db_playtime")==0) { - stats->dbPlayTime = strtol(re->value,NULL,10); - } - - mpd_getNextReturnElement(connection); - if(connection->error) { - free(stats); - return NULL; - } - } - - if(connection->error) { - free(stats); - return NULL; - } - - return stats; -} - -void mpd_freeStats(mpd_Stats * stats) { - free(stats); -} - -void mpd_initSong(mpd_Song * song) { - song->file = NULL; - song->artist = NULL; - song->album = NULL; - song->track = NULL; - song->title = NULL; - song->name = NULL; - song->date = NULL; - song->time = MPD_SONG_NO_TIME; - song->pos = MPD_SONG_NO_NUM; - song->id = MPD_SONG_NO_ID; -} - -void mpd_finishSong(mpd_Song * song) { - if(song->file) free(song->file); - if(song->artist) free(song->artist); - if(song->album) free(song->album); - if(song->title) free(song->title); - if(song->track) free(song->track); - if(song->name) free(song->name); - if(song->date) free(song->date); -} - -mpd_Song * mpd_newSong() { - mpd_Song * ret = malloc(sizeof(mpd_Song)); - - mpd_initSong(ret); - - return ret; -} - -void mpd_freeSong(mpd_Song * song) { - mpd_finishSong(song); - free(song); -} - -mpd_Song * mpd_songDup(mpd_Song * song) { - mpd_Song * ret = mpd_newSong(); - - if(song->file) ret->file = strdup(song->file); - if(song->artist) ret->artist = strdup(song->artist); - if(song->album) ret->album = strdup(song->album); - if(song->title) ret->title = strdup(song->title); - if(song->track) ret->track = strdup(song->track); - if(song->name) ret->name = strdup(song->name); - if(song->date) ret->date = strdup(song->date); - ret->time = song->time; - ret->pos = song->pos; - ret->id = song->id; - - return ret; -} - -void mpd_initDirectory(mpd_Directory * directory) { - directory->path = NULL; -} - -void mpd_finishDirectory(mpd_Directory * directory) { - if(directory->path) free(directory->path); -} - -mpd_Directory * mpd_newDirectory () { - mpd_Directory * directory = malloc(sizeof(mpd_Directory));; - - mpd_initDirectory(directory); - - return directory; -} - -void mpd_freeDirectory(mpd_Directory * directory) { - mpd_finishDirectory(directory); - - free(directory); -} - -mpd_Directory * mpd_directoryDup(mpd_Directory * directory) { - mpd_Directory * ret = mpd_newDirectory(); - - if(directory->path) ret->path = strdup(directory->path); - - return ret; -} - -void mpd_initPlaylistFile(mpd_PlaylistFile * playlist) { - playlist->path = NULL; -} - -void mpd_finishPlaylistFile(mpd_PlaylistFile * playlist) { - if(playlist->path) free(playlist->path); -} - -mpd_PlaylistFile * mpd_newPlaylistFile() { - mpd_PlaylistFile * playlist = malloc(sizeof(mpd_PlaylistFile)); - - mpd_initPlaylistFile(playlist); - - return playlist; -} - -void mpd_freePlaylistFile(mpd_PlaylistFile * playlist) { - mpd_finishPlaylistFile(playlist); - free(playlist); -} - -mpd_PlaylistFile * mpd_playlistFileDup(mpd_PlaylistFile * playlist) { - mpd_PlaylistFile * ret = mpd_newPlaylistFile(); - - if(playlist->path) ret->path = strdup(playlist->path); - - return ret; -} - -void mpd_initInfoEntity(mpd_InfoEntity * entity) { - entity->info.directory = NULL; -} - -void mpd_finishInfoEntity(mpd_InfoEntity * entity) { - if(entity->info.directory) { - if(entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { - mpd_freeDirectory(entity->info.directory); - } - else if(entity->type == MPD_INFO_ENTITY_TYPE_SONG) { - mpd_freeSong(entity->info.song); - } - else if(entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE) { - mpd_freePlaylistFile(entity->info.playlistFile); - } - } -} - -mpd_InfoEntity * mpd_newInfoEntity() { - mpd_InfoEntity * entity = malloc(sizeof(mpd_InfoEntity)); - - mpd_initInfoEntity(entity); - - return entity; -} - -void mpd_freeInfoEntity(mpd_InfoEntity * entity) { - mpd_finishInfoEntity(entity); - free(entity); -} - -void mpd_sendInfoCommand(mpd_Connection * connection, char * command) { - mpd_executeCommand(connection,command); -} - -mpd_InfoEntity * mpd_getNextInfoEntity(mpd_Connection * connection) { - mpd_InfoEntity * entity = NULL; - - if(connection->doneProcessing || (connection->listOks && - connection->doneListOk)) - { - return NULL; - } - - if(!connection->returnElement) mpd_getNextReturnElement(connection); - - if(connection->returnElement) { - if(strcmp(connection->returnElement->name,"file")==0) { - entity = mpd_newInfoEntity(); - entity->type = MPD_INFO_ENTITY_TYPE_SONG; - entity->info.song = mpd_newSong(); - entity->info.song->file = - strdup(connection->returnElement->value); - } - else if(strcmp(connection->returnElement->name, - "directory")==0) { - entity = mpd_newInfoEntity(); - entity->type = MPD_INFO_ENTITY_TYPE_DIRECTORY; - entity->info.directory = mpd_newDirectory(); - entity->info.directory->path = - strdup(connection->returnElement->value); - } - else if(strcmp(connection->returnElement->name,"playlist")==0) { - entity = mpd_newInfoEntity(); - entity->type = MPD_INFO_ENTITY_TYPE_PLAYLISTFILE; - entity->info.playlistFile = mpd_newPlaylistFile(); - entity->info.playlistFile->path = - strdup(connection->returnElement->value); - } - else { - connection->error = 1; - strcpy(connection->errorStr,"problem parsing song info"); - return NULL; - } - } - else return NULL; - - mpd_getNextReturnElement(connection); - while(connection->returnElement) { - mpd_ReturnElement * re = connection->returnElement; - - if(strcmp(re->name,"file")==0) return entity; - else if(strcmp(re->name,"directory")==0) return entity; - else if(strcmp(re->name,"playlist")==0) return entity; - - if(entity->type == MPD_INFO_ENTITY_TYPE_SONG && - strlen(re->value)) { - if(!entity->info.song->artist && - strcmp(re->name,"Artist")==0) { - entity->info.song->artist = strdup(re->value); - } - else if(!entity->info.song->album && - strcmp(re->name,"Album")==0) { - entity->info.song->album = strdup(re->value); - } - else if(!entity->info.song->title && - strcmp(re->name,"Title")==0) { - entity->info.song->title = strdup(re->value); - } - else if(!entity->info.song->track && - strcmp(re->name,"Track")==0) { - entity->info.song->track = strdup(re->value); - } - else if(!entity->info.song->name && - strcmp(re->name,"Name")==0) { - entity->info.song->name = strdup(re->value); - } - else if(entity->info.song->time==MPD_SONG_NO_TIME && - strcmp(re->name,"Time")==0) { - entity->info.song->time = atoi(re->value); - } - else if(entity->info.song->pos==MPD_SONG_NO_NUM && - strcmp(re->name,"Pos")==0) { - entity->info.song->pos = atoi(re->value); - } - else if(entity->info.song->id==MPD_SONG_NO_ID && - strcmp(re->name,"Id")==0) { - entity->info.song->id = atoi(re->value); - } - else if(!entity->info.song->date && - strcmp(re->name, "Date") == 0) { - entity->info.song->date = strdup(re->value); - } - } - else if(entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { - } - else if(entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE) { - } - - mpd_getNextReturnElement(connection); - } - - return entity; -} - -char * mpd_getNextReturnElementNamed(mpd_Connection * connection, - const char * name) -{ - if(connection->doneProcessing || (connection->listOks && - connection->doneListOk)) - { - return NULL; - } - - mpd_getNextReturnElement(connection); - while(connection->returnElement) { - mpd_ReturnElement * re = connection->returnElement; - - if(strcmp(re->name,name)==0) return strdup(re->value); - mpd_getNextReturnElement(connection); - } - - return NULL; -} - -char * mpd_getNextArtist(mpd_Connection * connection) { - return mpd_getNextReturnElementNamed(connection,"Artist"); -} - -char * mpd_getNextAlbum(mpd_Connection * connection) { - return mpd_getNextReturnElementNamed(connection,"Album"); -} - -void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songPos) { - char * string = malloc(strlen("playlistinfo")+25); - sprintf(string,"playlistinfo \"%i\"\n",songPos); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int id) { - char * string = malloc(strlen("playlistid")+25); - sprintf(string, "playlistid \"%i\"\n", id); - mpd_sendInfoCommand(connection, string); - free(string); -} - -void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist) { - char * string = malloc(strlen("plchanges")+25); - sprintf(string,"plchanges \"%lld\"\n",playlist); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendListallCommand(mpd_Connection * connection, const char * dir) { - char * sDir = mpd_sanitizeArg(dir); - char * string = malloc(strlen("listall")+strlen(sDir)+5); - sprintf(string,"listall \"%s\"\n",sDir); - mpd_sendInfoCommand(connection,string); - free(string); - free(sDir); -} - -void mpd_sendListallInfoCommand(mpd_Connection * connection, const char * dir) { - char * sDir = mpd_sanitizeArg(dir); - char * string = malloc(strlen("listallinfo")+strlen(sDir)+5); - sprintf(string,"listallinfo \"%s\"\n",sDir); - mpd_sendInfoCommand(connection,string); - free(string); - free(sDir); -} - -void mpd_sendLsInfoCommand(mpd_Connection * connection, const char * dir) { - char * sDir = mpd_sanitizeArg(dir); - char * string = malloc(strlen("lsinfo")+strlen(sDir)+5); - sprintf(string,"lsinfo \"%s\"\n",sDir); - mpd_sendInfoCommand(connection,string); - free(string); - free(sDir); -} - -void mpd_sendCurrentSongCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"currentsong\n"); -} - -void mpd_sendSearchCommand(mpd_Connection * connection, int table, - const char * str) -{ - char st[10]; - char * string; - char * sanitStr = mpd_sanitizeArg(str); - if(table == MPD_TABLE_ARTIST) strcpy(st,"artist"); - else if(table == MPD_TABLE_ALBUM) strcpy(st,"album"); - else if(table == MPD_TABLE_TITLE) strcpy(st,"title"); - else if(table == MPD_TABLE_FILENAME) strcpy(st,"filename"); - else { - connection->error = 1; - strcpy(connection->errorStr,"unknown table for search"); - return; - } - string = malloc(strlen("search")+strlen(sanitStr)+strlen(st)+6); - sprintf(string,"search %s \"%s\"\n",st,sanitStr); - mpd_sendInfoCommand(connection,string); - free(string); - free(sanitStr); -} - -void mpd_sendFindCommand(mpd_Connection * connection, int table, - const char * str) -{ - char st[10]; - char * string; - char * sanitStr = mpd_sanitizeArg(str); - if(table == MPD_TABLE_ARTIST) strcpy(st,"artist"); - else if(table == MPD_TABLE_ALBUM) strcpy(st,"album"); - else if(table == MPD_TABLE_TITLE) strcpy(st,"title"); - else { - connection->error = 1; - strcpy(connection->errorStr,"unknown table for find"); - return; - } - string = malloc(strlen("find")+strlen(sanitStr)+strlen(st)+6); - sprintf(string,"find %s \"%s\"\n",st,sanitStr); - mpd_sendInfoCommand(connection,string); - free(string); - free(sanitStr); -} - -void mpd_sendListCommand(mpd_Connection * connection, int table, - const char * arg1) -{ - char st[10]; - char * string; - if(table == MPD_TABLE_ARTIST) strcpy(st,"artist"); - else if(table == MPD_TABLE_ALBUM) strcpy(st,"album"); - else { - connection->error = 1; - strcpy(connection->errorStr,"unknown table for list"); - return; - } - if(arg1) { - char * sanitArg1 = mpd_sanitizeArg(arg1); - string = malloc(strlen("list")+strlen(sanitArg1)+strlen(st)+6); - sprintf(string,"list %s \"%s\"\n",st,sanitArg1); - free(sanitArg1); - } - else { - string = malloc(strlen("list")+strlen(st)+3); - sprintf(string,"list %s\n",st); - } - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendAddCommand(mpd_Connection * connection, const char * file) { - char * sFile = mpd_sanitizeArg(file); - char * string = malloc(strlen("add")+strlen(sFile)+5); - sprintf(string,"add \"%s\"\n",sFile); - mpd_executeCommand(connection,string); - free(string); - free(sFile); -} - -void mpd_sendDeleteCommand(mpd_Connection * connection, int songPos) { - char * string = malloc(strlen("delete")+25); - sprintf(string,"delete \"%i\"\n",songPos); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendDeleteIdCommand(mpd_Connection * connection, int id) { - char * string = malloc(strlen("deleteid")+25); - sprintf(string, "deleteid \"%i\"\n", id); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendSaveCommand(mpd_Connection * connection, const char * name) { - char * sName = mpd_sanitizeArg(name); - char * string = malloc(strlen("save")+strlen(sName)+5); - sprintf(string,"save \"%s\"\n",sName); - mpd_executeCommand(connection,string); - free(string); - free(sName); -} - -void mpd_sendLoadCommand(mpd_Connection * connection, const char * name) { - char * sName = mpd_sanitizeArg(name); - char * string = malloc(strlen("load")+strlen(sName)+5); - sprintf(string,"load \"%s\"\n",sName); - mpd_executeCommand(connection,string); - free(string); - free(sName); -} - -void mpd_sendRmCommand(mpd_Connection * connection, const char * name) { - char * sName = mpd_sanitizeArg(name); - char * string = malloc(strlen("rm")+strlen(sName)+5); - sprintf(string,"rm \"%s\"\n",sName); - mpd_executeCommand(connection,string); - free(string); - free(sName); -} - -void mpd_sendShuffleCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"shuffle\n"); -} - -void mpd_sendClearCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"clear\n"); -} - -void mpd_sendPlayCommand(mpd_Connection * connection, int songPos) { - char * string = malloc(strlen("play")+25); - sprintf(string,"play \"%i\"\n",songPos); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendPlayIdCommand(mpd_Connection * connection, int id) { - char * string = malloc(strlen("playid")+25); - sprintf(string,"playid \"%i\"\n",id); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendStopCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"stop\n"); -} - -void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode) { - char * string = malloc(strlen("pause")+25); - sprintf(string,"pause \"%i\"\n",pauseMode); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendNextCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"next\n"); -} - -void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to) { - char * string = malloc(strlen("move")+25); - sprintf(string,"move \"%i\" \"%i\"\n",from,to); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendMoveIdCommand(mpd_Connection * connection, int id, int to) { - char * string = malloc(strlen("moveid")+25); - sprintf(string, "moveid \"%i\" \"%i\"\n", id, to); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2) { - char * string = malloc(strlen("swap")+25); - sprintf(string,"swap \"%i\" \"%i\"\n",song1,song2); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendSwapIdCommand(mpd_Connection * connection, int id1, int id2) { - char * string = malloc(strlen("swapid")+25); - sprintf(string, "swapid \"%i\" \"%i\"\n", id1, id2); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time) { - char * string = malloc(strlen("seek")+25); - sprintf(string,"seek \"%i\" \"%i\"\n",song,time); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendSeekIdCommand(mpd_Connection * connection, int id, int time) { - char * string = malloc(strlen("seekid")+25); - sprintf(string,"seekid \"%i\" \"%i\"\n",id,time); - mpd_sendInfoCommand(connection,string); - free(string); -} - -void mpd_sendUpdateCommand(mpd_Connection * connection, char * path) { - char * sPath = mpd_sanitizeArg(path); - char * string = malloc(strlen("update")+strlen(sPath)+5); - sprintf(string,"update \"%s\"\n",sPath); - mpd_sendInfoCommand(connection,string); - free(string); - free(sPath); -} - -int mpd_getUpdateId(mpd_Connection * connection) { - char * jobid; - int ret = 0; - - jobid = mpd_getNextReturnElementNamed(connection,"updating_db"); - if(jobid) { - ret = atoi(jobid); - free(jobid); - } - - return ret; -} - -void mpd_sendPrevCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"previous\n"); -} - -void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode) { - char * string = malloc(strlen("repeat")+25); - sprintf(string,"repeat \"%i\"\n",repeatMode); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode) { - char * string = malloc(strlen("random")+25); - sprintf(string,"random \"%i\"\n",randomMode); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange) { - char * string = malloc(strlen("setvol")+25); - sprintf(string,"setvol \"%i\"\n",volumeChange); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendVolumeCommand(mpd_Connection * connection, int volumeChange) { - char * string = malloc(strlen("volume")+25); - sprintf(string,"volume \"%i\"\n",volumeChange); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds) { - char * string = malloc(strlen("crossfade")+25); - sprintf(string,"crossfade \"%i\"\n",seconds); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendPasswordCommand(mpd_Connection * connection, const char * pass) { - char * sPass = mpd_sanitizeArg(pass); - char * string = malloc(strlen("password")+strlen(sPass)+5); - sprintf(string,"password \"%s\"\n",sPass); - mpd_executeCommand(connection,string); - free(string); - free(sPass); -} - -void mpd_sendCommandListBegin(mpd_Connection * connection) { - if(connection->commandList) { - strcpy(connection->errorStr,"already in command list mode"); - connection->error = 1; - return; - } - connection->commandList = COMMAND_LIST; - mpd_executeCommand(connection,"command_list_begin\n"); -} - -void mpd_sendCommandListOkBegin(mpd_Connection * connection) { - if(connection->commandList) { - strcpy(connection->errorStr,"already in command list mode"); - connection->error = 1; - return; - } - connection->commandList = COMMAND_LIST_OK; - mpd_executeCommand(connection,"command_list_ok_begin\n"); - connection->listOks = 0; -} - -void mpd_sendCommandListEnd(mpd_Connection * connection) { - if(!connection->commandList) { - strcpy(connection->errorStr,"not in command list mode"); - connection->error = 1; - return; - } - connection->commandList = 0; - mpd_executeCommand(connection,"command_list_end\n"); -} - -void mpd_sendOutputsCommand(mpd_Connection * connection) { - mpd_executeCommand(connection,"outputs\n"); -} - -mpd_OutputEntity * mpd_getNextOutput(mpd_Connection * connection) { - mpd_OutputEntity * output = NULL; - - if(connection->doneProcessing || (connection->listOks && - connection->doneListOk)) - { - return NULL; - } - - if(connection->error) return NULL; - - output = malloc(sizeof(mpd_OutputEntity)); - output->id = -10; - output->name = NULL; - output->enabled = 0; - - if(!connection->returnElement) mpd_getNextReturnElement(connection); - - while(connection->returnElement) { - mpd_ReturnElement * re = connection->returnElement; - if(strcmp(re->name,"outputid")==0) { - if(output!=NULL && output->id>=0) return output; - output->id = atoi(re->value); - } - else if(strcmp(re->name,"outputname")==0) { - output->name = strdup(re->value); - } - else if(strcmp(re->name,"outputenabled")==0) { - output->enabled = atoi(re->value); - } - - mpd_getNextReturnElement(connection); - if(connection->error) { - free(output); - return NULL; - } - - } - - return output; -} - -void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId) { - char * string = malloc(strlen("enableoutput")+25); - sprintf(string,"enableoutput \"%i\"\n",outputId); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId) { - char * string = malloc(strlen("disableoutput")+25); - sprintf(string,"disableoutput \"%i\"\n",outputId); - mpd_executeCommand(connection,string); - free(string); -} - -void mpd_freeOutputElement(mpd_OutputEntity * output) { - free(output->name); - free(output); -} diff -Nru glurp-0.11.6/src/libmpdclient.h glurp-0.12.3/src/libmpdclient.h --- glurp-0.11.6/src/libmpdclient.h 2005-04-03 02:56:08.000000000 +0100 +++ glurp-0.12.3/src/libmpdclient.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,501 +0,0 @@ -/* libmpdclient - (c)2003-2004 by Warren Dukes (shank@mercury.chem.pitt.edu) - This project's homepage is: http://www.musicpd.org - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - - Neither the name of the Music Player Daemon nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef LIBMPDCLIENT_H -#define LIBMPDCLIENT_H - -#include - -#define MPD_BUFFER_MAX_LENGTH 50000 -#define MPD_WELCOME_MESSAGE "OK MPD " - -#define MPD_ERROR_TIMEOUT 10 /* timeout trying to talk to mpd */ -#define MPD_ERROR_SYSTEM 11 /* system error */ -#define MPD_ERROR_UNKHOST 12 /* unknown host */ -#define MPD_ERROR_CONNPORT 13 /* problems connecting to port on host */ -#define MPD_ERROR_NOTMPD 14 /* mpd not running on port at host */ -#define MPD_ERROR_NORESPONSE 15 /* no response on attempting to connect */ -#define MPD_ERROR_SENDING 16 /* error sending command */ -#define MPD_ERROR_CONNCLOSED 17 /* connection closed by mpd */ -#define MPD_ERROR_ACK 18 /* ACK returned! */ -#define MPD_ERROR_BUFFEROVERRUN 19 /* Buffer was overrun! */ - -#define MPD_ACK_ERROR_UNK -1 -#define MPD_ERROR_AT_UNK -1 - -#define MPD_ACK_ERROR_NOT_LIST 1 -#define MPD_ACK_ERROR_ARG 2 -#define MPD_ACK_ERROR_PASSWORD 3 -#define MPD_ACK_ERROR_PERMISSION 4 -#define MPD_ACK_ERROR_UNKNOWN_CMD 5 - -#define MPD_ACK_ERROR_NO_EXIST 50 -#define MPD_ACK_ERROR_PLAYLIST_MAX 51 -#define MPD_ACK_ERROR_SYSTEM 52 -#define MPD_ACK_ERROR_PLAYLIST_LOAD 53 -#define MPD_ACK_ERROR_UPDATE_ALREADY 54 -#define MPD_ACK_ERROR_PLAYER_SYNC 55 -#define MPD_ACK_ERROR_EXIST 56 - -#ifdef __cplusplus -extern "C" { -#endif - -/* internal stuff don't touch this struct */ -typedef struct _mpd_ReturnElement { - char * name; - char * value; -} mpd_ReturnElement; - -/* mpd_Connection - * holds info about connection to mpd - * use error, and errorStr to detect errors - */ -typedef struct _mpd_Connection { - /* use this to check the version of mpd */ - int version[3]; - /* IMPORTANT, you want to get the error messages from here */ - char errorStr[MPD_BUFFER_MAX_LENGTH+1]; - int errorCode; - int errorAt; - /* this will be set to MPD_ERROR_* if there is an error, 0 if not */ - int error; - /* DON'T TOUCH any of the rest of this stuff */ - int sock; - char buffer[MPD_BUFFER_MAX_LENGTH+1]; - int buflen; - int bufstart; - int doneProcessing; - int listOks; - int doneListOk; - int commandList; - mpd_ReturnElement * returnElement; - struct timeval timeout; -} mpd_Connection; - -/* mpd_newConnection - * use this to open a new connection - * you should use mpd_closeConnection, when your done with the connection, - * even if an error has occurred - * _timeout_ is the connection timeout period in seconds - */ -mpd_Connection * mpd_newConnection(const char * host, int port, float timeout); - -void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout); - -/* mpd_closeConnection - * use this to close a connection and free'ing subsequent memory - */ -void mpd_closeConnection(mpd_Connection * connection); - -/* mpd_clearError - * clears error - */ -void mpd_clearError(mpd_Connection * connection); - -/* STATUS STUFF */ - -/* use these with status.state to determine what state the player is in */ -#define MPD_STATUS_STATE_UNKNOWN 0 -#define MPD_STATUS_STATE_STOP 1 -#define MPD_STATUS_STATE_PLAY 2 -#define MPD_STATUS_STATE_PAUSE 3 - -/* us this with status.volume to determine if mpd has volume support */ -#define MPD_STATUS_NO_VOLUME -1 - -/* mpd_Status - * holds info return from status command - */ -typedef struct mpd_Status { - /* 0-100, or MPD_STATUS_NO_VOLUME when there is no volume support */ - int volume; - /* 1 if repeat is on, 0 otherwise */ - int repeat; - /* 1 if random is on, 0 otherwise */ - int random; - /* playlist length */ - int playlistLength; - /* playlist, use this to determine when the playlist has changed */ - long long playlist; - /* use with MPD_STATUS_STATE_* to determine state of player */ - int state; - /* crossfade setting in seconds */ - int crossfade; - /* if a song is currently selected (always the case when state is - * PLAY or PAUSE), this is the position of the currently - * playing song in the playlist, beginning with 0 - */ - int song; - /* Song ID of the currently selected song */ - int songid; - /* time in seconds that have elapsed in the currently playing/paused - * song - */ - int elapsedTime; - /* length in seconds of the currently playing/paused song */ - int totalTime; - /* current bit rate in kbs */ - int bitRate; - /* audio sample rate */ - unsigned int sampleRate; - /* audio bits */ - int bits; - /* audio channels */ - int channels; - /* 1 if mpd is updating, 0 otherwise */ - int updatingDb; - /* error */ - char * error; -} mpd_Status; - -void mpd_sendStatusCommand(mpd_Connection * connection); - -/* mpd_getStatus - * returns status info, be sure to free it with mpd_freeStatus() - * call this after mpd_sendStatusCommand() - */ -mpd_Status * mpd_getStatus(mpd_Connection * connection); - -/* mpd_freeStatus - * free's status info malloc'd and returned by mpd_getStatus - */ -void mpd_freeStatus(mpd_Status * status); - -typedef struct _mpd_Stats { - int numberOfArtists; - int numberOfAlbums; - int numberOfSongs; - unsigned long uptime; - unsigned long dbUpdateTime; - unsigned long playTime; - unsigned long dbPlayTime; -} mpd_Stats; - -void mpd_sendStatsCommand(mpd_Connection * connection); - -mpd_Stats * mpd_getStats(mpd_Connection * connection); - -void mpd_freeStats(mpd_Stats * stats); - -/* SONG STUFF */ - -#define MPD_SONG_NO_TIME -1 -#define MPD_SONG_NO_NUM -1 -#define MPD_SONG_NO_ID -1 - -/* mpd_Song - * for storing song info returned by mpd - */ -typedef struct _mpd_Song { - /* filename of song */ - char * file; - /* artist, maybe NULL if there is no tag */ - char * artist; - /* title, maybe NULL if there is no tag */ - char * title; - /* album, maybe NULL if there is no tag */ - char * album; - /* track, maybe NULL if there is no tag */ - char * track; - /* name, maybe NULL if there is no tag; it's the name of the current - * song, f.e. the icyName of the stream */ - char * name; - /* date */ - char *date; - /* length of song in seconds, check that it is not MPD_SONG_NO_TIME */ - int time; - /* if plchanges/playlistinfo/playlistid used, is the position of the - * song in the playlist */ - int pos; - /* song id for a song in the playlist */ - int id; -} mpd_Song; - -/* mpd_newSong - * use to allocate memory for a new mpd_Song - * file, artist, etc all initialized to NULL - * if your going to assign values to file, artist, etc - * be sure to malloc or strdup the memory - * use mpd_freeSong to free the memory for the mpd_Song, it will also - * free memory for file, artist, etc, so don't do it yourself - */ -mpd_Song * mpd_newSong(); - -/* mpd_freeSong - * use to free memory allocated by mpd_newSong - * also it will free memory pointed to by file, artist, etc, so be careful - */ -void mpd_freeSong(mpd_Song * song); - -/* mpd_songDup - * works like strDup, but for a mpd_Song - */ -mpd_Song * mpd_songDup(mpd_Song * song); - -/* DIRECTORY STUFF */ - -/* mpd_Directory - * used to store info fro directory (right now that just the path) - */ -typedef struct _mpd_Directory { - char * path; -} mpd_Directory; - -/* mpd_newDirectory - * allocates memory for a new directory - * use mpd_freeDirectory to free this memory - */ -mpd_Directory * mpd_newDirectory (); - -/* mpd_freeDirectory - * used to free memory allocated with mpd_newDirectory, and it frees - * path of mpd_Directory, so be careful - */ -void mpd_freeDirectory(mpd_Directory * directory); - -/* mpd_directoryDup - * works like strdup, but for mpd_Directory - */ -mpd_Directory * mpd_directoryDup(mpd_Directory * directory); - -/* PLAYLISTFILE STUFF */ - -/* mpd_PlaylistFile - * stores info about playlist file returned by lsinfo - */ -typedef struct _mpd_PlaylistFile { - char * path; -} mpd_PlaylistFile; - -/* mpd_newPlaylistFile - * allocates memory for new mpd_PlaylistFile, path is set to NULL - * free this memory with mpd_freePlaylistFile - */ -mpd_PlaylistFile * mpd_newPlaylistFile(); - -/* mpd_freePlaylist - * free memory allocated for freePlaylistFile, will also free - * path, so be careful - */ -void mpd_freePlaylistFile(mpd_PlaylistFile * playlist); - -/* mpd_playlistFileDup - * works like strdup, but for mpd_PlaylistFile - */ -mpd_PlaylistFile * mpd_playlistFileDup(mpd_PlaylistFile * playlist); - -/* INFO ENTITY STUFF */ - -/* the type of entity returned from one of the commands that generates info - * use in conjunction with mpd_InfoEntity.type - */ -#define MPD_INFO_ENTITY_TYPE_DIRECTORY 0 -#define MPD_INFO_ENTITY_TYPE_SONG 1 -#define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE 2 - -/* mpd_InfoEntity - * stores info on stuff returned info commands - */ -typedef struct mpd_InfoEntity { - /* the type of entity, use with MPD_INFO_ENTITY_TYPE_* to determine - * what this entity is (song, directory, etc...) - */ - int type; - /* the actual data you want, mpd_Song, mpd_Directory, etc */ - union { - mpd_Directory * directory; - mpd_Song * song; - mpd_PlaylistFile * playlistFile; - } info; -} mpd_InfoEntity; - -mpd_InfoEntity * mpd_newInfoEntity(); - -void mpd_freeInfoEntity(mpd_InfoEntity * entity); - -/* INFO COMMANDS AND STUFF */ - -/* use this function to loop over after calling Info/Listall functions */ -mpd_InfoEntity * mpd_getNextInfoEntity(mpd_Connection * connection); - -/* fetches the currently seeletect song (the song referenced by status->song - * and status->songid*/ -void mpd_sendCurrentSongCommand(mpd_Connection * connection); - -/* songNum of -1, means to display the whole list */ -void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songNum); - -/* songId of -1, means to display the whole list */ -void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int songId); - -/* use this to get the changes in the playlist since version _playlist_ */ -void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist); - -/* recursivel fetches all songs/dir/playlists in "dir* (no metadata is - * returned) */ -void mpd_sendListallCommand(mpd_Connection * connection, const char * dir); - -/* same as sendListallCommand, but also metadata is returned */ -void mpd_sendListallInfoCommand(mpd_Connection * connection, const char * dir); - -/* non-recursive version of ListallInfo */ -void mpd_sendLsInfoCommand(mpd_Connection * connection, const char * dir); - -#define MPD_TABLE_ARTIST 0 -#define MPD_TABLE_ALBUM 1 -#define MPD_TABLE_TITLE 2 -#define MPD_TABLE_FILENAME 3 - -void mpd_sendSearchCommand(mpd_Connection * connection, int table, - const char * str); - -void mpd_sendFindCommand(mpd_Connection * connection, int table, - const char * str); - -/* LIST TAG COMMANDS */ - -/* use this function fetch next artist entry, be sure to free the returned - * string. NULL means there are no more. Best used with sendListArtists - */ -char * mpd_getNextArtist(mpd_Connection * connection); - -char * mpd_getNextAlbum(mpd_Connection * connection); - -/* list artist or albums by artist, arg1 should be set to the artist if - * listing albums by a artist, otherwise NULL for listing all artists or albums - */ -void mpd_sendListCommand(mpd_Connection * connection, int table, - const char * arg1); - -/* SIMPLE COMMANDS */ - -void mpd_sendAddCommand(mpd_Connection * connection, const char * file); - -void mpd_sendDeleteCommand(mpd_Connection * connection, int songNum); - -void mpd_sendDeleteIdCommand(mpd_Connection * connection, int songNum); - -void mpd_sendSaveCommand(mpd_Connection * connection, const char * name); - -void mpd_sendLoadCommand(mpd_Connection * connection, const char * name); - -void mpd_sendRmCommand(mpd_Connection * connection, const char * name); - -void mpd_sendShuffleCommand(mpd_Connection * connection); - -void mpd_sendClearCommand(mpd_Connection * connection); - -/* use this to start playing at the beginning, useful when in random mode */ -#define MPD_PLAY_AT_BEGINNING -1 - -void mpd_sendPlayCommand(mpd_Connection * connection, int songNum); - -void mpd_sendPlayIdCommand(mpd_Connection * connection, int songNum); - -void mpd_sendStopCommand(mpd_Connection * connection); - -void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode); - -void mpd_sendNextCommand(mpd_Connection * connection); - -void mpd_sendPrevCommand(mpd_Connection * connection); - -void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to); - -void mpd_sendMoveIdCommand(mpd_Connection * connection, int from, int to); - -void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2); - -void mpd_sendSwapIdCommand(mpd_Connection * connection, int song1, int song2); - -void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time); - -void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int time); - -void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode); - -void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode); - -void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange); - -/* WARNING: don't use volume command, its depreacted */ -void mpd_sendVolumeCommand(mpd_Connection * connection, int volumeChange); - -void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds); - -void mpd_sendUpdateCommand(mpd_Connection * connection, char * path); - -/* returns the update job id, call this after a update command*/ -int mpd_getUpdateId(mpd_Connection * connection); - -void mpd_sendPasswordCommand(mpd_Connection * connection, const char * pass); - -/* after executing a command, when your done with it to get its status - * (you want to check connection->error for an error) - */ -void mpd_finishCommand(mpd_Connection * connection); - -/* command list stuff, use this to do things like add files very quickly */ -void mpd_sendCommandListBegin(mpd_Connection * connection); - -void mpd_sendCommandListOkBegin(mpd_Connection * connection); - -void mpd_sendCommandListEnd(mpd_Connection * connection); - -/* advance to the next listOk - * returns 0 if advanced to the next list_OK, - * returns -1 if it advanced to an OK or ACK */ -int mpd_nextListOkCommand(mpd_Connection * connection); - -typedef struct _mpd_OutputEntity { - int id; - char * name; - int enabled; -} mpd_OutputEntity; - -void mpd_sendOutputsCommand(mpd_Connection * connection); - -mpd_OutputEntity * mpd_getNextOutput(mpd_Connection * connection); - -void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId); - -void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId); - -void mpd_freeOutputElement(mpd_OutputEntity * output); - -#ifdef __cplusplus -} -#endif - -#endif diff -Nru glurp-0.11.6/src/main.c glurp-0.12.3/src/main.c --- glurp-0.11.6/src/main.c 2005-04-03 04:31:47.000000000 +0100 +++ glurp-0.12.3/src/main.c 2010-04-14 21:01:43.000000000 +0100 @@ -26,19 +26,21 @@ #include #include -#include #include #include #include +#include #include "structs.h" #include "support.h" #include "gui.h" #include "comm.h" #include "conf.h" +#include "gui-callbacks.h" +#include "mpd-callbacks.h" +#include "trayicon.h" -GladeXML *guixml = NULL, *configxml = NULL, *plxml = NULL, *addxml = NULL, - *streamxml = NULL; +GtkBuilder* builder = NULL; GlurpState *glurp = NULL; @@ -49,42 +51,53 @@ static struct option long_options[] = { { "version", 0, NULL, 0 }, { "help", 0, NULL, 0 }, + { "config", 1, NULL, 0 }, { 0, 0, NULL, 0 } }; + + /* NLS not yet implemented */ +#ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + + gtk_set_locale (); + gtk_init (&argc, &argv); + while (1) { option_index = 0; if( (c = getopt_long(argc, argv, "vh", long_options, &option_index)) == -1) break; if( option_index == 1 || c == 'h' ) { /* help */ - printf("Usage: %s [-v|--version] [-h|--help]\n", argv[0]); + printf("Usage: %s [-v|--version] [-h|--help] [--config=...]\n", argv[0]); return 0; } if( option_index == 0 || c == 'v' ) { /* version */ printf("%s version %s\n", argv[0], GLURP_VERSION); return 0; } - printf("Usage: %s [-v|--version] [-h|--help]\n", argv[0]); + + if( option_index == 2 ) { /* config */ + if (optarg) { + glurp = g_new0(GlurpState,1); + glurp->alternate_config_file = g_strdup(optarg); + } + continue; + } + printf("Usage: %s [-v|--version] [-h|--help] [--config=...]\n", argv[0]); return -1; } - - -#ifdef ENABLE_NLS - bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); -#endif - - gtk_set_locale (); - gtk_init (&argc, &argv); + - glurp = malloc(sizeof(GlurpState)); + if (!glurp) glurp = g_new0(GlurpState, 1); + glurp->progress_dragging = FALSE; glurp->refresh_rate_status = 0; - glurp->conn = NULL; - glurp->playlist = NULL; + glurp->mpd = NULL; glurp->playlist_version = 0; glurp->current_song = NULL; @@ -97,7 +110,6 @@ glurp->playlists = NULL; glurp->statusbar_status = 0; - glurp->conn_state = GLURP_CONN_STATE_DISCONNECTED; glurp->play_state = MPD_STATUS_STATE_STOP; glurp->prev_song_num = -1; glurp->scroll = 0; @@ -107,6 +119,9 @@ glurp->updating_db = FALSE; glurp->stream_history = NULL; + glurp->trayicon = NULL; + glurp->traymenu = NULL; + glurp->window = NULL; if( !config_load()) { debug("Couldn't read config file, aborting. Goodnight!"); @@ -114,11 +129,24 @@ } if( !(glurp_init_gui()) ) g_error("Can't initialize GUI, exiting...\n"); - - if(glurp->config->autoconnect) glurp_connect(); - else statusbar_print("Glurp v%s loaded...", GLURP_VERSION); + + glurp->mpd = mpd_new(glurp->config->server_host, glurp->config->server_port, glurp->config->server_pass); + /* add the callbacks now; we'll need them when we connect... + */ + mpd_signal_connect_connection_changed( glurp->mpd, mpd_connection_changed_callback, glurp); + mpd_signal_connect_status_changed( glurp->mpd, mpd_status_changed_callback, glurp); + mpd_signal_connect_error( glurp->mpd, mpd_error_callback, glurp); + + if(glurp->config->autoconnect) { + debug("autoconnecting..."); + glurp_connect(); + } else { + statusbar_print("Glurp v%s loaded...", GLURP_VERSION); + } + signal(SIGINT, sigint_handler); gtk_main(); return 0; } +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/Makefile.am glurp-0.12.3/src/Makefile.am --- glurp-0.11.6/src/Makefile.am 2005-06-05 16:28:03.000000000 +0100 +++ glurp-0.12.3/src/Makefile.am 2010-04-13 15:10:24.000000000 +0100 @@ -1,23 +1,25 @@ ## Process this file with automake to produce Makefile.in INCLUDES = \ - -DDATADIR=\""$(datadir)/glurp/"\" \ - @PACKAGE_CFLAGS@ -Wall + -DDATA_DIR=\""$(datadir)/glurp/"\" \ + @PACKAGE_CFLAGS@ @EXTRA_CFLAGS@ -Wall bin_PROGRAMS = glurp glurp_SOURCES = \ - comm.h comm.c \ conf.h conf.c \ + mpd-callbacks.h mpd-callbacks.c \ gui.h gui.c \ - gui-callbacks.c \ + comm.h comm.c \ + gui-callbacks.h gui-callbacks.c \ + player.h player.c \ keyboard.c \ - libmpdclient.h libmpdclient.c \ main.c \ - player.h player.c \ structs.h \ - support.h support.c + support.h support.c \ + trayicon.h trayicon.c \ + traymenu.h traymenu.c -glurp_LDFLAGS = -export-dynamic +glurp_LDFLAGS = -export-dynamic @EXTRA_LDFLAGS@ glurp_LDADD = @PACKAGE_LIBS@ diff -Nru glurp-0.11.6/src/Makefile.in glurp-0.12.3/src/Makefile.in --- glurp-0.11.6/src/Makefile.in 2005-06-05 16:38:32.000000000 +0100 +++ glurp-0.12.3/src/Makefile.in 2010-04-17 23:28:57.000000000 +0100 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +15,12 @@ @SET_MAKE@ -SOURCES = $(glurp_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,6 +32,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ bin_PROGRAMS = glurp$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -46,18 +44,21 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_glurp_OBJECTS = comm.$(OBJEXT) conf.$(OBJEXT) gui.$(OBJEXT) \ - gui-callbacks.$(OBJEXT) keyboard.$(OBJEXT) \ - libmpdclient.$(OBJEXT) main.$(OBJEXT) player.$(OBJEXT) \ - support.$(OBJEXT) +am_glurp_OBJECTS = conf.$(OBJEXT) mpd-callbacks.$(OBJEXT) \ + gui.$(OBJEXT) comm.$(OBJEXT) gui-callbacks.$(OBJEXT) \ + player.$(OBJEXT) keyboard.$(OBJEXT) main.$(OBJEXT) \ + support.$(OBJEXT) trayicon.$(OBJEXT) traymenu.$(OBJEXT) glurp_OBJECTS = $(am_glurp_OBJECTS) glurp_DEPENDENCIES = -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +glurp_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(glurp_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) @@ -68,8 +69,6 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -88,6 +87,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +EXTRA_CFLAGS = @EXTRA_CFLAGS@ +EXTRA_LDFLAGS = @EXTRA_LDFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -97,9 +100,8 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -108,6 +110,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ @@ -115,53 +118,75 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ INCLUDES = \ - -DDATADIR=\""$(datadir)/glurp/"\" \ - @PACKAGE_CFLAGS@ -Wall + -DDATA_DIR=\""$(datadir)/glurp/"\" \ + @PACKAGE_CFLAGS@ @EXTRA_CFLAGS@ -Wall glurp_SOURCES = \ - comm.h comm.c \ conf.h conf.c \ + mpd-callbacks.h mpd-callbacks.c \ gui.h gui.c \ - gui-callbacks.c \ + comm.h comm.c \ + gui-callbacks.h gui-callbacks.c \ + player.h player.c \ keyboard.c \ - libmpdclient.h libmpdclient.c \ main.c \ - player.h player.c \ structs.h \ - support.h support.c + support.h support.c \ + trayicon.h trayicon.c \ + traymenu.h traymenu.c -glurp_LDFLAGS = -export-dynamic +glurp_LDFLAGS = -export-dynamic @EXTRA_LDFLAGS@ glurp_LDADD = @PACKAGE_LIBS@ all: all-am @@ -171,14 +196,14 @@ @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -196,32 +221,47 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + 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 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) glurp$(EXEEXT): $(glurp_OBJECTS) $(glurp_DEPENDENCIES) @rm -f glurp$(EXEEXT) - $(LINK) $(glurp_LDFLAGS) $(glurp_OBJECTS) $(glurp_LDADD) $(LIBS) + $(glurp_LINK) $(glurp_OBJECTS) $(glurp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -234,98 +274,106 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui-callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpdclient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpd-callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trayicon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traymenu.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -uninstall-info-am: 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; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + 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; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -334,7 +382,7 @@ all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -356,6 +404,7 @@ distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -376,18 +425,38 @@ html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-binPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -407,18 +476,23 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ + 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 pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-info-am + uninstall-am uninstall-binPROGRAMS + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru glurp-0.11.6/src/mpd-callbacks.c glurp-0.12.3/src/mpd-callbacks.c --- glurp-0.11.6/src/mpd-callbacks.c 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/src/mpd-callbacks.c 2010-04-14 23:07:23.000000000 +0100 @@ -0,0 +1,204 @@ +/* + Glurp - A GTK+ client for Music Player Daemon + Copyright (C) 2004, 2005 Andrej Kacian + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + http://musicpd.org/glurp.shtml + +*/ +#include "support.h" +#include "gui.h" +#include "comm.h" +#include "player.h" +#include "mpd-callbacks.h" + +extern GtkBuilder *builder; + +void mpd_status_changed_callback (MpdObj *mi, ChangedStatusType what, void *userdata) { + struct glurp_t* glurp = userdata; + gchar* temp; + int tel; + + if (what != MPD_CST_ELAPSED_TIME) /* we don't want to have a line each second... */ + debug ("Status change callback... what: %x", what); + if (what & MPD_CST_PLAYLIST) { + update_playlist(mpd_playlist_get_old_playlist_id(glurp->mpd)); + /* update song name display for streams that change it on the fly */ + glurp->current_song = mpd_playlist_get_current_song(glurp->mpd); + gui_show_song_name(); + } + + if (what & MPD_CST_VOLUME ) { + /* update volumebar */ + gtk_scale_button_set_value(GTK_SCALE_BUTTON(gtk_builder_get_object(builder, "volumebar")), (gdouble)(mpd_status_get_volume(glurp->mpd)/100.0)); + } + if (what & MPD_CST_SONGID ) { + /* save current song */ + glurp->current_song = mpd_playlist_get_current_song(glurp->mpd); + gui_show_song_name(); + } + + if (what & MPD_CST_ELAPSED_TIME ) { + if(!glurp->progress_dragging) { + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "progressbar")), TRUE); + + /* +0.1 to make sure minmpd) + 0.1); + } + } + + if ( what & MPD_CST_ELAPSED_TIME ) { + /* update progressbar unless the user is dragging it...*/ + if(!glurp->progress_dragging) { + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(builder, "progressbar")), TRUE); + + gtk_range_set_value(GTK_RANGE(gtk_builder_get_object(builder, "progressbar")), + mpd_status_get_elapsed_song_time(glurp->mpd)); + } + + if(glurp->config->time_display_left) + tel = mpd_status_get_total_song_time(glurp->mpd) - mpd_status_get_elapsed_song_time(glurp->mpd); + else + tel = mpd_status_get_elapsed_song_time(glurp->mpd); + + temp = g_strdup_printf("%s%02d:%02d", (glurp->config->time_display_left ? "-" : ""), tel/60, tel%60); +#if 0 /* strange: this makes tooltips disappear! */ + gtk_button_set_label(GTK_BUTTON(gtk_builder_get_object(builder, "button_time")), temp); +/* gtk_tooltip_trigger_tooltip_query (gdk_display_get_default()); */ +#else + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_time")), temp); +#endif + g_free(temp); + } + + if ( what & MPD_CST_STATE ) { + switch (mpd_player_get_state(glurp->mpd)) { + case MPD_PLAYER_STOP: + gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder, "entry_trackname")), "Stopped..."); + + /* change appropriate gui parts */ + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_bitrate")), g_strdup("---kbps")); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_mode")), g_strdup("---")); + break; + case MPD_PLAYER_PLAY: + glurp->play_state = MPD_PLAYER_PLAY; + gui_show_song_name(); + break; + case MPD_PLAYER_PAUSE: + glurp->play_state = MPD_PLAYER_PAUSE; + break; + case MPD_PLAYER_UNKNOWN: + /* wazige sh*t */ + break; + } + } + /* PERIODIC: update bitrate and mode labels */ + if ( what & MPD_CST_AUDIOFORMAT ) { + char *text; + switch (mpd_status_get_channels(glurp->mpd)) { + case 0: + text = g_strdup("---"); + break; + case 1: + text = g_strdup("Mono"); + break; + case 2: + text = g_strdup("Stereo"); + break; + default: + text = g_strdup("More"); + break; + } + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_mode")), text); + } + if ( what & MPD_CST_BITRATE ) { + char *text; + int bitrate = mpd_status_get_bitrate(glurp->mpd); + if (bitrate == 0) + text = g_strdup("---kbps"); + else + text = g_strdup_printf("%dkbps", bitrate); + gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(builder, "label_bitrate")), text); + } + + if ( what & MPD_CST_REPEAT ) { + /* PERIODIC: update repeat button */ + if( mpd_player_get_repeat(glurp->mpd) ) { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_repeat")), TRUE); + } else { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_repeat")), FALSE); + } + } + + if ( what & MPD_CST_RANDOM ) { + /* PERIODIC: update random button */ + if( mpd_player_get_random(glurp->mpd) ) { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_random")), TRUE); + } else { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "togglebutton_random")), FALSE); + } + } + + if ( what & MPD_CST_DATABASE ) { + /* PERIODIC: reenable Add window controls if we just finished updating db (>=0.11.0) */ + statusbar_print("Database updated"); + gui_updating_enable_add_controls(); + glurp->updating_db = FALSE; + gtk_tree_view_set_model(GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview_add")), GTK_TREE_MODEL(glurp->gui_addtree)); + populate_gui_add_tree(); + } + + // TODO: hmm misunderstood something; this should be done anywhere an error could occur (as it was... D'oh) + mpd_check_error(glurp->mpd); +} + +int mpd_error_callback (MpdObj *mi, int id, char *msg, void *userdata) { + debug("Damn, mpd returned an error, %s", msg); + return 0; +} + +void mpd_connection_changed_callback(MpdObj *mi, int connect, void *userdata) { + struct glurp_t* glurp = userdata; + + if (connect) { + debug("We're connected!"); + /* we're just connected */ + debug("Connected to %s:%d", glurp->config->server_host, glurp->config->server_port); + statusbar_print("Connected to server %s:%d", glurp->config->server_host, glurp->config->server_port); + + title_print(GTK_WIDGET(gtk_builder_get_object(builder, "glurp_window_main")), "%s:%d", glurp->config->server_host, glurp->config->server_port); + + if( !STREAM_CAPABLE_MPD(glurp->mpd) ) { + debug("MPD VERSION TOO OLD, DISCONNECTING"); + glurp_disconnect(); + statusbar_print("MPD version too old, disconnecting"); + } else { + + gui_set_connected(); + + debug("Adding a timeout call to gui_update()."); + /* force immediate schedule beacuse of time dependency */ + gui_update_cb(GINT_TO_POINTER((guint)glurp->refresh_rate_status)); + g_timeout_add((guint)glurp->config->refresh_rate, gui_update_cb, NULL); + } + } else { + debug("We're disconnected!"); + gui_set_disconnected(); + /* we're just disconnected */ + } +} + +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/mpd-callbacks.h glurp-0.12.3/src/mpd-callbacks.h --- glurp-0.11.6/src/mpd-callbacks.h 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/src/mpd-callbacks.h 2010-04-13 15:10:24.000000000 +0100 @@ -0,0 +1,29 @@ +/* + Glurp - A GTK+ client for Music Player Daemon + Copyright (C) 2004, 2005 Andrej Kacian + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + http://musicpd.org/glurp.shtml + +*/ + +#include + +void mpd_connection_changed_callback(MpdObj *mi, int connect, void *userdata); +int mpd_error_callback (MpdObj *mi, int id, char *msg, void *userdata); +void mpd_status_changed_callback (MpdObj *mi, ChangedStatusType what, void *userdata); + +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/player.c glurp-0.12.3/src/player.c --- glurp-0.11.6/src/player.c 2005-04-03 03:46:56.000000000 +0100 +++ glurp-0.12.3/src/player.c 2010-04-13 15:10:24.000000000 +0100 @@ -30,172 +30,37 @@ extern GlurpState *glurp; void player_play_song(gint id) { - mpd_Status *status; debug("PLAY requested"); - if(!glurp->conn) { - debug("we're not connected, ignoring"); - return; - } - - if( !(status = get_status(TRUE)) ) { - debug("could not get mpd status"); - return; - } - - if(!glurp->playlist) { - debug("No songs loaded"); - statusbar_print("Playlist empty, cannot play"); - return; - } - - if(status->state == MPD_STATUS_STATE_PLAY) { - debug("mpd is already playing a song"); - statusbar_print("Already playing"); - return; - } - - - debug("Playing song with id %d", id); - mpd_sendPlayIdCommand(glurp->conn, id); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - debug("Can't start playback"); - return; - } - - glurp->play_state = MPD_STATUS_STATE_PLAY; - + mpd_player_play_id(glurp->mpd, id); statusbar_print("Starting playback"); return; } void player_pause() { - mpd_Status *status; - - debug("PAUSE requested"); - if(!glurp->conn) { - debug("we're not connected, ignoring"); - return; - } - - if( !(status = get_status(TRUE)) ) { - debug("could not get mpd status"); - return; - } - - if(status->state == MPD_STATUS_STATE_PLAY) { - debug("pausing playback"); - statusbar_print("Pause"); - mpd_sendPauseCommand(glurp->conn, 1); - } else if(status->state == MPD_STATUS_STATE_PAUSE) { - debug("resuming playback"); - statusbar_print("Resuming playback"); - mpd_sendPauseCommand(glurp->conn, 0); - } - - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - debug("Can't resume playback"); - return; - } - - glurp->play_state = MPD_STATUS_STATE_PLAY; + if (mpd_player_get_state(glurp->mpd) == MPD_PLAYER_PAUSE) + mpd_player_play(glurp->mpd); + else + mpd_player_pause(glurp->mpd); return; } void player_stop() { - mpd_Status *status; debug("STOP requested"); - if(!glurp->conn) { - debug("we're not connected, ignoring"); - return; - } - - if( !(status = get_status(TRUE)) ) { - debug("could not get mpd status"); - return; - } - - if(status->state == MPD_STATUS_STATE_STOP) { - debug("already stopped, ignoring"); - return; - } - - debug("Stopping playback"); - statusbar_print("Stopping playback"); - mpd_sendStopCommand(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) { - debug("Can't stop playback"); - return; - } - - glurp->play_state = MPD_STATUS_STATE_STOP; - + mpd_player_stop(glurp->mpd); return; } void player_prev() { - mpd_Status *status; - - debug("PREV requested"); - if(!glurp->conn) { - debug("we're not connected, ignoring"); - return; - } - - if( !(status = get_status(TRUE)) ) { - debug("could not get mpd status"); - return; - } - - if( status->state != MPD_STATUS_STATE_PLAY && status->state != MPD_STATUS_STATE_PAUSE ) { - debug("not playing, ignoring"); - return; - } - - debug("switching to previous track"); - statusbar_print("Previous"); - mpd_sendPrevCommand(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) debug("Can't switch to prev track"); - + mpd_player_prev(glurp->mpd); return; } void player_next() { - mpd_Status *status; - - debug("NEXT requested"); - if(!glurp->conn) { - debug("we're not connected, ignoring"); - return; - } - - if( !(status = get_status(TRUE)) ) { - debug("could not get mpd status"); - return; - } - - if( status->state != MPD_STATUS_STATE_PLAY && status->state != MPD_STATUS_STATE_PAUSE ) { - debug("not playing, ignoring"); - return; - } - - debug("switching to next track"); - statusbar_print("Next"); - mpd_sendNextCommand(glurp->conn); - mpd_finishCommand(glurp->conn); - - if( check_mpd_error() ) debug("Can't switch to next track"); - + mpd_player_next(glurp->mpd); return; } +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/player.h glurp-0.12.3/src/player.h --- glurp-0.11.6/src/player.h 2005-04-03 03:49:50.000000000 +0100 +++ glurp-0.12.3/src/player.h 2010-04-13 15:10:24.000000000 +0100 @@ -29,8 +29,9 @@ void player_prev(); void player_next(); -#define STOPPED (glurp->play_state == MPD_STATUS_STATE_STOP) -#define PLAYING (glurp->play_state == MPD_STATUS_STATE_PLAY) -#define PAUSED (glurp->play_state == MPD_STATUS_STATE_PAUSE) +#define STOPPED (mpd_player_get_state(glurp->mpd) == MPD_PLAYER_STOP) +#define PLAYING (mpd_player_get_state(glurp->mpd) == MPD_PLAYER_PLAY) +#define PAUSED (mpd_player_get_state(glurp->mpd) == MPD_PLAYER_PAUSE) #endif /* __PLAYER_H */ +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/structs.h glurp-0.12.3/src/structs.h --- glurp-0.11.6/src/structs.h 2005-04-05 02:35:39.000000000 +0100 +++ glurp-0.12.3/src/structs.h 2010-04-13 15:10:24.000000000 +0100 @@ -20,22 +20,22 @@ */ -#include "libmpdclient.h" +#ifndef __STRUCTS_H +#define __STRUCTS_H + +#include +#include enum { - PL_FILENAME, - PL_ARTIST, - PL_TITLE, - PL_ALBUM, - PL_TRACK, - PL_NAME, - PL_POS, - PL_ID, + PL_POS, + PL_TITLE, + PL_TIME, + PL_ID, - PL_BOLD, - PL_BOLD_SET, + PL_BOLD, + PL_BOLD_SET, - NUM_PL + NUM_PL }; struct conf_t { @@ -46,32 +46,18 @@ gboolean playlist_vis_on_start; gboolean time_display_left; gboolean save_size; - long refresh_rate; + gdouble refresh_rate; gint pos_x; gint pos_y; gint width; gint height; + gboolean trayicon; gboolean playlist_columns[PL_BOLD]; }; typedef struct conf_t GlurpConfig; -struct song_t { - gchar *file; - gchar *artist; - gchar *title; - gchar *album; - gchar *track; - gchar *name; - gint time; - gint pos; - gint id; - struct song_t *next; -}; - -typedef struct song_t GlurpSong; - struct pl_t { gchar *name; struct pl_t *next; @@ -88,25 +74,40 @@ struct glurp_t { GlurpConfig *config; - mpd_Connection *conn; - GlurpSong *playlist; - GlurpSong *current_song; + char* alternate_config_file; + MpdObj* mpd; + mpd_Song *current_song; GtkListStore *gui_playlist; GtkListStore *gui_playlist_list; GtkListStore *gui_stream_list; GtkTreeStore *gui_addtree; gboolean progress_dragging; - gint refresh_rate_status; + guint refresh_rate_status; long long playlist_version; GlurpPl *playlists; gint statusbar_status; - gint conn_state; gint play_state; gint prev_song_num; gint scroll; gint num_add_dirs; gboolean updating_db; GlurpStream *stream_history; + + GtkIconFactory *icon_factory; + /* below is used for parking those frames in condensed mode */ + GtkWidget* frame_time; + GtkWidget* frame_trackname; + /* current pixel width of the trackname entry */ + gint trackname_width; + /* the main window */ + GtkWidget* window; + /* the sytem-tray icon */ + GtkStatusIcon* trayicon; + /* the sytem-tray menu */ + GtkMenu* traymenu; }; typedef struct glurp_t GlurpState; + +#endif /* __STRUCTS_H */ +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/support.c glurp-0.12.3/src/support.c --- glurp-0.11.6/src/support.c 2005-06-05 14:16:37.000000000 +0100 +++ glurp-0.12.3/src/support.c 2010-04-17 22:05:05.000000000 +0100 @@ -26,17 +26,19 @@ #include #include -#include #include #include #include +#include #include "structs.h" #include "support.h" #include "comm.h" #include "gui.h" +#include "gui-callbacks.h" -extern GladeXML *guixml, *addxml; +#include +extern GtkBuilder *builder; extern GlurpState *glurp; void debug_real (const char *file, const int line, const char *function, const char *msg, ...) { @@ -55,7 +57,7 @@ void statusbar_print(const char *string, ...) { char str[129]; va_list va; - GtkWidget *sb = glade_xml_get_widget(guixml, "statusbar_main"); + GtkWidget *sb = GTK_WIDGET(gtk_builder_get_object(builder, "statusbar_main")); va_start(va, string); g_vsnprintf(str, sizeof(str)-1, string, va); @@ -73,7 +75,7 @@ if( glurp->progress_dragging ) return FALSE; if( *(gint*)msg == glurp->statusbar_status ) { - sb = glade_xml_get_widget(guixml, "statusbar_main"); + sb = GTK_WIDGET(gtk_builder_get_object(builder, "statusbar_main")); gtk_statusbar_push(GTK_STATUSBAR(sb), 0, status_string()); glurp->statusbar_status = 0; } @@ -90,7 +92,7 @@ va_start(va, string); g_vsnprintf(str, sizeof(str)-1, string, va); - if(!string || !str || !strlen(str)) str2 = g_strdup_printf("%s", GLURP_TITLE_PREFIX); + if(!string || !strlen(str)) str2 = g_strdup_printf("%s", GLURP_TITLE_PREFIX); else str2 = g_strdup_printf("%s :: %s", GLURP_TITLE_PREFIX, str); gtk_window_set_title(GTK_WINDOW(window), str2); @@ -98,27 +100,22 @@ } gchar *status_string() { - mpd_Status *mpdstatus; + MpdState state = mpd_player_get_state(glurp->mpd); - if(!CONNECTED) return "Not connected to server"; + if(!mpd_check_connected(glurp->mpd)) return "Not connected to server"; - mpdstatus = get_status(TRUE); - - if(mpdstatus->state == MPD_STATUS_STATE_PLAY) return "Connected to server, playing"; - if(mpdstatus->state == MPD_STATUS_STATE_PAUSE) return "Connected to server, paused"; - if(mpdstatus->state == MPD_STATUS_STATE_STOP) return "Connected to server, stopped"; + if (glurp->updating_db) { + if(state == MPD_PLAYER_PLAY) return "Connected to server, Updating DB, Playing"; + if(state == MPD_PLAYER_PAUSE) return "Connected to server, Updating DB, Paused"; + if(state == MPD_PLAYER_STOP) return "Connected to server, Updating DB, Stopped"; + } else { + if(state == MPD_PLAYER_PLAY) return "Connected to server, Playing"; + if(state == MPD_PLAYER_PAUSE) return "Connected to server, Paused"; + if(state == MPD_PLAYER_STOP) return "Connected to server, Stopped"; + } return "Connected to server, unknown state"; } -GlurpSong *get_nth_song_from_playlist(gint pos) { - gint i; - GlurpSong *s; - - for( i = 0, s = glurp->playlist; s && inext ) {} - - return s; -} - /* this will return a pointer to the first character after last '/' in path */ gchar *strip_dirs(gchar *path) { gchar *c = path, *s = path; @@ -130,10 +127,56 @@ return s+1; } -gchar *glade_path() { +GtkWidget* get_image_from_name(gchar* name) { + gchar* path; + GtkWidget* retval; +#ifdef WIN32 + gchar *packagedir; + packagedir = g_win32_get_package_installation_directory("glurp",NULL); + debug("Got %s as package installation dir", packagedir); + path = g_build_filename(packagedir,"data",name,NULL); + g_free(packagedir); +#else + path = g_strdup_printf(DATA_DIR"pixmaps/%s", name); +#endif + debug("Using %s for image %s",path, name); + retval = gtk_image_new_from_file(path); + g_free(path); + return retval; +} + +GdkPixbuf *get_pixbuf_from_name(gchar* name) { gchar *path; + GdkPixbuf *retval; +#ifdef WIN32 + gchar *packagedir; + packagedir = g_win32_get_package_installation_directory("glurp",NULL); + debug("Got %s as package installation dir", packagedir); + path = g_build_filename(packagedir,"data",name,NULL); + g_free(packagedir); +#else + path = g_strdup_printf(DATA_DIR"pixmaps/%s", name); +#endif + debug("Using %s for image %s",path, name); + retval = gdk_pixbuf_new_from_file(path,NULL); + g_free(path); + return retval; +} - path = g_strdup_printf(DATADIR"glurp.glade"); + +gchar *builder_path() { + gchar *path; +#ifdef WIN32 + gchar *packagedir; + packagedir = g_win32_get_package_installation_directory_utf8("glurp",NULL); + debug("Got %s as package installation dir", packagedir); + + path = g_build_filename(packagedir,"data", "glurp.glade",NULL); +#else + if (g_file_test("./glurp.glade", G_FILE_TEST_EXISTS)) return g_strdup("./glurp.glade"); + path = g_strdup_printf(DATA_DIR"glurp.glade"); +#endif + if(!g_file_test(path, G_FILE_TEST_EXISTS)) { debug("file '%s' does not exist", path); g_free(path); @@ -160,90 +203,41 @@ return dirs[i]; } -GlurpSong *get_song_by_pos(gint pos) { - gint i; - GlurpSong *s = NULL; - - for( i = 0, s = glurp->playlist; i < pos && s; i++, s = s->next ) {} - - return (s ? s : NULL); -} - -GlurpSong *get_song_by_id(gint id) { - GlurpSong *s = NULL; - - for( s = glurp->playlist; s; s = s->next ) { - if( s->id == id ) { - debug("Found it, returning"); - return s; - } - } - - return NULL; -} - -gint get_song_pos(GlurpSong *song) { - GlurpSong *s = NULL; - gint i; - - for( i = 0, s = glurp->playlist; s; s = s->next, i++ ) { - if( s == song ) { - debug("Found song position: %d", i); - return i; - } - } - - debug("Couldn't find song position"); - return -1; -} - -gint get_num_songs() { - GlurpSong *s = NULL; - gint i; - - for( i = 0, s = glurp->playlist; s; s = s->next, i++ ) {} - return i; -} - -void update_song(mpd_Song *song) { - debug("calling glurp_update_song()"); - glurp_update_song(song); - debug("calling gui_update_song()"); - gui_update_song(song->id); -} - void add_song(mpd_Song *song) { - GlurpSong *gsong = NULL, *s = NULL; - - if( get_song_by_id(song->id) ) { - debug("Already added, ignoring"); - return; + gint curlast = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(glurp->gui_playlist), NULL) - 1; + gint needed = song->pos - curlast ; + GtkTreeIter iter; + gchar title[1024]; + + + if (needed>0) { + for (;needed > 0; needed--) { + /* need to add some positions in the liststore */ + gtk_list_store_append(glurp->gui_playlist, &iter); + } + } else { + gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_playlist), &iter, NULL, song->pos); } - gsong = malloc(sizeof(GlurpSong)); - gsong->file = g_strdup(song->file); - gsong->artist = g_strdup(song->artist); - gsong->title = g_strdup(song->title); - gsong->album = g_strdup(song->album); - gsong->track = g_strdup(song->track); - gsong->name = g_strdup(song->name); - gsong->time = song->time; - gsong->pos = song->pos; - gsong->id = song->id; - gsong->next = NULL; + mpd_song_markup(title, 1023, "[%artist% - %title%]|%name%|%file%", song); - for(s = glurp->playlist; s && s->next; s = s->next) {} - - if(s) s->next = gsong; - else glurp->playlist = gsong; + gtk_list_store_set(glurp->gui_playlist, &iter, + PL_POS, song->pos + 1, + PL_TITLE, title, + PL_ID, song->id, + -1); } void debug_print_playlist() { - GlurpSong *s = NULL; - + GtkTreeIter iter; + gchar* title; + gint id; + gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(glurp->gui_playlist), &iter, NULL, 0); debug("-----------------------------------------------"); - for( s = glurp->playlist; s; s = s->next ) - debug("(%d) %s", s->id, s->file); + do { + gtk_tree_model_get(GTK_TREE_MODEL(glurp->gui_playlist), &iter, PL_ID, &id, PL_TITLE, &title, -1); + debug("(%d) %s", id, title); + } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(glurp->gui_playlist), &iter)); debug("-----------------------------------------------"); } @@ -336,3 +330,58 @@ prepend_stream(url); // else lift_stream(s); } + +void pull_stream(gchar* url) { + GlurpStream *s = NULL; + GlurpStream *p = NULL; + + if ( !strcmp(url, glurp->stream_history->url) ) { + s = glurp->stream_history; + glurp->stream_history = s->next; + } else { + for( p = glurp->stream_history, s = glurp->stream_history->next; s; p = p->next, s = s->next ) { + if( !strcmp(url, s->url) ) + break; + } + p->next = s->next; + } + if (s) { + g_free(s->url); + g_free(s); + } +} + +void sigint_handler(int s) { + debug("SIGINT received, exiting gracefully"); + on_ui_quit(NULL, NULL); +} + +char *remove_extension_and_basepath(const char *filename) +{ + int i = 0; + char *buf = NULL; + if(filename == NULL) + { + return NULL; + } + buf = g_path_get_basename(filename); + + if(buf != NULL) + { + /* replace _ with spaces */ + for(i=0; i< strlen(buf);i++) + { + if(buf[i] == '_') buf[i] = ' '; + } + for(i=strlen(buf);buf[i] != '.';i--); + /* cut of the extention */ + if(i > 0) + { + gchar *buf2 = g_strndup(buf, i); + g_free(buf); + return buf2; + } + } + return buf; +} +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/support.h glurp-0.12.3/src/support.h --- glurp-0.11.6/src/support.h 2005-06-05 14:17:16.000000000 +0100 +++ glurp-0.12.3/src/support.h 2010-04-17 22:34:17.000000000 +0100 @@ -23,12 +23,14 @@ #ifndef __SUPPORT_H #define __SUPPORT_H +#include "structs.h" + #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #ifdef GLURP_DEBUG -#define debug(str, ARGS...) debug_real(__FILE__, __LINE__, __FUNCTION__, str, ##ARGS) +#define debug(str, ARGS...) debug_real(__FILE__, __LINE__, __FUNCTION__, str, ##ARGS) #else #define debug(str, ARGS...) #endif @@ -41,15 +43,17 @@ void title_print(GtkWidget *window, const char *string, ...); -GlurpSong *get_nth_song_from_playlist(gint pos); +mpd_Song *get_nth_song_from_playlist(gint pos); gchar *strip_dirs(gchar *path); -gchar *glade_path(); +gchar *builder_path(); +GtkWidget* get_image_from_name(gchar* name); +GdkPixbuf* get_pixbuf_from_name(gchar* name); gchar *glurp_filename(gchar *path); -GlurpSong *get_song_by_pos(gint pos); -GlurpSong *get_song_by_id(gint id); -gint get_song_pos(GlurpSong *song); +mpd_Song *get_song_by_pos(gint pos); +mpd_Song *get_song_by_id(gint id); +gint get_song_pos(mpd_Song *song); gint get_num_songs(); void update_song(mpd_Song *song); @@ -61,19 +65,22 @@ void print_stream_history(); gchar *dump_stream_history(); void push_stream(gchar *url); +void pull_stream(gchar *url); + +void sigint_handler(int s); + +char *remove_extension_and_basepath(const char *filename); /* convenience macros */ -#define NONBLOCKING_UPDATE_CAPABLE_MPD ((glurp->conn->version[0] > 0 || \ - glurp->conn->version[1] >= 11) ? TRUE : FALSE) +#define NONBLOCKING_UPDATE_CAPABLE_MPD(mi) (mpd_server_check_version(mi, 0, 11, 0)) -#define STREAM_CAPABLE_MPD ((glurp->conn->version[0] > 0 || \ - glurp->conn->version[1] >= 11) ? TRUE : FALSE) +#define STREAM_CAPABLE_MPD(mi) (mpd_server_check_version(mi, 0, 11, 0)) -#define OUTPUTS_CAPABLE_MPD ((glurp->conn->version[0] > 0 || \ - glurp->conn->version[1] >= 12) ? TRUE : FALSE) +#define OUTPUTS_CAPABLE_MPD(mi) (mpd_server_check_version(mi, 0, 12, 0)) -#define GLURP_TITLE_PREFIX "Glurp v"GLURP_VERSION +#define GLURP_TITLE_PREFIX "Glurp v"GLURP_VERSION -#define MAX_STREAM_HISTORY 5 +#define MAX_STREAM_HISTORY 30 #endif /* __SUPPORT_H */ +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/trayicon.c glurp-0.12.3/src/trayicon.c --- glurp-0.11.6/src/trayicon.c 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/src/trayicon.c 2010-04-13 15:10:24.000000000 +0100 @@ -0,0 +1,90 @@ +/* + Glurp - A GTK+ client for Music Player Daemon + Copyright (C) 2004, 2005 Andrej Kacian + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + http://musicpd.org/glurp.shtml + +*/ + +#include +#include +#include "structs.h" +#include "support.h" +#include "traymenu.h" + +void trayicon_on_left_click(GtkStatusIcon* instance, gpointer app_data) { + static gint x = 0; + static gint y = 0; + static gboolean hidden = FALSE; + GlurpState* glurp = (GlurpState*) app_data; + + if (hidden) { + gtk_window_move(GTK_WINDOW(glurp->window), x, y); + gtk_widget_show(glurp->window); + hidden = FALSE; + } else { + gtk_window_get_position(GTK_WINDOW(glurp->window), &x, &y); + gtk_widget_hide(glurp->window); + hidden = TRUE; + } +} + +void trayicon_on_right_click(GtkStatusIcon* instance, guint button, guint activate_time, gpointer app_data) { + GlurpState* glurp = (GlurpState*) app_data; + traymenu_show (GTK_MENU(glurp->traymenu), button, activate_time); +} + +GtkStatusIcon* trayicon_new(GlurpState* glurp) { + GtkStatusIcon* trayicon = NULL; + + trayicon = gtk_status_icon_new(); + gtk_status_icon_set_tooltip(trayicon, "Glurp"); + gtk_status_icon_set_from_pixbuf(GTK_STATUS_ICON(trayicon), + get_pixbuf_from_name("media-audiofile.png")); + + g_signal_connect(G_OBJECT(trayicon), "activate", + G_CALLBACK(trayicon_on_left_click), glurp); + g_signal_connect(G_OBJECT(trayicon), "popup-menu", + G_CALLBACK(trayicon_on_right_click), glurp); + return trayicon; +} + +void trayicon_show(GtkStatusIcon* trayicon) { + gtk_status_icon_set_visible(trayicon, TRUE); +} + +void trayicon_hide(GtkStatusIcon* trayicon) { + gtk_status_icon_set_visible(trayicon, FALSE); +} + +void trayicon_set_text(GtkStatusIcon* trayicon, const gchar* text) { + gtk_status_icon_set_tooltip(trayicon, text); +} + +void trayicon_set_markup(GtkStatusIcon* trayicon, const gchar* text) { + gtk_status_icon_set_tooltip_markup(trayicon, text); +} + +gchar* trayicon_get_text(GtkStatusIcon* trayicon) { + return gtk_status_icon_get_tooltip_text(trayicon); +} + +gchar* trayicon_get_markup(GtkStatusIcon* trayicon) { + return gtk_status_icon_get_tooltip_markup(trayicon); +} + +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/trayicon.h glurp-0.12.3/src/trayicon.h --- glurp-0.11.6/src/trayicon.h 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/src/trayicon.h 2010-04-13 15:10:24.000000000 +0100 @@ -0,0 +1,43 @@ +/* + Glurp - A GTK+ client for Music Player Daemon + Copyright (C) 2004, 2005 Andrej Kacian + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + http://musicpd.org/glurp.shtml + +*/ + +#ifndef TRAYICON_H +#define TRAY_ICON_H + +#include "structs.h" + +GtkStatusIcon* trayicon_new(GlurpState* glurp); + +void trayicon_on_left_click(GtkStatusIcon* instance, gpointer app_data); +void trayicon_on_right_click(GtkStatusIcon* instance, guint button, guint activate_time, gpointer app_data); + +void trayicon_show(GtkStatusIcon* trayicon); + +void trayicon_hide(GtkStatusIcon* trayicon); + +void trayicon_set_text(GtkStatusIcon* trayicon, const gchar* text); +void trayicon_set_markup(GtkStatusIcon* trayicon, const gchar* text); +gchar* trayicon_get_text(GtkStatusIcon* trayicon); +gchar* trayicon_get_markup(GtkStatusIcon* trayicon); + +#endif +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/traymenu.c glurp-0.12.3/src/traymenu.c --- glurp-0.11.6/src/traymenu.c 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/src/traymenu.c 2010-04-13 15:10:24.000000000 +0100 @@ -0,0 +1,108 @@ +/* + Glurp - A GTK+ client for Music Player Daemon + Copyright (C) 2004, 2005 Andrej Kacian + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + http://musicpd.org/glurp.shtml + +*/ + +#include +#include +#include "player.h" +#include "gui-callbacks.h" + +GtkMenu* traymenu_new(void) +{ + return GTK_MENU(gtk_menu_new ()); +} + +/* append an item to the menu, and connect its callback on "activate" event */ +GtkMenuItem* traymenu_append_item(GtkMenu* menu, gchar* label, GCallback callback, gpointer cb_data) +{ + GtkWidget* item; + + item = gtk_menu_item_new_with_label (label); + gtk_menu_shell_append ((GtkMenuShell*) (menu), item); + if (callback) + g_signal_connect (G_OBJECT(item), "activate", G_CALLBACK(callback), cb_data); + gtk_widget_show (item); + + return GTK_MENU_ITEM(item); +} + +/* show the menu */ +void traymenu_show(GtkMenu* menu, guint button, guint activate_time) +{ + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, activate_time); + return; +} + +/* hide the menu */ +void tarymenu_hide(GtkMenu* menu) +{ + gtk_menu_popdown(GTK_MENU(menu)); + return; +} + +/* append a stock imageitem to the menu, and connect its callback on "activate" event */ +GtkMenuItem* traymenu_append_image_item(GtkMenu* menu, const gchar* stock_id, GCallback callback, gpointer cb_data) +{ + GtkWidget* item; + + item = gtk_image_menu_item_new_from_stock(stock_id, NULL); + gtk_menu_shell_append ((GtkMenuShell*) (menu), item); + if (callback) + g_signal_connect (G_OBJECT(item), "activate", G_CALLBACK(callback), cb_data); + gtk_widget_show (item); + + return GTK_MENU_ITEM(item); +} + +gboolean traymenu_on_play(GtkWidget *widget, gpointer user_data) { + player_play_song(-1); + + return FALSE; +} + +gboolean traymenu_on_pause(GtkWidget *widget, gpointer user_data) { + player_pause(); + + return FALSE; +} + +gboolean traymenu_on_stop(GtkWidget *widget, gpointer user_data) { + player_stop(); + + return FALSE; +} + +gboolean traymenu_on_next(GtkWidget *widget, gpointer user_data) { + player_next(); + + return FALSE; +} + +gboolean traymenu_on_prev(GtkWidget *widget, gpointer user_data) { + player_prev(); + + return FALSE; +} + +void traymenu_on_quit(GtkWidget *widget, gpointer user_data) { + on_ui_quit(NULL, NULL); +} +// vim: et sw=2 smarttab diff -Nru glurp-0.11.6/src/traymenu.h glurp-0.12.3/src/traymenu.h --- glurp-0.11.6/src/traymenu.h 1970-01-01 01:00:00.000000000 +0100 +++ glurp-0.12.3/src/traymenu.h 2010-04-13 15:10:24.000000000 +0100 @@ -0,0 +1,56 @@ +/* + Glurp - A GTK+ client for Music Player Daemon + Copyright (C) 2004, 2005 Andrej Kacian + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + http://musicpd.org/glurp.shtml + +*/ + +#ifndef _MENU_H +#define _MENU_H +#include +#include + +/* create a new (empty) menu */ +GtkMenu* traymenu_new(void); + +/* append an item to the menu, and connect its callback on "activate" event */ +GtkMenuItem* traymenu_append_item(GtkMenu* menu, gchar* label, GCallback callback, gpointer cb_data); + +/* append a stock image item to the menu, and connect its callback on "activate" event */ +GtkMenuItem* traymenu_append_image_item(GtkMenu* menu, const gchar* stock_id, GCallback callback, gpointer cb_data); + +/* show the menu */ +void traymenu_show(GtkMenu* menu, guint button, guint activate_time); + +/* hide the menu */ +void traymenu_hide(GtkMenu* menu); + +gboolean traymenu_on_play(GtkWidget *widget, gpointer user_data); + +gboolean traymenu_on_pause(GtkWidget *widget, gpointer user_data); + +gboolean traymenu_on_stop(GtkWidget *widget, gpointer user_data); + +gboolean traymenu_on_next(GtkWidget *widget, gpointer user_data); + +gboolean traymenu_on_prev(GtkWidget *widget, gpointer user_data); + +void traymenu_on_quit(GtkWidget *widget, gpointer user_data); + +#endif /* _MENU_H */ +// vim: et sw=2 smarttab