Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Combe <ycombe@src.gnome.org>2006-12-09 00:24:58 (GMT)
committer Yves Combe <ycombe@src.gnome.org>2006-12-09 00:24:58 (GMT)
commit40fd990e80c173d6a02d15fc182176fe5beca2c8 (patch)
tree764cff380840152eaee6f61a6d91ce4976737c1d
parent59a68ac4a498251f80b4cce4306078492c37f781 (diff)
GC_SOUND Python bindings
-rw-r--r--ChangeLog76
-rw-r--r--src/gc_sound/ChangeLog75
-rw-r--r--src/gc_sound/INSTALL69
-rw-r--r--src/gc_sound/Makefile.am2
-rw-r--r--src/gc_sound/aclocal.m42088
-rwxr-xr-xsrc/gc_sound/compile153
-rw-r--r--src/gc_sound/configure.in70
-rwxr-xr-xsrc/gc_sound/depcomp103
-rwxr-xr-xsrc/gc_sound/install-sh477
-rwxr-xr-xsrc/gc_sound/missing142
-rw-r--r--src/gc_sound/python/Makefile.am35
-rw-r--r--src/gc_sound/python/gc_sound.defs287
-rw-r--r--src/gc_sound/python/gc_sound.override20
-rw-r--r--src/gc_sound/python/gc_sound_module.c27
-rw-r--r--src/gc_sound/src/Makefile.am42
-rw-r--r--src/gc_sound/src/gc-sound-channel.c58
-rw-r--r--src/gc_sound/src/gc-sound-channel.h64
-rw-r--r--src/gc_sound/src/gc-sound-item.c66
-rw-r--r--src/gc_sound/src/gc-sound-item.h46
-rw-r--r--src/gc_sound/src/gc-sound-mixer-SDL.c130
-rw-r--r--src/gc_sound/src/gc-sound-mixer-SDL.h80
-rw-r--r--src/gc_sound/src/gc-sound-mixer-private.h2
-rw-r--r--src/gc_sound/src/gc-sound-mixer.c28
-rw-r--r--src/gc_sound/src/gc-sound-mixer.h60
-rw-r--r--src/gc_sound/src/gc-sound-object.c50
-rw-r--r--src/gc_sound/src/gc-sound-object.h22
-rw-r--r--src/gc_sound/src/gc-sound.h1
-rw-r--r--src/gc_sound/src/test_gc_sound.c20
28 files changed, 2510 insertions, 1783 deletions
diff --git a/ChangeLog b/ChangeLog
index 087ec0f..a4bfc52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,79 @@
+2006-12-09 Yves Combe <yves@ycombe.net>
+
+ GC_SOUND
+ Python bindings
+
+ * src/gc_sound/ChangeLog:
+ * src/gc_sound/INSTALL:
+ * src/gc_sound/Makefile.am:
+ * src/gc_sound/aclocal.m4:
+ * src/gc_sound/compile:
+ * src/gc_sound/configure.in:
+ * src/gc_sound/depcomp:
+ * src/gc_sound/install-sh:
+ * src/gc_sound/missing:
+ * src/gc_sound/python/Makefile.am:
+ * src/gc_sound/python/gc_sound.defs:
+ * src/gc_sound/python/gc_sound.override:
+ * src/gc_sound/python/gc_sound_module.c: (initgc_sound):
+ * src/gc_sound/src/Makefile.am:
+ * src/gc_sound/src/gc-sound-channel.c:
+ (gc_sound_channel_play_item), (gc_sound_channel_get_root),
+ (gc_sound_channel_pause), (gc_sound_channel_resume),
+ (gc_sound_channel_halt), (gc_sound_channel_get_policy),
+ (gc_sound_channel_set_policy), (gc_sound_channel_play),
+ (root_destroyed), (gc_sound_channel_destroy),
+ (gc_sound_channel_init), (gc_sound_channel_get_property),
+ (gc_sound_channel_set_property),
+ (gc_sound_channel_signal_chunk_end), (gc_sound_channel_signal_run),
+ (gc_sound_channel_class_init):
+ * src/gc_sound/src/gc-sound-channel.h:
+ * src/gc_sound/src/gc-sound-item.c: (gc_sound_item_run_next),
+ (gc_sound_item_set_loop), (gc_sound_item_get_policy),
+ (gc_sound_item_set_policy), (gc_sound_item_child_start),
+ (gc_sound_item_child_end), (gc_sound_item_child_destroyed),
+ (gc_sound_item_append_child), (gc_sound_item_play),
+ (gc_sound_item_set_filename), (gc_sound_item_get_filename),
+ (gc_sound_item_signal_real_play), (gc_sound_item_signal_play_end),
+ (gc_sound_item_signal_play_start),
+ (gc_sound_item_signal_chunk_end),
+ (gc_sound_item_signal_chunk_start), (gc_sound_item_init),
+ (gc_sound_item_get_property), (gc_sound_item_set_property),
+ (gc_sound_item_class_init):
+ * src/gc_sound/src/gc-sound-item.h:
+ * src/gc_sound/src/gc-sound-mixer-SDL.c: (gc_sound_mixer_sdl_new),
+ (gc_sound_mixer_sdl_open_audio), (gc_sound_mixer_sdl_close_audio),
+ (reset_channel_number), (channel_destroyed),
+ (gc_sound_mixer_sdl_new_channel), (gc_sound_mixer_sdl_pause),
+ (gc_sound_mixer_sdl_resume), (gc_sound_mixer_sdl_halt),
+ (gc_sound_mixer_sdl_pause_channel),
+ (gc_sound_mixer_sdl_resume_channel),
+ (gc_sound_mixer_sdl_halt_channel), (gc_sound_mixer_sdl_play_item),
+ (channel_finished_cb), (gc_sound_mixer_sdl_channel_finished),
+ (gc_sound_mixer_sdl_init), (gc_sound_mixer_sdl_finalize),
+ (gc_sound_mixer_sdl_destroy), (gc_sound_mixer_sdl_get_property),
+ (gc_sound_mixer_sdl_set_property), (gc_sound_mixer_sdl_class_init),
+ (gc_init_sound_mixer):
+ * src/gc_sound/src/gc-sound-mixer-SDL.h:
+ * src/gc_sound/src/gc-sound-mixer-private.h:
+ * src/gc_sound/src/gc-sound-mixer.c: (gc_sound_mixer_open_audio),
+ (gc_sound_mixer_close_audio), (gc_sound_mixer_new_channel),
+ (gc_sound_mixer_pause), (gc_sound_mixer_resume),
+ (gc_sound_mixer_halt), (gc_sound_mixer_pause_channel),
+ (gc_sound_mixer_resume_channel), (gc_sound_mixer_halt_channel),
+ (gc_sound_mixer_play_item), (gc_sound_mixer_get_type):
+ * src/gc_sound/src/gc-sound-mixer.h:
+ * src/gc_sound/src/gc-sound-object.c: (gc_sound_object_get_type),
+ (gc_sound_object_base_class_init),
+ (gc_sound_object_base_class_finalize),
+ (gc_sound_object_class_init), (gc_sound_object_init),
+ (gc_sound_object_destroy), (gc_sound_object_dispose),
+ (gc_sound_object_real_destroy), (gc_sound_object_finalize),
+ (parent_destroyed):
+ * src/gc_sound/src/gc-sound-object.h:
+ * src/gc_sound/src/gc-sound.h:
+ * src/gc_sound/src/test_gc_sound.c: (finish), (start), (main):
+
2006-12-08 Yves Combe <yves@ycombe.net>
GC_SOUND
diff --git a/src/gc_sound/ChangeLog b/src/gc_sound/ChangeLog
index 3389b8a..d9cffab 100644
--- a/src/gc_sound/ChangeLog
+++ b/src/gc_sound/ChangeLog
@@ -1,3 +1,78 @@
+2006-12-09 Yves Combe <yves@ycombe.net>
+
+ Python bindings:
+ - change names from GCSound to GcSound, and names in SoundPolicy enum
+ (uses h2py and glib-mkenums)
+ - add bindings for python.
+
+ * INSTALL:
+ * Makefile.am:
+ * aclocal.m4:
+ * compile:
+ * configure.in:
+ * depcomp:
+ * install-sh:
+ * missing:
+ * python/Makefile.am:
+ * python/gc_sound.defs:
+ * python/gc_sound.override:
+ * python/gc_sound_module.c: (initgc_sound):
+ * src/Makefile.am:
+ * src/gc-sound-channel.c: (gc_sound_channel_play_item),
+ (gc_sound_channel_get_root), (gc_sound_channel_pause),
+ (gc_sound_channel_resume), (gc_sound_channel_halt),
+ (gc_sound_channel_get_policy), (gc_sound_channel_set_policy),
+ (gc_sound_channel_play), (root_destroyed),
+ (gc_sound_channel_destroy), (gc_sound_channel_init),
+ (gc_sound_channel_get_property), (gc_sound_channel_set_property),
+ (gc_sound_channel_signal_chunk_end), (gc_sound_channel_signal_run),
+ (gc_sound_channel_class_init):
+ * src/gc-sound-channel.h:
+ * src/gc-sound-item.c: (gc_sound_item_run_next),
+ (gc_sound_item_set_loop), (gc_sound_item_get_policy),
+ (gc_sound_item_set_policy), (gc_sound_item_child_start),
+ (gc_sound_item_child_end), (gc_sound_item_child_destroyed),
+ (gc_sound_item_append_child), (gc_sound_item_play),
+ (gc_sound_item_set_filename), (gc_sound_item_get_filename),
+ (gc_sound_item_signal_real_play), (gc_sound_item_signal_play_end),
+ (gc_sound_item_signal_play_start),
+ (gc_sound_item_signal_chunk_end),
+ (gc_sound_item_signal_chunk_start), (gc_sound_item_init),
+ (gc_sound_item_get_property), (gc_sound_item_set_property),
+ (gc_sound_item_class_init) * src/gc-sound-item.h:
+ * src/gc-sound-mixer-SDL.c: (gc_sound_mixer_sdl_new),
+ (gc_sound_mixer_sdl_open_audio), (gc_sound_mixer_sdl_close_audio),
+ (reset_channel_number), (channel_destroyed),
+ (gc_sound_mixer_sdl_new_channel), (gc_sound_mixer_sdl_pause),
+ (gc_sound_mixer_sdl_resume), (gc_sound_mixer_sdl_halt),
+ (gc_sound_mixer_sdl_pause_channel),
+ (gc_sound_mixer_sdl_resume_channel),
+ (gc_sound_mixer_sdl_halt_channel), (gc_sound_mixer_sdl_play_item),
+ (channel_finished_cb), (gc_sound_mixer_sdl_channel_finished),
+ (gc_sound_mixer_sdl_init), (gc_sound_mixer_sdl_finalize),
+ (gc_sound_mixer_sdl_destroy), (gc_sound_mixer_sdl_get_property),
+ (gc_sound_mixer_sdl_set_property), (gc_sound_mixer_sdl_class_init),
+ (gc_init_sound_mixer):
+ * src/gc-sound-mixer-SDL.h:
+ * src/gc-sound-mixer-private.h:
+ * src/gc-sound-mixer.c: (gc_sound_mixer_open_audio),
+ (gc_sound_mixer_close_audio), (gc_sound_mixer_new_channel),
+ (gc_sound_mixer_pause), (gc_sound_mixer_resume),
+ (gc_sound_mixer_halt), (gc_sound_mixer_pause_channel),
+ (gc_sound_mixer_resume_channel), (gc_sound_mixer_halt_channel),
+ (gc_sound_mixer_play_item), (gc_sound_mixer_get_type):
+ * src/gc-sound-mixer.h:
+ * src/gc-sound-object.c: (gc_sound_object_get_type),
+ (gc_sound_object_base_class_init),
+ (gc_sound_object_base_class_finalize),
+ (gc_sound_object_class_init), (gc_sound_object_init),
+ (gc_sound_object_destroy), (gc_sound_object_dispose),
+ (gc_sound_object_real_destroy), (gc_sound_object_finalize),
+ (parent_destroyed):
+ * src/gc-sound-object.h:
+ * src/gc-sound.h:
+ * src/test_gc_sound.c: (finish), (start), (main):
+
2006-12-08 Yves Combe <yves@ycombe.net>
Work on destroy recursive on mixer-SDL/channel/item
diff --git a/src/gc_sound/INSTALL b/src/gc_sound/INSTALL
index 23e5f25..54caf7c 100644
--- a/src/gc_sound/INSTALL
+++ b/src/gc_sound/INSTALL
@@ -1,16 +1,13 @@
-Installation Instructions
-*************************
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
-
-This file is free documentation; the Free Software Foundation gives
+ This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
-These are generic installation instructions.
+ These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -70,9 +67,9 @@ The simplest way to compile this package is:
Compilers and Options
=====================
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
@@ -85,7 +82,7 @@ is an example:
Compiling For Multiple Architectures
====================================
-You can compile the package for more than one kind of computer at the
+ You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
@@ -102,19 +99,19 @@ for another architecture.
Installation Names
==================
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
+options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
@@ -125,7 +122,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
-Some packages pay attention to `--enable-FEATURE' options to
+ Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
@@ -140,11 +137,11 @@ you can use the `configure' options `--x-includes=DIR' and
Specifying the System Type
==========================
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
@@ -159,7 +156,7 @@ where SYSTEM can have one of these forms:
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
+use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
@@ -170,9 +167,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults
================
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +178,7 @@ A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
-Variables not defined in a site shell script can be set in the
+ Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
@@ -189,18 +186,14 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
-
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
`configure' Invocation
======================
-`configure' recognizes the following options to control how it operates.
+ `configure' recognizes the following options to control how it
+operates.
`--help'
`-h'
diff --git a/src/gc_sound/Makefile.am b/src/gc_sound/Makefile.am
index 89560b4..09899b3 100644
--- a/src/gc_sound/Makefile.am
+++ b/src/gc_sound/Makefile.am
@@ -1 +1 @@
-SUBDIRS= src
+SUBDIRS= src python
diff --git a/src/gc_sound/aclocal.m4 b/src/gc_sound/aclocal.m4
index 75137d0..b492f10 100644
--- a/src/gc_sound/aclocal.m4
+++ b/src/gc_sound/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,117 +11,843 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-dnl
-dnl GOB_HOOK(script if found, fail)
-dnl if fail = "failure", abort if GOB not found
-dnl
+# Do all the work for Automake. -*- Autoconf -*-
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
-AC_DEFUN([GOB2_HOOK],[
- AC_PATH_PROG(GOB2,gob2)
- if test ! x$GOB2 = x; then
- if test ! x$1 = x; then
- AC_MSG_CHECKING(for gob-2 >= $1)
- g_r_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- g_r_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- g_r_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- g_ve=`$GOB2 --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- g_ma=`$GOB2 --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- g_mi=`$GOB2 --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
- if test $g_ve -eq $g_r_ve; then
- if test $g_ma -ge $g_r_ma; then
- if test $g_mi -ge $g_r_mi; then
- AC_MSG_RESULT(ok)
- else
- if test $g_ma -gt $g_r_ma; then
- AC_MSG_RESULT(ok)
- else
- AC_MSG_ERROR("found $g_ve.$g_ma.$g_mi requires $g_r_ve.$g_r_ma.$g_r_mi")
- fi
- fi
- else
- AC_MSG_ERROR("found $g_ve.$g_ma.$g_mi requires $g_r_ve.$g_r_ma.$g_r_mi")
- fi
- else
- if test $g_ve -gt $g_r_ve; then
- AC_MSG_RESULT(ok)
- else
- AC_MSG_ERROR(major version $g_ve found but $g_r_ve required)
- fi
- fi
-
- unset gob_version
- unset g_ve
- unset g_ma
- unset g_mi
- unset g_r_ve
- unset g_r_ma
- unset g_r_mi
- fi
- AC_SUBST(GOB2)
- $2
- else
- $3
- fi
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
])
-AC_DEFUN([GOB2_CHECK],[
- GOB2_HOOK($1,[],[AC_MSG_WARN([Cannot find GOB-2, check http://www.5z.com/jirka/gob.html])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.7.9])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
])
-dnl -*- mode: autoconf -*-
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
# serial 1
-dnl Usage:
-dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
-AC_DEFUN([GTK_DOC_CHECK],
-[
- AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
- AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
- dnl for overriding the documentation installation directory
- AC_ARG_WITH(html-dir,
- AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
- [with_html_dir='${datadir}/gtk-doc/html'])
- HTML_DIR="$with_html_dir"
- AC_SUBST(HTML_DIR)
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
- dnl enable/disable documentation building
- AC_ARG_ENABLE(gtk-doc,
- AC_HELP_STRING([--enable-gtk-doc],
- [use gtk-doc to build documentation [default=no]]),,
- enable_gtk_doc=no)
+# serial 5 -*- Autoconf -*-
- have_gtk_doc=no
- if test x$enable_gtk_doc = xyes; then
- if test -z "$PKG_CONFIG"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- fi
- if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
- have_gtk_doc=yes
- fi
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
- dnl do we want to do a version check?
-ifelse([$1],[],,
- [gtk_doc_min_version=$1
- if test "$have_gtk_doc" = yes; then
- AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
- if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
- AC_MSG_RESULT(yes)
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ : > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
else
- AC_MSG_RESULT(no)
- have_gtk_doc=no
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
fi
fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
])
- if test "$have_gtk_doc" != yes; then
- enable_gtk_doc=no
- fi
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
- AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
- AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# aclocal-include.m4
+#
+# This macro adds the name macrodir to the set of directories
+# that `aclocal' searches for macros.
+
+# serial 1
+
+dnl AM_ACLOCAL_INCLUDE(macrodir)
+AC_DEFUN([AM_ACLOCAL_INCLUDE],
+[
+ AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y)
+
+ test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+
+ for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
@@ -6493,6 +7219,119 @@ SED=$lt_cv_path_SED
AC_MSG_RESULT([$SED])
])
+dnl -*- mode: autoconf -*-
+
+# serial 1
+
+dnl Usage:
+dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
+AC_DEFUN([GTK_DOC_CHECK],
+[
+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+ dnl for overriding the documentation installation directory
+ AC_ARG_WITH(html-dir,
+ AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+ [with_html_dir='${datadir}/gtk-doc/html'])
+ HTML_DIR="$with_html_dir"
+ AC_SUBST(HTML_DIR)
+
+ dnl enable/disable documentation building
+ AC_ARG_ENABLE(gtk-doc,
+ AC_HELP_STRING([--enable-gtk-doc],
+ [use gtk-doc to build documentation [default=no]]),,
+ enable_gtk_doc=no)
+
+ have_gtk_doc=no
+ if test x$enable_gtk_doc = xyes; then
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+ if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
+ have_gtk_doc=yes
+ fi
+
+ dnl do we want to do a version check?
+ifelse([$1],[],,
+ [gtk_doc_min_version=$1
+ if test "$have_gtk_doc" = yes; then
+ AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
+ if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ have_gtk_doc=no
+ fi
+ fi
+])
+ if test "$have_gtk_doc" != yes; then
+ enable_gtk_doc=no
+ fi
+ fi
+
+ AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+ AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
+])
+
+dnl
+dnl GOB_HOOK(script if found, fail)
+dnl if fail = "failure", abort if GOB not found
+dnl
+
+
+AC_DEFUN([GOB2_HOOK],[
+ AC_PATH_PROG(GOB2,gob2)
+ if test ! x$GOB2 = x; then
+ if test ! x$1 = x; then
+ AC_MSG_CHECKING(for gob-2 >= $1)
+ g_r_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ g_r_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ g_r_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ g_ve=`$GOB2 --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ g_ma=`$GOB2 --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ g_mi=`$GOB2 --version 2>&1|sed 's/Gob version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+ if test $g_ve -eq $g_r_ve; then
+ if test $g_ma -ge $g_r_ma; then
+ if test $g_mi -ge $g_r_mi; then
+ AC_MSG_RESULT(ok)
+ else
+ if test $g_ma -gt $g_r_ma; then
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_ERROR("found $g_ve.$g_ma.$g_mi requires $g_r_ve.$g_r_ma.$g_r_mi")
+ fi
+ fi
+ else
+ AC_MSG_ERROR("found $g_ve.$g_ma.$g_mi requires $g_r_ve.$g_r_ma.$g_r_mi")
+ fi
+ else
+ if test $g_ve -gt $g_r_ve; then
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_ERROR(major version $g_ve found but $g_r_ve required)
+ fi
+ fi
+
+ unset gob_version
+ unset g_ve
+ unset g_ma
+ unset g_mi
+ unset g_r_ve
+ unset g_r_ma
+ unset g_r_mi
+ fi
+ AC_SUBST(GOB2)
+ $2
+ else
+ $3
+ fi
+])
+
+AC_DEFUN([GOB2_CHECK],[
+ GOB2_HOOK($1,[],[AC_MSG_WARN([Cannot find GOB-2, check http://www.5z.com/jirka/gob.html])])
+])
+
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
@@ -6832,840 +7671,275 @@ int main(int argc, char *argv[])
rm -f conf.sdltest
])
-# Copyright (C) 2002, 2003, 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.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 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.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 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.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 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.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+# Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- case $depmode in
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- none) break ;;
- esac
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION])
+
+# Adds support for distributing Python modules and packages. To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable. To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
+# numbers and dots only.
+
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+ dnl Find a Python interpreter. Python versions prior to 1.5 are not
+ dnl supported because the default installation locations changed from
+ dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+ dnl in 1.5.
+ m4_define([_AM_PYTHON_INTERPRETER_LIST],
+ [python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+ # Find any Python interpreter.
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
+ am_display_PYTHON=python
+ ], [
+ dnl A version check is needed.
+ if test -n "$PYTHON"; then
+ # If the user set $PYTHON, use it and don't search something else.
+ AC_MSG_CHECKING([whether $PYTHON version >= $1])
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_ERROR(too old)])
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+ [am_cv_pathless_PYTHON],[
+ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do
+ if test "$am_cv_pathless_PYTHON" = : ; then
+ AC_MSG_ERROR([no suitable Python interpreter found])
+ fi
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+ done])
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+ am_display_PYTHON=$am_cv_pathless_PYTHON
fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 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.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
+ ])
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+ dnl Query Python for its version number. Getting [:3] seems to be
+ dnl the best way to do this; it's what "site.py" does in the standard
+ dnl library.
+
+ AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+ [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+ AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+ dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
+ dnl distinct variables so they can be overridden if need be. However,
+ dnl general consensus is that you shouldn't need this ability.
+
+ AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+ AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+ dnl At times (like when building shared libraries) you may want
+ dnl to know which OS platform Python thinks this is.
+
+ AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+ [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+ AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+ dnl Set up 4 directories:
+
+ dnl pythondir -- where to install python scripts. This is the
+ dnl site-packages directory, not the python standard library
+ dnl directory like in previous automake betas. This behavior
+ dnl is more consistent with lispdir.m4 for example.
+ dnl Query distutils for this directory. distutils does not exist in
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
+ dnl doesn't work.
+ AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+ [am_cv_python_pythondir],
+ [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+ AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+ dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
+ dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
+ dnl more consistent with the rest of automake.
+
+ AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+ dnl pyexecdir -- directory for installing python extension modules
+ dnl (shared libraries)
+ dnl Query distutils for this directory. distutils does not exist in
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
+ dnl doesn't work.
+ AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+ [am_cv_python_pyexecdir],
+ [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+ echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+ AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+ dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+ AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
])
-# Do all the work for Automake. -*- 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.
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# hexversion has been introduced in Python 1.5.2; it's probably not
+# worth to support older versions (1.5.1 was released on October 31, 1998).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys, string
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+ AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
-# serial 12
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN([AM_CHECK_PYMOD],
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+ import $1
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
else
- CYGPATH_W=echo
+ eval "py_cv_mod_$py_mod_var=no"
fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 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.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 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.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$3], [],, [$3
+])dnl
else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 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.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
+ AC_MSG_RESULT(no)
+ ifelse([$4], [],, [$4
+])dnl
fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
])
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 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.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
])
-# Copyright (C) 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.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 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.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 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.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 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.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 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.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+dnl
+dnl JH_ADD_CFLAG(FLAG)
+dnl checks whether the C compiler supports the given flag, and if so, adds
+dnl it to $CFLAGS. If the flag is already present in the list, then the
+dnl check is not performed.
+AC_DEFUN([JH_ADD_CFLAG],
+[
+case " $CFLAGS " in
+*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_MSG_CHECKING([whether [$]CC understands $1])
+ AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
+ AC_MSG_RESULT($jh_has_option)
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+ ;;
+esac])
diff --git a/src/gc_sound/compile b/src/gc_sound/compile
index 1b1d232..ac07cc5 100755
--- a/src/gc_sound/compile
+++ b/src/gc_sound/compile
@@ -1,9 +1,8 @@
#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-scriptversion=2005-05-14.22
+# Wrapper for compilers which do not understand `-c -o'.
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright 1999, 2000 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -18,125 +17,91 @@ scriptversion=2005-05-14.22
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
+# Usage:
+# compile PROGRAM [ARGS]...
+# `-o FOO.o' is removed from the args passed to the actual compile.
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+# Usage statement added by Billy Biggs <vektor@dumbterm.net>.
+if [ -z $1 ]; then
+ echo "Wrapper for compilers which do not understand '-c -o'."
+ echo "usage: compile PROGRAM [ARGS]..."
+ echo "'-o FOO.o' is removed from the args passed to the actual compile."
+ exit 1
+fi
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "compile $scriptversion"
- exit $?
- ;;
-esac
+prog=$1
+shift
ofile=
cfile=
-eat=
-
-for arg
-do
- if test -n "$eat"; then
- eat=
- else
- case $1 in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
- eat=1
- case $2 in
- *.o | *.obj)
- ofile=$2
- ;;
- *)
- set x "$@" -o "$2"
- shift
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- set x "$@" "$1"
- shift
- ;;
- *)
- set x "$@" "$1"
- shift
- ;;
- esac
- fi
- shift
+args=
+while test $# -gt 0; do
+ case "$1" in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we do something ugly here.
+ ofile=$2
+ shift
+ case "$ofile" in
+ *.o | *.obj)
+ ;;
+ *)
+ args="$args -o $ofile"
+ ofile=
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ args="$args $1"
+ ;;
+ *)
+ args="$args $1"
+ ;;
+ esac
+ shift
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$@"
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$prog" $args
fi
# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
- if mkdir "$lockdir" >/dev/null 2>&1; then
- break
- fi
- sleep 1
+ if mkdir $lockdir > /dev/null 2>&1; then
+ break
+ fi
+ sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
+trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
-"$@"
-ret=$?
+"$prog" $args
+status=$?
if test -f "$cofile"; then
- mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
+ mv "$cofile" "$ofile"
fi
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
+rmdir $lockdir
+exit $status
diff --git a/src/gc_sound/configure.in b/src/gc_sound/configure.in
index 3d3b878..0401257 100644
--- a/src/gc_sound/configure.in
+++ b/src/gc_sound/configure.in
@@ -3,6 +3,8 @@ AC_INIT([GCompris Sound library], [2.0],
[gc_sound])
AM_INIT_AUTOMAKE
+AM_ACLOCAL_INCLUDE(macros)
+
dnl Don't let libtool check for these
CXX=no
F77=no
@@ -46,6 +48,74 @@ fi
AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,, AC_MSG_ERROR([*** SDL_mixer not found. Visit http://www.libsdl.org and get it]))
+AC_MSG_CHECKING([for glib-genmarshal])
+GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
+AC_SUBST(GLIB_GENMARSHAL)
+AC_MSG_RESULT($GLIB_GENMARSHAL)
+
+AC_MSG_CHECKING([for glib-mkenums])
+GLIB_MKENUMS=`pkg-config --variable=glib_mkenums glib-2.0`
+AC_SUBST(GLIB_MKENUMS)
+AC_MSG_RESULT($GLIB_MKENUMS)
+
+dnl -----------------
+dnl | Python bindings |-------------------------------------------------------
+dnl -----------------
+
+dnl required versions of other packages
+m4_define(pygtk_required_major_version, 2)
+m4_define(pygtk_required_minor_version, 8)
+m4_define(pygtk_required_micro_version, 0)
+m4_define(pygtk_required_version, pygtk_required_major_version.pygtk_required_minor_version.pygtk_required_micro_version)
+m4_define(gtk_required_version, 2.8.0)
+
+dnl Define pygtk required version, for runtime check
+AC_DEFINE(PYGTK_REQUIRED_MAJOR_VERSION, pygtk_required_major_version, [PyGTK required major version])
+AC_DEFINE(PYGTK_REQUIRED_MINOR_VERSION, pygtk_required_minor_version, [PyGTK required minor version])
+AC_DEFINE(PYGTK_REQUIRED_MICRO_VERSION, pygtk_required_micro_version, [PyGTK required micro version])
+
+dnl check for python
+AM_PATH_PYTHON(2.2)
+AM_CHECK_PYTHON_HEADERS([have_python="yes"],[have_python="no"])
+
+if test x$have_python = xno; then
+ AC_MSG_NOTICE([Python binding is disabled.])
+else
+
+ dnl check for pygtk
+ PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= pygtk_required_version,[
+ have_python="yes"
+ AC_MSG_RESULT(okay)
+ ],[
+ have_python="no"
+ AC_MSG_RESULT(not found)
+ ])
+ if test x$have_python = xyes; then
+ AC_SUBST(PYGTK_CFLAGS)
+ AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
+ if test "x$PYGTK_CODEGEN" = xno; then
+ AC_MSG_NOTICE(could not find pygtk-codegen-2.0 script, Python binding is disabled.)
+ have_python="no"
+ fi
+
+ if test x$have_python = xyes; then
+ AC_MSG_CHECKING(for pygtk defs)
+ PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
+ AC_SUBST(PYGTK_DEFSDIR)
+ AC_MSG_RESULT($PYGTK_DEFSDIR)
+ fi
+ fi
+
+dnl required version substitutions for use in the spec file
+PYGTK_VERSION=pygtk_required_version
+GTK_VERSION=gtk_required_version
+
+fi
+
+AM_CONDITIONAL(WITH_PYTHON,[test "x$have_python" = "xyes"])
+
+
AC_OUTPUT([Makefile
src/Makefile
+python/Makefile
])
diff --git a/src/gc_sound/depcomp b/src/gc_sound/depcomp
index 04701da..edb5d38 100755
--- a/src/gc_sound/depcomp
+++ b/src/gc_sound/depcomp
@@ -1,9 +1,7 @@
#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +15,8 @@ scriptversion=2005-07-09.11
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,45 +25,22 @@ scriptversion=2005-07-09.11
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+ base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+ dir=`echo "$object" | sed 's,/.*$,/,'`
+ if test "$dir" = "$object"; then
+ dir=
+ fi
+ # FIXME: should be _deps on DOS.
+ depfile="$dir.deps/$base"
+fi
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
@@ -287,43 +262,27 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ tmpdepfile1="$dir.libs/$base.lo.d"
+ tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
+ tmpdepfile1="$dir$base.o.d"
+ tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile="$tmpdepfile1"
+ else
+ tmpdepfile="$tmpdepfile2"
+ fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
@@ -467,8 +426,7 @@ cpp)
done
"$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
@@ -519,12 +477,3 @@ none)
esac
exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/gc_sound/install-sh b/src/gc_sound/install-sh
index 4d4a951..6ce63b9 100755
--- a/src/gc_sound/install-sh
+++ b/src/gc_sound/install-sh
@@ -1,8 +1,7 @@
#!/bin/sh
+#
# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
+#
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@@ -42,11 +41,13 @@ scriptversion=2005-05-14.22
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
+
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
+
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -58,266 +59,236 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c (ignored)
--d create directories instead of installing files.
--g GROUP $chgrpprog installed files to GROUP.
--m MODE $chmodprog installed files to MODE.
--o USER $chownprog installed files to USER.
--s $stripprog installed files.
--t DIRECTORY install into DIRECTORY.
--T report an error if DSTFILE is a directory.
---help display this help and exit.
---version display version info and exit.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
- case $1 in
- -c) shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t) dstarg=$2
- shift
- shift
- continue;;
-
- -T) no_target_directory=true
- shift
- continue;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
- break;;
- esac
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
done
-if test -z "$1"; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
+if [ x"$src" = x ]
+then
+ echo "$0: no input file specified" >&2
+ exit 1
+else
+ :
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d "$dst" ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f "$src" ] || [ -d "$src" ]
+ then
+ :
+ else
+ echo "$0: $src does not exist" >&2
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "$0: no destination specified" >&2
+ exit 1
+ else
+ :
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d "$dst" ]
+ then
+ dst=$dst/`basename "$src"`
+ else
+ :
+ fi
fi
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src ;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
- else
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dstarg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dstarg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst ;;
- esac
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dstarg: Is a directory" >&2
- exit 1
- fi
- dst=$dst/`basename "$src"`
- fi
- fi
-
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
- # Make sure that the destination directory exists.
-
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
-
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
-
- pathcomp=
-
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
- shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
- fi
- pathcomp=$pathcomp/
- done
- fi
-
- if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
- else
- dstfile=`basename "$dst"`
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
- trap '(exit $?); exit' 1 2 13 15
-
- # Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
- # Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
- || {
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
-
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit 1
- }
- else
- :
- fi
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
- }
- }
- fi || { (exit 1); exit 1; }
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp=$pathcomp$1
+ shift
+
+ if [ ! -d "$pathcomp" ] ;
+ then
+ $mkdirprog "$pathcomp"
+ else
+ :
+ fi
+
+ pathcomp=$pathcomp/
done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd "$dst" &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename "$dst"`
+ else
+ :
+ fi
+
+# Make a couple of temp file names in the proper directory.
+
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+# Trap to clean up temp files at exit.
+
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
+
+# Now rename the file to the real destination.
+
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
+
{
- (exit 0); exit 0
+ (exit 0); exit
}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/gc_sound/missing b/src/gc_sound/missing
index 894e786..fc54c64 100755
--- a/src/gc_sound/missing
+++ b/src/gc_sound/missing
@@ -1,10 +1,6 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -19,8 +15,8 @@ scriptversion=2005-06-08.21
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -42,24 +38,18 @@ else
configure_ac=configure.in
fi
-msg="missing on your system"
-
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -84,15 +74,11 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
- exit $?
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
- exit $?
+ echo "missing 0.4 - GNU automake"
;;
-*)
@@ -101,44 +87,14 @@ Send bug reports to <bug-automake@gnu.org>."
exit 1
;;
-esac
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
- lex|yacc)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
+ aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
fi
- ;;
-esac
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
- aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
@@ -146,8 +102,13 @@ WARNING: \`$1' is $msg. You should only need it if
;;
autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
@@ -155,8 +116,13 @@ WARNING: \`$1' is $msg. You should only need it if
;;
autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
@@ -174,8 +140,13 @@ WARNING: \`$1' is $msg. You should only need it if
;;
automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
@@ -185,9 +156,14 @@ WARNING: \`$1' is $msg. You should only need it if
;;
autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
@@ -209,7 +185,7 @@ WARNING: \`$1' is needed, but is $msg.
bison|yacc)
echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
@@ -239,7 +215,7 @@ WARNING: \`$1' $msg. You should only need it if
lex|flex)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
@@ -261,8 +237,13 @@ WARNING: \`$1' is $msg. You should only need it if
;;
help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
@@ -281,30 +262,32 @@ WARNING: \`$1' is $msg. You should only need it if
;;
makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
touch $file
;;
tar)
shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -340,8 +323,8 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
@@ -351,10 +334,3 @@ WARNING: \`$1' is needed, and is $msg.
esac
exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/src/gc_sound/python/Makefile.am b/src/gc_sound/python/Makefile.am
new file mode 100644
index 0000000..e7e3cee
--- /dev/null
+++ b/src/gc_sound/python/Makefile.am
@@ -0,0 +1,35 @@
+INCLUDES = $(PYTHON_INCLUDES) $(PYGTK_CFLAGS)
+
+defsdir = $(datadir)/pygtk/2.0/defs
+defs_DATA = gc_sound.defs
+
+EXTRA_DIST = $(defs_DATA)
+
+pkgpythondir = $(pyexecdir)/gtk-2.0
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+
+common_ldflags = -module -avoid-version
+
+# gc_sound binding
+pkgpyexec_LTLIBRARIES = gc_sound.la
+gc_sound_la_CFLAGS = $(GC_SOUND_CFLAGS) -I../src
+gc_sound_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initgc_sound
+gc_sound_la_LIBADD = $(GC_SOUND_LIBS) -L../src/.libs -lgcsound-2
+nodist_gc_sound_la_CFLAGS = $(GC_SOUNDS_CFLAGS) -I../src
+gc_sound_la_SOURCES = gc_sound_module.c
+nodist_gc_sound_la_SOURCES = gc_sound.c
+CLEANFILES = gc_sound.c
+EXTRA_DIST += gc_sound.override
+gc_sound.c: gc_sound.defs gc_sound.override
+
+.defs.c:
+ (cd $(srcdir) \
+ && $(PYGTK_CODEGEN) \
+ --register $(PYGTK_DEFSDIR)/gdk-types.defs \
+ --register $(PYGTK_DEFSDIR)/gtk-types.defs \
+ --register $(PYGTK_DEFSDIR)/pango-types.defs \
+ --override $*.override \
+ --prefix py$* $*.defs) > gen-$*.c \
+ && cp gen-$*.c $*.c \
+ && rm -f gen-$*.c
+
diff --git a/src/gc_sound/python/gc_sound.defs b/src/gc_sound/python/gc_sound.defs
new file mode 100644
index 0000000..2df0386
--- /dev/null
+++ b/src/gc_sound/python/gc_sound.defs
@@ -0,0 +1,287 @@
+;; -*- scheme -*-
+; object definitions ...
+(define-object Mixer
+ (in-module "GcSound")
+ (c-name "GcSoundMixer")
+ (gtype-id "GC_TYPE_SOUND_MIXER")
+)
+
+(define-object Object
+ (in-module "GcSound")
+ (parent "GObject")
+ (c-name "GcSoundObject")
+ (gtype-id "GC_TYPE_SOUND_OBJECT")
+)
+
+(define-object MixerSdl
+ (in-module "GcSound")
+ (parent "GcSoundObject")
+ (c-name "GcSoundMixerSdl")
+ (gtype-id "GC_TYPE_SOUND_MIXER_SDL")
+)
+
+(define-object Item
+ (in-module "GcSound")
+ (parent "GcSoundObject")
+ (c-name "GcSoundItem")
+ (gtype-id "GC_TYPE_SOUND_ITEM")
+)
+
+(define-object Channel
+ (in-module "GcSound")
+ (parent "GcSoundObject")
+ (c-name "GcSoundChannel")
+ (gtype-id "GC_TYPE_SOUND_CHANNEL")
+)
+
+;; Enumerations and flags ...
+
+(define-enum SoundPolicy
+ (in-module "GcSound")
+ (c-name "GcSoundPolicy")
+ (gtype-id "GC_TYPE_SOUND_POLICY")
+ (values
+ '("none" "NONE")
+ '("play-only-if-idle" "PLAY_ONLY_IF_IDLE")
+ '("play-after-current" "PLAY_AFTER_CURRENT")
+ '("interrupt-and-play" "INTERRUPT_AND_PLAY")
+ )
+)
+
+;; From gc-sound-channel.h
+
+(define-method get_root
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_get_root")
+ (return-type "GcSoundItem*")
+)
+
+(define-method pause
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_pause")
+ (return-type "gboolean")
+)
+
+(define-method resume
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_resume")
+ (return-type "gboolean")
+)
+
+(define-method halt
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_halt")
+ (return-type "gboolean")
+)
+
+(define-method play
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_play")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundItem*" "item")
+ )
+)
+
+(define-method play_item
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_play_item")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundItem*" "item")
+ )
+)
+
+(define-method get_policy
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_get_policy")
+ (return-type "GcSoundPolicy")
+)
+
+(define-method set_policy
+ (of-object "GcSoundChannel")
+ (c-name "gc_sound_channel_set_policy")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundPolicy" "policy")
+ )
+)
+
+
+
+;; From gc-sound-enumerations.h
+
+(define-function gc_sound_object_flags_get_type
+ (c-name "gc_sound_object_flags_get_type")
+ (return-type "GType")
+)
+
+(define-function gc_sound_policy_get_type
+ (c-name "gc_sound_policy_get_type")
+ (return-type "GType")
+)
+
+
+
+;; From gc-sound.h
+
+
+
+;; From gc-sound-item.h
+
+(define-method append_child
+ (of-object "GcSoundItem")
+ (c-name "gc_sound_item_append_child")
+ (return-type "GcSoundItem*")
+)
+
+(define-method play
+ (of-object "GcSoundItem")
+ (c-name "gc_sound_item_play")
+ (return-type "gboolean")
+)
+
+(define-method set_filename
+ (of-object "GcSoundItem")
+ (c-name "gc_sound_item_set_filename")
+ (return-type "none")
+ (parameters
+ '("gchar*" "filename")
+ )
+)
+
+(define-method get_filename
+ (of-object "GcSoundItem")
+ (c-name "gc_sound_item_get_filename")
+ (return-type "gchar*")
+)
+
+(define-method set_loop
+ (of-object "GcSoundItem")
+ (c-name "gc_sound_item_set_loop")
+ (return-type "none")
+ (parameters
+ '("gboolean" "loop")
+ )
+)
+
+
+
+;; From gc-sound-marshallers.h
+
+
+
+;; From gc-sound-mixer.h
+
+(define-method open_audio
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_open_audio")
+ (return-type "gboolean")
+)
+
+(define-method close_audio
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_close_audio")
+ (return-type "gboolean")
+)
+
+(define-method new_channel
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_new_channel")
+ (return-type "GcSoundChannel*")
+)
+
+(define-method pause
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_pause")
+ (return-type "gboolean")
+)
+
+(define-method resume
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_resume")
+ (return-type "gboolean")
+)
+
+(define-method halt
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_halt")
+ (return-type "gboolean")
+)
+
+(define-method pause_channel
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_pause_channel")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundChannel*" "channel")
+ )
+)
+
+(define-method resume_channel
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_resume_channel")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundChannel*" "channel")
+ )
+)
+
+(define-method halt_channel
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_halt_channel")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundChannel*" "channel")
+ )
+)
+
+(define-method play_item
+ (of-object "GcSoundMixer")
+ (c-name "gc_sound_mixer_play_item")
+ (return-type "gboolean")
+ (parameters
+ '("GcSoundChannel*" "channel")
+ '("GcSoundItem*" "item")
+ )
+)
+
+
+
+;; From gc-sound-mixer-private.h
+
+
+
+;; From gc-sound-mixer-SDL.h
+
+(define-function gc_sound_mixer_sdl_get_type
+ (c-name "gc_sound_mixer_sdl_get_type")
+ (return-type "GType")
+)
+
+(define-function gc_sound_mixer_sdl_new
+ (c-name "gc_sound_mixer_sdl_new")
+ (is-constructor-of "GcSoundMixerSdl")
+ (return-type "GcSoundMixer*")
+)
+
+
+
+;; From gc-sound-object.h
+
+(define-function gc_sound_object_get_type
+ (c-name "gc_sound_object_get_type")
+ (return-type "GType")
+)
+
+(define-method destroy
+ (of-object "GcSoundObject")
+ (c-name "gc_sound_object_destroy")
+ (return-type "none")
+)
+
+
+
+;; From gobject-helpers.h
+
+
diff --git a/src/gc_sound/python/gc_sound.override b/src/gc_sound/python/gc_sound.override
new file mode 100644
index 0000000..bbc1062
--- /dev/null
+++ b/src/gc_sound/python/gc_sound.override
@@ -0,0 +1,20 @@
+%%
+headers
+#include <Python.h>
+
+#include "pygobject.h"
+#include <glib.h>
+#include "gc-sound.h"
+
+void py_gc_sound_add_constants(PyObject *module, const gchar *strip_prefix);
+void py_gc_sound_register_classes(PyObject *d);
+
+%%
+modulename gc_sound
+%%
+import gobject.GObject as PyGObject_Type
+
+%%
+ignore-glob
+ *_get_type
+%%
diff --git a/src/gc_sound/python/gc_sound_module.c b/src/gc_sound/python/gc_sound_module.c
new file mode 100644
index 0000000..506e0be
--- /dev/null
+++ b/src/gc_sound/python/gc_sound_module.c
@@ -0,0 +1,27 @@
+
+#include <pygobject.h>
+
+void pygc_sound_register_classes (PyObject *d);
+extern PyMethodDef pygc_sound_functions[];
+
+void pygc_sound_add_constants(PyObject *module, const gchar *strip_prefix);
+
+DL_EXPORT(void) initgc_sound(void);
+
+DL_EXPORT(void)
+initgc_sound(void)
+{
+ PyObject *m, *d;
+
+ init_pygobject ();
+
+ m = Py_InitModule ("gc_sound", pygc_sound_functions);
+ d = PyModule_GetDict (m);
+
+ pygc_sound_register_classes (d);
+ pygc_sound_add_constants (m, "");
+
+ if (PyErr_Occurred ()) {
+ Py_FatalError ("can't initialise module gc_sound");
+ }
+}
diff --git a/src/gc_sound/src/Makefile.am b/src/gc_sound/src/Makefile.am
index eaaa019..1143680 100644
--- a/src/gc_sound/src/Makefile.am
+++ b/src/gc_sound/src/Makefile.am
@@ -3,13 +3,13 @@
#
lib_LTLIBRARIES = libgcsound-2.la
-libgcsound_2_la_CFLAGS= $(SDL_CFLAGS) $(SDL_MIXER_CFLAGS) $(GC_SOUND_CFLAGS)
+libgcsound_2_la_CFLAGS= $(SDL_CFLAGS) $(GC_SOUND_CFLAGS)
-libgcsound_2_la_LDFLAGS= $(SDL_LIBS) $(SDL_MIXER_LIBS) $(GC_SOUND_LIBS)
+libgcsound_2_la_LDFLAGS= $(SDL_LIBS) $(GC_SOUND_LIBS)
libgcsoundincludedir = $(includedir)/gcompris/gcsound
-libgcsoundinclude_HEADERS = \
+static_headers = \
gc-sound.h \
gc-sound-object.h\
gc-sound-mixer.h \
@@ -18,6 +18,13 @@ libgcsoundinclude_HEADERS = \
gc-sound-marshallers.h \
gc-sound-item.h
+build_headers = \
+ gc-sound-enumerations.h
+
+libgcsoundinclude_HEADERS = \
+ $(static_headers) \
+ $(build_headers)
+
libgcsound_PRIVATE =
# \
# gc-sound.h \
@@ -32,6 +39,7 @@ libgcsound_2_la_SOURCES = \
gc-sound-mixer.c \
gc-sound-mixer-SDL.c \
gc-sound-marshallers.c \
+ gc-sound-enumerations.c \
gc-sound-channel.c \
gc-sound-item.c
@@ -63,20 +71,20 @@ gc-sound-marshallers.c: $(srcdir)/marshallers.list $(srcdir)/Makefile
&& (cmp -s xgen-cmc $@ || (echo "Creating $@..."; cp xgen-cmc $@) ) \
&& rm -f xgen-cmc
-# gc-sound-enumerations.h: $(static_headers) Makefile gc-sound-enumerations.h.in
-# @( cd $(srcdir) && $(GLIB_MKENUMS) --template gc-sound-enumerations.h.in \
-# $(gc_sound_HEADERS) ) > xgen-gtbh \
-# && (cmp -s xgen-gtbh $@ || (echo "Creating $@..."; cp xgen-gtbh $@) ) \
-# && rm -f xgen-gtbh
+gc-sound-enumerations.h: $(static_headers) Makefile gc-sound-enumerations.h.in
+ @( cd $(srcdir) && $(GLIB_MKENUMS) --template gc-sound-enumerations.h.in \
+ $(static_headers) ) > xgen-gtbh \
+ && (cmp -s xgen-gtbh $@ || (echo "Creating $@..."; cp xgen-gtbh $@) ) \
+ && rm -f xgen-gtbh
-# gc-sound-enumerations.c: $(static_headers) Makefile gc-sound-enumerations.c.in
-# @( cd $(srcdir) && $(GLIB_MKENUMS) --template gc-sound-enumerations.c.in \
-# $(gc_sound_HEADERS) ) >> xgen-gtbc \
-# && (cmp -s xgen-gtbc $@ || (echo "Creating $@..."; cp xgen-gtbc $@) ) \
-# && rm -f xgen-gtbc
+gc-sound-enumerations.c: $(libgcsoundinclude_HEADERS) Makefile gc-sound-enumerations.c.in
+ @( cd $(srcdir) && $(GLIB_MKENUMS) --template gc-sound-enumerations.c.in \
+ $(libgcsoundinclude_HEADERS) ) >> xgen-gtbc \
+ && (cmp -s xgen-gtbc $@ || (echo "Creating $@..."; cp xgen-gtbc $@) ) \
+ && rm -f xgen-gtbc
-# gc-sound-enumerations.c.in \
-# gc-sound-enumerations.h.in \
EXTRA_DIST=\
- marshallers.list \
- $(NULL)
+ gc-sound-enumerations.h.in \
+ gc-sound-enumerations.c.in \
+ marshallers.list
+
diff --git a/src/gc_sound/src/gc-sound-channel.c b/src/gc_sound/src/gc-sound-channel.c
index 8f03d3e..206ebed 100644
--- a/src/gc_sound/src/gc-sound-channel.c
+++ b/src/gc_sound/src/gc-sound-channel.c
@@ -36,7 +36,7 @@ enum {
guint gc_sound_channel_signals[N_SIGNALS] = {0};
-gboolean gc_sound_channel_play_item (GCSoundChannel * self, GCSoundItem *item)
+gboolean gc_sound_channel_play_item (GcSoundChannel * self, GcSoundItem *item)
{
self->running_sample = item;
self->stopped = FALSE;
@@ -44,58 +44,58 @@ gboolean gc_sound_channel_play_item (GCSoundChannel * self, G
return gc_sound_mixer_play_item (GC_SOUND_MIXER(GC_SOUND_OBJECT(self)->parent), self, item);
}
-GCSoundItem * gc_sound_channel_get_root (GCSoundChannel * self)
+GcSoundItem * gc_sound_channel_get_root (GcSoundChannel * self)
{
return self->root;
}
-gboolean gc_sound_channel_pause (GCSoundChannel * self)
+gboolean gc_sound_channel_pause (GcSoundChannel * self)
{
return gc_sound_mixer_pause_channel( GC_SOUND_MIXER(GC_SOUND_OBJECT(self)->parent), self);
}
-gboolean gc_sound_channel_resume (GCSoundChannel * self)
+gboolean gc_sound_channel_resume (GcSoundChannel * self)
{
return gc_sound_mixer_resume_channel( GC_SOUND_MIXER(GC_SOUND_OBJECT(self)->parent), self);
}
-gboolean gc_sound_channel_halt (GCSoundChannel * self)
+gboolean gc_sound_channel_halt (GcSoundChannel * self)
{
return gc_sound_mixer_halt_channel(GC_SOUND_MIXER(GC_SOUND_OBJECT(self)->parent), self);
}
-GCSoundPolicy gc_sound_channel_get_policy (GCSoundChannel * self)
+GcSoundPolicy gc_sound_channel_get_policy (GcSoundChannel * self)
{
return self->policy;
}
-gboolean gc_sound_channel_set_policy (GCSoundChannel * self,
- GCSoundPolicy policy)
+gboolean gc_sound_channel_set_policy (GcSoundChannel * self,
+ GcSoundPolicy policy)
{
self->policy = policy;
return TRUE;
}
-gboolean gc_sound_channel_play (GCSoundChannel *self,
- GCSoundItem *item)
+gboolean gc_sound_channel_play (GcSoundChannel *self,
+ GcSoundItem *item)
{
- GCSoundPolicy policy;
+ GcSoundPolicy policy;
/* item policy if it's set */
- if (gc_sound_item_get_policy(item) == GC_SOUND_POLICY_NONE)
+ if (gc_sound_item_get_policy(item) == NONE)
policy = self->policy;
else
policy = gc_sound_item_get_policy(item);
switch (policy) {
- case GC_SOUND_PLAY_ONLY_IF_IDLE:
+ case PLAY_ONLY_IF_IDLE:
if (self->running_sample || g_list_length (self->playlist)>0)
- return;
+ return FALSE;
self->playlist = g_list_append (self->playlist, item);
// TODO send a signal to run !!!
g_signal_emit(self, gc_sound_channel_signals[RUN], 0);
break;
- case GC_SOUND_INTERRUPT_AND_PLAY:
+ case INTERRUPT_AND_PLAY:
g_list_free (self->playlist);
self->playlist = NULL;
self->playlist = g_list_append (self->playlist, item);
@@ -112,7 +112,7 @@ gboolean gc_sound_channel_play (GCSoundChannel *self,
g_signal_emit(self, gc_sound_channel_signals[RUN], 0);
break;
}
-
+ return TRUE;
}
/* GType stuff */
@@ -123,9 +123,9 @@ enum {
/* GType */
-G_DEFINE_TYPE(GCSoundChannel, gc_sound_channel, GC_TYPE_SOUND_OBJECT);
+G_DEFINE_TYPE(GcSoundChannel, gc_sound_channel, GC_TYPE_SOUND_OBJECT);
-static void root_destroyed (GCSoundObject *root, gpointer data)
+static void root_destroyed (GcSoundObject *root, gpointer data)
{
// direct call claas destroy because root is already destroyed.
@@ -133,7 +133,7 @@ static void root_destroyed (GCSoundObject *root, gpointer data)
}
static void
-gc_sound_channel_destroy (GCSoundChannel *self){
+gc_sound_channel_destroy (GcSoundChannel *self){
g_signal_handlers_disconnect_by_func(self->root, root_destroyed, self);
gc_sound_object_destroy(GC_SOUND_OBJECT(self->root));
g_object_unref(self->root);
@@ -142,13 +142,13 @@ gc_sound_channel_destroy (GCSoundChannel *self){
}
static void
-gc_sound_channel_init(GCSoundChannel* self)
+gc_sound_channel_init(GcSoundChannel* self)
{
// initialisation des variables.
//g_warning("gc_sound_channel_init");
self->volume = 1.0;
- self->policy = GC_SOUND_PLAY_AFTER_CURRENT;
+ self->policy = PLAY_AFTER_CURRENT;
self->stopped = FALSE;
@@ -171,7 +171,7 @@ gc_sound_channel_init(GCSoundChannel* self)
static void
gc_sound_channel_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
- GCSoundChannel *self = GC_SOUND_CHANNEL(object);
+ GcSoundChannel *self = GC_SOUND_CHANNEL(object);
switch(prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -182,7 +182,7 @@ gc_sound_channel_get_property(GObject* object, guint prop_id, GValue* value, GPa
static void
gc_sound_channel_set_property(GObject* object, guint prop_id, GValue const* value, GParamSpec* pspec)
{
- GCSoundChannel *self = GC_SOUND_CHANNEL(object);
+ GcSoundChannel *self = GC_SOUND_CHANNEL(object);
switch(prop_id) {
default:
@@ -193,9 +193,9 @@ gc_sound_channel_set_property(GObject* object, guint prop_id, GValue const* valu
}
static void
-gc_sound_channel_signal_chunk_end (GCSoundChannel *self)
+gc_sound_channel_signal_chunk_end (GcSoundChannel *self)
{
- GCSoundItem *chunk = self->running_sample;
+ GcSoundItem *chunk = self->running_sample;
self->running_sample = NULL;
@@ -205,7 +205,7 @@ gc_sound_channel_signal_chunk_end (GCSoundChannel *self)
}
static void
-gc_sound_channel_signal_run (GCSoundChannel *self)
+gc_sound_channel_signal_run (GcSoundChannel *self)
{
GList *item_root;
gboolean ret;
@@ -222,7 +222,7 @@ gc_sound_channel_signal_run (GCSoundChannel *self)
}
static void
-gc_sound_channel_class_init(GCSoundChannelClass* self_class)
+gc_sound_channel_class_init(GcSoundChannelClass* self_class)
{
// c'est ici qu'il faut passer les properties et les signals.
// g_warning("gc_sound_channel_class_init");
@@ -257,7 +257,7 @@ gc_sound_channel_class_init(GCSoundChannelClass* self_class)
g_signal_new("run", /* name */
GC_TYPE_SOUND_CHANNEL, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundChannelClass, run), /* offset function */
+ G_STRUCT_OFFSET (GcSoundChannelClass, run), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__VOID, /* marshal */
@@ -269,7 +269,7 @@ gc_sound_channel_class_init(GCSoundChannelClass* self_class)
g_signal_new("chunk_end", /* name */
GC_TYPE_SOUND_CHANNEL, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundChannelClass, chunk_end), /* offset function */
+ G_STRUCT_OFFSET (GcSoundChannelClass, chunk_end), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__BOOLEAN, /* marshal */
diff --git a/src/gc_sound/src/gc-sound-channel.h b/src/gc_sound/src/gc-sound-channel.h
index ab6b487..975744d 100644
--- a/src/gc_sound/src/gc-sound-channel.h
+++ b/src/gc_sound/src/gc-sound-channel.h
@@ -24,15 +24,15 @@
G_BEGIN_DECLS
-typedef struct _GCSoundChannel GCSoundChannel;
-typedef struct _GCSoundChannelClass GCSoundChannelClass;
+typedef struct _GcSoundChannel GcSoundChannel;
+typedef struct _GcSoundChannelClass GcSoundChannelClass;
typedef enum {
- GC_SOUND_POLICY_NONE,
- GC_SOUND_PLAY_ONLY_IF_IDLE,
- GC_SOUND_PLAY_AFTER_CURRENT,
- GC_SOUND_INTERRUPT_AND_PLAY
-} GCSoundPolicy;
+ NONE,
+ PLAY_ONLY_IF_IDLE,
+ PLAY_AFTER_CURRENT,
+ INTERRUPT_AND_PLAY
+} GcSoundPolicy;
G_END_DECLS
@@ -44,59 +44,59 @@ G_END_DECLS
G_BEGIN_DECLS
#define GC_TYPE_SOUND_CHANNEL (gc_sound_channel_get_type())
-#define GC_SOUND_CHANNEL(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_CHANNEL, GCSoundChannel))
-#define GC_SOUND_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_CHANNEL, GCSoundChannelClass))
+#define GC_SOUND_CHANNEL(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_CHANNEL, GcSoundChannel))
+#define GC_SOUND_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_CHANNEL, GcSoundChannelClass))
#define GC_IS_SOUND_CHANNEL(i) (G_TYPE_CHECK_INSTANCE_TYPE((i), GC_TYPE_SOUND_CHANNEL))
#define GC_IS_SOUND_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE((c), GC_TYPE_SOUND_CHANNEL))
-#define GC_SOUND_CHANNEL_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_CHANNEL, GCSoundChannelClass))
+#define GC_SOUND_CHANNEL_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_CHANNEL, GcSoundChannelClass))
GType gc_sound_channel_get_type(void);
-struct _GCSoundChannel {
- GCSoundObject __parent__;
+struct _GcSoundChannel {
+ GcSoundObject __parent__;
gdouble volume;
- GCSoundPolicy policy;
+ GcSoundPolicy policy;
//gint policy;
gboolean stopped;
- GCSoundMixer* mixer;
- GCSoundItem* root;
+ GcSoundMixer* mixer;
+ GcSoundItem* root;
GList* playlist;
//this one is the item with the file
- GCSoundItem* running_sample;
+ GcSoundItem* running_sample;
// this one is the group playing
GList* running_root;
gint channel_number;
};
-struct _GCSoundChannelClass {
- GCSoundObjectClass __parentClass__;
+struct _GcSoundChannelClass {
+ GcSoundObjectClass __parentClass__;
/* signal handlers */
- void (* run) (GCSoundChannel * self);
- void (* chunk_end) (GCSoundChannel * self);
- void (* destroy) (GCSoundChannel *self);
+ void (* run) (GcSoundChannel * self);
+ void (* chunk_end) (GcSoundChannel * self);
+ void (* destroy) (GcSoundChannel *self);
};
-GCSoundItem * gc_sound_channel_get_root (GCSoundChannel * self);
+GcSoundItem * gc_sound_channel_get_root (GcSoundChannel * self);
-gboolean gc_sound_channel_pause (GCSoundChannel * self);
-gboolean gc_sound_channel_resume (GCSoundChannel * self);
-gboolean gc_sound_channel_halt (GCSoundChannel * self);
+gboolean gc_sound_channel_pause (GcSoundChannel * self);
+gboolean gc_sound_channel_resume (GcSoundChannel * self);
+gboolean gc_sound_channel_halt (GcSoundChannel * self);
-gboolean gc_sound_channel_play (GCSoundChannel * channel,
- GCSoundItem *item);
+gboolean gc_sound_channel_play (GcSoundChannel * channel,
+ GcSoundItem *item);
-gboolean gc_sound_channel_play_item (GCSoundChannel * self,
- GCSoundItem *item);
+gboolean gc_sound_channel_play_item (GcSoundChannel * self,
+ GcSoundItem *item);
-GCSoundPolicy gc_sound_channel_get_policy (GCSoundChannel * self);
-gboolean gc_sound_channel_set_policy (GCSoundChannel * self,
- GCSoundPolicy policy);
+GcSoundPolicy gc_sound_channel_get_policy (GcSoundChannel * self);
+gboolean gc_sound_channel_set_policy (GcSoundChannel * self,
+ GcSoundPolicy policy);
G_END_DECLS
diff --git a/src/gc_sound/src/gc-sound-item.c b/src/gc_sound/src/gc-sound-item.c
index c6b0e15..d6aaebe 100644
--- a/src/gc_sound/src/gc-sound-item.c
+++ b/src/gc_sound/src/gc-sound-item.c
@@ -40,7 +40,7 @@ enum {
guint gc_sound_item_signals[N_SIGNALS] = {0};
// internal use
-gboolean gc_sound_item_run_next (GCSoundItem *self,
+gboolean gc_sound_item_run_next (GcSoundItem *self,
gboolean stopped)
{
gboolean ret;
@@ -93,25 +93,25 @@ gboolean gc_sound_item_run_next (GCSoundItem *self,
return FALSE;
}
-void gc_sound_item_set_loop(GCSoundItem *self, gboolean loop)
+void gc_sound_item_set_loop(GcSoundItem *self, gboolean loop)
{
self->loop = loop;
}
-GCSoundPolicy gc_sound_item_get_policy (GCSoundItem * self)
+GcSoundPolicy gc_sound_item_get_policy (GcSoundItem * self)
{
return self->policy;
}
-gboolean gc_sound_item_set_policy (GCSoundItem * self,
- GCSoundPolicy policy)
+gboolean gc_sound_item_set_policy (GcSoundItem * self,
+ GcSoundPolicy policy)
{
self->policy = policy;
return TRUE;
}
-void gc_sound_item_child_start( GCSoundItem *child, gpointer data)
+void gc_sound_item_child_start( GcSoundItem *child, gpointer data)
{
- GCSoundItem *self = GC_SOUND_ITEM(data);
+ GcSoundItem *self = GC_SOUND_ITEM(data);
g_return_if_fail(GC_IS_SOUND_ITEM(self));
@@ -122,25 +122,25 @@ void gc_sound_item_child_start( GCSoundItem *child, gpointer data)
}
-void gc_sound_item_child_end( GCSoundItem *child, gboolean stopped, gpointer data)
+void gc_sound_item_child_end( GcSoundItem *child, gboolean stopped, gpointer data)
{
- GCSoundItem *self = GC_SOUND_ITEM(data);
+ GcSoundItem *self = GC_SOUND_ITEM(data);
if (self->has_played)
gc_sound_item_run_next(self, stopped);
}
-void gc_sound_item_child_destroyed( GCSoundItem *child, gpointer data)
+void gc_sound_item_child_destroyed( GcSoundItem *child, gpointer data)
{
- GCSoundItem *self = GC_SOUND_ITEM(data);
+ GcSoundItem *self = GC_SOUND_ITEM(data);
self->children = g_list_remove ( self->children, child);
g_object_unref (G_OBJECT(child));
}
-GCSoundItem * gc_sound_item_append_child (GCSoundItem *self)
+GcSoundItem * gc_sound_item_append_child (GcSoundItem *self)
{
- GCSoundItem *child;
+ GcSoundItem *child;
child = GC_SOUND_ITEM(g_object_new(GC_TYPE_SOUND_ITEM,
"parent", self,
@@ -159,15 +159,15 @@ GCSoundItem * gc_sound_item_append_child (GCSoundItem *self)
return child;
}
-gboolean gc_sound_item_play (GCSoundItem *self)
+gboolean gc_sound_item_play (GcSoundItem *self)
{
return gc_sound_channel_play (self->channel, self);
}
-void gc_sound_item_set_filename (GCSoundItem *self, gchar *filename)
+void gc_sound_item_set_filename (GcSoundItem *self, gchar *filename)
{
if (filename) {
- self->filename = filename;
+ self->filename = g_strdup(filename);
if ( (!self->children) || (self != self->children->data))
self->children = g_list_prepend( self->children, self);
@@ -178,20 +178,20 @@ void gc_sound_item_set_filename (GCSoundItem *self, gchar *filename)
}
}
-gchar * gc_sound_item_get_filename (GCSoundItem *self)
+gchar * gc_sound_item_get_filename (GcSoundItem *self)
{
return self->filename;
}
static void
-gc_sound_item_signal_real_play (GCSoundItem *self)
+gc_sound_item_signal_real_play (GcSoundItem *self)
{
g_signal_emit(self, gc_sound_item_signals[CHUNK_START], 0);
gc_sound_channel_play_item (self->channel, self);
}
static void
-gc_sound_item_signal_play_end (GCSoundItem *self, gboolean stopped)
+gc_sound_item_signal_play_end (GcSoundItem *self, gboolean stopped)
{
if (self->has_played || stopped) {
self->started = FALSE;
@@ -201,13 +201,13 @@ gc_sound_item_signal_play_end (GCSoundItem *self, gboolean stopped)
}
static void
-gc_sound_item_signal_play_start (GCSoundItem *self)
+gc_sound_item_signal_play_start (GcSoundItem *self)
{
self->started = TRUE;
}
static void
-gc_sound_item_signal_chunk_end (GCSoundItem *self, gboolean stopped)
+gc_sound_item_signal_chunk_end (GcSoundItem *self, gboolean stopped)
{
/*
We receive this signal from channel when play of chunk if finished.
@@ -218,7 +218,7 @@ gc_sound_item_signal_chunk_end (GCSoundItem *self, gboolean stopped)
}
static void
-gc_sound_item_signal_chunk_start (GCSoundItem *self)
+gc_sound_item_signal_chunk_start (GcSoundItem *self)
{
self->started = TRUE;
}
@@ -231,16 +231,16 @@ enum {
};
/* GType */
-G_DEFINE_TYPE(GCSoundItem, gc_sound_item, GC_TYPE_SOUND_OBJECT);
+G_DEFINE_TYPE(GcSoundItem, gc_sound_item, GC_TYPE_SOUND_OBJECT);
static void
-gc_sound_item_init(GCSoundItem* self)
+gc_sound_item_init(GcSoundItem* self)
{
// initialisation des variables.
self->volume = -1.0;
self->mute = FALSE;
- self->policy = GC_SOUND_PLAY_AFTER_CURRENT;
+ self->policy = PLAY_AFTER_CURRENT;
self->loop = FALSE;
self->filename = NULL;
@@ -267,7 +267,7 @@ gc_sound_item_init(GCSoundItem* self)
static void
gc_sound_item_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
- GCSoundItem *self = GC_SOUND_ITEM(object);
+ GcSoundItem *self = GC_SOUND_ITEM(object);
switch(prop_id) {
case PROP_CHANNEL:
g_value_set_object(value, self->channel);
@@ -284,7 +284,7 @@ gc_sound_item_get_property(GObject* object, guint prop_id, GValue* value, GParam
static void
gc_sound_item_set_property(GObject* object, guint prop_id, GValue const* value, GParamSpec* pspec)
{
- GCSoundItem *self = GC_SOUND_ITEM(object);
+ GcSoundItem *self = GC_SOUND_ITEM(object);
switch(prop_id) {
case PROP_CHANNEL:
@@ -301,7 +301,7 @@ gc_sound_item_set_property(GObject* object, guint prop_id, GValue const* value,
}
static void
-gc_sound_item_class_init(GCSoundItemClass* self_class)
+gc_sound_item_class_init(GcSoundItemClass* self_class)
{
// c'est ici qu'il faut passer les properties et les signals.
GObjectClass* go_class;
@@ -344,7 +344,7 @@ gc_sound_item_class_init(GCSoundItemClass* self_class)
g_signal_new("real_play", /* name */
GC_TYPE_SOUND_ITEM, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundItemClass, real_play), /* offset function */
+ G_STRUCT_OFFSET (GcSoundItemClass, real_play), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__VOID, /* marshal */
@@ -355,7 +355,7 @@ gc_sound_item_class_init(GCSoundItemClass* self_class)
g_signal_new("play_start", /* name */
GC_TYPE_SOUND_ITEM, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundItemClass, play_start), /* offset function */
+ G_STRUCT_OFFSET (GcSoundItemClass, play_start), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__VOID, /* marshal */
@@ -366,7 +366,7 @@ gc_sound_item_class_init(GCSoundItemClass* self_class)
g_signal_new("play_end", /* name */
GC_TYPE_SOUND_ITEM, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundItemClass, play_end), /* offset function */
+ G_STRUCT_OFFSET (GcSoundItemClass, play_end), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__BOOLEAN, /* marshal */
@@ -378,7 +378,7 @@ gc_sound_item_class_init(GCSoundItemClass* self_class)
g_signal_new("chunk_start", /* name */
GC_TYPE_SOUND_ITEM, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundItemClass, chunk_start), /* offset function */
+ G_STRUCT_OFFSET (GcSoundItemClass, chunk_start), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__VOID, /* marshal */
@@ -389,7 +389,7 @@ gc_sound_item_class_init(GCSoundItemClass* self_class)
g_signal_new("chunk_end", /* name */
GC_TYPE_SOUND_ITEM, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundItemClass, chunk_end), /* offset function */
+ G_STRUCT_OFFSET (GcSoundItemClass, chunk_end), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__BOOLEAN, /* marshal */
diff --git a/src/gc_sound/src/gc-sound-item.h b/src/gc_sound/src/gc-sound-item.h
index 967eb77..2676cef 100644
--- a/src/gc_sound/src/gc-sound-item.h
+++ b/src/gc_sound/src/gc-sound-item.h
@@ -25,8 +25,8 @@
G_BEGIN_DECLS
-typedef struct _GCSoundItem GCSoundItem;
-typedef struct _GCSoundItemClass GCSoundItemClass;
+typedef struct _GcSoundItem GcSoundItem;
+typedef struct _GcSoundItemClass GcSoundItemClass;
G_END_DECLS
@@ -36,28 +36,28 @@ G_BEGIN_DECLS
#define GC_TYPE_SOUND_ITEM (gc_sound_item_get_type())
-#define GC_SOUND_ITEM(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_ITEM, GCSoundItem))
-#define GC_SOUND_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_ITEM, GCSoundItemClass))
+#define GC_SOUND_ITEM(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_ITEM, GcSoundItem))
+#define GC_SOUND_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_ITEM, GcSoundItemClass))
#define GC_IS_SOUND_ITEM(i) (G_TYPE_CHECK_INSTANCE_TYPE((i), GC_TYPE_SOUND_ITEM))
#define GC_IS_SOUND_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE((c), GC_TYPE_SOUND_ITEM))
-#define GC_SOUND_ITEM_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_ITEM, GCSoundItemClass))
+#define GC_SOUND_ITEM_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_ITEM, GcSoundItemClass))
GType gc_sound_item_get_type(void);
-struct _GCSoundItem {
- GCSoundObject __parent__;
+struct _GcSoundItem {
+ GcSoundObject __parent__;
gdouble volume;
gboolean mute;
- GCSoundPolicy policy;
+ GcSoundPolicy policy;
//gint policy;
gboolean loop;
gchar* filename;
- GCSoundChannel* channel;
- GCSoundItem* parent;
+ GcSoundChannel* channel;
+ GcSoundItem* parent;
GList* children;
//internal use
@@ -71,31 +71,31 @@ struct _GCSoundItem {
GList *playing;
};
-struct _GCSoundItemClass {
- GCSoundObjectClass __parentClass__;
+struct _GcSoundItemClass {
+ GcSoundObjectClass __parentClass__;
/* signal handlers */
- void (* real_play) (GCSoundItem * self);
- void (* play_start) (GCSoundItem * self);
- void (* play_end) (GCSoundItem * self, gboolean stopped);
- void (* chunk_start) (GCSoundItem * self);
- void (* chunk_end) (GCSoundItem * self, gboolean stopped);
+ void (* real_play) (GcSoundItem * self);
+ void (* play_start) (GcSoundItem * self);
+ void (* play_end) (GcSoundItem * self, gboolean stopped);
+ void (* chunk_start) (GcSoundItem * self);
+ void (* chunk_end) (GcSoundItem * self, gboolean stopped);
};
// internal use
-gboolean gc_sound_item_run_next (GCSoundItem *self,
+gboolean gc_sound_item_run_next (GcSoundItem *self,
gboolean stopped);
-GCSoundItem * gc_sound_item_append_child (GCSoundItem *self);
+GcSoundItem * gc_sound_item_append_child (GcSoundItem *self);
-gboolean gc_sound_item_play (GCSoundItem *self);
+gboolean gc_sound_item_play (GcSoundItem *self);
-void gc_sound_item_set_filename (GCSoundItem *self, gchar *filename);
+void gc_sound_item_set_filename (GcSoundItem *self, gchar *filename);
-gchar * gc_sound_item_get_filename (GCSoundItem *self);
+gchar * gc_sound_item_get_filename (GcSoundItem *self);
-void gc_sound_item_set_loop(GCSoundItem *self, gboolean loop);
+void gc_sound_item_set_loop(GcSoundItem *self, gboolean loop);
G_END_DECLS
diff --git a/src/gc_sound/src/gc-sound-mixer-SDL.c b/src/gc_sound/src/gc-sound-mixer-SDL.c
index ae1aa17..a4ee924 100644
--- a/src/gc_sound/src/gc-sound-mixer-SDL.c
+++ b/src/gc_sound/src/gc-sound-mixer-SDL.c
@@ -37,23 +37,23 @@ enum {
N_SIGNALS
};
-guint gc_sound_mixer_SDL_signals[N_SIGNALS] = {0};
+guint gc_sound_mixer_sdl_signals[N_SIGNALS] = {0};
-static GCSoundMixerSDL *running_mixer = NULL;
+static GcSoundMixerSdl *running_mixer = NULL;
-GCSoundMixer *gc_sound_mixer_SDL_new(void)
+GcSoundMixer *gc_sound_mixer_sdl_new(void)
{
return GC_SOUND_MIXER(g_object_new(GC_TYPE_SOUND_MIXER_SDL, NULL));
}
gboolean
-gc_sound_mixer_SDL_open_audio (GCSoundMixer* mixer)
+gc_sound_mixer_sdl_open_audio (GcSoundMixer* mixer)
{
int audio_rate,audio_channels;
Uint16 audio_format;
int audio_buffers=2048;
int bits = 0;
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
@@ -66,7 +66,7 @@ gc_sound_mixer_SDL_open_audio (GCSoundMixer* mixer)
// initialize sdl mixer, open up the audio device
if(Mix_OpenAudio(44100,MIX_DEFAULT_FORMAT,2,audio_buffers)<0){
- g_warning("GCSoundMixer can not open audio dev");
+ g_warning("GcSoundMixer can not open audio dev");
return FALSE;
}
@@ -86,9 +86,9 @@ gc_sound_mixer_SDL_open_audio (GCSoundMixer* mixer)
}
gboolean
-gc_sound_mixer_SDL_close_audio (GCSoundMixer * mixer)
+gc_sound_mixer_sdl_close_audio (GcSoundMixer * mixer)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
@@ -105,14 +105,14 @@ gc_sound_mixer_SDL_close_audio (GCSoundMixer * mixer)
return TRUE;
}
-static void reset_channel_number(GCSoundChannel *channel, gboolean stopped, gpointer data)
+static void reset_channel_number(GcSoundChannel *channel, gboolean stopped, gpointer data)
{
channel->channel_number = GPOINTER_TO_INT(data);
}
-static void channel_destroyed(GCSoundChannel *channel, gpointer data)
+static void channel_destroyed(GcSoundChannel *channel, gpointer data)
{
- GCSoundMixerSDL *self = GC_SOUND_MIXER_SDL (data);
+ GcSoundMixerSdl *self = GC_SOUND_MIXER_SDL (data);
int i;
//check if channel is playing
@@ -127,7 +127,7 @@ static void channel_destroyed(GCSoundChannel *channel, gpointer data)
/* channel reorganisation */
for (i = 0; i < self->channels->len; i++) {
- GCSoundChannel *i_channel = g_ptr_array_index (self->channels, i);
+ GcSoundChannel *i_channel = g_ptr_array_index (self->channels, i);
if (i!=i_channel->channel_number) {
if (i_channel->running_sample)
@@ -138,15 +138,15 @@ static void channel_destroyed(GCSoundChannel *channel, gpointer data)
}
}
-static GCSoundChannel *gc_sound_mixer_SDL_new_channel (GCSoundMixer * mixer)
+static GcSoundChannel *gc_sound_mixer_sdl_new_channel (GcSoundMixer * mixer)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
self = GC_SOUND_MIXER_SDL(mixer);
- GCSoundChannel *channel = GC_SOUND_CHANNEL(g_object_new(GC_TYPE_SOUND_CHANNEL,
+ GcSoundChannel *channel = GC_SOUND_CHANNEL(g_object_new(GC_TYPE_SOUND_CHANNEL,
"parent", self, NULL));
g_assert (channel != 0);
@@ -167,16 +167,16 @@ static GCSoundChannel *gc_sound_mixer_SDL_new_channel (GCSoundMixer * mixer)
return channel;
}
-gboolean gc_sound_mixer_SDL_pause (GCSoundMixer * mixer)
+gboolean gc_sound_mixer_sdl_pause (GcSoundMixer * mixer)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
self = GC_SOUND_MIXER_SDL(mixer);
if (self->paused){
- g_warning ("gc_sound_mixer_SDL_pause : Already paused !");
+ g_warning ("gc_sound_mixer_sdl_pause : Already paused !");
return FALSE;
}
@@ -185,16 +185,16 @@ gboolean gc_sound_mixer_SDL_pause (GCSoundMixer * mix
}
gboolean
-gc_sound_mixer_SDL_resume (GCSoundMixer * mixer)
+gc_sound_mixer_sdl_resume (GcSoundMixer * mixer)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
self = GC_SOUND_MIXER_SDL(mixer);
if (!self->paused){
- g_warning ("gc_sound_mixer_SDL_resume : Not paused !");
+ g_warning ("gc_sound_mixer_sdl_resume : Not paused !");
return FALSE;
}
Mix_Resume(-1);
@@ -202,9 +202,9 @@ gc_sound_mixer_SDL_resume (GCSoundMixer * mixer)
}
gboolean
-gc_sound_mixer_SDL_halt (GCSoundMixer * mixer)
+gc_sound_mixer_sdl_halt (GcSoundMixer * mixer)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
@@ -214,9 +214,9 @@ gc_sound_mixer_SDL_halt (GCSoundMixer * mixer)
}
gboolean
-gc_sound_mixer_SDL_pause_channel (GCSoundMixer * mixer, GCSoundChannel * channel)
+gc_sound_mixer_sdl_pause_channel (GcSoundMixer * mixer, GcSoundChannel * channel)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
g_return_val_if_fail(GC_IS_SOUND_CHANNEL(channel), FALSE);
@@ -225,9 +225,9 @@ gc_sound_mixer_SDL_pause_channel (GCSoundMixer * mixer, GCSoundChannel * cha
}
gboolean
-gc_sound_mixer_SDL_resume_channel (GCSoundMixer * mixer, GCSoundChannel * channel)
+gc_sound_mixer_sdl_resume_channel (GcSoundMixer * mixer, GcSoundChannel * channel)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
g_return_val_if_fail(GC_IS_SOUND_CHANNEL(channel), FALSE);
@@ -238,9 +238,9 @@ gc_sound_mixer_SDL_resume_channel (GCSoundMixer * mixer, GCSoundChannel * cha
gboolean
-gc_sound_mixer_SDL_halt_channel (GCSoundMixer * mixer, GCSoundChannel * channel)
+gc_sound_mixer_sdl_halt_channel (GcSoundMixer * mixer, GcSoundChannel * channel)
{
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
g_return_val_if_fail(GC_IS_SOUND_CHANNEL(channel), FALSE);
@@ -252,11 +252,11 @@ gc_sound_mixer_SDL_halt_channel (GCSoundMixer * mixer, GCSoundChannel * cha
gboolean
-gc_sound_mixer_SDL_play_item (GCSoundMixer * mixer, GCSoundChannel * channel, GCSoundItem *item )
+gc_sound_mixer_sdl_play_item (GcSoundMixer * mixer, GcSoundChannel * channel, GcSoundItem *item )
{
Mix_Chunk *sample;
- GCSoundMixerSDL* self;
+ GcSoundMixerSdl* self;
g_return_val_if_fail(GC_IS_SOUND_MIXER_SDL(mixer), FALSE);
g_return_val_if_fail(GC_IS_SOUND_CHANNEL(channel), FALSE);
@@ -299,22 +299,22 @@ gc_sound_mixer_SDL_play_item (GCSoundMixer * mixer, GCSoundChannel * channel, G
void channel_finished_cb (int channel_number)
{
- GCSoundMixerSDL* self = running_mixer;
+ GcSoundMixerSdl* self = running_mixer;
- GCSoundChannel *channel = g_ptr_array_index(self->channels, channel_number);
+ GcSoundChannel *channel = g_ptr_array_index(self->channels, channel_number);
g_return_if_fail(channel != NULL);
g_return_if_fail(GC_IS_SOUND_MIXER_SDL(self));
g_return_if_fail(GC_IS_SOUND_CHANNEL(channel));
- g_signal_emit(self, gc_sound_mixer_SDL_signals[CHANNEL_FINISHED], 0, channel, NULL);
+ g_signal_emit(self, gc_sound_mixer_sdl_signals[CHANNEL_FINISHED], 0, channel, NULL);
}
static
-void gc_sound_mixer_SDL_channel_finished (GCSoundMixerSDL* self,
- GCSoundChannel* channel)
+void gc_sound_mixer_sdl_channel_finished (GcSoundMixerSdl* self,
+ GcSoundChannel* channel)
{
Mix_Chunk *sample;
@@ -326,7 +326,7 @@ void gc_sound_mixer_SDL_channel_finished (GCSoundMixerSDL* self,
}
static void
-gc_sound_mixer_SDL_init (GCSoundMixerSDL* self)
+gc_sound_mixer_sdl_init (GcSoundMixerSdl* self)
{
/* SDL_mixer limitation */
if (running_mixer != NULL)
@@ -346,8 +346,8 @@ gc_sound_mixer_SDL_init (GCSoundMixerSDL* self)
self->audio_opened = FALSE;
- if (!gc_sound_mixer_SDL_open_audio (GC_SOUND_MIXER(self))) {
- g_warning("gc_sound_mixer_SDL_init: cannot open audio !");
+ if (!gc_sound_mixer_sdl_open_audio (GC_SOUND_MIXER(self))) {
+ g_warning("gc_sound_mixer_sdl_init: cannot open audio !");
}
/* like GtkWindow */
@@ -364,9 +364,9 @@ static GObjectClass *parent_class;
static void
-gc_sound_mixer_SDL_finalize (GObject* object)
+gc_sound_mixer_sdl_finalize (GObject* object)
{
- GCSoundMixerSDL * self = GC_SOUND_MIXER_SDL(object);
+ GcSoundMixerSdl * self = GC_SOUND_MIXER_SDL(object);
running_mixer = NULL;
@@ -383,7 +383,7 @@ gc_sound_mixer_SDL_finalize (GObject* object)
}
static void
-gc_sound_mixer_SDL_destroy (GCSoundMixerSDL *self)
+gc_sound_mixer_sdl_destroy (GcSoundMixerSdl *self)
{
gint i;
@@ -405,13 +405,13 @@ gc_sound_mixer_SDL_destroy (GCSoundMixerSDL *self)
}
static void
-gc_sound_mixer_SDL_get_property() {}
+gc_sound_mixer_sdl_get_property() {}
static void
-gc_sound_mixer_SDL_set_property() {}
+gc_sound_mixer_sdl_set_property() {}
static void
-gc_sound_mixer_SDL_class_init (GCSoundMixerSDLClass* self_class)
+gc_sound_mixer_sdl_class_init (GcSoundMixerSdlClass* self_class)
{
GObjectClass* go_class;
@@ -419,11 +419,11 @@ gc_sound_mixer_SDL_class_init (GCSoundMixerSDLClass* self_class)
/* GObjectClass */
go_class = G_OBJECT_CLASS(self_class);
- go_class->finalize = gc_sound_mixer_SDL_finalize;
- go_class->get_property = gc_sound_mixer_SDL_get_property;
- go_class->set_property = gc_sound_mixer_SDL_set_property;
+ go_class->finalize = gc_sound_mixer_sdl_finalize;
+ go_class->get_property = gc_sound_mixer_sdl_get_property;
+ go_class->set_property = gc_sound_mixer_sdl_set_property;
- self_class->destroy = gc_sound_mixer_SDL_destroy;
+ self_class->destroy = gc_sound_mixer_sdl_destroy;
_gc_sound_mixer_install_property( go_class, PROP_DEVICE);
/* signals */
@@ -439,13 +439,13 @@ gc_sound_mixer_SDL_class_init (GCSoundMixerSDLClass* self_class)
/* }; */
- self_class->channel_finished = gc_sound_mixer_SDL_channel_finished;
+ self_class->channel_finished = gc_sound_mixer_sdl_channel_finished;
- gc_sound_mixer_SDL_signals[CHANNEL_FINISHED] =
+ gc_sound_mixer_sdl_signals[CHANNEL_FINISHED] =
g_signal_new("channel_finished", /* name */
GC_TYPE_SOUND_MIXER_SDL, /* itype */
(GSignalFlags)(G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION), /* flags */
- G_STRUCT_OFFSET (GCSoundMixerSDLClass, channel_finished), /* offset function */
+ G_STRUCT_OFFSET (GcSoundMixerSdlClass, channel_finished), /* offset function */
NULL, /* accumulator */
NULL, /* accu data */
gc_sound_marshal_VOID__OBJECT, /* marshal */
@@ -458,29 +458,29 @@ gc_sound_mixer_SDL_class_init (GCSoundMixerSDLClass* self_class)
}
-static void gc_init_sound_mixer (GCSoundMixerIface* iface);
+static void gc_init_sound_mixer (GcSoundMixerIface* iface);
-G_DEFINE_TYPE_WITH_CODE(GCSoundMixerSDL, gc_sound_mixer_SDL, GC_TYPE_SOUND_OBJECT,
+G_DEFINE_TYPE_WITH_CODE(GcSoundMixerSdl, gc_sound_mixer_sdl, GC_TYPE_SOUND_OBJECT,
G_IMPLEMENT_INTERFACE(GC_TYPE_SOUND_MIXER, gc_init_sound_mixer));
- void gc_init_sound_mixer (GCSoundMixerIface* iface)
+ void gc_init_sound_mixer (GcSoundMixerIface* iface)
{
g_warning("Sound Mixer is initalized by SDL mixer! ");
/* vtable */
- iface->open_audio = gc_sound_mixer_SDL_open_audio;
- iface->close_audio = gc_sound_mixer_SDL_close_audio;
+ iface->open_audio = gc_sound_mixer_sdl_open_audio;
+ iface->close_audio = gc_sound_mixer_sdl_close_audio;
- iface->new_channel = gc_sound_mixer_SDL_new_channel;
+ iface->new_channel = gc_sound_mixer_sdl_new_channel;
- iface->pause = gc_sound_mixer_SDL_pause;
- iface->resume = gc_sound_mixer_SDL_resume;
- iface->halt = gc_sound_mixer_SDL_halt;
+ iface->pause = gc_sound_mixer_sdl_pause;
+ iface->resume = gc_sound_mixer_sdl_resume;
+ iface->halt = gc_sound_mixer_sdl_halt;
- iface->pause_channel = gc_sound_mixer_SDL_pause_channel;
- iface->resume_channel = gc_sound_mixer_SDL_resume_channel;
- iface->halt_channel = gc_sound_mixer_SDL_halt_channel;
+ iface->pause_channel = gc_sound_mixer_sdl_pause_channel;
+ iface->resume_channel = gc_sound_mixer_sdl_resume_channel;
+ iface->halt_channel = gc_sound_mixer_sdl_halt_channel;
- iface->play_item = gc_sound_mixer_SDL_play_item;
+ iface->play_item = gc_sound_mixer_sdl_play_item;
}
diff --git a/src/gc_sound/src/gc-sound-mixer-SDL.h b/src/gc_sound/src/gc-sound-mixer-SDL.h
index 16bcb2c..803cc1e 100644
--- a/src/gc_sound/src/gc-sound-mixer-SDL.h
+++ b/src/gc_sound/src/gc-sound-mixer-SDL.h
@@ -27,39 +27,39 @@
G_BEGIN_DECLS
-typedef struct _GCSoundMixerSDL GCSoundMixerSDL;
-typedef struct _GCSoundMixerSDLClass GCSoundMixerSDLClass;
+typedef struct _GcSoundMixerSdl GcSoundMixerSdl;
+typedef struct _GcSoundMixerSdlClass GcSoundMixerSdlClass;
-#define GC_TYPE_SOUND_MIXER_SDL (gc_sound_mixer_SDL_get_type())
-#define GC_SOUND_MIXER_SDL(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_MIXER_SDL, GCSoundMixerSDL))
-#define GC_SOUND_MIXER_SDL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_MIXER_SDL, GCSoundMixerSDLClass))
+#define GC_TYPE_SOUND_MIXER_SDL (gc_sound_mixer_sdl_get_type())
+#define GC_SOUND_MIXER_SDL(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_MIXER_SDL, GcSoundMixerSdl))
+#define GC_SOUND_MIXER_SDL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_MIXER_SDL, GcSoundMixerSdlClass))
#define GC_IS_SOUND_MIXER_SDL(i) (G_TYPE_CHECK_INSTANCE_TYPE((i), GC_TYPE_SOUND_MIXER_SDL))
#define GC_IS_SOUND_MIXER_SDL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE((c), GC_TYPE_SOUND_MIXER_SDL))
-#define GC_SOUND_MIXER_SDL_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_MIXER_SDL, GCSoundMixerSDLClass))
+#define GC_SOUND_MIXER_SDL_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_MIXER_SDL, GcSoundMixerSdlClass))
-GType gc_sound_mixer_SDL_get_type(void);
+GType gc_sound_mixer_sdl_get_type(void);
-GCSoundMixer * gc_sound_mixer_SDL_new(void);
+GcSoundMixer * gc_sound_mixer_sdl_new(void);
/*
-gboolean gc_sound_mixer_SDL_open_audio (GCSoundMixerSDL * self);
-gboolean gc_sound_mixer_SDL_close_audio (GCSoundMixerSDL * self);
+gboolean gc_sound_mixer_sdl_open_audio (GcSoundMixerSdl * self);
+gboolean gc_sound_mixer_sdl_close_audio (GcSoundMixerSdl * self);
-GCSoundChannel * gc_sound_mixer_SDL_new_channel (GCSoundMixer * self);
+GcSoundChannel * gc_sound_mixer_sdl_new_channel (GcSoundMixer * self);
-gboolean gc_sound_mixer_SDL_pause (GCSoundMixerSDL * self);
-gboolean gc_sound_mixer_SDL_resume (GCSoundMixerSDL * self);
-gboolean gc_sound_mixer_SDL_halt (GCSoundMixerSDL * self);
+gboolean gc_sound_mixer_sdl_pause (GcSoundMixerSdl * self);
+gboolean gc_sound_mixer_sdl_resume (GcSoundMixerSdl * self);
+gboolean gc_sound_mixer_sdl_halt (GcSoundMixerSdl * self);
-gboolean gc_sound_mixer_SDL_pause_channel (GCSoundMixerSDL * self, GCSoundChannel * channel);
-gboolean gc_sound_mixer_SDL_resume_channel (GCSoundMixerSDL * self, GCSoundChannel * channel);
-gboolean gc_sound_mixer_SDL_halt_channel (GCSoundMixerSDL * self, GCSoundChannel * channel);
+gboolean gc_sound_mixer_sdl_pause_channel (GcSoundMixerSdl * self, GcSoundChannel * channel);
+gboolean gc_sound_mixer_sdl_resume_channel (GcSoundMixerSdl * self, GcSoundChannel * channel);
+gboolean gc_sound_mixer_sdl_halt_channel (GcSoundMixerSdl * self, GcSoundChannel * channel);
-gboolean gc_sound_mixer_SDL_play_item (GCSoundMixerSDL * self, GCSoundChannel * channel, GCSoundItem *item);
+gboolean gc_sound_mixer_sdl_play_item (GcSoundMixerSdl * self, GcSoundChannel * channel, GcSoundItem *item);
*/
-struct _GCSoundMixerSDL {
- GCSoundObject __parent__;
+struct _GcSoundMixerSdl {
+ GcSoundObject __parent__;
/* Is audio initiallised correctly */
gboolean audio_opened;
@@ -74,36 +74,36 @@ struct _GCSoundMixerSDL {
gboolean has_user_ref_count;
};
-struct _GCSoundMixerSDLClass {
- GCSoundObjectClass base_class;
+struct _GcSoundMixerSdlClass {
+ GcSoundObjectClass base_class;
/* vtable */
- gboolean (* open_audio) (GCSoundMixerSDL * self);
- gboolean (* close_audio) (GCSoundMixerSDL * self);
+ gboolean (* open_audio) (GcSoundMixerSdl * self);
+ gboolean (* close_audio) (GcSoundMixerSdl * self);
- GCSoundChannel * (* new_channel) (GCSoundMixer * self);
+ GcSoundChannel * (* new_channel) (GcSoundMixer * self);
- gboolean (* pause) (GCSoundMixerSDL * self);
- gboolean (* resume) (GCSoundMixerSDL * self);
- gboolean (* halt) (GCSoundMixerSDL * self);
+ gboolean (* pause) (GcSoundMixerSdl * self);
+ gboolean (* resume) (GcSoundMixerSdl * self);
+ gboolean (* halt) (GcSoundMixerSdl * self);
- gboolean (* pause_channel) (GCSoundMixerSDL * self,
- GCSoundChannel * channel);
+ gboolean (* pause_channel) (GcSoundMixerSdl * self,
+ GcSoundChannel * channel);
- gboolean (* resume_channel) (GCSoundMixerSDL * self,
- GCSoundChannel * channel);
+ gboolean (* resume_channel) (GcSoundMixerSdl * self,
+ GcSoundChannel * channel);
- gboolean (* halt_channel) (GCSoundMixerSDL * self,
- GCSoundChannel * channel);
+ gboolean (* halt_channel) (GcSoundMixerSdl * self,
+ GcSoundChannel * channel);
- gboolean (* play_item) (GCSoundMixerSDL * self,
- GCSoundChannel * channel,
- GCSoundItem * item);
+ gboolean (* play_item) (GcSoundMixerSdl * self,
+ GcSoundChannel * channel,
+ GcSoundItem * item);
- void (* channel_finished) (GCSoundMixerSDL * self,
- GCSoundChannel * channel);
+ void (* channel_finished) (GcSoundMixerSdl * self,
+ GcSoundChannel * channel);
- void (* destroy) (GCSoundMixerSDL *self);
+ void (* destroy) (GcSoundMixerSdl *self);
};
G_END_DECLS
diff --git a/src/gc_sound/src/gc-sound-mixer-private.h b/src/gc_sound/src/gc-sound-mixer-private.h
index 41ad6b6..f693e96 100644
--- a/src/gc_sound/src/gc-sound-mixer-private.h
+++ b/src/gc_sound/src/gc-sound-mixer-private.h
@@ -31,7 +31,7 @@
extern "C" {
#endif /* __cplusplus */
-struct _GCSoundMixerPrivate {
+struct _GcSoundMixerPrivate {
#line 52 "gc-sound-mixer-SDL.gob"
int audio_buffers;
#line 53 "gc-sound-mixer-SDL.gob"
diff --git a/src/gc_sound/src/gc-sound-mixer.c b/src/gc_sound/src/gc-sound-mixer.c
index 703e2e9..51e9531 100644
--- a/src/gc_sound/src/gc-sound-mixer.c
+++ b/src/gc_sound/src/gc-sound-mixer.c
@@ -20,21 +20,21 @@
#include <gc-sound-mixer-SDL.h>
gboolean
-gc_sound_mixer_open_audio (GCSoundMixer * self)
+gc_sound_mixer_open_audio (GcSoundMixer * self)
{
return GC_SOUND_MIXER_GET_CLASS(self)->open_audio (self);
}
gboolean
-gc_sound_mixer_close_audio (GCSoundMixer * self)
+gc_sound_mixer_close_audio (GcSoundMixer * self)
{
return GC_SOUND_MIXER_GET_CLASS(self)->close_audio (self);
}
-GCSoundChannel *
-gc_sound_mixer_new_channel (GCSoundMixer * self)
+GcSoundChannel *
+gc_sound_mixer_new_channel (GcSoundMixer * self)
{
- g_return_val_if_fail (GC_IS_SOUND_MIXER_SDL (self), (GCSoundChannel * )NULL);
+ g_return_val_if_fail (GC_IS_SOUND_MIXER_SDL (self), (GcSoundChannel * )NULL);
g_assert (GC_SOUND_MIXER_GET_CLASS(self)->new_channel != 0);
return GC_SOUND_MIXER_GET_CLASS(self)->new_channel (self);
@@ -42,44 +42,44 @@ gc_sound_mixer_new_channel (GCSoundMixer * self)
gboolean
-gc_sound_mixer_pause (GCSoundMixer * self)
+gc_sound_mixer_pause (GcSoundMixer * self)
{
return GC_SOUND_MIXER_GET_CLASS(self)->pause (self);
}
gboolean
-gc_sound_mixer_resume (GCSoundMixer * self)
+gc_sound_mixer_resume (GcSoundMixer * self)
{
return GC_SOUND_MIXER_GET_CLASS(self)->resume (self);
}
gboolean
-gc_sound_mixer_halt (GCSoundMixer * self)
+gc_sound_mixer_halt (GcSoundMixer * self)
{
return GC_SOUND_MIXER_GET_CLASS(self)->halt (self);
}
gboolean
-gc_sound_mixer_pause_channel (GCSoundMixer * self, GCSoundChannel * channel)
+gc_sound_mixer_pause_channel (GcSoundMixer * self, GcSoundChannel * channel)
{
return GC_SOUND_MIXER_GET_CLASS(self)->pause_channel (self, channel);
}
gboolean
-gc_sound_mixer_resume_channel (GCSoundMixer * self, GCSoundChannel * channel)
+gc_sound_mixer_resume_channel (GcSoundMixer * self, GcSoundChannel * channel)
{
return GC_SOUND_MIXER_GET_CLASS(self)->resume_channel (self, channel);
}
gboolean
-gc_sound_mixer_halt_channel (GCSoundMixer * self, GCSoundChannel * channel)
+gc_sound_mixer_halt_channel (GcSoundMixer * self, GcSoundChannel * channel)
{
return GC_SOUND_MIXER_GET_CLASS(self)->halt_channel (self, channel);
}
gboolean
-gc_sound_mixer_play_item (GCSoundMixer * self, GCSoundChannel * channel, GCSoundItem *item)
+gc_sound_mixer_play_item (GcSoundMixer * self, GcSoundChannel * channel, GcSoundItem *item)
{
return GC_SOUND_MIXER_GET_CLASS(self)->play_item (self, channel, item);
}
@@ -94,7 +94,7 @@ gc_sound_mixer_get_type (void)
static GType type = 0;
if (type == 0) {
static const GTypeInfo info = {
- sizeof (GCSoundMixerIface),
+ sizeof (GcSoundMixerIface),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gc_sound_mixer_iface_init, /* class_init */
@@ -104,7 +104,7 @@ gc_sound_mixer_get_type (void)
0, /* n_preallocs */
NULL /* instance_init */
};
- type = g_type_register_static (G_TYPE_INTERFACE, "GCSoundMixer", &info, 0);
+ type = g_type_register_static (G_TYPE_INTERFACE, "GcSoundMixer", &info, 0);
g_type_interface_add_prerequisite(type, G_TYPE_OBJECT);
}
return type;
diff --git a/src/gc_sound/src/gc-sound-mixer.h b/src/gc_sound/src/gc-sound-mixer.h
index 8bb8a9e..252c730 100644
--- a/src/gc_sound/src/gc-sound-mixer.h
+++ b/src/gc_sound/src/gc-sound-mixer.h
@@ -27,8 +27,8 @@ G_BEGIN_DECLS
/*
* Main interface structure
*/
-typedef struct _GCSoundMixer GCSoundMixer;
-typedef struct _GCSoundMixerIface GCSoundMixerIface;
+typedef struct _GcSoundMixer GcSoundMixer;
+typedef struct _GcSoundMixerIface GcSoundMixerIface;
G_END_DECLS
@@ -41,55 +41,55 @@ G_BEGIN_DECLS
* Type checking and casting macros
*/
#define GC_TYPE_SOUND_MIXER (gc_sound_mixer_get_type())
-#define GC_SOUND_MIXER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), GC_TYPE_SOUND_MIXER, GCSoundMixer)
+#define GC_SOUND_MIXER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), GC_TYPE_SOUND_MIXER, GcSoundMixer)
#define GC_IS_SOUND_MIXER(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), GC_TYPE_SOUND_MIXER)
-#define GC_SOUND_MIXER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_INTERFACE((obj), GC_TYPE_SOUND_MIXER, GCSoundMixerIface)
+#define GC_SOUND_MIXER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_INTERFACE((obj), GC_TYPE_SOUND_MIXER, GcSoundMixerIface)
GType gc_sound_mixer_get_type(void);
void _gc_sound_mixer_install_property (GObjectClass* go_class,
gboolean device_id);
-gboolean gc_sound_mixer_open_audio (GCSoundMixer * self);
-gboolean gc_sound_mixer_close_audio (GCSoundMixer * self);
+gboolean gc_sound_mixer_open_audio (GcSoundMixer * self);
+gboolean gc_sound_mixer_close_audio (GcSoundMixer * self);
-GCSoundChannel * gc_sound_mixer_new_channel (GCSoundMixer * self);
+GcSoundChannel * gc_sound_mixer_new_channel (GcSoundMixer * self);
-gboolean gc_sound_mixer_pause (GCSoundMixer * self);
-gboolean gc_sound_mixer_resume (GCSoundMixer * self);
-gboolean gc_sound_mixer_halt (GCSoundMixer * self);
+gboolean gc_sound_mixer_pause (GcSoundMixer * self);
+gboolean gc_sound_mixer_resume (GcSoundMixer * self);
+gboolean gc_sound_mixer_halt (GcSoundMixer * self);
-gboolean gc_sound_mixer_pause_channel (GCSoundMixer * self, GCSoundChannel * channel);
-gboolean gc_sound_mixer_resume_channel (GCSoundMixer * self, GCSoundChannel * channel);
-gboolean gc_sound_mixer_halt_channel (GCSoundMixer * self, GCSoundChannel * channel);
+gboolean gc_sound_mixer_pause_channel (GcSoundMixer * self, GcSoundChannel * channel);
+gboolean gc_sound_mixer_resume_channel (GcSoundMixer * self, GcSoundChannel * channel);
+gboolean gc_sound_mixer_halt_channel (GcSoundMixer * self, GcSoundChannel * channel);
-gboolean gc_sound_mixer_play_item (GCSoundMixer * self, GCSoundChannel * channel, GCSoundItem *item);
+gboolean gc_sound_mixer_play_item (GcSoundMixer * self, GcSoundChannel * channel, GcSoundItem *item);
-struct _GCSoundMixerIface {
+struct _GcSoundMixerIface {
GTypeInterface base_iface;
/* vtable */
- gboolean (* open_audio) (GCSoundMixer * self);
- gboolean (* close_audio) (GCSoundMixer * self);
+ gboolean (* open_audio) (GcSoundMixer * self);
+ gboolean (* close_audio) (GcSoundMixer * self);
- GCSoundChannel * (* new_channel) (GCSoundMixer * self);
+ GcSoundChannel * (* new_channel) (GcSoundMixer * self);
- gboolean (* pause) (GCSoundMixer * self);
- gboolean (* resume) (GCSoundMixer * self);
- gboolean (* halt) (GCSoundMixer * self);
+ gboolean (* pause) (GcSoundMixer * self);
+ gboolean (* resume) (GcSoundMixer * self);
+ gboolean (* halt) (GcSoundMixer * self);
- gboolean (* pause_channel) (GCSoundMixer * self,
- GCSoundChannel * channel);
+ gboolean (* pause_channel) (GcSoundMixer * self,
+ GcSoundChannel * channel);
- gboolean (* resume_channel) (GCSoundMixer * self,
- GCSoundChannel * channel);
+ gboolean (* resume_channel) (GcSoundMixer * self,
+ GcSoundChannel * channel);
- gboolean (* halt_channel) (GCSoundMixer * self,
- GCSoundChannel * channel);
+ gboolean (* halt_channel) (GcSoundMixer * self,
+ GcSoundChannel * channel);
- gboolean (* play_item) (GCSoundMixer * self,
- GCSoundChannel * channel,
- GCSoundItem *item);
+ gboolean (* play_item) (GcSoundMixer * self,
+ GcSoundChannel * channel,
+ GcSoundItem *item);
};
G_END_DECLS
diff --git a/src/gc_sound/src/gc-sound-object.c b/src/gc_sound/src/gc-sound-object.c
index b217a70..2ea347c 100644
--- a/src/gc_sound/src/gc-sound-object.c
+++ b/src/gc_sound/src/gc-sound-object.c
@@ -20,11 +20,11 @@
#include <gc-sound-object.h>
#include <gc-sound-marshallers.h>
-static void gc_sound_object_base_class_init (GCSoundObjectClass *class);
-static void gc_sound_object_base_class_finalize (GCSoundObjectClass *class);
-static void gc_sound_object_class_init (GCSoundObjectClass *klass);
-static void gc_sound_object_init (GCSoundObject *object,
- GCSoundObjectClass *klass);
+static void gc_sound_object_base_class_init (GcSoundObjectClass *class);
+static void gc_sound_object_base_class_finalize (GcSoundObjectClass *class);
+static void gc_sound_object_class_init (GcSoundObjectClass *klass);
+static void gc_sound_object_init (GcSoundObject *object,
+ GcSoundObjectClass *klass);
static void gc_sound_object_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -34,7 +34,7 @@ static void gc_sound_object_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gc_sound_object_dispose (GObject *object);
-static void gc_sound_object_real_destroy (GCSoundObject *object);
+static void gc_sound_object_real_destroy (GcSoundObject *object);
static void gc_sound_object_finalize (GObject *object);
enum {
@@ -51,7 +51,7 @@ static guint gc_sound_object_signals[LAST_SIGNAL] = { 0 };
static gpointer parent_class = NULL;
/****************************************************
- * GCSoundObject type, class and instance initialization
+ * GcSoundObject type, class and instance initialization
*
****************************************************/
@@ -64,19 +64,19 @@ gc_sound_object_get_type (void)
{
const GTypeInfo object_info =
{
- sizeof (GCSoundObjectClass),
+ sizeof (GcSoundObjectClass),
(GBaseInitFunc) gc_sound_object_base_class_init,
(GBaseFinalizeFunc) gc_sound_object_base_class_finalize,
(GClassInitFunc) gc_sound_object_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof (GCSoundObject),
+ sizeof (GcSoundObject),
16, /* n_preallocs */
(GInstanceInitFunc) gc_sound_object_init,
NULL, /* value_table */
};
- object_type = g_type_register_static (G_TYPE_INITIALLY_UNOWNED, "GCSoundObject",
+ object_type = g_type_register_static (G_TYPE_INITIALLY_UNOWNED, "GcSoundObject",
&object_info, G_TYPE_FLAG_ABSTRACT);
}
@@ -84,17 +84,17 @@ gc_sound_object_get_type (void)
}
static void
-gc_sound_object_base_class_init (GCSoundObjectClass *class)
+gc_sound_object_base_class_init (GcSoundObjectClass *class)
{
}
static void
-gc_sound_object_base_class_finalize (GCSoundObjectClass *class)
+gc_sound_object_base_class_finalize (GcSoundObjectClass *class)
{
}
static void
-gc_sound_object_class_init (GCSoundObjectClass *class)
+gc_sound_object_class_init (GcSoundObjectClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
@@ -118,7 +118,7 @@ gc_sound_object_class_init (GCSoundObjectClass *class)
PROP_PARENT,
g_param_spec_object ("parent",
"Parent Object",
- "GCSoundObject parent",
+ "GcSoundObject parent",
GC_TYPE_SOUND_OBJECT,
G_PARAM_READWRITE));
@@ -126,26 +126,26 @@ gc_sound_object_class_init (GCSoundObjectClass *class)
g_signal_new ("destroy",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_CLEANUP | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
- G_STRUCT_OFFSET (GCSoundObjectClass, destroy),
+ G_STRUCT_OFFSET (GcSoundObjectClass, destroy),
NULL, NULL,
gc_sound_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
static void
-gc_sound_object_init (GCSoundObject *object,
- GCSoundObjectClass *klass)
+gc_sound_object_init (GcSoundObject *object,
+ GcSoundObjectClass *klass)
{
// TRUE is default;
object->destroy_with_parent = TRUE;
}
/********************************************
- * Functions to end a GCSoundObject's life time
+ * Functions to end a GcSoundObject's life time
*
********************************************/
void
-gc_sound_object_destroy (GCSoundObject *object)
+gc_sound_object_destroy (GcSoundObject *object)
{
g_return_if_fail (object != NULL);
g_return_if_fail (GC_IS_SOUND_OBJECT (object));
@@ -158,7 +158,7 @@ gc_sound_object_destroy (GCSoundObject *object)
static void
gc_sound_object_dispose (GObject *gobject)
{
- GCSoundObject *object = GC_SOUND_OBJECT (gobject);
+ GcSoundObject *object = GC_SOUND_OBJECT (gobject);
/* guard against reinvocations during
* destruction with the GTK_IN_DESTRUCTION flag.
@@ -176,7 +176,7 @@ gc_sound_object_dispose (GObject *gobject)
}
static void
-gc_sound_object_real_destroy (GCSoundObject *object)
+gc_sound_object_real_destroy (GcSoundObject *object)
{
g_signal_handlers_destroy (object);
}
@@ -184,11 +184,11 @@ gc_sound_object_real_destroy (GCSoundObject *object)
static void
gc_sound_object_finalize (GObject *gobject)
{
- GCSoundObject *object = GC_SOUND_OBJECT (gobject);
+ GcSoundObject *object = GC_SOUND_OBJECT (gobject);
if (g_object_is_floating (object))
{
- g_warning ("GCSoundObject: A floating object was finalized. This means that someone\n"
+ g_warning ("GcSoundObject: A floating object was finalized. This means that someone\n"
"called g_object_unref() on an object that had only a floating\n"
"reference; the initial floating reference is not owned by anyone\n"
"and must be removed with g_object_ref_sink().");
@@ -198,12 +198,12 @@ gc_sound_object_finalize (GObject *gobject)
}
/*****************************************
- * GCSoundObject property handlers
+ * GcSoundObject property handlers
* comes directly from GtkObject
*
*****************************************/
static void
-parent_destroyed (GCSoundObject *object, gpointer data)
+parent_destroyed (GcSoundObject *object, gpointer data)
{
if (GC_SOUND_OBJECT(object)->parent) {
g_signal_handlers_disconnect_by_func(GC_SOUND_OBJECT(object)->parent, parent_destroyed, object);
diff --git a/src/gc_sound/src/gc-sound-object.h b/src/gc_sound/src/gc-sound-object.h
index 0b73bbd..144a3fc 100644
--- a/src/gc_sound/src/gc-sound-object.h
+++ b/src/gc_sound/src/gc-sound-object.h
@@ -24,15 +24,15 @@
G_BEGIN_DECLS
-typedef struct _GCSoundObject GCSoundObject;
-typedef struct _GCSoundObjectClass GCSoundObjectClass;
+typedef struct _GcSoundObject GcSoundObject;
+typedef struct _GcSoundObjectClass GcSoundObjectClass;
#define GC_TYPE_SOUND_OBJECT (gc_sound_object_get_type())
-#define GC_SOUND_OBJECT(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_OBJECT, GCSoundObject))
-#define GC_SOUND_OBJECT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_OBJECT, GCSoundObjectClass))
+#define GC_SOUND_OBJECT(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GC_TYPE_SOUND_OBJECT, GcSoundObject))
+#define GC_SOUND_OBJECT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GC_TYPE_SOUND_OBJECT, GcSoundObjectClass))
#define GC_IS_SOUND_OBJECT(i) (G_TYPE_CHECK_INSTANCE_TYPE((i), GC_TYPE_SOUND_OBJECT))
#define GC_IS_SOUND_OBJECT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE((c), GC_TYPE_SOUND_OBJECT))
-#define GC_SOUND_OBJECT_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_OBJECT, GCSoundObjectClass))
+#define GC_SOUND_OBJECT_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GC_TYPE_SOUND_OBJECT, GcSoundObjectClass))
GType gc_sound_object_get_type(void);
@@ -40,7 +40,7 @@ GType gc_sound_object_get_type(void);
typedef enum
{
GC_SOUND_IN_DESTRUCTION = 1 << 0, /* Used internally during dispose */
-} GCSoundObjectFlags;
+} GcSoundObjectFlags;
#define GC_SOUND_OBJECT_FLAGS(obj) (GC_SOUND_OBJECT (obj)->flags)
/* Macros for setting and clearing bits in the object_flags field of GtkObject.
@@ -48,26 +48,26 @@ typedef enum
#define GC_SOUND_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (GC_SOUND_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END
#define GC_SOUND_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (GC_SOUND_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END
-struct _GCSoundObject {
+struct _GcSoundObject {
GInitiallyUnowned __parent__;
guint32 flags;
// NULL on mixer; mixer on channel,; prent item on item
- GCSoundObject *parent;
+ GcSoundObject *parent;
gboolean destroy_with_parent;
//debug
gchar *nick;
};
-struct _GCSoundObjectClass {
+struct _GcSoundObjectClass {
GInitiallyUnownedClass base_class;
- void (*destroy) (GCSoundObject *object);
+ void (*destroy) (GcSoundObject *object);
};
-void gc_sound_object_destroy (GCSoundObject *object);
+void gc_sound_object_destroy (GcSoundObject *object);
G_END_DECLS
diff --git a/src/gc_sound/src/gc-sound.h b/src/gc_sound/src/gc-sound.h
index 228b193..1e64b4d 100644
--- a/src/gc_sound/src/gc-sound.h
+++ b/src/gc_sound/src/gc-sound.h
@@ -24,3 +24,4 @@
#include <gc-sound-mixer-SDL.h>
#include <gc-sound-channel.h>
#include <gc-sound-item.h>
+#include <gc-sound-enumerations.h>
diff --git a/src/gc_sound/src/test_gc_sound.c b/src/gc_sound/src/test_gc_sound.c
index 8e8722d..475888e 100644
--- a/src/gc_sound/src/test_gc_sound.c
+++ b/src/gc_sound/src/test_gc_sound.c
@@ -2,25 +2,25 @@
#include <gc-sound.h>
#include <stdio.h>
-void finish(GCSoundItem *item, gboolean stopped, gpointer data)
+void finish(GcSoundItem *item, gboolean stopped, gpointer data)
{
g_warning("Return of finish callback %s %s", GC_SOUND_OBJECT(item)->nick, stopped ? "STOPPED" : "normal");
}
-void start(GCSoundItem *item, gpointer data)
+void start(GcSoundItem *item, gpointer data)
{
g_warning("Return of start callback %s", GC_SOUND_OBJECT(item)->nick);
}
main (int argc, char *argv)
{
- GCSoundMixer *gcmix;
- GCSoundChannel* gcchan1, *gcchan2;
- GCSoundItem *item1, *item2, *item3, *root1, *root2, *item1_1, *item1_2;
+ GcSoundMixer *gcmix;
+ GcSoundChannel* gcchan1, *gcchan2;
+ GcSoundItem *item1, *item2, *item3, *root1, *root2, *item1_1, *item1_2;
g_type_init ();
/* Sound mixer opens SDL and audio device */
- gcmix = gc_sound_mixer_SDL_new();
+ gcmix = gc_sound_mixer_sdl_new();
GC_SOUND_OBJECT(gcmix)->nick = "gcmix";
/* We open two chans to play simultaneously */
@@ -29,7 +29,7 @@ main (int argc, char *argv)
GC_SOUND_OBJECT(gcchan1)->nick = "gcchan1";
GC_SOUND_OBJECT(gcchan2)->nick = "gcchan2";
- GCSoundMixer *gcmix2;
+ GcSoundMixer *gcmix2;
g_object_get(G_OBJECT(gcchan2), "parent", &gcmix2, NULL);
@@ -65,7 +65,7 @@ main (int argc, char *argv)
//policy test: works on channel and on item.
//gc_sound_channel_set_policy(gcchan2, GC_SOUND_INTERRUPT_AND_PLAY);
- gc_sound_item_set_policy(item3, GC_SOUND_INTERRUPT_AND_PLAY);
+ gc_sound_item_set_policy(item3, INTERRUPT_AND_PLAY);
// callback connection
//gc_sound_item_connect__play_finished(item2, (GCallback) finish, NULL);
@@ -99,8 +99,8 @@ main (int argc, char *argv)
g_usleep(3000000);
//this will stop item2 because of policy
- //gc_sound_item_play(item3);
- //gc_sound_object_destroy(GC_SOUND_OBJECT(gcchan2));
+ gc_sound_item_play(item3);
+ gc_sound_object_destroy(GC_SOUND_OBJECT(gcchan2));
gc_sound_object_destroy(GC_SOUND_OBJECT(item1));
g_usleep(3000000);