summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am23
-rwxr-xr-xbootstrap.sh39
-rw-r--r--configure.ac49
-rw-r--r--src/Makefile10
-rw-r--r--src/Makefile.am55
-rw-r--r--src/main.c7
-rw-r--r--src/sample.c4
7 files changed, 175 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..7266cba5
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,23 @@
+# $Id$
+#
+# This file is part of polypaudio.
+#
+# polypaudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# polypaudio 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 polypaudio; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+EXTRA_DIST = bootstrap.sh
+SUBDIRS=src
+
+distcleancheck:
+ @:
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 00000000..f26ceb15
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+# $Id$
+
+# This file is part of polypaudio.
+#
+# polypaudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# polypaudio 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 polypaudio; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+if [ "x$1" = "xam" ] ; then
+ set -ex
+ automake -a -c --foreign
+ ./config.status
+else
+ set -ex
+
+ rm -rf autom4te.cache
+ rm -f config.cache
+
+ aclocal
+ libtoolize -c --force
+ autoheader
+ automake -a -c
+ autoconf -Wall
+
+ ./configure --sysconfdir=/etc "$@"
+
+ make clean
+fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..de1a94ff
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,49 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# $Id$
+
+# This file is part of polypaudio.
+#
+# polypaudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# polypaudio 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 polypaudio; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+AC_PREREQ(2.57)
+AC_INIT([polypaudio],[0.0],[mzcbylcnhqvb (at) 0pointer (dot) de])
+AC_CONFIG_SRCDIR([src/main.c])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign -Wall])
+
+AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/polypaudio/])
+
+if type -p stow > /dev/null && test -d /usr/local/stow ; then
+ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+ ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
+fi
+
+# Checks for programs.
+AC_PROG_CC
+AC_LIBLTDL_INSTALLABLE
+AC_SUBST(INCLTDL)
+AC_SUBST(LIBLTDL)
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+
+# If using GCC specifiy some additional parameters
+if test "x$GCC" = "xyes" ; then
+ CFLAGS="$CFLAGS -pipe -Wall"
+fi
+
+AC_CONFIG_FILES([Makefile src/Makefile])
+AC_OUTPUT
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 366e84e6..00000000
--- a/src/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-CFLAGS=-Wall -pipe -ansi -D_GNU_SOURCE
-
-all: idxset.o queue.o strbuf.o mainloop.o iochannel.o packet.o \
- memblock.o sample.o socket-server.o memblockq.o client.o \
- core.o main.o outputstream.o inputstream.o source.o sink.o \
- pstream.o protocol-simple.o protocol-simple-tcp.o sink-pipe.o \
- module.o
-
-clean:
- rm -f *.o
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 00000000..c64babb3
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,55 @@
+# $Id: Makefile.am 27 2003-10-22 22:34:06Z lennart $
+#
+# This file is part of polypaudio.
+#
+# polypaudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# polypaudio 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 polypaudio; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+AM_CFLAGS=-ansi -D_GNU_SOURCE
+
+bin_PROGRAMS = polypaudio
+
+pkglib_LTLIBRARIES=protocol-simple.la protocol-simple-tcp.la \
+ socket-server.la sink-pipe.la pstream.la iochannel.la packet.la
+
+polypaudio_SOURCES = idxset.c queue.c strbuf.c mainloop.c \
+ memblock.c sample.c memblockq.c client.c \
+ core.c main.c outputstream.c inputstream.c source.c sink.c \
+ module.c
+polypaudio_INCLUDES = $(INCLTDL)
+polypaudio_LDADD = $(LIBLTDL)
+polypaudio_LDFLAGS=-export-dynamic
+
+protocol_simple_la_SOURCES = protocol-simple.c
+protocol_simple_la_LDFLAGS = -module -avoid-version
+
+protocol_simple_tcp_la_SOURCES = protocol-simple-tcp.c
+protocol_simple_tcp_la_LDFLAGS = -module -avoid-version
+protocol_simple_tcp_la_LIBADD = protocol-simple.la socket-server.la
+
+socket_server_la_SOURCES = socket-server.c
+socket_server_la_LDFLAGS = -module -avoid-version
+
+sink_pipe_la_SOURCES = sink-pipe.c
+sink_pipe_la_LDFLAGS = -module -avoid-version
+
+pstream_la_SOURCES = pstream.c
+pstream_la_LDFLAGS = -module -avoid-version
+
+iochannel_la_SOURCES = pstream.c
+iochannel_la_LDFLAGS = -module -avoid-version
+
+packet_la_SOURCES = pstream.c
+packet_la_LDFLAGS = -module -avoid-version
+
diff --git a/src/main.c b/src/main.c
index 3104c264..0785b39c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,6 @@
#include <stddef.h>
#include <assert.h>
+#include <ltdl.h>
#include "core.h"
#include "mainloop.h"
@@ -8,7 +9,11 @@
int main(int argc, char *argv[]) {
struct mainloop *m;
struct core *c;
+ int r;
+ r = lt_dlinit();
+ assert(r == 0);
+
m = mainloop_new();
assert(m);
c = core_new(m);
@@ -21,6 +26,8 @@ int main(int argc, char *argv[]) {
core_free(c);
mainloop_free(m);
+
+ lt_dlexit();
return 0;
}
diff --git a/src/sample.c b/src/sample.c
index 74a54937..2e46eac7 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -10,7 +10,7 @@ struct sample_spec default_sample_spec = {
};
struct memblock *silence(struct memblock* b, struct sample_spec *spec) {
- char c;
+ char c = 0;
assert(b && spec);
memblock_assert_exclusive(b);
@@ -53,7 +53,7 @@ void add_clip(struct memchunk *target, struct memchunk *chunk, struct sample_spe
size_t sample_size(struct sample_spec *spec) {
assert(spec);
- size_t b;
+ size_t b = 1;
switch (spec->format) {
case SAMPLE_U8: