better xsetpointer code - ALSA in configure - Alex
authorterminatorX <>
Mon, 16 Jul 2001 16:34:57 +0000 (16:34 +0000)
committerterminatorX <>
Mon, 16 Jul 2001 16:34:57 +0000 (16:34 +0000)
terminatorX/acconfig.h
terminatorX/configure.in
terminatorX/gnome-support/Makefile.in [new file with mode: 0644]
terminatorX/src/gui_icons/Makefile.in [new file with mode: 0644]
terminatorX/src/smallknob/Makefile.in [new file with mode: 0644]
terminatorX/src/tX_audiodevice.cc
terminatorX/src/tX_audiodevice.h
terminatorX/src/tX_mouse.cc

index 21c25f56a7cb3a5462c04ebcb86c109196fa9691..27a5dff22f8095d451bca4cbbdfa77d1a64d2c15 100644 (file)
 
 /* Define for big dial knobs */
 #undef USE_BIG_BUTTONS
+
+/* Exec xsetpointer instead of using Xlib-calls. */
+#undef USE_XSETPOINTER
+
+/* Do we have the ALSA-Lib?
+#undef HAVE_ALSALIB
+
+/* Do we have the ALSA-Headers? 
+#undef HAVE_ALSAHEADER*/
+
+/* Use ALSA*/
+#undef USE_ALSA
+
index 60368d0019c7e49f48ce0232d06d3b5194009b91..d6ca2f86a47f0096e71dbcc0b807d49f44ae3796 100644 (file)
@@ -13,6 +13,9 @@ dnl AC_ARG_ENABLE(flash,    [  --enable-flash          enable flashes. [default=
 dnl AC_ARG_ENABLE(3dnow,    [  --enable-3dnow          enables 3DNow! support. [default=no] ])
 dnl AC_ARG_ENABLE(benchmark,[  --enable-benchmark      creates a non-functional test version [default=no] ])
 AC_ARG_ENABLE(wav,          [  --enable-wav            enables the builtin wav-loader [default=yes] ])
+AC_ARG_ENABLE(xsetpointer,  [  --enable-xsetpointer    enables executing of xsetpointer [default=auto] ])
+AC_ARG_ENABLE(alsa,         [  --enable-alsa           use ALSA instead of OSS [default=auto] ])
+
 dnl AC_ARG_ENABLE(dial,         [  --enable-dial           use dials instead of scales for effects [default=yes] ])
 dnl AC_ARG_ENABLE(bigdial,      [  --enable-bigdial        use BIG dials [default=yes] ])
 dnl AC_ARG_ENABLE(dga2,     [  --enable-dga2           use DGA2 instead of DGA1. (experimental) [default=no] ])
@@ -63,6 +66,45 @@ if test "$enable_mpg123" != "no"; then
        fi
 fi
 
+if test "$enable_xsetpointer" != "no"; then
+       AC_CHECK_PROG(XSETPOINTER_PROG, xsetpointer, yes)
+       if test "$XSETPOINTER_PROG" = "yes"; then
+               AC_DEFINE(USE_XSETPOINTER)
+       else
+               if test "$enable_xsetpointer" = "yes"; then
+                       AC_MSG_ERROR([** xsetpointer not found. **])
+               fi
+       fi
+fi
+
+using_alsa=no
+
+if test "$enable_alsa" != "no"; then
+       AC_CHECK_LIB(asound, snd_ctl_open,alsalib=yes,alsalib=no)
+       AC_CHECK_HEADERS(sys/asoundlib.h,alsaheader=yes,alsaheader=no)
+
+       if test "$alsalib" = "yes"; then
+               if test "$alsaheader" = "yes"; then
+                       AC_DEFINE(USE_ALSA)
+                       using_alsa=yes;
+               else 
+                       if test "$enable_alsa" = "yes"; then
+                               AC_MSG_ERROR([** Coulnd't find ALSA header file sys/asoundlib.h **])
+                       fi
+               fi
+       else
+               if test "$enable_alsa" = "yes"; then
+                       AC_MSG_ERROR([** Coulnd'f find ALSA library libasound. **])
+               fi
+       fi
+fi
+
+if test "$using_alsa" = "yes"; then
+       AC_MSG_RESULT([** Using ALSA for sound output. **])
+else
+       AC_MSG_RESULT([** Using OSS for sound output. **])
+fi
+
 if test "$enable_wav" != "no";
 then
        AC_DEFINE(USE_BUILTIN_WAV)
diff --git a/terminatorX/gnome-support/Makefile.in b/terminatorX/gnome-support/Makefile.in
new file mode 100644 (file)
index 0000000..d782974
--- /dev/null
@@ -0,0 +1,188 @@
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AWK = @AWK@
+CC = @CC@
+CXX = @CXX@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MPG123_PROG = @MPG123_PROG@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SOX_PROG = @SOX_PROG@
+VERSION = @VERSION@
+XSETPOINTER_PROG = @XSETPOINTER_PROG@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+x_libraries = @x_libraries@
+
+SOURCES = terminatorX-app.xpm  terminatorX-mime.xpm    terminatorX.keys        terminatorX.mime        tx-gnome-install        tx-gnome-uninstall      README.GNOME
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu gnome-support/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = gnome-support
+
+distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu gnome-support/Makefile
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$d/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/terminatorX/src/gui_icons/Makefile.in b/terminatorX/src/gui_icons/Makefile.in
new file mode 100644 (file)
index 0000000..24d84a1
--- /dev/null
@@ -0,0 +1,188 @@
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AWK = @AWK@
+CC = @CC@
+CXX = @CXX@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MPG123_PROG = @MPG123_PROG@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SOX_PROG = @SOX_PROG@
+VERSION = @VERSION@
+XSETPOINTER_PROG = @XSETPOINTER_PROG@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+x_libraries = @x_libraries@
+
+SOURCES = tx_audioengine.xpm           tx_power.xpm            tx_smaller_logo.xpm             tx_grab.xpm             tx_record.xpm           tx_stop.xpm             tx_play.xpm             tx_sequencer.xpm                tx_wave.xpm             tx_reload.xpm           tx_minimize.xpm                 tX_fx_up.xpm            tX_fx_down.xpm          tX_fx_close.xpm
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gui_icons/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/gui_icons
+
+distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/gui_icons/Makefile
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$d/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/terminatorX/src/smallknob/Makefile.in b/terminatorX/src/smallknob/Makefile.in
new file mode 100644 (file)
index 0000000..df0d202
--- /dev/null
@@ -0,0 +1,188 @@
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AWK = @AWK@
+CC = @CC@
+CXX = @CXX@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_CONFIG = @GTK_CONFIG@
+GTK_LIBS = @GTK_LIBS@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MPG123_PROG = @MPG123_PROG@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SOX_PROG = @SOX_PROG@
+VERSION = @VERSION@
+XSETPOINTER_PROG = @XSETPOINTER_PROG@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+x_libraries = @x_libraries@
+
+SOURCES = knob0.xpm            knob1.xpm               knob10.xpm              knob11.xpm              knob12.xpm              knob13.xpm              knob14.xpm              knob15.xpm              knob16.xpm              knob17.xpm              knob18.xpm              knob19.xpm              knob2.xpm               knob20.xpm              knob21.xpm              knob22.xpm              knob23.xpm              knob24.xpm              knob25.xpm              knob26.xpm              knob27.xpm              knob28.xpm              knob29.xpm              knob3.xpm               knob30.xpm              knob31.xpm              knob32.xpm              knob33.xpm              knob34.xpm              knob35.xpm              knob36.xpm              knob37.xpm              knob38.xpm              knob39.xpm              knob4.xpm               knob40.xpm              knob41.xpm              knob42.xpm              knob43.xpm              knob44.xpm              knob45.xpm              knob46.xpm              knob47.xpm              knob48.xpm              knob49.xpm              knob5.xpm               knob6.xpm               knob7.xpm               knob8.xpm               knob9.xpm
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu src/smallknob/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src/smallknob
+
+distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/smallknob/Makefile
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$d/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# 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:
index 19622ce0bb426644c459903926f682a3c165a029..2a3f1c4afce89d1401e10cefb577aaf532364311 100644 (file)
 
 #include "tX_endian.h"
 
-#ifdef USE_WRITER_THREAD
-
-void* writer_thread(void *parm)
-{
-       audiodevice *audio=(audiodevice *) parm;
-       int16_t *buffer;
-
-       puts("writer thread");
-
-       pthread_mutex_lock(&audio->write_mutex);
-       
-       while (pthread_mutex_trylock(&audio->stop_mutex))
-       {
-       
-               pthread_mutex_lock(&audio->buffer_read_mutex);
-               pthread_mutex_unlock(&audio->write_mutex);
-               pthread_mutex_lock(&audio->buffer_ready_mutex);
-               buffer=audio->current_buffer;
-               pthread_mutex_unlock(&audio->buffer_read_mutex);
-               pthread_mutex_unlock(&audio->buffer_ready_mutex);
-               pthread_mutex_lock(&audio->write_mutex);
-               
-               write(audio->fd, buffer, audio->blocksize);     
-       }
-       pthread_mutex_unlock(&audio->stop_mutex);
-       pthread_mutex_unlock(&audio->write_mutex);
-       
-       puts("wt quits");
-       return NULL;
-}
-
-void audiodevice :: eat(int16_t *buffer)
-{
-       if (pthread_mutex_trylock(&stop_mutex))
-       {
-               pthread_mutex_lock(&write_mutex);
-
-               current_buffer=buffer;
-               pthread_mutex_unlock(&buffer_ready_mutex);      
-       
-               pthread_mutex_lock(&buffer_read_mutex);
-       
-               pthread_mutex_lock(&buffer_ready_mutex);
-       
-               pthread_mutex_unlock(&buffer_read_mutex);
-               pthread_mutex_unlock(&write_mutex);     
-       }
-}
-
-#endif
-
 int audiodevice :: dev_open(int dont_use_rt_buffsize)
 {
        int i=0;
@@ -140,15 +89,6 @@ int audiodevice :: dev_open(int dont_use_rt_buffsize)
 //     printf("bs: %i, samples: %i, tbs: %i\n", blocksize,samples,globals.true_block_size);
         ioctl(fd, SNDCTL_DSP_SYNC, 0);
 
-#ifdef USE_WRITER_THREAD
-       
-       puts("A");
-       pthread_mutex_lock(&stop_mutex);
-       puts("A");
-       pthread_mutex_trylock(&buffer_ready_mutex);
-       puts("A");
-       pthread_create(&writer, NULL, writer_thread, (void *) this);
-#endif 
         return(i);     
 }
 
@@ -161,14 +101,6 @@ int audiodevice :: dev_close()
 {
        void *dummy;
 
-#ifdef USE_WRITER_THREAD
-       pthread_mutex_unlock(&buffer_ready_mutex);
-       pthread_mutex_unlock(&stop_mutex);
-       
-       pthread_join(writer, &dummy);   
-       puts("okidoki");
-#endif 
-
        if (!fd)
        {       
                return(1);              
@@ -188,15 +120,8 @@ audiodevice :: audiodevice()
 {
        fd=0;
        blocksize=0;
-#ifdef USE_WRITER_THREAD       
-       pthread_mutex_init(&stop_mutex, NULL);
-       pthread_mutex_init(&write_mutex, NULL);
-       pthread_mutex_init(&buffer_read_mutex, NULL);
-       pthread_mutex_init(&buffer_ready_mutex, NULL);
-#endif 
 }
 
-#ifndef USE_WRITER_THREAD
 void audiodevice :: eat(int16_t *buffer)
 {
 #ifdef BIG_ENDIAN_MACHINE
@@ -204,4 +129,3 @@ void audiodevice :: eat(int16_t *buffer)
 #endif
        write(fd, buffer, blocksize);   
 }
-#endif
index 6373084c9a645190c905237fe8e693501bdb4965..8c9ea5d6afd00f832a16545ce4cb2071efbe1111 100644 (file)
@@ -52,15 +52,7 @@ class audiodevice
        void eat(int16_t*);
        
        audiodevice();
-
-#ifdef USE_WRITER_THREAD       
-       pthread_mutex_t stop_mutex;
-       pthread_mutex_t write_mutex;
-       pthread_mutex_t buffer_ready_mutex;
-       pthread_mutex_t buffer_read_mutex;
-       int16_t *current_buffer;
-       pthread_t writer;
-#endif 
+       
 };
 
 #endif
index df03617fae3faf53f07e04c8e15c18c511b16074..34ac84929bd2a21625ed8dede44438245625cde3 100644 (file)
@@ -28,6 +28,7 @@
 #include "tX_global.h"
 #include "tX_engine.h"
 #include "tX_vtt.h"
+#include <sys/wait.h>
 
 #define TX_MOUSE_SPEED_NORMAL 0.05
 #define TX_MOUSE_SPEED_WARP 250000
@@ -165,20 +166,76 @@ void tx_mouse :: ungrab()
        grabbed=0;
 }
 
+#ifdef USE_XSETPOINTER
+
 void tx_mouse :: set_x_pointer(char *devname)
 {
-       char commandline[256];
+       pid_t pid;
+       int status;
+               
+       pid = fork();
+       
+       if (pid==-1) 
+       { 
+               /* OOPS. fork failed */
+               perror("tX: Error: Couldn't fork process!");
+               return; 
+       }
        
-       sprintf(commandline, "xsetpointer %s", devname);
-       system(commandline);
-       printf("ran: %s\n", commandline);
+       if (pid==0) 
+       {
+               /* The child execlps xsetpointer */
+               execlp("xsetpointer", "xsetpointer", devname, NULL);
+               perror("tX: Error: Failed to execute xpointer!");
+               exit(0);
+       }
+       
+       /* parent waits for xsetpointer to finish */
+       waitpid(pid,  &status, WUNTRACED);
 }
 
+#else
+
+void tx_mouse :: set_x_pointer(char *devname)
+{
+       XDeviceInfo *devlist;                   
+       XDevice *device;
+       int listmax, i;
+       
+       devlist=XListInputDevices(dpy, &listmax);
+       
+       for (i=0; i<listmax; i++)
+       {
+               if(strcmp(devlist[i].name, devname)==0)
+               {
+                       device=XOpenDevice(dpy, devlist[i].id);
+                       if (device)
+                       {
+                               if (XChangePointerDevice(dpy, device, 0, 1))
+                               {
+                                       printf("tX: Error: failed to set pointer device.");                     
+                               }
+                               XCloseDevice(dpy, device);
+                       }
+                       else
+                       {
+                               printf("tX: Error: failed to open XInput device.");
+                       }               
+               }
+       }
+               
+       XFreeDeviceList(devlist);               
+}
+
+#endif
+
 int tx_mouse :: set_xinput()
 {
        XDeviceInfo *devlist;                   
        int listmax, i;
        
+       OrgXPointer=0;
+       
        if (globals.xinput_enable)
        {       
                devlist=XListInputDevices(dpy, &listmax);
@@ -196,6 +253,8 @@ int tx_mouse :: set_xinput()
                
                set_x_pointer(globals.xinput_device);
        }
+       
+       if (OrgXPointer==0) printf("tX: Error failed to detect core pointer.");
        return(0);
 }
 
@@ -204,7 +263,7 @@ void tx_mouse :: reset_xinput()
 {
        if (globals.xinput_enable)
        {
-               set_x_pointer(OrgXPointerName);
+               if (OrgXPointer) set_x_pointer(OrgXPointerName);
        }
 }