]> code.delx.au - pulseaudio/commitdiff
autoconf
authorLennart Poettering <lennart@poettering.net>
Fri, 11 Jun 2004 00:33:43 +0000 (00:33 +0000)
committerLennart Poettering <lennart@poettering.net>
Fri, 11 Jun 2004 00:33:43 +0000 (00:33 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@5 fefdeb5f-60dc-0310-8127-8f9354f1896f

Makefile.am [new file with mode: 0644]
bootstrap.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
src/Makefile [deleted file]
src/Makefile.am [new file with mode: 0644]
src/main.c
src/sample.c

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..7266cba
--- /dev/null
@@ -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 (executable)
index 0000000..f26ceb1
--- /dev/null
@@ -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 (file)
index 0000000..de1a94f
--- /dev/null
@@ -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 (file)
index 366e84e..0000000
+++ /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 (file)
index 0000000..c64babb
--- /dev/null
@@ -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 
+
index 3104c26492b4ce0b9606e4e902608ea853557d8b..0785b39c6f5d0ffb545e965073fdfb4da9a21ec4 100644 (file)
@@ -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;
 }
index 74a54937ba4af54e22470141f244c1270222b478..2e46eac768d35b053bb9795b65ae02d63145ed30 100644 (file)
@@ -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: