|
From: <ane...@us...> - 2006-12-29 21:08:59
|
Revision: 228
http://svn.sourceforge.net/g15daemon/?rev=228&view=rev
Author: aneurysm9
Date: 2006-12-29 13:08:56 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
Remove autotools generated files
Removed Paths:
-------------
trunk/g15daemon-audio-plugins/g15mpd/Makefile.in
trunk/g15daemon-audio-plugins/g15mpd/config.h.in
Deleted: trunk/g15daemon-audio-plugins/g15mpd/Makefile.in
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/Makefile.in 2006-12-29 21:07:17 UTC (rev 227)
+++ trunk/g15daemon-audio-plugins/g15mpd/Makefile.in 2006-12-29 21:08:56 UTC (rev 228)
@@ -1,624 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-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
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = g15mpd$(EXEEXT)
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- config/config.guess config/config.sub config/depcomp \
- config/install-sh config/ltmain.sh config/missing
-subdir = .
-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
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am_g15mpd_OBJECTS = g15mpd.$(OBJEXT)
-g15mpd_OBJECTS = $(am_g15mpd_OBJECTS)
-g15mpd_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(g15mpd_SOURCES)
-DIST_SOURCES = $(g15mpd_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-docDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(doc_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-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); }; }
-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@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = -lg15daemon_client -lg15render -lX11 -lmpd
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XMKMF = @XMKMF@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_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@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
-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@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AM_CFLAGS = -O3 -Wall @CFLAGS@ -I$(top_builddir) -I$(top_srcdir)
-METASOURCES = AUTO
-doc_DATA = README ChangeLog AUTHORS NEWS COPYING
-IMCLUDES = -I
-g15mpd_LDFLAGS = -avoid-version
-g15mpd_SOURCES = g15mpd.c
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) 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: $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-install-binPROGRAMS: $(bin_PROGRAMS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- done
-
-clean-binPROGRAMS:
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-g15mpd$(EXEEXT): $(g15mpd_OBJECTS) $(g15mpd_DEPENDENCIES)
- @rm -f g15mpd$(EXEEXT)
- $(LINK) $(g15mpd_LDFLAGS) $(g15mpd_OBJECTS) $(g15mpd_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g15mpd.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
-@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
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-docDATA: $(doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(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; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) 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" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/config
- @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; \
- 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 \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- -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)
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA) config.h
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-docDATA
-
-install-exec-am: install-binPROGRAMS
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-docDATA \
- uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-binPROGRAMS clean-generic clean-libtool ctags dist \
- dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
- distcheck distclean distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-binPROGRAMS install-data \
- install-data-am install-docDATA install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-docDATA uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
Deleted: trunk/g15daemon-audio-plugins/g15mpd/config.h.in
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/config.h.in 2006-12-29 21:07:17 UTC (rev 227)
+++ trunk/g15daemon-audio-plugins/g15mpd/config.h.in 2006-12-29 21:08:56 UTC (rev 228)
@@ -1,77 +0,0 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <g15daemon_client.h> header file. */
-#undef HAVE_G15DAEMON_CLIENT_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `g15daemon_client' library
- (-lg15daemon_client). */
-#undef HAVE_LIBG15DAEMON_CLIENT
-
-/* Define to 1 if you have the <libg15render.h> header file. */
-#undef HAVE_LIBG15RENDER_H
-
-/* Define to 1 if you have the <libmpd/libmpd.h> header file. */
-#undef HAVE_LIBMPD_LIBMPD_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <X11/XF86keysym.h> header file. */
-#undef HAVE_X11_XF86KEYSYM_H
-
-/* Define to 1 if you have the <X11/Xlib.h> header file. */
-#undef HAVE_X11_XLIB_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ane...@us...> - 2006-12-29 21:07:16
|
Revision: 227
http://svn.sourceforge.net/g15daemon/?rev=227&view=rev
Author: aneurysm9
Date: 2006-12-29 13:07:17 -0800 (Fri, 29 Dec 2006)
Log Message:
-----------
Remove autotools generated files
Removed Paths:
-------------
trunk/g15daemon-audio-plugins/g15mpd/aclocal.m4
trunk/g15daemon-audio-plugins/g15mpd/config/config.guess
trunk/g15daemon-audio-plugins/g15mpd/config/config.sub
trunk/g15daemon-audio-plugins/g15mpd/config/depcomp
trunk/g15daemon-audio-plugins/g15mpd/config/install-sh
trunk/g15daemon-audio-plugins/g15mpd/config/ltmain.sh
trunk/g15daemon-audio-plugins/g15mpd/config/missing
Deleted: trunk/g15daemon-audio-plugins/g15mpd/aclocal.m4
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/aclocal.m4 2006-12-29 21:05:38 UTC (rev 226)
+++ trunk/g15daemon-audio-plugins/g15mpd/aclocal.m4 2006-12-29 21:07:17 UTC (rev 227)
@@ -1,6998 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-
-# serial 47 AC_PROG_LIBTOOL
-
-
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
- [],
- [m4_define([AC_PROVIDE_IFELSE],
- [m4_ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
- ])])
-dnl And a similar setup for Fortran 77 support
- AC_PROVIDE_IFELSE([AC_PROG_F77],
- [AC_LIBTOOL_F77],
- [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ],
- defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
- ;;
- *)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
- [AC_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_LINKER_BOILERPLATE
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X[$]1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-[$]*
-EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string="`eval $cmd`") 2>/dev/null &&
- echo_test_string="`eval $cmd`" &&
- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
- then
- break
- fi
- done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
-else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$echo" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- echo='print -r'
- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- echo=echo
- fi
- fi
- fi
- fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
- ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
- if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $rm conftest*
-])
-
-if test x"[$]$2" = xyes; then
- ifelse([$5], , :, [$5])
-else
- ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
- $SED '/^$/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $rm conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- ifelse([$4], , :, [$4])
-else
- ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- *)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
- = "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
-
- exit (status);
-}]
-EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_unknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_AC_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_d...
[truncated message content] |
|
From: <mla...@us...> - 2007-01-01 00:32:57
|
Revision: 233
http://svn.sourceforge.net/g15daemon/?rev=233&view=rev
Author: mlampard
Date: 2006-12-31 16:32:56 -0800 (Sun, 31 Dec 2006)
Log Message:
-----------
tidy the code, add playlist listing/item selection via volume control.
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/Makefile.am
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/Makefile.am
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/Makefile.am 2006-12-30 14:39:24 UTC (rev 232)
+++ trunk/g15daemon-audio-plugins/g15mpd/Makefile.am 2007-01-01 00:32:56 UTC (rev 233)
@@ -6,7 +6,7 @@
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
doc_DATA = README ChangeLog AUTHORS NEWS COPYING
-LIBS = -lg15daemon_client -lg15render -lX11 -lmpd
+LIBS = -lg15daemon_client -lg15render -lX11 -lXtst -lmpd
IMCLUDES = -I
g15mpd_LDFLAGS = -avoid-version
g15mpd_SOURCES = g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2006-12-30 14:39:24 UTC (rev 232)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-01-01 00:32:56 UTC (rev 233)
@@ -1,29 +1,29 @@
/*
- This file is part of g15daemon.
+ This file is part of g15daemon.
- g15daemon 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.
+ g15daemon 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.
- g15daemon 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.
+ g15daemon 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 g15daemon; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ You should have received a copy of the GNU General Public License
+ along with g15daemon; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- (c) 2006 Mike Lampard
+ (c) 2006 Mike Lampard
- $Revision$ - $Date$ $Author$
+ $Revision$ - $Date$ $Author$
- This daemon listens on localhost port 15550 for client connections,
- and arbitrates LCD display. Allows for multiple simultaneous clients.
- Client screens can be cycled through by pressing the 'L1' key.
+ This daemon listens on localhost port 15550 for client connections,
+ and arbitrates LCD display. Allows for multiple simultaneous clients.
+ Client screens can be cycled through by pressing the 'L1' key.
- This is a simple frontend for the Media Player Daemon (MPD)
+ This is a simple frontend for the Media Player Daemon (MPD)
*/
#include <libmpd/libmpd.h>
@@ -34,6 +34,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <poll.h>
+#include <arpa/inet.h>
#include <g15daemon_client.h>
#include <libg15.h>
@@ -41,9 +43,10 @@
#include <poll.h>
#include <pthread.h>
#include <X11/Xlib.h>
+#include <X11/extensions/XTest.h>
#include <X11/XF86keysym.h>
-extern int debug_level;
+ extern int debug_level;
int g15screen_fd, retval;
g15canvas *canvas;
@@ -56,11 +59,36 @@
MpdObj *obj = NULL;
int leaving = 0;
+int have_xtest=0;
static int voltimeout=0;
+static int own_keyboard=0;
+pthread_mutex_t daemon_mutex;
+pthread_mutex_t lockit;
+
static int menulevel=0;
+#define MENU_MODE1 0
+#define MENU_MODE2 1
#define MAX_MENU_MODES 2
+/* playlist mode takes over all keys on the keyboard - allowing searches/playlist scroll via volume ctrl etc.
+all non-valid keys are sent elsewhere via the xtest extension */
+static int playlist_mode=0;
+int playlist_selection=0;
+int item_selected=0;
+struct track_info {
+ char artist[100];
+ char title[100];
+ int total;
+ int elapsed;
+ int volume;
+ int repeat;
+ int random;
+ int playstate;
+ int totalsongs_in_playlist;
+ int currentsong;
+} track_info;
+
void error_callback(MpdObj *mi,int errorid, char *msg, void *userdata)
{
}
@@ -71,6 +99,7 @@
struct pollfd fds;
char ver[5];
int foo;
+
strncpy(ver,G15DAEMON_VERSION,3);
float g15v;
sscanf(ver,"%f",&g15v);
@@ -80,32 +109,45 @@
while(!leaving){
/* g15daemon series 1.2 need key request packets */
- if((g15v*10)<=18)
- keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo);
- else
- if ((poll(&fds, 1, 5)) > 0)
- read (g15screen_fd, &keystate, sizeof (keystate));
+ pthread_mutex_lock(&daemon_mutex);
+ if((g15v*10)<=18) {
+ keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo);
+ } else {
+ if ((poll(&fds, 1, 5)) > 0)
+ read (g15screen_fd, &keystate, sizeof (keystate));
+ }
+ pthread_mutex_unlock(&daemon_mutex);
if (keystate)
{
switch (keystate)
{
case G15_KEY_L1:
+ exit(1); // FIXME quick hack to exit
break;
case G15_KEY_L2:
menulevel++;
if(menulevel>=MAX_MENU_MODES)
menulevel=0;
- printf("L2 pressed (entering mode %i)\n",menulevel);
break;
case G15_KEY_L3:
- printf("L3 pressed... nothing to do yet\n");
+ if(!own_keyboard){ //activate keyboard grab mode
+ own_keyboard=playlist_mode=1;
+ XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
+ mpd_Song *song = mpd_playlist_get_current_song(obj);
+ if(song)
+ if(song->pos)
+ track_info.currentsong=song->pos;
+ }else{ //de-activate
+ own_keyboard=playlist_mode=0;
+ XUngrabKeyboard(dpy,CurrentTime);
+ }
break;
case G15_KEY_L4:
- if(menulevel==0){
+ if(menulevel==MENU_MODE1){
mpd_player_set_random(obj,mpd_player_get_random(obj)^1);
}
- if(menulevel==1){
+ if(menulevel==MENU_MODE2){
volume=mpd_status_get_volume(obj);
if(volume>0)
volume-=10;
@@ -113,10 +155,10 @@
}
break;
case G15_KEY_L5:
- if(menulevel==0){
+ if(menulevel==MENU_MODE1){
mpd_player_set_repeat(obj, mpd_player_get_repeat(obj)^1);
}
- if(menulevel==1){
+ if(menulevel==MENU_MODE2){
volume=mpd_status_get_volume(obj);
if(volume<100)
volume+=10;
@@ -128,199 +170,364 @@
}
keystate = 0;
}
- usleep(25000);
+ usleep(100*1000);
}
return NULL;
}
-static void* poll_mmediakeys()
+void xkey_handler(XEvent *event){
+
+ int keycode = event->xkey.keycode;
+ int code_audio_play = XKeysymToKeycode(dpy,XF86XK_AudioPlay);
+ int code_audio_stop = XKeysymToKeycode(dpy, XF86XK_AudioStop);
+ int code_audio_next = XKeysymToKeycode(dpy, XF86XK_AudioNext);
+ int code_audio_prev = XKeysymToKeycode(dpy, XF86XK_AudioPrev);
+ int code_audio_raisevol = XKeysymToKeycode(dpy, XF86XK_AudioRaiseVolume);
+ int code_audio_lowervol = XKeysymToKeycode(dpy, XF86XK_AudioLowerVolume);
+
+ if(keycode == code_audio_play) {
+ if(playing && !playlist_mode) {
+ if (paused) {
+ mpd_player_play(obj);
+ paused = 0;
+ } else {
+ mpd_player_pause(obj);
+ paused = 1;
+ }
+ } else {
+ mpd_player_play(obj);
+ playing = 1;
+ }
+ if(playlist_mode){
+ mpd_player_play_id(obj, item_selected);
+ }
+ return;
+ }
+
+ if(keycode == code_audio_stop) {
+ mpd_player_stop(obj);
+ playing = 0;
+ return;
+ }
+
+ if(keycode == code_audio_next) {
+ mpd_player_next(obj);
+ return;
+ }
+
+ if(keycode == code_audio_prev) {
+ mpd_player_prev(obj);
+ return;
+ }
+
+ if(keycode == code_audio_raisevol){
+ playlist_selection = 1;
+ return;
+ }
+ if(keycode == code_audio_lowervol){
+ playlist_selection = -1;
+ return;
+ }
+
+ /* now the default stuff */
+ if(own_keyboard) {
+ menulevel=MENU_MODE1;
+ XUngrabKeyboard(dpy,CurrentTime);
+ XFlush(dpy);
+ }
+
+ if(have_xtest) { // send the keypress elsewhere
+ if(event->type==KeyPress){
+ XTestFakeKeyEvent(dpy, keycode, True, CurrentTime);
+ }
+ XFlush(dpy);
+ }
+
+ if(own_keyboard && have_xtest) { // we only regrab if the XTEST extension is available.
+ XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
+ }
+ XFlush(dpy);
+
+}
+
+static void* xevent_thread()
{
- long mask = KeyPressMask;
XEvent event;
+ long event_mask = KeyPressMask|FocusChangeMask|SubstructureNotifyMask;
+
+ XSelectInput(dpy, root_win, event_mask);
+
while(!leaving){
- while (XCheckMaskEvent(dpy, mask, &event)){
- if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioPlay)) {
- if(playing) {
- if (paused) {
- mpd_player_play(obj);
- paused = 0;
- } else {
- mpd_player_pause(obj);
- paused = 1;
+ if(XCheckMaskEvent(dpy, event_mask, &event)){
+ switch(event.type) {
+ case KeyPress: {
+ xkey_handler(&event);
+ break;
+ }
+ case KeyRelease: {
+ break;
+ }
+ case FocusIn:
+ case FocusOut:
+ case EnterNotify:
+ case LeaveNotify:
+ case MapNotify:
+ case UnmapNotify:
+ case MapRequest:
+ case ConfigureNotify:
+ case CreateNotify:
+ case DestroyNotify:
+ break;
+ case ReparentNotify: {
+ if(own_keyboard && have_xtest) { // we only regrab if the XTEST extension is available.
+ XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
+ }
+ XFlush(dpy);
+ break;
}
- } else
- mpd_player_play(obj);
- playing = 1;
+ default:
+ printf("Unhandled event (%i) received\n",event.type);
}
-
- if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioStop)){
- mpd_player_stop(obj);
- playing = 0;
- }
-
- if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioNext))
- mpd_player_next(obj);
-
- if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioPrev))
- mpd_player_prev(obj);
}
- usleep(100*1000);
if(voltimeout)
voltimeout--;
+
+ usleep(1000);
}
return NULL;
}
-pthread_mutex_t lockit;
-
-void status_changed(MpdObj *mi, ChangedStatusType what)
-{
+/* take the track_info structure and render it */
+void *g15display_thread(){
long chksum=0;
static long last_chksum;
int i;
- static char artist[100];
- static char title[100];
+ unsigned char time_elapsed[41];
+ unsigned char time_total[41];
+ static int current = 0;
+ while(!leaving){
+ if(playlist_mode){
+
+ int y=0;
+ int offset=2;
+ if(track_info.currentsong>-1){
+ current=track_info.currentsong;
+ track_info.currentsong = -1;
+ }
+
+ if(playlist_selection>0){
+ if(current+1<mpd_playlist_get_playlist_length(obj))
+ current+=playlist_selection;
+ playlist_selection=0;
+ }
+ if(playlist_selection<0){
+ if(current)
+ current--;
+ playlist_selection=0;
+ }
+
+ g15r_pixelBox (canvas, 0, 0, 159, 42, G15_COLOR_WHITE, 1, 1);
+
+ if(current-offset<0)
+ offset-=current;
+
+ for(i=current-offset;i<current+6;i++){
+ char title[100];
+ mpd_Song *song;
+
+ song = mpd_playlist_get_song_from_pos(obj, i);
+ if(song) {
+ if(song->title!=NULL)
+ strncpy(title,song->title,99);
+ else
+ strncpy(title,"",99);
+ if(song->artist!=NULL){
+ strncat(title," - ",99);
+ strncat(title,song->artist,99);
+ }
+ }
+ /* sanitise the display */
+ if(i==mpd_playlist_get_playlist_length(obj))
+ strncpy(title,"End of PlayList",99);
+ if(i>mpd_playlist_get_playlist_length(obj))
+ break;
+ if(i<0)
+ strncpy(title,"",99);
+
+ if(y==offset){
+ g15r_pixelBox (canvas, 0, 7*offset, 159 , 7*(offset+1), G15_COLOR_BLACK, 1, 1);
+ canvas->mode_xor=1;
+ if(song)
+ if(song->id)
+ item_selected=song->id;
+ }
+ g15r_renderString (canvas, (unsigned char *)title, y, G15_TEXT_MED, 1, 1);
+ canvas->mode_xor=0;
+ y++;
+ }
+ }else{
+ /* track info */
+ g15r_pixelBox (canvas, 0, 0, 159, 42, G15_COLOR_WHITE, 1, 1);
+ g15r_renderString (canvas, (unsigned char *)track_info.artist, 0, G15_TEXT_LARGE, 80-(strlen(track_info.artist)*8)/2, 2);
+ g15r_renderString (canvas, (unsigned char *)track_info.title, 0, G15_TEXT_MED, 80-(strlen(track_info.title)*5)/2, 12);
+
+ /* elapsed time */
+ memset(time_elapsed,0,41);
+ memset(time_total,0,41);
+ snprintf((char*)time_elapsed,40,"%02i:%02i",track_info.elapsed/60, track_info.elapsed%60);
+ snprintf((char*)time_total,40,"%02i:%02i",track_info.total/60, track_info.total%60);
+ if(track_info.elapsed>0&&track_info.total>0)
+ g15r_drawBar (canvas, 10, 22, 149, 30, G15_COLOR_BLACK, track_info.elapsed, track_info.total, 1);
+ canvas->mode_xor=1;
+ g15r_renderString (canvas,(unsigned char*)time_elapsed,0,G15_TEXT_MED,12,23);
+ g15r_renderString (canvas,(unsigned char*)time_total,0,G15_TEXT_MED,124,23);
+ canvas->mode_xor=0;
+
+ switch(track_info.playstate)
+ {
+ case MPD_PLAYER_PLAY:
+ playing=1;
+ paused=0;
+ break;
+ case MPD_PLAYER_PAUSE:
+ g15r_pixelBox (canvas, 10, 22, 149, 30, G15_COLOR_WHITE, 1, 1);
+ g15r_renderString (canvas, (unsigned char *)"Playback Paused", 0, G15_TEXT_LARGE, 22, 23);
+ paused=1;
+ break;
+ case MPD_PLAYER_STOP:
+ g15r_pixelBox (canvas, 10, 22, 149, 30, G15_COLOR_WHITE, 1, 1);
+ g15r_renderString (canvas, (unsigned char *)"Playback Stopped", 0, G15_TEXT_LARGE, 18, 23);
+ playing=0;
+ paused=0;
+ break;
+ default:
+ break;
+ }
+
+ g15r_pixelBox (canvas, 1, 34, 158 , 41, G15_COLOR_WHITE, 1, 1);
+ g15r_pixelBox (canvas, 10, 34, 27, 42, G15_COLOR_BLACK, 1, 1);
+ canvas->mode_xor=1;
+ g15r_renderString (canvas, (unsigned char *)"mode", 0, G15_TEXT_SMALL, 11, 36);
+ canvas->mode_xor=0;
+
+ if(menulevel==MENU_MODE1){
+ if(track_info.random){
+ g15r_drawLine (canvas, 43, 42, 158, 42,G15_COLOR_WHITE);
+ canvas->mode_xor=1;
+ g15r_pixelBox (canvas, 104, 34, 125 , 42, G15_COLOR_BLACK, 1, 1);
+ }else{
+ g15r_pixelBox (canvas, 104, 34, 125 , 42, G15_COLOR_BLACK, 1, 0);
+ }
+ g15r_renderString (canvas, (unsigned char *)"Rndm", 0, G15_TEXT_SMALL, 108, 36);
+ canvas->mode_xor=0;
+
+ if(track_info.repeat){
+ canvas->mode_xor=1;
+ g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 1);
+ }else {
+ g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 0);
+ }
+
+ g15r_renderString (canvas, (unsigned char *)"Rpt", 0, G15_TEXT_SMALL, 136, 36);
+ canvas->mode_xor=0;
+
+ // 2nd box from left - if you want it...
+ if(playlist_mode==0){
+ g15r_pixelBox (canvas, 34, 34, 70 , 42, G15_COLOR_BLACK, 1, 0);
+ g15r_renderString (canvas, (unsigned char *)"Playlist", 0, G15_TEXT_SMALL, 36, 36);
+ }else{
+ canvas->mode_xor=1;
+ g15r_pixelBox (canvas, 34, 34, 70 , 42, G15_COLOR_BLACK, 1, 1);
+ g15r_renderString (canvas, (unsigned char *)"Playlist", 0, G15_TEXT_SMALL, 36, 36);
+ canvas->mode_xor=0;
+ }
+ }
+
+ if(menulevel==MENU_MODE2){
+ g15r_pixelBox (canvas, 104, 34, 125 , 42, G15_COLOR_BLACK, 1, 0);
+ g15r_renderString (canvas, (unsigned char *)"Vol-", 0, G15_TEXT_SMALL, 108, 36);
+
+ g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 0);
+ g15r_renderString (canvas, (unsigned char *)"Vol+", 0, G15_TEXT_SMALL, 132, 36);
+
+ // 2nd box from left - if you want it...
+ //g15r_pixelBox (canvas, 34, 34, 54 , 42, G15_COLOR_BLACK, 1, 0);
+ //g15r_renderString (canvas, (unsigned char *)"test", 0, G15_TEXT_SMALL, 36, 36);
+ }
+
+ if(voltimeout){
+ g15r_drawBar (canvas,10, 22, 149, 30, G15_COLOR_BLACK, track_info.volume, 100, 1);
+ canvas->mode_xor=1;
+ g15r_renderString (canvas, (unsigned char *)"Volume", 0, G15_TEXT_LARGE, 59, 23);
+ canvas->mode_xor=0;
+ }
+ }
+
+ /* do a quicky checksum - only send frame if different */
+ chksum=0;
+ for(i=0;i<G15_BUFFER_LEN;i++){
+ chksum+=canvas->buffer[i]*i;
+ }
+ pthread_mutex_lock(&daemon_mutex);
+ if(last_chksum!=chksum) {
+ while(g15_send(g15screen_fd,(char *)canvas->buffer,G15_BUFFER_LEN)<0 && !leaving) {
+ perror("lost connection, tryng again\n");
+ usleep(10000);
+ /* connection error occurred - try to reconnect to the daemon */
+ g15screen_fd=new_g15_screen(G15_G15RBUF);
+ }
+ }
+ pthread_mutex_unlock(&daemon_mutex);
+ last_chksum=chksum;
+
+ usleep(75*1000);
+ if(playlist_mode)
+ usleep(75*1000);
+
+ }
+}
+
+void status_changed(MpdObj *mi, ChangedStatusType what)
+{
pthread_mutex_lock(&lockit);
+
mpd_Song *song = mpd_playlist_get_current_song(mi);
if(song) {
- g15r_pixelBox (canvas, 0, 0, 159, 20, G15_COLOR_WHITE, 1, 1);
-
- if(song->artist!=NULL)
- strncpy(artist,song->artist,99);
- if(song->title!=NULL)
- strncpy(title,song->title,99);
+ if(song->artist!=NULL)
+ strncpy(track_info.artist,song->artist,99);
+ if(song->title!=NULL)
+ strncpy(track_info.title,song->title,99);
}
- g15r_renderString (canvas, (unsigned char *)artist, 0, G15_TEXT_LARGE, 80-(strlen(artist)*8)/2, 2);
- g15r_renderString (canvas, (unsigned char *)title, 0, G15_TEXT_MED, 80-(strlen(title)*5)/2, 12);
-
if(what&MPD_CST_CROSSFADE){
- // printf(GREEN"X-Fade:"RESET" %i sec.\n",mpd_status_get_crossfade(mi));
+ // printf(GREEN"X-Fade:"RESET" %i sec.\n",mpd_status_get_crossfade(mi));
}
if(what&MPD_CST_PLAYLIST)
{
- // printf(GREEN"Playlist changed"RESET"\n");
+ // printf(GREEN"Playlist changed"RESET"\n");
+ track_info.totalsongs_in_playlist = mpd_playlist_get_playlist_length(mi);
+
}
if(what&MPD_CST_ELAPSED_TIME && !voltimeout){
- unsigned char time_elapsed[41];
- unsigned char time_total[41];
- int elapsed = mpd_status_get_elapsed_song_time(mi);
- int total = mpd_status_get_total_song_time(mi);
-
- memset(time_elapsed,0,41);
- memset(time_total,0,41);
- snprintf((char*)time_elapsed,40,"%02i:%02i",elapsed/60, elapsed%60);
- snprintf((char*)time_total,40,"%02i:%02i",total/60, total%60);
-
- if(elapsed>0&&total>0)
- g15r_drawBar (canvas, 10, 22, 149, 30, G15_COLOR_BLACK, elapsed, total, 1);
-
- canvas->mode_xor=1;
- g15r_renderString (canvas,(unsigned char*)time_elapsed,0,G15_TEXT_MED,12,23);
- g15r_renderString (canvas,(unsigned char*)time_total,0,G15_TEXT_MED,124,23);
- canvas->mode_xor=0;
+ track_info.elapsed = mpd_status_get_elapsed_song_time(mi);
+ track_info.total = mpd_status_get_total_song_time(mi);
}
- if(what&MPD_CST_VOLUME||voltimeout>0){
- static int volume;
- if(what&MPD_CST_VOLUME){
- voltimeout=5;
- volume = mpd_status_get_volume(mi);
- }
- if(voltimeout<0)
- voltimeout=0;
-
- g15r_drawBar (canvas,10, 22, 149, 30, G15_COLOR_BLACK, volume, 100, 1);
- canvas->mode_xor=1;
- g15r_renderString (canvas, (unsigned char *)"Volume", 0, G15_TEXT_LARGE, 59, 23);
- canvas->mode_xor=0;
+ if(what&MPD_CST_VOLUME){
+ voltimeout=500;
+ track_info.volume = mpd_status_get_volume(mi);
}
-
- if(what&MPD_CST_STATE)
- {
- switch(mpd_player_get_state(mi))
- {
- case MPD_PLAYER_PLAY:
- playing=1;
- paused=0;
- break;
- case MPD_PLAYER_PAUSE:
- g15r_pixelBox (canvas, 10, 22, 149, 30, G15_COLOR_WHITE, 1, 1);
- g15r_renderString (canvas, (unsigned char *)"Playback Paused", 0, G15_TEXT_LARGE, 22, 23);
- paused=1;
- break;
- case MPD_PLAYER_STOP:
- g15r_pixelBox (canvas, 10, 22, 149, 30, G15_COLOR_WHITE, 1, 1);
- g15r_renderString (canvas, (unsigned char *)"Playback Stopped", 0, G15_TEXT_LARGE, 18, 23);
- playing=0;
- paused=0;
- break;
- default:
- break;
- }
- }
-
- g15r_pixelBox (canvas, 1, 34, 158 , 41, G15_COLOR_WHITE, 1, 1);
- g15r_pixelBox (canvas, 10, 34, 27, 42, G15_COLOR_BLACK, 1, 1);
- canvas->mode_xor=1;
- g15r_renderString (canvas, (unsigned char *)"mode", 0, G15_TEXT_SMALL, 11, 36);
- canvas->mode_xor=0;
- if(menulevel==0){
- if(mpd_player_get_random(mi)){
- g15r_drawLine (canvas, 43, 42, 158, 42,G15_COLOR_WHITE);
- canvas->mode_xor=1;
- g15r_pixelBox (canvas, 104, 34, 125 , 42, G15_COLOR_BLACK, 1, 1);
- }else
- g15r_pixelBox (canvas, 104, 34, 125 , 42, G15_COLOR_BLACK, 1, 0);
-
- g15r_renderString (canvas, (unsigned char *)"Rndm", 0, G15_TEXT_SMALL, 108, 36);
- if(mpd_player_get_random(mi))
- canvas->mode_xor=0;
-
- if(mpd_player_get_repeat(mi)){
- canvas->mode_xor=1;
- g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 1);
- }else
- g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 0);
-
- g15r_renderString (canvas, (unsigned char *)"Rpt", 0, G15_TEXT_SMALL, 136, 36);
- if(mpd_player_get_repeat(mi))
- canvas->mode_xor=0;
- // 2nd box from left - if you want it...
- //g15r_pixelBox (canvas, 34, 34, 54 , 42, G15_COLOR_BLACK, 1, 0);
- //g15r_renderString (canvas, (unsigned char *)"test", 0, G15_TEXT_SMALL, 36, 36);
+ if(what&MPD_CST_STATE) {
+ track_info.playstate = mpd_player_get_state(mi);
}
- if(menulevel==1){
- g15r_pixelBox (canvas, 104, 34, 125 , 42, G15_COLOR_BLACK, 1, 0);
- g15r_renderString (canvas, (unsigned char *)"Vol-", 0, G15_TEXT_SMALL, 108, 36);
+ track_info.repeat = mpd_player_get_repeat(obj);
+ track_info.random = mpd_player_get_random(obj);
- g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 0);
- g15r_renderString (canvas, (unsigned char *)"Vol+", 0, G15_TEXT_SMALL, 132, 36);
-
- // 2nd box from left - if you want it...
- //g15r_pixelBox (canvas, 34, 34, 54 , 42, G15_COLOR_BLACK, 1, 0);
- //g15r_renderString (canvas, (unsigned char *)"test", 0, G15_TEXT_SMALL, 36, 36);
- }
-
- /* do a quicky checksum - only send frame if different */
- chksum=0;
- for(i=0;i<G15_BUFFER_LEN;i++){
- chksum+=canvas->buffer[i]*i;
- }
- if(last_chksum!=chksum) {
- while(g15_send(g15screen_fd,(char *)canvas->buffer,G15_BUFFER_LEN)<0 && !leaving) {
- perror("lost connection, tryng again\n");
- usleep(10000);
- /* connection error occurred - try to reconnect to the daemon */
- g15screen_fd=new_g15_screen(G15_G15RBUF);
- }
- }
- last_chksum=chksum;
pthread_mutex_unlock(&lockit);
usleep(100*1000);
}
@@ -336,12 +543,18 @@
int fdstdin = 0;
pthread_t Xkeys;
pthread_t Lkeys;
+ pthread_t g15display;
+ int xtest_major_version = 0;
+ int xtest_minor_version = 0;
+ int dummy;
+
int iport = 6600;
char *hostname = getenv("MPD_HOST");
char *port = getenv("MPD_PORT");
char *password = getenv("MPD_PASSWORD");
+
pthread_mutex_init(&lockit,NULL);
- /* Make the input non blocking */
+ pthread_mutex_init(&daemon_mutex,NULL);
/* set correct hostname */
if(!hostname) {
@@ -376,6 +589,12 @@
return 1;
}
+ have_xtest = XTestQueryExtension(dpy, &dummy, &dummy, &xtest_major_version, &xtest_minor_version);
+ if(have_xtest == False || xtest_major_version < 2 || (xtest_major_version <= 2 && xtest_minor_version < 2))
+ {
+ printf("XTEST extension not supported");
+ }
+
/* completely ignore errors and carry on */
XSetErrorHandler(myx_error_handler);
XFlush(dpy);
@@ -407,8 +626,9 @@
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr,32*1024); /* set stack to 64k - dont need 8Mb !! */
- pthread_create(&Xkeys, &attr, poll_mmediakeys, NULL);
+ pthread_create(&Xkeys, &attr, xevent_thread, NULL);
pthread_create(&Lkeys, &attr, Lkeys_thread, NULL);
+ pthread_create(&g15display, &attr, g15display_thread, NULL);
do{
mpd_status_update(obj);
@@ -423,11 +643,14 @@
close(g15screen_fd);
leaving = 1;
pthread_join(Xkeys,NULL);
+ pthread_join(Lkeys,NULL);
+ pthread_join(g15display,NULL);
XUngrabKey(dpy, XF86XK_AudioPrev, AnyModifier, root_win);
XUngrabKey(dpy, XF86XK_AudioNext, AnyModifier, root_win);
XUngrabKey(dpy, XF86XK_AudioPlay, AnyModifier, root_win);
XUngrabKey(dpy, XF86XK_AudioStop, AnyModifier, root_win);
-
+ if(own_keyboard)
+ XUngrabKeyboard(dpy,CurrentTime);
pthread_mutex_destroy(&lockit);
return 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-01-01 20:51:39
|
Revision: 239
http://svn.sourceforge.net/g15daemon/?rev=239&view=rev
Author: mlampard
Date: 2007-01-01 12:51:40 -0800 (Mon, 01 Jan 2007)
Log Message:
-----------
ensure compilability even if xtest extension devel packages arent found.
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/configure.in
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-01-01 20:04:15 UTC (rev 238)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-01-01 20:51:40 UTC (rev 239)
@@ -3,3 +3,4 @@
SVN
- added ability to scroll through playlist and play selected songs with the
volume control/play button.
+- best used with g15daemon wip
Modified: trunk/g15daemon-audio-plugins/g15mpd/configure.in
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/configure.in 2007-01-01 20:04:15 UTC (rev 238)
+++ trunk/g15daemon-audio-plugins/g15mpd/configure.in 2007-01-01 20:51:40 UTC (rev 239)
@@ -12,10 +12,12 @@
AC_PROG_RANLIB
AC_CHECK_LIB([g15daemon_client], [g15daemon_version],,AC_MSG_ERROR(["libg15daemon_client (or its devel package) not found. please install it"]))
+AC_CHECK_LIB([Xtst],[XTestQueryExtension],,AC_MSG_ERROR(["Xorg XTest extension library not found. please install it"]))
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(g15daemon_client.h libg15render.h,,AC_MSG_ERROR(["libg15daemon_client (or its devel package) could not be found. please install it"]))
AC_CHECK_HEADERS(X11/Xlib.h X11/XF86keysym.h,,AC_MSG_ERROR(["Xorg development files could not be found. please install the devel package"]))
+AC_CHECK_HEADERS(X11/extensions/XTest.h,,AC_MSG_ERROR(["Xorg XTEST Extension devel headers could not be found. please install the devel package"]))
AC_CHECK_HEADERS(libmpd/libmpd.h,,AC_MSG_ERROR(["libmpd development files could not be found. please install the libmpd devel package"]))
AC_PATH_X
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-01-01 20:04:15 UTC (rev 238)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-01-01 20:51:40 UTC (rev 239)
@@ -43,7 +43,9 @@
#include <poll.h>
#include <pthread.h>
#include <X11/Xlib.h>
+#ifdef HAVE_X11_EXTENSIONS_XTEST_H
#include <X11/extensions/XTest.h>
+#endif
#include <X11/XF86keysym.h>
extern int debug_level;
@@ -253,14 +255,14 @@
XUngrabKeyboard(dpy,CurrentTime);
XFlush(dpy);
}
-
+#ifdef HAVE_X11_EXTENSIONS_XTEST_H
if(have_xtest) { // send the keypress elsewhere
if(event->type==KeyPress){
XTestFakeKeyEvent(dpy, keycode, True, CurrentTime);
}
XFlush(dpy);
}
-
+#endif
if(own_keyboard && have_xtest) { // we only regrab if the XTEST extension is available.
XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
}
@@ -617,13 +619,13 @@
printf("Cant find root window\n");
return 1;
}
-
+#ifdef HAVE_X11_EXTENSIONS_XTEST_H
have_xtest = XTestQueryExtension(dpy, &dummy, &dummy, &xtest_major_version, &xtest_minor_version);
if(have_xtest == False || xtest_major_version < 2 || (xtest_major_version <= 2 && xtest_minor_version < 2))
{
printf("XTEST extension not supported");
}
-
+#endif
/* completely ignore errors and carry on */
XSetErrorHandler(myx_error_handler);
XFlush(dpy);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-18 23:07:11
|
Revision: 316
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=316&view=rev
Author: mlampard
Date: 2007-11-18 15:07:15 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
respond to volume/mute controls, improve responsiveness. (Thanks to Nedko Arnaudov)
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/AUTHORS
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/AUTHORS
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/AUTHORS 2007-09-15 10:47:56 UTC (rev 315)
+++ trunk/g15daemon-audio-plugins/g15mpd/AUTHORS 2007-11-18 23:07:15 UTC (rev 316)
@@ -1 +1,9 @@
Mike Lampard <mla...@us...>
+- Primary developer / Maintainer
+
+*** Contributions:
+
+Nedko Arnaudov
+- patch to improve responsiveness
+- patch to respond to volume control/mute
+
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-09-15 10:47:56 UTC (rev 315)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-18 23:07:15 UTC (rev 316)
@@ -4,3 +4,5 @@
- added ability to scroll through playlist and play selected songs with the
volume control/play button.
- best used with g15daemon wip
+- Respond to volume wheel & mute button
+- Improve responsiveness
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-09-15 10:47:56 UTC (rev 315)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-18 23:07:15 UTC (rev 316)
@@ -77,6 +77,9 @@
static int playlist_mode=0;
int playlist_selection=0;
int item_selected=0;
+int volume_adjust=0;
+int mute=0;
+int muted_volume=0;
struct track_info {
char artist[100];
@@ -204,7 +207,10 @@
int code_audio_prev = XKeysymToKeycode(dpy, XF86XK_AudioPrev);
int code_audio_raisevol = XKeysymToKeycode(dpy, XF86XK_AudioRaiseVolume);
int code_audio_lowervol = XKeysymToKeycode(dpy, XF86XK_AudioLowerVolume);
+ int code_audio_mute = XKeysymToKeycode(dpy, XF86XK_AudioMute);
+/* printf("keycode = %d\n", keycode); */
+
if(keycode == code_audio_play) {
if(playing && !playlist_mode) {
if (paused) {
@@ -241,14 +247,25 @@
}
if(keycode == code_audio_raisevol){
- playlist_selection = 1;
+ pthread_mutex_lock(&daemon_mutex);
+ volume_adjust+=1;
+ pthread_mutex_unlock(&daemon_mutex);
return;
}
if(keycode == code_audio_lowervol){
- playlist_selection = -1;
+ pthread_mutex_lock(&daemon_mutex);
+ volume_adjust-=1;
+ pthread_mutex_unlock(&daemon_mutex);
return;
}
+ if(keycode == code_audio_mute){
+ pthread_mutex_lock(&daemon_mutex);
+ mute = 1;
+ pthread_mutex_unlock(&daemon_mutex);
+ return;
+ }
+
/* now the default stuff */
if(own_keyboard) {
menulevel=MENU_MODE1;
@@ -486,7 +503,10 @@
//g15r_renderString (canvas, (unsigned char *)"test", 0, G15_TEXT_SMALL, 36, 36);
}
- if(voltimeout){
+ if(muted_volume != 0){
+ g15r_renderString (canvas, (unsigned char *)"MUTE", 0, G15_TEXT_LARGE, 11, 2);
+ }
+ else if(voltimeout){
g15r_drawBar (canvas,10, 22, 149, 30, G15_COLOR_BLACK, track_info.volume, 100, 1);
canvas->mode_xor=1;
g15r_renderString (canvas, (unsigned char *)"Volume", 0, G15_TEXT_LARGE, 59, 23);
@@ -560,7 +580,7 @@
track_info.random = mpd_player_get_random(obj);
pthread_mutex_unlock(&lockit);
- usleep(100*1000);
+ usleep(10*1000);
}
@@ -578,6 +598,8 @@
int xtest_major_version = 0;
int xtest_minor_version = 0;
int dummy;
+ int volume;
+ int volume_new;
int iport = 6600;
char *hostname = getenv("MPD_HOST");
@@ -638,6 +660,12 @@
False, GrabModeAsync, GrabModeAsync);
XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioNext), AnyModifier, root_win,
False, GrabModeAsync, GrabModeAsync);
+ XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioRaiseVolume), AnyModifier, root_win,
+ False, GrabModeAsync, GrabModeAsync);
+ XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioLowerVolume), AnyModifier, root_win,
+ False, GrabModeAsync, GrabModeAsync);
+ XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioMute), AnyModifier, root_win,
+ False, GrabModeAsync, GrabModeAsync);
/* Create mpd object */
obj = mpd_new(hostname, iport,password);
@@ -662,8 +690,44 @@
pthread_create(&g15display, &attr, g15display_thread, NULL);
do{
+ pthread_mutex_lock(&daemon_mutex);
+ if(mute){
+ volume_adjust = 0;
+ mute = 0;
+ if (muted_volume == 0) {
+ //printf("mute\n");
+ muted_volume = mpd_status_get_volume(obj);
+ mpd_status_set_volume (obj,0);
+ } else {
+ //printf("unmute\n");
+ if (mpd_status_get_volume(obj) == 0) { /* if no other client has set volume up */
+ mpd_status_set_volume (obj,muted_volume);
+ }
+ muted_volume = 0;
+ }
+ }
+ if(volume_adjust != 0){
+ if (muted_volume != 0) {
+ volume=muted_volume;
+ } else {
+ volume=mpd_status_get_volume(obj);
+ }
+ volume_new = volume + volume_adjust;
+ volume_adjust = 0;
+ if(volume_new < 0)
+ volume_new = 0;
+ if(volume_new > 100)
+ volume_new = 100;
+ if(volume != volume_new || muted_volume){
+ //printf("volume %d -> %d\n", volume, volume_new);
+ mpd_status_set_volume (obj,volume_new);
+ }
+ voltimeout=500;
+ muted_volume=0;
+ }
mpd_status_update(obj);
- }while(!usleep(10000) && !leaving);
+ pthread_mutex_unlock(&daemon_mutex);
+ }while(!usleep(5000) && !leaving);
}
mpd_free(obj);
close(fdstdin);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-18 23:16:22
|
Revision: 317
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=317&view=rev
Author: mlampard
Date: 2007-11-18 15:16:25 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
Dont display previous name if current track has NULL name field. (Nedko)
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-18 23:07:15 UTC (rev 316)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-18 23:16:25 UTC (rev 317)
@@ -6,3 +6,4 @@
- best used with g15daemon wip
- Respond to volume wheel & mute button
- Improve responsiveness
+- Fix display if stream name is NULL
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-18 23:07:15 UTC (rev 316)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-18 23:16:25 UTC (rev 317)
@@ -545,10 +545,16 @@
mpd_Song *song = mpd_playlist_get_current_song(mi);
if(song) {
- if(song->artist!=NULL)
+ if (song->artist!=NULL) {
strncpy(track_info.artist,song->artist,99);
- if(song->title!=NULL)
+ } else {
+ track_info.artist[0] = 0;
+ }
+ if (song->title!=NULL) {
strncpy(track_info.title,song->title,99);
+ } else {
+ track_info.title[0] = 0;
+ }
}
if(what&MPD_CST_CROSSFADE){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-18 23:20:21
|
Revision: 318
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=318&view=rev
Author: mlampard
Date: 2007-11-18 15:20:11 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
Dont display track time info if that data is not available (Thanks Nedko)
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/AUTHORS
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/AUTHORS
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/AUTHORS 2007-11-18 23:16:25 UTC (rev 317)
+++ trunk/g15daemon-audio-plugins/g15mpd/AUTHORS 2007-11-18 23:20:11 UTC (rev 318)
@@ -6,4 +6,4 @@
Nedko Arnaudov
- patch to improve responsiveness
- patch to respond to volume control/mute
-
+- patch to hide display of names and/or track info if that data isn't available.
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-18 23:16:25 UTC (rev 317)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-18 23:20:11 UTC (rev 318)
@@ -7,3 +7,5 @@
- Respond to volume wheel & mute button
- Improve responsiveness
- Fix display if stream name is NULL
+- Dont display elapsed or total time if playing a radio stream where we dont
+ have that information.
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-18 23:16:25 UTC (rev 317)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-18 23:20:11 UTC (rev 318)
@@ -422,8 +422,10 @@
/* elapsed time */
memset(time_elapsed,0,41);
memset(time_total,0,41);
- snprintf((char*)time_elapsed,40,"%02i:%02i",track_info.elapsed/60, track_info.elapsed%60);
- snprintf((char*)time_total,40,"%02i:%02i",track_info.total/60, track_info.total%60);
+ if (track_info.total != 0) {
+ snprintf((char*)time_elapsed,40,"%02i:%02i",track_info.elapsed/60, track_info.elapsed%60);
+ snprintf((char*)time_total,40,"%02i:%02i",track_info.total/60, track_info.total%60);
+ }
if(track_info.elapsed>0&&track_info.total>0)
g15r_drawBar (canvas, 10, 22, 149, 30, G15_COLOR_BLACK, track_info.elapsed, track_info.total, 1);
canvas->mode_xor=1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2007-11-19 05:37:32
|
Revision: 319
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=319&view=rev
Author: mlampard
Date: 2007-11-18 21:37:36 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
remove dependency on X11, use the EVDEV devices available in /dev/input/eventX for input. Fix fast-scrolling through the playlist.
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/Makefile.am
trunk/g15daemon-audio-plugins/g15mpd/configure.in
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-18 23:20:11 UTC (rev 318)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2007-11-19 05:37:36 UTC (rev 319)
@@ -2,10 +2,16 @@
- Initial release
SVN
- added ability to scroll through playlist and play selected songs with the
-volume control/play button.
+ volume control/play button.
- best used with g15daemon wip
- Respond to volume wheel & mute button
- Improve responsiveness
- Fix display if stream name is NULL
- Dont display elapsed or total time if playing a radio stream where we dont
have that information.
+- Use EVDEV rather than X events. g15mpd can now be started from init.
+ It now needs to be run as root or be in the same group as /dev/input/eventX.
+- Fix playlist mode scroll feature (uses volume control to fast scroll
+ through playlist if --quickscroll option is used, otherwise uses prev/next
+ keys.
+- Only respond to mmedia keys if the display is in the foreground.
Modified: trunk/g15daemon-audio-plugins/g15mpd/Makefile.am
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/Makefile.am 2007-11-18 23:20:11 UTC (rev 318)
+++ trunk/g15daemon-audio-plugins/g15mpd/Makefile.am 2007-11-19 05:37:36 UTC (rev 319)
@@ -6,7 +6,7 @@
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
doc_DATA = README ChangeLog AUTHORS NEWS COPYING
-LIBS = -lg15daemon_client -lg15render -lX11 -lXtst -lmpd
+LIBS = -lg15daemon_client -lg15render -lmpd
IMCLUDES = -I
g15mpd_LDFLAGS = -avoid-version
g15mpd_SOURCES = g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/configure.in
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/configure.in 2007-11-18 23:20:11 UTC (rev 318)
+++ trunk/g15daemon-audio-plugins/g15mpd/configure.in 2007-11-19 05:37:36 UTC (rev 319)
@@ -1,7 +1,7 @@
-AC_INIT(g15mpd.c,[1.0svn], [mla...@us...])
+AC_INIT(g15mpd.c,[1.2svn], [mla...@us...])
PACKAGE=g15mpd
-VERSION=1.0.0
+VERSION=1.2.0
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
@@ -12,12 +12,9 @@
AC_PROG_RANLIB
AC_CHECK_LIB([g15daemon_client], [g15daemon_version],,AC_MSG_ERROR(["libg15daemon_client (or its devel package) not found. please install it"]))
-AC_CHECK_LIB([Xtst],[XTestQueryExtension],,AC_MSG_ERROR(["Xorg XTest extension library not found. please install it"]))
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(g15daemon_client.h libg15render.h,,AC_MSG_ERROR(["libg15daemon_client (or its devel package) could not be found. please install it"]))
-AC_CHECK_HEADERS(X11/Xlib.h X11/XF86keysym.h,,AC_MSG_ERROR(["Xorg development files could not be found. please install the devel package"]))
-AC_CHECK_HEADERS(X11/extensions/XTest.h,,AC_MSG_ERROR(["Xorg XTEST Extension devel headers could not be found. please install the devel package"]))
AC_CHECK_HEADERS(libmpd/libmpd.h,,AC_MSG_ERROR(["libmpd development files could not be found. please install the libmpd devel package"]))
AC_PATH_X
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-18 23:20:11 UTC (rev 318)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2007-11-19 05:37:36 UTC (rev 319)
@@ -14,15 +14,15 @@
You should have received a copy of the GNU General Public License
along with g15daemon; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
- (c) 2006 Mike Lampard
+ (c) 2006-2007 Mike Lampard
+
$Revision$ - $Date$ $Author$
-
+
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
Client screens can be cycled through by pressing the 'L1' key.
-
+
This is a simple frontend for the Media Player Daemon (MPD)
*/
@@ -42,32 +42,28 @@
#include <libg15render.h>
#include <poll.h>
#include <pthread.h>
-#include <X11/Xlib.h>
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
-#include <X11/extensions/XTest.h>
-#endif
-#include <X11/XF86keysym.h>
- extern int debug_level;
+#include <linux/input.h>
+
+extern int debug_level;
int g15screen_fd, retval;
g15canvas *canvas;
-
-static Display *dpy;
-static Window root_win;
-
+int current_fg_check=0;
static int playing;
-static int paused;
+static int paused=0;
+static int quickscroll = 0;
MpdObj *obj = NULL;
int leaving = 0;
-int have_xtest=0;
static int voltimeout=0;
static int own_keyboard=0;
pthread_mutex_t daemon_mutex;
pthread_mutex_t lockit;
+int mmedia_fd;
+
static int menulevel=0;
#define MENU_MODE1 0
#define MENU_MODE2 1
@@ -103,7 +99,6 @@
int volume;
struct pollfd fds;
char ver[5];
- int foo;
strncpy(ver,G15DAEMON_VERSION,3);
float g15v;
@@ -111,31 +106,28 @@
fds.fd = g15screen_fd;
fds.events = POLLIN;
-
+
while(!leaving){
- int foo=0;
- int current_fg_check = g15_send_cmd (g15screen_fd, G15DAEMON_IS_FOREGROUND, foo);
- static int last_fg_check = 0;
- if(playlist_mode && last_fg_check != current_fg_check){
- if(own_keyboard){
- if(current_fg_check==0){
- own_keyboard=0;
- XUngrabKeyboard(dpy,CurrentTime);
- XFlush(dpy);
+ int foo=0;
+ current_fg_check = g15_send_cmd (g15screen_fd, G15DAEMON_IS_FOREGROUND, foo);
+ static int last_fg_check = 0;
+ if(playlist_mode && last_fg_check != current_fg_check){
+ if(own_keyboard){
+ if(current_fg_check==0){
+ own_keyboard=0;
+ }
+ }else if(current_fg_check && !own_keyboard) {
+ own_keyboard=1;
}
- }else if(current_fg_check && !own_keyboard) {
- own_keyboard=1;
- XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
- }
- last_fg_check = current_fg_check;
- }
-
+ last_fg_check = current_fg_check;
+ }
+
/* g15daemon series 1.2 need key request packets */
- pthread_mutex_lock(&daemon_mutex);
- if((g15v*10)<=18) {
+ pthread_mutex_lock(&daemon_mutex);
+ if((g15v*10)<=18) {
keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo);
- } else {
+ } else {
if ((poll(&fds, 1, 5)) > 0)
read (g15screen_fd, &keystate, sizeof (keystate));
}
@@ -154,16 +146,14 @@
menulevel=0;
break;
case G15_KEY_L3:
- if(!own_keyboard){ //activate keyboard grab mode
+ if(!own_keyboard){
own_keyboard=playlist_mode=1;
- XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
mpd_Song *song = mpd_playlist_get_current_song(obj);
if(song)
if(song->pos)
track_info.currentsong=song->pos;
}else{ //de-activate
own_keyboard=playlist_mode=0;
- XUngrabKeyboard(dpy,CurrentTime);
}
break;
case G15_KEY_L4:
@@ -198,142 +188,121 @@
return NULL;
}
-void xkey_handler(XEvent *event){
-
- int keycode = event->xkey.keycode;
- int code_audio_play = XKeysymToKeycode(dpy,XF86XK_AudioPlay);
- int code_audio_stop = XKeysymToKeycode(dpy, XF86XK_AudioStop);
- int code_audio_next = XKeysymToKeycode(dpy, XF86XK_AudioNext);
- int code_audio_prev = XKeysymToKeycode(dpy, XF86XK_AudioPrev);
- int code_audio_raisevol = XKeysymToKeycode(dpy, XF86XK_AudioRaiseVolume);
- int code_audio_lowervol = XKeysymToKeycode(dpy, XF86XK_AudioLowerVolume);
- int code_audio_mute = XKeysymToKeycode(dpy, XF86XK_AudioMute);
-/* printf("keycode = %d\n", keycode); */
+void *event_key_thread() {
- if(keycode == code_audio_play) {
- if(playing && !playlist_mode) {
- if (paused) {
- mpd_player_play(obj);
- paused = 0;
- } else {
- mpd_player_pause(obj);
- paused = 1;
- }
- } else {
- mpd_player_play(obj);
- playing = 1;
- }
- if(playlist_mode){
- mpd_player_play_id(obj, item_selected);
- }
- return;
- }
+ struct input_event *event;
+ event=malloc(sizeof(struct input_event));
+ struct pollfd fds;
- if(keycode == code_audio_stop) {
- mpd_player_stop(obj);
- playing = 0;
- return;
- }
-
- if(keycode == code_audio_next) {
- mpd_player_next(obj);
- return;
- }
+ int retval;
+ while(!leaving) {
- if(keycode == code_audio_prev) {
- mpd_player_prev(obj);
- return;
- }
+ event->value=0;
+ event->code=0;
+ fds.fd=mmedia_fd;
+ fds.events=POLLIN;
- if(keycode == code_audio_raisevol){
- pthread_mutex_lock(&daemon_mutex);
- volume_adjust+=1;
- pthread_mutex_unlock(&daemon_mutex);
- return;
- }
- if(keycode == code_audio_lowervol){
- pthread_mutex_lock(&daemon_mutex);
- volume_adjust-=1;
- pthread_mutex_unlock(&daemon_mutex);
- return;
- }
+ if(poll(&fds,1,500)<1)
+ continue;
- if(keycode == code_audio_mute){
- pthread_mutex_lock(&daemon_mutex);
- mute = 1;
- pthread_mutex_unlock(&daemon_mutex);
- return;
- }
+ retval=read(mmedia_fd,event,sizeof(struct input_event));
- /* now the default stuff */
- if(own_keyboard) {
- menulevel=MENU_MODE1;
- XUngrabKeyboard(dpy,CurrentTime);
- XFlush(dpy);
- }
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
- if(have_xtest) { // send the keypress elsewhere
- if(event->type==KeyPress){
- XTestFakeKeyEvent(dpy, keycode, True, CurrentTime);
- }
- XFlush(dpy);
- }
-#endif
- if(own_keyboard && have_xtest) { // we only regrab if the XTEST extension is available.
- XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
- }
- XFlush(dpy);
+ if(event->value==0||current_fg_check==0)
+ continue;
-}
+ int keycode = event->code;
+ int code_audio_play = KEY_PLAYPAUSE;
+ int code_audio_stop = KEY_STOPCD;
+ int code_audio_next = KEY_NEXTSONG;
+ int code_audio_prev = KEY_PREVIOUSSONG;
+ int code_audio_raisevol = KEY_VOLUMEUP;
+ int code_audio_lowervol = KEY_VOLUMEDOWN;
+ int code_audio_mute = KEY_MUTE;
-static void* xevent_thread()
-{
- XEvent event;
- long event_mask = KeyPressMask|FocusChangeMask|SubstructureNotifyMask;
+ /* printf("keycode = %d\n", keycode); */
- XSelectInput(dpy, root_win, event_mask);
-
- while(!leaving){
- if(XCheckMaskEvent(dpy, event_mask, &event)){
- switch(event.type) {
- case KeyPress: {
- xkey_handler(&event);
- break;
+ if(keycode == code_audio_play) {
+ if(playing && !playlist_mode) {
+ if (paused==1) {
+ mpd_player_play(obj);
+ paused = 0;
+ } else {
+ mpd_player_pause(obj);
+ paused = 1;
+
}
- case KeyRelease: {
- break;
- }
- case FocusIn:
- case FocusOut:
- case EnterNotify:
- case LeaveNotify:
- case MapNotify:
- case UnmapNotify:
- case MapRequest:
- case ConfigureNotify:
- case CreateNotify:
- case DestroyNotify:
- break;
- case ReparentNotify: {
- if(own_keyboard && have_xtest) { // we only regrab if the XTEST extension is available.
- XGrabKeyboard(dpy, root_win, True, GrabModeAsync, GrabModeAsync, CurrentTime);
- }
- XFlush(dpy);
- break;
- }
- default:
- printf("Unhandled event (%i) received\n",event.type);
+
+ } else {
+ mpd_player_play(obj);
+ playing = 1;
}
+ if(playlist_mode){
+ mpd_player_play_id(obj, item_selected);
+ }
}
- if(voltimeout)
- voltimeout--;
- usleep(1000);
+ if(keycode == code_audio_stop) {
+ mpd_player_stop(obj);
+ playing = 0;
+ continue;
+ }
+
+ if(keycode == code_audio_next) {
+ if(playlist_mode)
+ playlist_selection+=1;
+ else
+ mpd_player_next(obj);
+ continue;
+ }
+
+ if(keycode == code_audio_prev) {
+ if(playlist_mode)
+ playlist_selection-=1;
+ else
+ mpd_player_prev(obj);
+ continue;
+ }
+
+ if(keycode == code_audio_raisevol){
+ if(playlist_mode && quickscroll)
+ playlist_selection+=1;
+ else {
+ pthread_mutex_lock(&daemon_mutex);
+ volume_adjust+=1;
+ pthread_mutex_unlock(&daemon_mutex);
+ continue;
+ }
+ }
+ if(keycode == code_audio_lowervol){
+ if(playlist_mode && quickscroll)
+ playlist_selection-=1;
+ else {
+ pthread_mutex_lock(&daemon_mutex);
+ volume_adjust-=1;
+ pthread_mutex_unlock(&daemon_mutex);
+ continue;
+ }
+ }
+
+ if(keycode == code_audio_mute){
+ pthread_mutex_lock(&daemon_mutex);
+ mute = 1;
+ pthread_mutex_unlock(&daemon_mutex);
+ continue;
+ }
+
+ /* now the default stuff */
+ if(own_keyboard) {
+ menulevel=MENU_MODE1;
+ continue;
+ }
}
+ free(event);
return NULL;
}
+
/* take the track_info structure and render it */
void *g15display_thread(){
long chksum=0;
@@ -345,11 +314,11 @@
int changed =0;
while(!leaving){
if(playlist_mode){
-
+
int y=0;
int offset=2;
changed = 0;
-
+
if(track_info.currentsong>-1){
current=track_info.currentsong;
track_info.currentsong = -1;
@@ -375,44 +344,44 @@
if(current-offset<0)
offset-=current;
-
+
if(changed){
g15r_pixelBox (canvas, 0, 0, 159, 42, G15_COLOR_WHITE, 1, 1);
- for(i=current-offset;i<current+6;i++){
- char title[100];
- mpd_Song *song;
+ for(i=current-offset;i<current+6;i++){
+ char title[100];
+ mpd_Song *song;
- song = mpd_playlist_get_song_from_pos(obj, i);
- if(song) {
- if(song->title!=NULL)
- strncpy(title,song->title,99);
- else
+ song = mpd_playlist_get_song_from_pos(obj, i);
+ if(song) {
+ if(song->title!=NULL)
+ strncpy(title,song->title,99);
+ else
+ strncpy(title,"",99);
+ if(song->artist!=NULL){
+ strncat(title," - ",99);
+ strncat(title,song->artist,99);
+ }
+ }
+ /* sanitise the display */
+ if(i==mpd_playlist_get_playlist_length(obj))
+ strncpy(title,"End of PlayList",99);
+ if(i>mpd_playlist_get_playlist_length(obj))
+ break;
+ if(i<0)
strncpy(title,"",99);
- if(song->artist!=NULL){
- strncat(title," - ",99);
- strncat(title,song->artist,99);
+
+ if(y==offset){
+ g15r_pixelBox (canvas, 0, 7*offset, 159 , 7*(offset+1), G15_COLOR_BLACK, 1, 1);
+ canvas->mode_xor=1;
+ if(song)
+ if(song->id)
+ item_selected=song->id;
}
+ g15r_renderString (canvas, (unsigned char *)title, y, G15_TEXT_MED, 1, 1);
+ canvas->mode_xor=0;
+ y++;
}
- /* sanitise the display */
- if(i==mpd_playlist_get_playlist_length(obj))
- strncpy(title,"End of PlayList",99);
- if(i>mpd_playlist_get_playlist_length(obj))
- break;
- if(i<0)
- strncpy(title,"",99);
-
- if(y==offset){
- g15r_pixelBox (canvas, 0, 7*offset, 159 , 7*(offset+1), G15_COLOR_BLACK, 1, 1);
- canvas->mode_xor=1;
- if(song)
- if(song->id)
- item_selected=song->id;
- }
- g15r_renderString (canvas, (unsigned char *)title, y, G15_TEXT_MED, 1, 1);
- canvas->mode_xor=0;
- y++;
}
- }
}else{
/* track info */
g15r_pixelBox (canvas, 0, 0, 159, 42, G15_COLOR_WHITE, 1, 1);
@@ -423,8 +392,8 @@
memset(time_elapsed,0,41);
memset(time_total,0,41);
if (track_info.total != 0) {
- snprintf((char*)time_elapsed,40,"%02i:%02i",track_info.elapsed/60, track_info.elapsed%60);
- snprintf((char*)time_total,40,"%02i:%02i",track_info.total/60, track_info.total%60);
+ snprintf((char*)time_elapsed,40,"%02i:%02i",track_info.elapsed/60, track_info.elapsed%60);
+ snprintf((char*)time_total,40,"%02i:%02i",track_info.total/60, track_info.total%60);
}
if(track_info.elapsed>0&&track_info.total>0)
g15r_drawBar (canvas, 10, 22, 149, 30, G15_COLOR_BLACK, track_info.elapsed, track_info.total, 1);
@@ -500,9 +469,9 @@
g15r_pixelBox (canvas, 130, 34, 149 , 42, G15_COLOR_BLACK, 1, 0);
g15r_renderString (canvas, (unsigned char *)"Vol+", 0, G15_TEXT_SMALL, 132, 36);
- // 2nd box from left - if you want it...
- //g15r_pixelBox (canvas, 34, 34, 54 , 42, G15_COLOR_BLACK, 1, 0);
- //g15r_renderString (canvas, (unsigned char *)"test", 0, G15_TEXT_SMALL, 36, 36);
+ // 2nd box from left - if you want it...
+ //g15r_pixelBox (canvas, 34, 34, 54 , 42, G15_COLOR_BLACK, 1, 0);
+ //g15r_renderString (canvas, (unsigned char *)"test", 0, G15_TEXT_SMALL, 36, 36);
}
if(muted_volume != 0){
@@ -532,7 +501,6 @@
}
pthread_mutex_unlock(&daemon_mutex);
last_chksum=chksum;
-
usleep(75*1000);
if(playlist_mode)
usleep(75*1000);
@@ -562,12 +530,12 @@
if(what&MPD_CST_CROSSFADE){
// printf(GREEN"X-Fade:"RESET" %i sec.\n",mpd_status_get_crossfade(mi));
}
-
+
if(what&MPD_CST_PLAYLIST)
{
// printf(GREEN"Playlist changed"RESET"\n");
track_info.totalsongs_in_playlist = mpd_playlist_get_playlist_length(mi);
-
+
}
if(what&MPD_CST_ELAPSED_TIME && !voltimeout){
@@ -579,44 +547,83 @@
voltimeout=500;
track_info.volume = mpd_status_get_volume(mi);
}
-
+
if(what&MPD_CST_STATE) {
track_info.playstate = mpd_player_get_state(mi);
}
-
+
track_info.repeat = mpd_player_get_repeat(obj);
track_info.random = mpd_player_get_random(obj);
-
+
pthread_mutex_unlock(&lockit);
usleep(10*1000);
}
-int myx_error_handler(Display *dpy, XErrorEvent *err){
- printf("error (%i) occured - ignoring\n",err->error_code);
- return 0;
-}
int main(int argc, char **argv)
{
int fdstdin = 0;
- pthread_t Xkeys;
pthread_t Lkeys;
pthread_t g15display;
- int xtest_major_version = 0;
- int xtest_minor_version = 0;
- int dummy;
+ pthread_t EKeys;
int volume;
int volume_new;
-
+ char devname[256] = "Unknown";
int iport = 6600;
char *hostname = getenv("MPD_HOST");
char *port = getenv("MPD_PORT");
char *password = getenv("MPD_PASSWORD");
-
+ int eventdev;
+ char evdev_name[128];
pthread_mutex_init(&lockit,NULL);
pthread_mutex_init(&daemon_mutex,NULL);
+ int i;
+
+ for (i=0;i<argc;i++) {
+ char argument[20];
+ memset(argument,0,20);
+ strncpy(argument,argv[i],19);
+ if (!strncmp(argument, "-q",2) || !strncmp(argument, "--quickscroll",13)) {
+ quickscroll=1;
+ }
+ if (!strncmp(argument, "-h",2) || !strncmp(argument, "--help",6)) {
+ printf(" %s version %s\n (c)2006-2007 Mike Lampard\n\n",argv[0],VERSION);
+ printf("%s -q or --quickscroll Use volume control to scroll through the playlist\n",argv[0]);
+ printf("%s -v or --version Show program version\n",argv[0]);
+ printf("%s -h or --help This help text\n\n",argv[0]);
+ exit(0);
+ }
+ if (!strncmp(argument, "-v",2) || !strncmp(argument, "--version",9)) {
+ printf("%s version %s\n",argv[0],VERSION);
+ exit(0);
+ }
+ }
+
+ for(eventdev=0;eventdev<127;eventdev++) {
+ snprintf(evdev_name,127,"/dev/input/event%i",eventdev);
+ if ((mmedia_fd = open(evdev_name, O_NONBLOCK|O_RDONLY)) < 0) {
+ printf("error opening interface %i",eventdev);
+ }
+ ioctl(mmedia_fd, EVIOCGNAME(sizeof(devname)), devname);
+ if(0==strncmp(devname,"Logitech Logitech Gaming Keyboard",256)){
+ printf("Found device: \"%s\" on %s ", devname,evdev_name);
+ break;
+ }else
+ close(mmedia_fd);
+ }
+ if (mmedia_fd) { // we assume that the next event device is the multimedia keys
+ close(mmedia_fd);
+ snprintf(evdev_name,127,"/dev/input/event%i",++eventdev);
+ printf("and %s\n",evdev_name);
+ if ((mmedia_fd = open(evdev_name, O_NONBLOCK|O_RDONLY)) < 0) {
+ printf("error opening interface %i",eventdev);
+ }
+ }else {
+ printf("Unable to find Keyboard via EVENT interface... is /dev/input/event[0-9] readable??\n");
+ }
+
/* set correct hostname */
if(!hostname) {
hostname = "localhost";
@@ -638,43 +645,6 @@
canvas->mode_xor = 0;
}
- dpy = XOpenDisplay(getenv("DISPLAY"));
- if (!dpy) {
- printf("Can't open display\n");
- return 1;
- }
-
- root_win = DefaultRootWindow(dpy);
- if (!root_win) {
- printf("Cant find root window\n");
- return 1;
- }
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
- have_xtest = XTestQueryExtension(dpy, &dummy, &dummy, &xtest_major_version, &xtest_minor_version);
- if(have_xtest == False || xtest_major_version < 2 || (xtest_major_version <= 2 && xtest_minor_version < 2))
- {
- printf("XTEST extension not supported");
- }
-#endif
- /* completely ignore errors and carry on */
- XSetErrorHandler(myx_error_handler);
- XFlush(dpy);
-
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioPlay), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioStop), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioPrev), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioNext), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioRaiseVolume), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioLowerVolume), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
- XGrabKey(dpy,XKeysymToKeycode(dpy, XF86XK_AudioMute), AnyModifier, root_win,
- False, GrabModeAsync, GrabModeAsync);
-
/* Create mpd object */
obj = mpd_new(hostname, iport,password);
/* Connect signals */
@@ -693,8 +663,8 @@
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr,32*1024); /* set stack to 64k - dont need 8Mb !! */
- pthread_create(&Xkeys, &attr, xevent_thread, NULL);
pthread_create(&Lkeys, &attr, Lkeys_thread, NULL);
+ pthread_create(&EKeys, &attr,event_key_thread, NULL);
pthread_create(&g15display, &attr, g15display_thread, NULL);
do{
@@ -735,6 +705,7 @@
}
mpd_status_update(obj);
pthread_mutex_unlock(&daemon_mutex);
+
}while(!usleep(5000) && !leaving);
}
mpd_free(obj);
@@ -744,17 +715,12 @@
free(canvas);
close(g15screen_fd);
+ close(mmedia_fd);
leaving = 1;
- pthread_join(Xkeys,NULL);
pthread_join(Lkeys,NULL);
pthread_join(g15display,NULL);
- XUngrabKey(dpy, XF86XK_AudioPrev, AnyModifier, root_win);
- XUngrabKey(dpy, XF86XK_AudioNext, AnyModifier, root_win);
- XUngrabKey(dpy, XF86XK_AudioPlay, AnyModifier, root_win);
- XUngrabKey(dpy, XF86XK_AudioStop, AnyModifier, root_win);
- if(own_keyboard)
- XUngrabKeyboard(dpy,CurrentTime);
+
pthread_mutex_destroy(&lockit);
-
+
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mla...@us...> - 2008-01-24 04:01:42
|
Revision: 448
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=448&view=rev
Author: mlampard
Date: 2008-01-23 20:01:44 -0800 (Wed, 23 Jan 2008)
Log Message:
-----------
g15mpd: fix segfault when exiting due to unavailability of MPD server.
Modified Paths:
--------------
trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
Modified: trunk/g15daemon-audio-plugins/g15mpd/ChangeLog
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2008-01-23 11:05:31 UTC (rev 447)
+++ trunk/g15daemon-audio-plugins/g15mpd/ChangeLog 2008-01-24 04:01:44 UTC (rev 448)
@@ -15,3 +15,4 @@
through playlist if --quickscroll option is used, otherwise uses prev/next
keys.
- Only respond to mmedia keys if the display is in the foreground.
+- Fix segfault when exiting due to unavailability of MPD server.
Modified: trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c
===================================================================
--- trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2008-01-23 11:05:31 UTC (rev 447)
+++ trunk/g15daemon-audio-plugins/g15mpd/g15mpd.c 2008-01-24 04:01:44 UTC (rev 448)
@@ -653,7 +653,7 @@
/* Set timeout */
mpd_set_connection_timeout(obj, 10);
- if(!mpd_connect(obj))
+ if(0==mpd_connect(obj))
{
char buffer[20];
pthread_attr_t attr;
@@ -707,8 +707,14 @@
pthread_mutex_unlock(&daemon_mutex);
}while(!usleep(5000) && !leaving);
- }
- mpd_free(obj);
+ leaving = 1;
+ pthread_join(Lkeys,NULL);
+ pthread_join(g15display,NULL);
+ }else
+ printf("Unable to connect to MPD server. Exiting\n");
+
+ if(obj)
+ mpd_free(obj);
close(fdstdin);
if(canvas!=NULL)
@@ -716,9 +722,6 @@
close(g15screen_fd);
close(mmedia_fd);
- leaving = 1;
- pthread_join(Lkeys,NULL);
- pthread_join(g15display,NULL);
pthread_mutex_destroy(&lockit);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|