From 1f11ee3c8b392a68685875478637ce875de85da2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 5 Jan 2006 13:07:00 +0000 Subject: [PATCH] Big cleanup of the build structure. * configure.ac is divided into distinct sections for programs, headers, optional components, etc. * polyp/Makefile.am is organised into several sections instead of a big mess. * Conditionals are only for adding things to the primaries, not around their build rules. * polypcore has been brought up to date in preparation for the Windows port. It is not possible to use the current tricks there. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@362 fefdeb5f-60dc-0310-8127-8f9354f1896f --- Makefile.am | 6 +- acinclude.m4 | 41 ++ configure.ac | 280 ++++++++---- polyp/Makefile.am | 1271 +++++++++++++++++++++++++++++------------------------ 4 files changed, 927 insertions(+), 671 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7935321..a6a012a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ # USA. EXTRA_DIST = bootstrap.sh README LICENSE doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in libtool.m4 ltdl.m4 -SUBDIRS=polyp doc libltdl +SUBDIRS=libltdl polyp doc MAINTAINERCLEANFILES=README noinst_DATA = README @@ -49,8 +49,8 @@ homepage: all dist doxygen cp -a doxygen/html/* $$HOME/homepage/private/projects/polypaudio/doxygen cp $$HOME/homepage/private/projects/polypaudio/README.html $$HOME/homepage/private/projects/polypaudio/index.html -distcleancheck: - @: +#distcleancheck: +# @: doxygen: $(MAKE) -C doxygen doxygen diff --git a/acinclude.m4 b/acinclude.m4 index bedf51c..02f271b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -197,3 +197,44 @@ else fi AC_LANG_RESTORE ])dnl ACX_PTHREAD + +AC_DEFUN([AC_CHECK_DEFINE],[ +AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl +AC_CACHE_CHECK([for $1 defined], ac_var, +AC_TRY_COMPILE([#include <$2>],[ + #ifdef $1 + int ok; + #else + choke me + #endif +],AS_VAR_SET(ac_var, yes),AS_VAR_SET(ac_var, no))) +AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl +AS_VAR_POPDEF([ac_var])dnl +]) + +AC_DEFUN([ACX_LIBWRAP], [ +LIBWRAP_LIBS= +saved_LIBS="$LIBS" +LIBS="$LIBS -lwrap" +AC_MSG_CHECKING([for tcpwrap library and headers]) +AC_LINK_IFELSE( +AC_LANG_PROGRAM( +[#include +#include +int allow_severity = LOG_INFO; +int deny_severity = LOG_WARNING;], +[struct request_info *req; +return hosts_access (req);]), +[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?]) +LIBWRAP_LIBS="-lwrap" +AC_MSG_RESULT(yes)], +[AC_MSG_RESULT(no)]) +LIBS="$saved_LIBS" +]) + +AC_DEFUN([ACX_LIRC], [ +LIRC_CFLAGS= +LIRC_LIBS= +AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1 +LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0) +]) diff --git a/configure.ac b/configure.ac index 1254134..362077f 100644 --- a/configure.ac +++ b/configure.ac @@ -35,18 +35,60 @@ if type -p stow > /dev/null && test -d /usr/local/stow ; then ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}" fi -# Checks for programs. +#### Checks for programs. #### + +# CC + AC_PROG_CC +AC_PROG_GCC_TRADITIONAL + +# If using GCC specify some additional parameters +if test "x$GCC" = "xyes" ; then + CFLAGS="$CFLAGS -pipe -W -Wall -pedantic" + + AC_LANG_CONFTEST([int main() {}]) + $CC -c conftest.c -std=gnu9x -Wno-unused-parameter $CFLAGS > /dev/null 2> /dev/null && CFLAGS="$CFLAGS -std=gnu9x -Wno-unused-parameter" + rm -f conftest.o +fi + +# M4 -# libtool stuff +AC_PATH_PROG([M4], [m4 gm4], [no]) +if test "x$M4" = xno ; then + AC_MSG_ERROR([m4 missing]) +fi + +# LYNX documentation generation +AC_ARG_ENABLE(lynx, + AC_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation), +[case "${enableval}" in + yes) lynx=yes ;; + no) lynx=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;; +esac],[lynx=yes]) + +if test x$lynx = xyes ; then + AC_CHECK_PROG(have_lynx, lynx, yes, no) + + if test x$have_lynx = xno ; then + AC_MSG_WARN([*** lynx not found, plain text README will not be built ***]) + fi +fi + +AM_CONDITIONAL([USE_LYNX], [test "x$have_lynx" = xyes]) + +#### libtool stuff #### + +AC_LTDL_ENABLE_INSTALL AC_LIBLTDL_INSTALLABLE AC_SUBST(LTDLINCL) AC_SUBST(LIBLTDL) AC_LIBTOOL_DLOPEN +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_CONFIG_SUBDIRS(libltdl) -if test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then +if test "x$enable_ltdl_install" = "xno" && test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then AC_MSG_ERROR([[ *** Cannot find the libltdl development files. @@ -54,93 +96,167 @@ if test "x$ac_cv_lib_ltdl_lt_dlinit" = "xno" ; then ]]) fi -# Checks for header files. +#### Determine build environment #### + +os_is_win32=0 + +case "$host_os" in + mingw*) + AC_DEFINE([OS_IS_WIN32], 1, [Build target is Windows.]) + os_is_win32=1 + ;; + esac + +AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1") + +################################### +# Basic environment checks # +################################### + +#### Checks for header files. #### + +# ISO AC_HEADER_STDC -AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h syslog.h]) -ACX_PTHREAD -AC_PATH_XTRA +# POSIX +AC_CHECK_HEADERS([glob.h grp.h netdb.h netinet/in.h netinet/tcp.h pwd.h \ + sched.h sys/capability.h sys/resource.h sys/select.h sys/socket.h \ + syslog.h]) +AC_CHECK_HEADERS([regex.h], [HAVE_REGEX=1], [HAVE_REGEX=0]) +AC_CHECK_HEADERS([sys/un.h], [HAVE_AF_UNIX=1], [HAVE_AF_UNIX=0]) -HAVE_X11=0 -test "x$no_x" != "xyes" && HAVE_X11=1 -AC_SUBST(HAVE_X11) -AM_CONDITIONAL(HAVE_X11, test "x$no_x" != "xyes") -if test "x$no_x" != "xyes" ; then - AC_DEFINE([HAVE_X11], 1, [Have X11]) -fi +AM_CONDITIONAL(HAVE_REGEX, test "x$HAVE_REGEX" = "x1") +AM_CONDITIONAL(HAVE_AF_UNIX, test "x$HAVE_AF_UNIX" = "x1") + +# XPG4-UNIX +AC_CHECK_HEADERS([sys/poll.h]) + +# Linux +AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0]) + +AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"]) + +# Windows +AC_CHECK_HEADERS([winsock2.h ws2tcpip.h]) + +# Other +AC_CHECK_HEADERS([sys/ioctl.h]) + +#### Typdefs, structures, etc. #### -# Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +AC_C_BIGENDIAN AC_TYPE_PID_T AC_TYPE_SIZE_T +AC_CHECK_TYPES(ssize_t, , [AC_DEFINE([ssize_t], [signed long], + [Define ssize_t if it is not done by the standard libs.])]) AC_TYPE_OFF_T -AC_HEADER_TIME - -# Checks for library functions. -AC_FUNC_FORK -AC_PROG_GCC_TRADITIONAL -AC_FUNC_LSTAT -AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK -AC_FUNC_MALLOC -AC_FUNC_MEMCMP -AC_FUNC_MMAP -AC_FUNC_REALLOC -AC_FUNC_SETPGRP -AC_FUNC_VPRINTF -AC_FUNC_CLOSEDIR_VOID -AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_TYPE_UID_T -AC_CHECK_FUNCS([gethostname gettimeofday memchr memmove memset mkdir mkfifo munmap rmdir socket strcspn strerror strrchr strspn strstr strtol strtoul strcasecmp putenv strchr strpbrk strdup getgrgid_r getpwuid_r regcomp ftruncate select]) -AC_CHECK_LIB(m, pow) -AC_CHECK_FUNCS(pow) -AC_FUNC_STAT -AC_HEADER_SYS_WAIT -AC_HEADER_DIRENT -AC_C_BIGENDIAN +AC_CHECK_DEFINE([SIGXCPU], [signal.h]) +AM_CONDITIONAL(HAVE_SIGXCPU, test "x$HAVE_SIGXCPU" = "x1") + +#### Check for functions #### + +# ISO +AC_CHECK_LIB([m], [pow]) + +# POSIX +AC_FUNC_FORK AC_FUNC_GETGROUPS +AC_FUNC_SELECT_ARGTYPES +AC_CHECK_FUNCS([ftruncate getgrgid_r getpwuid_r gettimeofday getuid \ + inet_ntop mkfifo nanosleep sigaction sleep]) -AC_CHECK_LIB(cap, cap_init, [CAP_LIBS='-lcap'], [CAP_LIBS='']) -AC_SUBST(CAP_LIBS) +AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1") -AC_CHECK_HEADERS(sys/capability.h) +# X/OPEN +AC_CHECK_FUNCS([readlink]) + +# SUSv2 +AC_CHECK_FUNCS([ctime_r usleep]) + +# Non-standard AC_CHECK_FUNCS(setresuid) AC_CHECK_FUNCS(setreuid) +#### POSIX threads #### + +ACX_PTHREAD + +################################### +# External libraries # +################################### + +#### X11 (optional) #### + +HAVE_X11=0 + +# The macro tests the host, not the build target +if test "x$os_is_win32" != "x1" ; then + AC_PATH_XTRA + test "x$no_x" != "xyes" && HAVE_X11=1 +fi + +AC_SUBST(HAVE_X11) +AM_CONDITIONAL(HAVE_X11, test "x$HAVE_X11" = "x1") +if test "x$HAVE_X11" = "x1" ; then + AC_DEFINE([HAVE_X11], 1, [Have X11]) +fi + +#### Capabilities (optional) #### + +AC_CHECK_LIB(cap, cap_init, [CAP_LIBS='-lcap'], [CAP_LIBS='']) +AC_SUBST(CAP_LIBS) + +#### Sample rate conversion #### + PKG_CHECK_MODULES(LIBSAMPLERATE, [ samplerate >= 0.1.0 ]) AC_SUBST(LIBSAMPLERATE_CFLAGS) AC_SUBST(LIBSAMPLERATE_LIBS) +#### Sound file #### + PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ]) AC_SUBST(LIBSNDFILE_CFLAGS) AC_SUBST(LIBSNDFILE_LIBS) +#### ALSA support (optional) #### + PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ], [HAVE_ALSA=1], [HAVE_ALSA=0]) AC_SUBST(ASOUNDLIB_CFLAGS) AC_SUBST(ASOUNDLIB_LIBS) AC_SUBST(HAVE_ALSA) AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1]) +#### GLib 2 support (optional) #### + PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ], HAVE_GLIB20=1, HAVE_GLIB20=0) AC_SUBST(GLIB20_CFLAGS) AC_SUBST(GLIB20_LIBS) AC_SUBST(HAVE_GLIB20) AM_CONDITIONAL([HAVE_GLIB20], [test "x$HAVE_GLIB20" = x1]) +#### GLib 1 support (optional) #### + PKG_CHECK_MODULES(GLIB12, [ glib >= 1.2.0 ], HAVE_GLIB12=1, HAVE_GLIB12=0) AC_SUBST(GLIB12_CFLAGS) AC_SUBST(GLIB12_LIBS) AC_SUBST(HAVE_GLIB12) AM_CONDITIONAL([HAVE_GLIB12], [test "x$HAVE_GLIB12" = x1]) +#### Howl support (optional) #### + PKG_CHECK_MODULES(HOWL, [ howl >= 0.9.8 ], HAVE_HOWL=1, HAVE_HOWL=0) AC_SUBST(HOWL_CFLAGS) AC_SUBST(HOWL_LIBS) AC_SUBST(HAVE_HOWL) AM_CONDITIONAL([HAVE_HOWL], [test "x$HAVE_HOWL" = x1]) +#### Async DNS support (optional) #### + PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ], HAVE_LIBASYNCNS=1, HAVE_LIBASYNCNS=0) AC_SUBST(LIBASYNCNS_CFLAGS) AC_SUBST(LIBASYNCNS_LIBS) @@ -151,70 +267,42 @@ if test "x$HAVE_LIBASYNCNS" != "x0" ; then AC_DEFINE([HAVE_LIBASYNCNS], 1, [Have libasyncns?]) fi -AC_PATH_PROG([M4], [m4 gm4], [no]) -if test "x$M4" = xno ; then - AC_MSG_ERROR([m4 missing]) -fi +#### TCP wrappers (optional) #### -AC_MSG_CHECKING([for tcpwrap library and headers]) -LIBWRAP_LIBS= -saved_LIBS="$LIBS" -LIBS="$LIBS -lwrap" -AC_LINK_IFELSE( -AC_LANG_PROGRAM( -[#include -#include -int allow_severity = LOG_INFO; -int deny_severity = LOG_WARNING;], -[struct request_info *req; -return hosts_access (req);]), -[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?]) -LIBWRAP_LIBS="-lwrap" -AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) +ACX_LIBWRAP AC_SUBST(LIBWRAP_LIBS) -LIBS="$saved_LIBS" -LIRC_CFLAGS= -LIRC_LIBS= -AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1 -LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0) +#### LIRC support (optional) #### + +ACX_LIRC AC_SUBST(LIRC_CFLAGS) AC_SUBST(LIRC_LIBS) AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1]) -AC_CHECK_HEADER(linux/input.h,HAVE_EVDEV=1,HAVE_EVDEV=0) -AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = x1]) - -# If using GCC specify some additional parameters -if test "x$GCC" = "xyes" ; then - CFLAGS="$CFLAGS -pipe -W -Wall -pedantic" - - AC_LANG_CONFTEST([int main() {}]) - $CC -c conftest.c -std=c99 -Wno-unused-parameter $CFLAGS > /dev/null 2> /dev/null && CFLAGS="$CFLAGS -std=c99 -Wno-unused-parameter" - rm -f conftest.o -fi - -# LYNX documentation generation -AC_ARG_ENABLE(lynx, - AC_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation), -[case "${enableval}" in - yes) lynx=yes ;; - no) lynx=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;; -esac],[lynx=yes]) - -if test x$lynx = xyes ; then - AC_CHECK_PROG(have_lynx, lynx, yes, no) - - if test x$have_lynx = xno ; then - AC_MSG_WARN([*** lynx not found, plain text README will not be built ***]) - fi -fi - -AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes]) +################################### +# Output # +################################### AM_CONDITIONAL(BUILD_LIBPOLYPCORE, false) -AC_CONFIG_FILES([Makefile polyp/Makefile polyplib.pc polyplib-simple.pc polyplib-mainloop.pc polyplib-browse.pc polyplib-error.pc polyplib-glib-mainloop.pc polyplib-glib12-mainloop.pc doc/Makefile doc/README.html doc/cli.html doc/daemon.html doc/modules.html doxygen/Makefile doxygen/doxygen.conf polyp/polyplib-version.h doc/FAQ.html]) +AC_CONFIG_FILES([ +Makefile +polyp/Makefile +polyplib.pc +polyplib-simple.pc +polyplib-mainloop.pc +polyplib-browse.pc +polyplib-error.pc +polyplib-glib-mainloop.pc +polyplib-glib12-mainloop.pc +doc/Makefile +doc/README.html +doc/cli.html +doc/daemon.html +doc/modules.html +doxygen/Makefile +doxygen/doxygen.conf +polyp/polyplib-version.h +doc/FAQ.html +]) AC_OUTPUT diff --git a/polyp/Makefile.am b/polyp/Makefile.am index 389cb0d..847be9a 100644 --- a/polyp/Makefile.am +++ b/polyp/Makefile.am @@ -17,72 +17,440 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. + +################################### +# Extra directories # +################################### + polypincludedir=$(includedir)/polyp polypconfdir=$(sysconfdir)/polypaudio modlibdir=$(libdir)/polypaudio-@PA_MAJORMINOR@ -AM_CFLAGS=-D_GNU_SOURCE -I$(top_srcdir) $(PTHREAD_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS) -AM_CFLAGS+=-DDLSEARCHPATH=\"$(modlibdir)\" -AM_CFLAGS+=-DDEFAULT_CONFIG_DIR=\"$(polypconfdir)\" -AM_CFLAGS+=-DPOLYPAUDIO_BINARY=\"$(bindir)/polypaudio\" +################################### +# Compiler/linker flags # +################################### + +AM_CFLAGS = -D_GNU_SOURCE -I$(top_srcdir) +AM_CFLAGS += $(PTHREAD_CFLAGS) $(LTDLINCL) +AM_CFLAGS += $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS) +AM_CFLAGS += -DDLSEARCHPATH=\"$(modlibdir)\" +AM_CFLAGS += -DDEFAULT_CONFIG_DIR=\"$(polypconfdir)\" +AM_CFLAGS += -DPOLYPAUDIO_BINARY=\"$(bindir)/polypaudio$(EXEEXT)\" # This cool debug trap works on i386/gcc only -AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' +AM_CFLAGS += '-DDEBUG_TRAP=__asm__("int $$3")' + +AM_LIBADD = $(PTHREAD_LIBS) +AM_LDADD = $(PTHREAD_LIBS) + +# Only required on some platforms but defined for all to avoid errors +AM_LDFLAGS = -no-undefined + +if OS_IS_WIN32 +AM_LDFLAGS+=-Wl,--export-all-symbols +WINSOCK_LIBS=-lwsock32 -lws2_32 -lwininet +endif -AM_LIBADD=$(PTHREAD_LIBS) -lm -AM_LDADD=$(PTHREAD_LIBS) -lm +################################### +# Extra files # +################################### -EXTRA_DIST = default.pa.in daemon.conf.in client.conf.in depmod.py esdcompat.sh.in module-defs.h.m4 -bin_PROGRAMS = \ - polypaudio \ +EXTRA_DIST = \ + client.conf.in \ + daemon.conf.in \ + default.pa.in \ + depmod.py \ + esdcompat.sh.in \ + module-defs.h.m4 + +polypconf_DATA = default.pa daemon.conf client.conf + +BUILT_SOURCES = polyplib-version.h + +################################### +# Main daemon # +################################### + +bin_PROGRAMS = polypaudio + +polypaudio_SOURCES = \ + caps.h caps.c \ + cmdline.c cmdline.h \ + cpulimit.c cpulimit.h \ + conf-parser.h conf-parser.c \ + daemon-conf.c daemon-conf.h \ + dumpmodules.c dumpmodules.h \ + gcc-printf.h \ + main.c \ + pid.c pid.h + +polypaudio_CFLAGS = $(AM_CFLAGS) +polypaudio_CPPFLAGS = $(AM_CPPFLAGS) +polypaudio_LDADD = $(AM_LDADD) libpolypcore.la $(LIBLTDL) \ + $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(CAP_LIBS) +polypaudio_LDFLAGS= $(AM_LDFLAGS) -dlopen force +#q-static $(foreach f,$(modlib_LTLIBRARIES),-dlpreopen $(f)) + +################################### +# Utility programs # +################################### + +bin_PROGRAMS += \ pacat \ pactl \ - paplay \ - pacmd + paplay + +if HAVE_AF_UNIX +bin_PROGRAMS += pacmd +endif + +if HAVE_X11 +bin_PROGRAMS += pax11publish +endif + +if HAVE_HOWL +bin_PROGRAMS += pabrowse +endif bin_SCRIPTS = esdcompat.sh +pacat_SOURCES = pacat.c +pacat_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la +pacat_CFLAGS = $(AM_CFLAGS) + +paplay_SOURCES = paplay.c +paplay_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS) +paplay_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS) + +pactl_SOURCES = pactl.c +pactl_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS) +pactl_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS) + +pacmd_SOURCES = pacmd.c util.c util.h xmalloc.c xmalloc.h log.c log.h pid.c pid.h +pacmd_CFLAGS = $(AM_CFLAGS) +pacmd_LDADD = $(AM_LDADD) + +pax11publish_SOURCES = pax11publish.c util.c util.h xmalloc.c xmalloc.h log.c log.h authkey.c authkey.h client-conf.c client-conf.h conf-parser.c conf-parser.h x11prop.c x11prop.h random.c random.h +pax11publish_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) +pax11publish_LDADD = $(AM_LDADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) + +pabrowse_SOURCES = pabrowse.c +pabrowse_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la libpolyp-browse-@PA_MAJORMINOR@.la +pabrowse_CFLAGS = $(AM_CFLAGS) + +################################### +# Test programs # +################################### + noinst_PROGRAMS = \ mainloop-test \ + mcalign-test \ pacat-simple \ parec-simple \ - cpulimit-test \ - cpulimit-test2 \ - voltest \ strlist-test \ - mcalign-test + voltest + +if HAVE_SIGXCPU +noinst_PROGRAMS += \ + cpulimit-test \ + cpulimit-test2 +endif + +if HAVE_GLIB20 +noinst_PROGRAMS += \ + mainloop-test-glib +endif + +if HAVE_GLIB12 +noinst_PROGRAMS += \ + mainloop-test-glib12 +endif + +mainloop_test_SOURCES = mainloop-test.c +mainloop_test_CFLAGS = $(AM_CFLAGS) +mainloop_test_LDADD = $(AM_LDADD) libpolyp-mainloop-@PA_MAJORMINOR@.la libpolyp-@PA_MAJORMINOR@.la + +mcalign_test_SOURCES = mcalign-test.c util.c util.h xmalloc.c xmalloc.h log.c log.h mcalign.c mcalign.h memchunk.c memchunk.h memblock.c memblock.h +mcalign_test_CFLAGS = $(AM_CFLAGS) +mcalign_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) + +pacat_simple_SOURCES = pacat-simple.c +pacat_simple_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-simple-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la +pacat_simple_CFLAGS = $(AM_CFLAGS) -polypconf_DATA=default.pa daemon.conf client.conf +parec_simple_SOURCES = parec-simple.c +parec_simple_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-simple-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la +parec_simple_CFLAGS = $(AM_CFLAGS) + +strlist_test_SOURCES = strlist-test.c strlist.c strlist.h strbuf.c strbuf.h util.c util.h xmalloc.c xmalloc.h log.c log.h +strlist_test_CFLAGS = $(AM_CFLAGS) +strlist_test_LDADD = $(AM_LDADD) $(WINSOCK_LIBS) + +voltest_SOURCES = voltest.c sample.c +voltest_CFLAGS = $(AM_CFLAGS) +voltest_LDADD = $(AM_LDADD) + +cpulimit_test_SOURCES = cpulimit-test.c cpulimit.c util.c log.c cpulimit.h util.h log.h +cpulimit_test_CFLAGS = $(AM_CFLAGS) +cpulimit_test_LDADD = $(AM_LDADD) libpolyp-mainloop-@PA_MAJORMINOR@.la + +cpulimit_test2_SOURCES = cpulimit-test.c cpulimit.c util.c log.c cpulimit.h util.h log.h +cpulimit_test2_CFLAGS = $(AM_CFLAGS) -DTEST2 +cpulimit_test2_LDADD = $(AM_LDADD) libpolyp-mainloop-@PA_MAJORMINOR@.la + +mainloop_test_glib_SOURCES = $(mainloop_test_SOURCES) +mainloop_test_glib_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB20_CFLAGS) -DGLIB_MAIN_LOOP +mainloop_test_glib_LDADD = $(mainloop_test_LDADD) $(GLIB20_LIBS) libpolyp-mainloop-glib-@PA_MAJORMINOR@.la + +mainloop_test_glib12_SOURCES = $(mainloop_test_SOURCES) +mainloop_test_glib12_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB12_CFLAGS) -DGLIB_MAIN_LOOP +mainloop_test_glib12_LDADD = $(mainloop_test_LDADD) $(GLIB12_LIBS) libpolyp-mainloop-glib12-@PA_MAJORMINOR@.la -BUILT_SOURCES=polyplib-version.h +################################### +# Client library # +################################### -polypinclude_HEADERS= \ +polypinclude_HEADERS = \ + cdecl.h \ + glib-mainloop.h \ + mainloop.h \ + mainloop-api.h \ + mainloop-signal.h \ polyplib.h \ + polyplib-context.h \ polyplib-def.h \ - polyplib-simple.h \ polyplib-error.h \ - polyplib-stream.h \ - polyplib-context.h \ polyplib-introspect.h \ - polyplib-subscribe.h \ polyplib-operation.h \ polyplib-scache.h \ + polyplib-simple.h \ + polyplib-stream.h \ + polyplib-subscribe.h \ polyplib-version.h \ - cdecl.h \ - mainloop-api.h \ - mainloop.h \ - mainloop-signal.h \ sample.h \ - glib-mainloop.h \ typeid.h +if HAVE_HOWL +polypinclude_HEADERS += \ + polyplib-browser.h +endif + +lib_LTLIBRARIES = \ + libpolyp-@PA_MAJORMINOR@.la \ + libpolyp-error-@PA_MAJORMINOR@.la \ + libpolyp-mainloop-@PA_MAJORMINOR@.la \ + libpolyp-simple-@PA_MAJORMINOR@.la + +if HAVE_HOWL +lib_LTLIBRARIES += \ + libpolyp-browse-@PA_MAJORMINOR@.la +endif + +if HAVE_GLIB20 +lib_LTLIBRARIES += \ + libpolyp-mainloop-glib-@PA_MAJORMINOR@.la +endif + +if HAVE_GLIB12 +lib_LTLIBRARIES += \ + libpolyp-mainloop-glib12-@PA_MAJORMINOR@.la +endif + +libpolyp_@PA_MAJORMINOR@_la_SOURCES = \ + authkey.c authkey.h \ + cdecl.h \ + client-conf.c client-conf.h \ + conf-parser.c conf-parser.h \ + dynarray.c dynarray.h \ + gcc-printf.h \ + idxset.c idxset.h \ + iochannel.c iochannel.h \ + llist.h \ + log.c log.h \ + mainloop-api.c mainloop-api.h \ + mcalign.c mcalign.h \ + memblock.c memblock.h \ + memchunk.c memchunk.h \ + native-common.h \ + packet.c packet.h \ + parseaddr.c parseaddr.h \ + pdispatch.c pdispatch.h \ + polyplib.h \ + polyplib-context.c polyplib-context.h \ + polyplib-def.h \ + polyplib-internal.h \ + polyplib-introspect.c polyplib-introspect.h \ + polyplib-operation.c polyplib-operation.h \ + polyplib-scache.c polyplib-scache.h \ + polyplib-stream.c polyplib-stream.h \ + polyplib-subscribe.c polyplib-subscribe.h \ + pstream.c pstream.h \ + pstream-util.c pstream-util.h \ + queue.c queue.h \ + random.c random.h \ + sample.c sample.h \ + socket-client.c socket-client.h \ + socket-util.c socket-util.h \ + strbuf.c strbuf.h \ + strlist.c strlist.h \ + tagstruct.c tagstruct.h \ + typeid.c typeid.h \ + util.c util.h \ + xmalloc.c xmalloc.h + +if HAVE_X11 +libpolyp_@PA_MAJORMINOR@_la_SOURCES += \ + client-conf-x11.c client-conf-x11.h \ + x11prop.c x11prop.h +endif + +libpolyp_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) +libpolyp_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 +libpolyp_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) + +if HAVE_X11 +libpolyp_@PA_MAJORMINOR@_la_CFLAGS += $(X_CFLAGS) +libpolyp_@PA_MAJORMINOR@_la_LDFLAGS += $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) +endif + +if HAVE_LIBASYNCNS +libpolyp_@PA_MAJORMINOR@_la_CFLAGS += $(LIBASYNCNS_CFLAGS) +libpolyp_@PA_MAJORMINOR@_la_LIBADD += $(LIBASYNCNS_LIBS) +endif + +libpolyp_error_@PA_MAJORMINOR@_la_SOURCES = polyplib-error.c polyplib-error.h +libpolyp_error_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) +libpolyp_error_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la +libpolyp_error_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 + +libpolyp_mainloop_@PA_MAJORMINOR@_la_SOURCES = \ + mainloop.c mainloop.h \ + mainloop-api.h mainloop-api.c \ + mainloop-signal.c mainloop-signal.h +libpolyp_mainloop_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) +libpolyp_mainloop_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la $(WINSOCK_LIBS) +libpolyp_mainloop_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 + +libpolyp_simple_@PA_MAJORMINOR@_la_SOURCES = polyplib-simple.c polyplib-simple.h +libpolyp_simple_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) +libpolyp_simple_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la +libpolyp_simple_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 + +libpolyp_browse_@PA_MAJORMINOR@_la_SOURCES = polyplib-browser.c polyplib-browser.h +libpolyp_browse_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS) +libpolyp_browse_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la $(HOWL_LIBS) +libpolyp_browse_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 + +libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_SOURCES = glib-mainloop.h glib-mainloop.c +libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS) +libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-mainloop-@PA_MAJORMINOR@.la $(GLIB20_LIBS) +libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 + +libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_SOURCES = glib-mainloop.h glib12-mainloop.c +libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(GLIB12_CFLAGS) +libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-mainloop-@PA_MAJORMINOR@.la $(GLIB12_LIBS) +libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 + +################################### +# Daemon core library # +################################### + +polypinclude_HEADERS += \ + cli-command.h \ + client.h \ + core.h \ + dynarray.h \ + endianmacros.h \ + hashmap.h \ + idxset.h \ + iochannel.h \ + memblock.h \ + memblockq.h \ + memchunk.h \ + modargs.h \ + module.h \ + namereg.h \ + queue.h \ + resampler.h \ + sample-util.h \ + sink.h \ + sink-input.h \ + sioman.h \ + socket-server.h \ + socket-client.h \ + socket-util.h \ + source.h \ + source-output.h \ + strbuf.h \ + tokenizer.h \ + tagstruct.h \ + util.h + +lib_LTLIBRARIES += libpolypcore.la + +libpolypcore_la_SOURCES = \ + autoload.c autoload.h \ + cli-command.c cli-command.h \ + cli-text.c cli-text.h \ + client.c client.h \ + core.c core.h \ + dynarray.c dynarray.h \ + endianmacros.h \ + g711.c g711.h \ + hashmap.c hashmap.h \ + idxset.c idxset.h \ + log.c log.h \ + mainloop.c mainloop.h \ + mainloop-api.c mainloop-api.h \ + mainloop-signal.c mainloop-signal.h \ + mcalign.c mcalign.h \ + memblock.c memblock.h \ + memblockq.c memblockq.h \ + memchunk.c memchunk.h \ + modargs.c modargs.h \ + modinfo.c modinfo.h \ + module.c module.h \ + namereg.c namereg.h \ + play-memchunk.c play-memchunk.h \ + props.c props.h \ + queue.c queue.h \ + random.c random.h \ + resampler.c resampler.h \ + sample.c sample.h \ + sample-util.c sample-util.h \ + scache.c scache.h \ + sconv.c sconv.h \ + sconv-s16be.c sconv-s16be.h \ + sconv-s16le.c sconv-s16le.h \ + sink.c sink.h \ + sink-input.c sink-input.h \ + sioman.c sioman.h \ + sound-file.c sound-file.h \ + sound-file-stream.c sound-file-stream.h \ + source.c source.h \ + source-output.c source-output.h \ + strbuf.c strbuf.h \ + subscribe.c subscripe.h \ + tokenizer.c tokenizer.h \ + typeid.c typeid.h \ + util.c util.h \ + xmalloc.c xmalloc.h + +libpolypcore_la_CPPFLAGS = $(AM_CPPFLAGS) +libpolypcore_la_LDFLAGS = -avoid-version +libpolypcore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) + +################################### +# Plug-in support libraries # +################################### + ### Warning! Due to an obscure bug in libtool/automake it is required ### that the libraries in modlib_LTLIBRARIES are specified in-order, ### i.e. libraries near the end of the list depend on libraries near ### the head, and not the other way! -modlib_LTLIBRARIES= \ +modlib_LTLIBRARIES = \ libsocket-util.la \ libiochannel.la \ libsocket-server.la \ @@ -90,7 +458,6 @@ modlib_LTLIBRARIES= \ libparseaddr.la \ libpacket.la \ libpstream.la \ - liboss-util.la \ libioline.la \ libcli.la \ libprotocol-cli.la \ @@ -103,163 +470,49 @@ modlib_LTLIBRARIES= \ libprotocol-simple.la \ libprotocol-esound.la \ libprotocol-native.la \ - libprotocol-http.la \ - module-cli.la \ - module-cli-protocol-tcp.la \ - module-cli-protocol-tcp6.la \ - module-cli-protocol-unix.la \ - module-pipe-sink.la \ - module-pipe-source.la \ - module-oss.la \ - module-oss-mmap.la \ - module-simple-protocol-tcp.la \ - module-simple-protocol-tcp6.la \ - module-simple-protocol-unix.la \ - module-esound-protocol-tcp.la \ - module-esound-protocol-tcp6.la \ - module-esound-protocol-unix.la \ - module-native-protocol-tcp.la \ - module-native-protocol-tcp6.la \ - module-native-protocol-unix.la \ - module-native-protocol-fd.la \ - module-sine.la \ - module-combine.la \ - module-esound-compat-spawnfd.la \ - module-esound-compat-spawnpid.la \ - module-match.la \ - module-tunnel-sink.la \ - module-tunnel-source.la \ - module-null-sink.la \ - module-esound-sink.la \ - module-http-protocol-tcp.la \ - module-http-protocol-tcp6.la \ - module-http-protocol-unix.la - -SYMDEF_FILES= \ - module-cli-symdef.h \ - module-cli-protocol-tcp-symdef.h \ - module-cli-protocol-tcp6-symdef.h \ - module-cli-protocol-unix-symdef.h \ - module-pipe-sink-symdef.h \ - module-pipe-source-symdef.h \ - module-oss-symdef.h \ - module-oss-mmap-symdef.h \ - module-simple-protocol-tcp-symdef.h \ - module-simple-protocol-tcp6-symdef.h \ - module-simple-protocol-unix-symdef.h \ - module-esound-protocol-tcp-symdef.h \ - module-esound-protocol-tcp6-symdef.h \ - module-esound-protocol-unix-symdef.h \ - module-native-protocol-tcp-symdef.h \ - module-native-protocol-tcp6-symdef.h \ - module-native-protocol-unix-symdef.h \ - module-native-protocol-fd-symdef.h \ - module-sine-symdef.h \ - module-combine-symdef.h \ - module-esound-compat-spawnfd-symdef.h \ - module-esound-compat-spawnpid-symdef.h \ - module-match-symdef.h \ - module-tunnel-sink-symdef.h \ - module-tunnel-source-symdef.h \ - module-null-sink-symdef.h \ - module-esound-sink-symdef.h \ - module-zeroconf-publish-symdef.h \ - module-lirc-symdef.h \ - module-mmkbd-evdev-symdef.h \ - module-http-protocol-tcp-symdef.h \ - module-http-protocol-tcp6-symdef.h \ - module-http-protocol-unix-symdef.h + libprotocol-http.la -EXTRA_DIST+=$(SYMDEF_FILES) -BUILT_SOURCES+=$(SYMDEF_FILES) +if HAVE_X11 +modlib_LTLIBRARIES += \ + libx11wrap.la \ + libx11prop.la +endif -lib_LTLIBRARIES= \ - libpolyp-@PA_MAJORMINOR@.la \ - libpolyp-error-@PA_MAJORMINOR@.la \ - libpolyp-mainloop-@PA_MAJORMINOR@.la \ - libpolyp-simple-@PA_MAJORMINOR@.la +if !OS_IS_WIN32 +modlib_LTLIBRARIES += \ + liboss-util.la +endif -polypaudio_SOURCES = idxset.c idxset.h \ - queue.c queue.h \ - strbuf.c strbuf.h \ - main.c \ - mainloop.c mainloop.h \ - memblock.c memblock.h \ - sample.c sample.h \ - sample-util.c sample-util.h \ - memblockq.c memblockq.h \ - client.c client.h \ - core.c core.h \ - source-output.c source-output.h \ - sink-input.c sink-input.h \ - source.c source.h \ - sink.c sink.h \ - module.c module.h \ - mainloop-signal.c mainloop-signal.h \ - mainloop-api.c mainloop-api.h \ - util.c util.h \ - hashmap.c hashmap.h \ - namereg.c namereg.h \ - sconv.c sconv.h \ - resampler.c resampler.h \ - endianmacros.h \ - memchunk.c memchunk.h \ - sconv-s16le.c sconv-s16le.h \ - sconv-s16be.c sconv-s16be.h \ - sioman.c sioman.h \ - modargs.c modargs.h \ - cmdline.c cmdline.h \ - cli-command.c cli-command.h \ - cli-text.c cli-text.h \ - tokenizer.c tokenizer.h \ - dynarray.c dynarray.h \ - scache.c scache.h \ - sound-file.c sound-file.h \ - play-memchunk.c play-memchunk.h \ - autoload.c autoload.h \ - xmalloc.c xmalloc.h \ - subscribe.h subscribe.c \ - sound-file-stream.c sound-file-stream.h \ - cpulimit.c cpulimit.h \ - log.c log.h \ - gcc-printf.h \ - modinfo.c modinfo.h \ - daemon-conf.c daemon-conf.h \ - dumpmodules.c dumpmodules.h \ - conf-parser.h conf-parser.c \ - caps.h caps.c \ - props.h props.c \ - mcalign.c mcalign.h \ - g711.c g711.h \ - pid.c pid.h \ - random.c random.h \ - typeid.c typeid.h +if HAVE_ALSA +modlib_LTLIBRARIES += \ + libalsa-util.la +endif -polypaudio_CFLAGS = $(AM_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS) -polypaudio_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -polypaudio_LDADD = $(AM_LDADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(CAP_LIBS) -polypaudio_LDFLAGS= $(AM_LDFLAGS) -export-dynamic -dlopen force -#q-static $(foreach f,$(modlib_LTLIBRARIES),-dlpreopen $(f)) +if HAVE_HOWL +modlib_LTLIBRARIES += \ + libhowl-wrap.la +endif libprotocol_simple_la_SOURCES = protocol-simple.c protocol-simple.h libprotocol_simple_la_LDFLAGS = -avoid-version -libprotocol_simple_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la +libprotocol_simple_la_LIBADD = $(AM_LIBADD) libpolypcore.la libsocket-server.la libiochannel.la libsocket_server_la_SOURCES = socket-server.c socket-server.h libsocket_server_la_LDFLAGS = -avoid-version -libsocket_server_la_LIBADD = $(AM_LIBADD) libiochannel.la libsocket-util.la $(LIBWRAP_LIBS) +libsocket_server_la_LIBADD = $(AM_LIBADD) libpolypcore.la libiochannel.la libsocket-util.la $(LIBWRAP_LIBS) $(WINSOCK_LIBS) libsocket_client_la_SOURCES = socket-client.c socket-client.h libsocket_client_la_LDFLAGS = -avoid-version -libsocket_client_la_LIBADD = $(AM_LIBADD) libiochannel.la libsocket-util.la libparseaddr.la $(LIBASYNCNS_LIBS) +libsocket_client_la_LIBADD = $(AM_LIBADD) libpolypcore.la libiochannel.la libsocket-util.la libparseaddr.la $(LIBASYNCNS_LIBS) $(WINSOCK_LIBS) libsocket_client_la_CFLAGS = $(AM_CFLAGS) $(LIBASYNCNS_CFLAGS) libparseaddr_la_SOURCES = parseaddr.c parseaddr.h libparseaddr_la_LDFLAGS = -avoid-version +libparseaddr_la_LIBADD = $(AM_LIBADD) libpolypcore.la libpstream_la_SOURCES = pstream.c pstream.h libpstream_la_LDFLAGS = -avoid-version -libpstream_la_LIBADD = $(AM_LIBADD) libpacket.la libiochannel.la +libpstream_la_LIBADD = $(AM_LIBADD) libpolypcore.la libpacket.la libiochannel.la $(WINSOCK_LIBS) libpstream_util_la_SOURCES = pstream-util.c pstream-util.h libpstream_util_la_LDFLAGS = -avoid-version @@ -267,326 +520,380 @@ libpstream_util_la_LIBADD = $(AM_LIBADD) libpacket.la libpstream.la libtagstruct libpdispatch_la_SOURCES = pdispatch.c pdispatch.h libpdispatch_la_LDFLAGS = -avoid-version -libpdispatch_la_LIBADD = $(AM_LIBADD) libtagstruct.la +libpdispatch_la_LIBADD = $(AM_LIBADD) libtagstruct.la libpolypcore.la libiochannel_la_SOURCES = iochannel.c iochannel.h libiochannel_la_LDFLAGS = -avoid-version -libiochannel_la_LIBADD = $(AM_LIBADD) libsocket-util.la +libiochannel_la_LIBADD = $(AM_LIBADD) libsocket-util.la libpolypcore.la libpacket_la_SOURCES = packet.c packet.h libpacket_la_LDFLAGS = -avoid-version - -liboss_util_la_SOURCES = oss-util.c oss-util.h -liboss_util_la_LDFLAGS = -avoid-version +libpacket_la_LIBADD = $(AM_LIBADD) libpolypcore.la libioline_la_SOURCES = ioline.c ioline.h libioline_la_LDFLAGS = -avoid-version -libioline_la_LIBADD = $(AM_LIBADD) libiochannel.la +libioline_la_LIBADD = $(AM_LIBADD) libiochannel.la libpolypcore.la libcli_la_SOURCES = cli.c cli.h +libcli_la_CPPFLAGS = $(AM_CPPFLAGS) libcli_la_LDFLAGS = -avoid-version -libcli_la_LIBADD = $(AM_LIBADD) libiochannel.la libioline.la +libcli_la_LIBADD = $(AM_LIBADD) libiochannel.la libioline.la libpolypcore.la libstrlist_la_SOURCES = strlist.c strlist.h libstrlist_la_LDFLAGS = -avoid-version -libstrlist_la_LIBADD = $(AM_LIBADD) +libstrlist_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol_cli_la_SOURCES = protocol-cli.c protocol-cli.h libprotocol_cli_la_LDFLAGS = -avoid-version -libprotocol_cli_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libcli.la +libprotocol_cli_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libcli.la libpolypcore.la libprotocol_http_la_SOURCES = protocol-http.c protocol-http.h libprotocol_http_la_LDFLAGS = -avoid-version -libprotocol_http_la_LIBADD = $(AM_LIBADD) libsocket-server.la libioline.la +libprotocol_http_la_LIBADD = $(AM_LIBADD) libsocket-server.la libioline.la libpolypcore.la libiochannel.la libprotocol_native_la_SOURCES = protocol-native.c protocol-native.h native-common.h libprotocol_native_la_LDFLAGS = -avoid-version -libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libstrlist.la +libprotocol_native_la_LIBADD = $(AM_LIBADD) libsocket-server.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libstrlist.la libpolypcore.la libiochannel.la libtagstruct_la_SOURCES = tagstruct.c tagstruct.h libtagstruct_la_LDFLAGS = -avoid-version +libtagstruct_la_LIBADD = $(AM_LIBADD) libpolypcore.la $(WINSOCK_LIBS) libprotocol_esound_la_SOURCES = protocol-esound.c protocol-esound.h esound.h libprotocol_esound_la_LDFLAGS = -avoid-version -libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la +libprotocol_esound_la_LIBADD = $(AM_LIBADD) libsocket-server.la libiochannel.la libauthkey.la libpolypcore.la libauthkey_la_SOURCES = authkey.c authkey.h libauthkey_la_LDFLAGS = -avoid-version +libauthkey_la_LIBADD = $(AM_LIBADD) libpolypcore.la libauthkey_prop_la_SOURCES = authkey-prop.c authkey-prop.h libauthkey_prop_la_LDFLAGS = -avoid-version +libauthkey_prop_la_LIBADD = $(AM_LIBADD) libpolypcore.la libsocket_util_la_SOURCES = socket-util.c socket-util.h libsocket_util_la_LDFLAGS = -avoid-version +libsocket_util_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) + +# X11 + +libx11wrap_la_SOURCES = x11wrap.c x11wrap.h +libx11wrap_la_LDFLAGS = -avoid-version +libx11wrap_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) +libx11wrap_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) + +libx11prop_la_SOURCES = x11prop.c x11prop.h +libx11prop_la_LDFLAGS = -avoid-version +libx11prop_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) +libx11prop_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) + +# OSS + +liboss_util_la_SOURCES = oss-util.c oss-util.h +liboss_util_la_LDFLAGS = -avoid-version + +# ALSA + +libalsa_util_la_SOURCES = alsa-util.c alsa-util.h +libalsa_util_la_LDFLAGS = -avoid-version +libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) +libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) + +# HOWL + +libhowl_wrap_la_SOURCES = howl-wrap.c howl-wrap.h +libhowl_wrap_la_LDFLAGS = -avoid-version +libhowl_wrap_la_LIBADD = $(AM_LIBADD) $(HOWL_LIBS) +libhowl_wrap_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS) + +################################### +# Plug-in libraries # +################################### + +modlib_LTLIBRARIES += \ + module-cli.la \ + module-cli-protocol-tcp.la \ + module-cli-protocol-tcp6.la \ + module-simple-protocol-tcp.la \ + module-simple-protocol-tcp6.la \ + module-esound-protocol-tcp.la \ + module-esound-protocol-tcp6.la \ + module-native-protocol-tcp.la \ + module-native-protocol-tcp6.la \ + module-native-protocol-fd.la \ + module-sine.la \ + module-combine.la \ + module-tunnel-sink.la \ + module-tunnel-source.la \ + module-null-sink.la \ + module-esound-sink.la \ + module-http-protocol-tcp.la \ + module-http-protocol-tcp6.la + +if HAVE_AF_UNIX +modlib_LTLIBRARIES += \ + module-cli-protocol-unix.la \ + module-simple-protocol-unix.la \ + module-esound-protocol-unix.la \ + module-native-protocol-unix.la \ + module-http-protocol-unix.la +endif + +if HAVE_MKFIFO +modlib_LTLIBRARIES += \ + module-pipe-sink.la \ + module-pipe-source.la +endif + +if !OS_IS_WIN32 +modlib_LTLIBRARIES += \ + module-esound-compat-spawnfd.la \ + module-esound-compat-spawnpid.la +endif + +if HAVE_REGEX +modlib_LTLIBRARIES += \ + module-match.la +endif + +if HAVE_X11 +modlib_LTLIBRARIES += \ + module-x11-bell.la \ + module-x11-publish.la +endif + +if !OS_IS_WIN32 +modlib_LTLIBRARIES += \ + module-oss.la \ + module-oss-mmap.la +endif + +if HAVE_ALSA +modlib_LTLIBRARIES += \ + module-alsa-sink.la \ + module-alsa-source.la +endif + +if HAVE_HOWL +modlib_LTLIBRARIES += \ + module-zeroconf-publish.la +endif + +if HAVE_LIRC +modlib_LTLIBRARIES += \ + module-lirc.la +endif + +if HAVE_EVDEV +modlib_LTLIBRARIES += \ + module-mmkbd-evdev.la +endif + +# These are generated by a M4 script + +SYMDEF_FILES = \ + module-cli-symdef.h \ + module-cli-protocol-tcp-symdef.h \ + module-cli-protocol-tcp6-symdef.h \ + module-cli-protocol-unix-symdef.h \ + module-pipe-sink-symdef.h \ + module-pipe-source-symdef.h \ + module-simple-protocol-tcp-symdef.h \ + module-simple-protocol-tcp6-symdef.h \ + module-simple-protocol-unix-symdef.h \ + module-esound-protocol-tcp-symdef.h \ + module-esound-protocol-tcp6-symdef.h \ + module-esound-protocol-unix-symdef.h \ + module-native-protocol-tcp-symdef.h \ + module-native-protocol-tcp6-symdef.h \ + module-native-protocol-unix-symdef.h \ + module-native-protocol-fd-symdef.h \ + module-sine-symdef.h \ + module-combine-symdef.h \ + module-esound-compat-spawnfd-symdef.h \ + module-esound-compat-spawnpid-symdef.h \ + module-match-symdef.h \ + module-tunnel-sink-symdef.h \ + module-tunnel-source-symdef.h \ + module-null-sink-symdef.h \ + module-esound-sink-symdef.h \ + module-zeroconf-publish-symdef.h \ + module-lirc-symdef.h \ + module-mmkbd-evdev-symdef.h \ + module-http-protocol-tcp-symdef.h \ + module-http-protocol-tcp6-symdef.h \ + module-http-protocol-unix-symdef.h + +if HAVE_X11 +SYMDEF_FILES += \ + module-x11-bell-symdef.h \ + module-x11-publish-symdef.h +endif + +if !OS_IS_WIN32 +SYMDEF_FILES += \ + module-oss-symdef.h \ + module-oss-mmap-symdef.h +endif + +if HAVE_ALSA +SYMDEF_FILES += \ + module-alsa-sink-symdef.h \ + module-alsa-source-symdef.h +endif + +EXTRA_DIST += $(SYMDEF_FILES) +BUILT_SOURCES += $(SYMDEF_FILES) + +$(SYMDEF_FILES): module-defs.h.m4 + $(M4) -Dfname="$@" $< > $@ + +# Simple protocol module_simple_protocol_tcp_la_SOURCES = module-protocol-stub.c module_simple_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS) module_simple_protocol_tcp_la_LDFLAGS = -module -avoid-version -module_simple_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-simple.la libsocket-server.la +module_simple_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-simple.la libsocket-server.la module_simple_protocol_tcp6_la_SOURCES = module-protocol-stub.c module_simple_protocol_tcp6_la_CFLAGS = -DUSE_TCP6_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS) module_simple_protocol_tcp6_la_LDFLAGS = -module -avoid-version -module_simple_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libprotocol-simple.la libsocket-server.la +module_simple_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-simple.la libsocket-server.la module_simple_protocol_unix_la_SOURCES = module-protocol-stub.c module_simple_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS) module_simple_protocol_unix_la_LDFLAGS = -module -avoid-version -module_simple_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-simple.la libsocket-server.la libsocket-util.la +module_simple_protocol_unix_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-simple.la libsocket-server.la libsocket-util.la + +# CLI protocol + +module_cli_la_SOURCES = module-cli.c +module_cli_la_LDFLAGS = -module -avoid-version +module_cli_la_LIBADD = $(AM_LIBADD) libcli.la libiochannel.la libpolypcore.la module_cli_protocol_tcp_la_SOURCES = module-protocol-stub.c module_cli_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS) module_cli_protocol_tcp_la_LDFLAGS = -module -avoid-version -module_cli_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-cli.la libsocket-server.la +module_cli_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-cli.la libsocket-server.la module_cli_protocol_tcp6_la_SOURCES = module-protocol-stub.c module_cli_protocol_tcp6_la_CFLAGS = -DUSE_TCP6_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS) module_cli_protocol_tcp6_la_LDFLAGS = -module -avoid-version -module_cli_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libprotocol-cli.la libsocket-server.la +module_cli_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-cli.la libsocket-server.la module_cli_protocol_unix_la_SOURCES = module-protocol-stub.c module_cli_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS) module_cli_protocol_unix_la_LDFLAGS = -module -avoid-version -module_cli_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-cli.la libsocket-server.la libsocket-util.la +module_cli_protocol_unix_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-cli.la libsocket-server.la libsocket-util.la + +# HTTP protocol module_http_protocol_tcp_la_SOURCES = module-protocol-stub.c module_http_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS) module_http_protocol_tcp_la_LDFLAGS = -module -avoid-version -module_http_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-http.la libsocket-server.la +module_http_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-http.la libsocket-server.la module_http_protocol_tcp6_la_SOURCES = module-protocol-stub.c module_http_protocol_tcp6_la_CFLAGS = -DUSE_TCP6_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS) module_http_protocol_tcp6_la_LDFLAGS = -module -avoid-version -module_http_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libprotocol-http.la libsocket-server.la +module_http_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-http.la libsocket-server.la module_http_protocol_unix_la_SOURCES = module-protocol-stub.c module_http_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS) module_http_protocol_unix_la_LDFLAGS = -module -avoid-version -module_http_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-http.la libsocket-server.la libsocket-util.la +module_http_protocol_unix_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-http.la libsocket-server.la libsocket-util.la + +# Native protocol module_native_protocol_tcp_la_SOURCES = module-protocol-stub.c module_native_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS) module_native_protocol_tcp_la_LDFLAGS = -module -avoid-version -module_native_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libsocket-server.la +module_native_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-native.la libsocket-server.la module_native_protocol_tcp6_la_SOURCES = module-protocol-stub.c module_native_protocol_tcp6_la_CFLAGS = -DUSE_TCP6_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS) module_native_protocol_tcp6_la_LDFLAGS = -module -avoid-version -module_native_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libsocket-server.la +module_native_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-native.la libsocket-server.la module_native_protocol_unix_la_SOURCES = module-protocol-stub.c module_native_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS) module_native_protocol_unix_la_LDFLAGS = -module -avoid-version -module_native_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libsocket-server.la libsocket-util.la +module_native_protocol_unix_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-native.la libsocket-server.la libsocket-util.la module_native_protocol_fd_la_SOURCES = module-native-protocol-fd.c module_native_protocol_fd_la_CFLAGS = $(AM_CFLAGS) module_native_protocol_fd_la_LDFLAGS = -module -avoid-version -module_native_protocol_fd_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libsocket-server.la libsocket-util.la - -module_esound_protocol_tcp_la_SOURCES = module-protocol-stub.c -module_esound_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) -module_esound_protocol_tcp_la_LDFLAGS = -module -avoid-version -module_esound_protocol_tcp_la_LIBADD = $(AM_LIBADD) libprotocol-esound.la libsocket-server.la - -module_esound_protocol_tcp6_la_SOURCES = module-protocol-stub.c -module_esound_protocol_tcp6_la_CFLAGS = -DUSE_TCP6_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) -module_esound_protocol_tcp6_la_LDFLAGS = -module -avoid-version -module_esound_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libprotocol-esound.la libsocket-server.la - -module_esound_protocol_unix_la_SOURCES = module-protocol-stub.c -module_esound_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) -module_esound_protocol_unix_la_LDFLAGS = -module -avoid-version -module_esound_protocol_unix_la_LIBADD = $(AM_LIBADD) libprotocol-esound.la libsocket-server.la libsocket-util.la - -module_pipe_sink_la_SOURCES = module-pipe-sink.c -module_pipe_sink_la_LDFLAGS = -module -avoid-version -module_pipe_sink_la_LIBADD = $(AM_LIBADD) libiochannel.la - -module_pipe_source_la_SOURCES = module-pipe-source.c -module_pipe_source_la_LDFLAGS = -module -avoid-version -module_pipe_source_la_LIBADD = $(AM_LIBADD) libiochannel.la - -module_oss_la_SOURCES = module-oss.c -module_oss_la_LDFLAGS = -module -avoid-version -module_oss_la_LIBADD = $(AM_LIBADD) libiochannel.la liboss-util.la - -module_oss_mmap_la_SOURCES = module-oss-mmap.c -module_oss_mmap_la_LDFLAGS = -module -avoid-version -module_oss_mmap_la_LIBADD = $(AM_LIBADD) liboss-util.la - -module_cli_la_SOURCES = module-cli.c -module_cli_la_LDFLAGS = -module -avoid-version -module_cli_la_LIBADD = $(AM_LIBADD) libcli.la libiochannel.la - -module_sine_la_SOURCES = module-sine.c -module_sine_la_LDFLAGS = -module -avoid-version -module_sine_la_LIBADD = $(AM_LIBADD) - -module_combine_la_SOURCES = module-combine.c -module_combine_la_LDFLAGS = -module -avoid-version -module_combine_la_LIBADD = $(AM_LIBADD) - -module_null_sink_la_SOURCES = module-null-sink.c -module_null_sink_la_LDFLAGS = -module -avoid-version -module_null_sink_la_LIBADD = $(AM_LIBADD) - -module_match_la_SOURCES = module-match.c -module_match_la_LDFLAGS = -module -avoid-version -module_match_la_LIBADD = $(AM_LIBADD) - -module_tunnel_sink_la_SOURCES = module-tunnel.c -module_tunnel_sink_la_CFLAGS = -DTUNNEL_SINK=1 $(AM_CFLAGS) -module_tunnel_sink_la_LDFLAGS = -module -avoid-version -module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la - -module_tunnel_source_la_SOURCES = module-tunnel.c -module_tunnel_source_la_LDFLAGS = -module -avoid-version -module_tunnel_source_la_LIBADD = $(AM_LIBADD) libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la - -module_esound_compat_spawnfd_la_SOURCES = module-esound-compat-spawnfd.c -module_esound_compat_spawnfd_la_LDFLAGS = -module -avoid-version -module_esound_compat_spawnfd_la_LIBADD = $(AM_LIBADD) - -module_esound_compat_spawnpid_la_SOURCES = module-esound-compat-spawnpid.c -module_esound_compat_spawnpid_la_LDFLAGS = -module -avoid-version -module_esound_compat_spawnpid_la_LIBADD = $(AM_LIBADD) - -module_esound_sink_la_SOURCES = module-esound-sink.c -module_esound_sink_la_LDFLAGS = -module -avoid-version -module_esound_sink_la_LIBADD = $(AM_LIBADD) libsocket-client.la libauthkey.la - -libpolyp_@PA_MAJORMINOR@_la_SOURCES = polyplib.h \ - polyplib-def.h \ - tagstruct.c tagstruct.h \ - iochannel.c iochannel.h \ - pstream.c pstream.h \ - pstream-util.c pstream-util.h \ - pdispatch.c pdispatch.h \ - mainloop-api.c mainloop-api.h \ - idxset.c idxset.h \ - util.c util.h \ - memblock.c memblock.h \ - socket-client.c socket-client.h \ - parseaddr.c parseaddr.h \ - packet.c packet.h \ - queue.c queue.h \ - dynarray.c dynarray.h \ - memchunk.c memchunk.h \ - authkey.c authkey.h \ - socket-util.c socket-util.h \ - native-common.h \ - sample.c sample.h \ - xmalloc.c xmalloc.h \ - polyplib-operation.c polyplib-operation.h \ - polyplib-context.c polyplib-context.h \ - polyplib-stream.c polyplib-stream.h \ - polyplib-introspect.c polyplib-introspect.h \ - polyplib-scache.c polyplib-scache.h \ - polyplib-subscribe.c polyplib-subscribe.h \ - polyplib-internal.h \ - cdecl.h \ - llist.h \ - log.c log.h \ - gcc-printf.h \ - client-conf.c client-conf.h \ - conf-parser.c conf-parser.h \ - strlist.c strlist.h \ - strbuf.c strbuf.h \ - mcalign.c mcalign.h \ - typeid.c typeid.h \ - random.c random.h - -libpolyp_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) -libpolyp_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 -libpolyp_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) - -libpolyp_mainloop_@PA_MAJORMINOR@_la_SOURCES = mainloop-api.h mainloop-api.c \ - mainloop.c mainloop.h \ - mainloop-signal.c mainloop-signal.h -libpolyp_mainloop_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) -libpolyp_mainloop_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la -libpolyp_mainloop_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 +module_native_protocol_fd_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-native.la libsocket-server.la libsocket-util.la libiochannel.la -libpolyp_error_@PA_MAJORMINOR@_la_SOURCES = polyplib-error.c polyplib-error.h -libpolyp_error_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) -libpolyp_error_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la -libpolyp_error_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 +# EsounD protocol -libpolyp_simple_@PA_MAJORMINOR@_la_SOURCES = polyplib-simple.c polyplib-simple.h -libpolyp_simple_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) -libpolyp_simple_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la -libpolyp_simple_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 +module_esound_protocol_tcp_la_SOURCES = module-protocol-stub.c +module_esound_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) +module_esound_protocol_tcp_la_LDFLAGS = -module -avoid-version +module_esound_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-esound.la libsocket-server.la -pacat_SOURCES = pacat.c -pacat_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la -pacat_CFLAGS = $(AM_CFLAGS) +module_esound_protocol_tcp6_la_SOURCES = module-protocol-stub.c +module_esound_protocol_tcp6_la_CFLAGS = -DUSE_TCP6_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) +module_esound_protocol_tcp6_la_LDFLAGS = -module -avoid-version +module_esound_protocol_tcp6_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-esound.la libsocket-server.la -paplay_SOURCES = paplay.c -paplay_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS) -paplay_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS) +module_esound_protocol_unix_la_SOURCES = module-protocol-stub.c +module_esound_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) +module_esound_protocol_unix_la_LDFLAGS = -module -avoid-version +module_esound_protocol_unix_la_LIBADD = $(AM_LIBADD) libpolypcore.la libprotocol-esound.la libsocket-server.la libsocket-util.la -pactl_SOURCES = pactl.c -pactl_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS) -pactl_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS) +module_esound_compat_spawnfd_la_SOURCES = module-esound-compat-spawnfd.c +module_esound_compat_spawnfd_la_LDFLAGS = -module -avoid-version +module_esound_compat_spawnfd_la_LIBADD = $(AM_LIBADD) libpolypcore.la -pacat_simple_SOURCES = pacat-simple.c -pacat_simple_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-simple-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la -pacat_simple_CFLAGS = $(AM_CFLAGS) +module_esound_compat_spawnpid_la_SOURCES = module-esound-compat-spawnpid.c +module_esound_compat_spawnpid_la_LDFLAGS = -module -avoid-version +module_esound_compat_spawnpid_la_LIBADD = $(AM_LIBADD) libpolypcore.la -parec_simple_SOURCES = parec-simple.c -parec_simple_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-simple-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la -parec_simple_CFLAGS = $(AM_CFLAGS) +module_esound_sink_la_SOURCES = module-esound-sink.c +module_esound_sink_la_LDFLAGS = -module -avoid-version +module_esound_sink_la_LIBADD = $(AM_LIBADD) libpolypcore.la libiochannel.la libsocket-client.la libauthkey.la -mainloop_test_SOURCES = mainloop-test.c -mainloop_test_CFLAGS = $(AM_CFLAGS) -mainloop_test_LDADD = $(AM_LDADD) libpolyp-mainloop-@PA_MAJORMINOR@.la libpolyp-@PA_MAJORMINOR@.la +# Pipes -voltest_SOURCES = voltest.c sample.c -voltest_CFLAGS = $(AM_CFLAGS) -voltest_LDADD = $(AM_LDADD) +module_pipe_sink_la_SOURCES = module-pipe-sink.c +module_pipe_sink_la_LDFLAGS = -module -avoid-version +module_pipe_sink_la_LIBADD = $(AM_LIBADD) libpolypcore.la libiochannel.la -strlist_test_SOURCES = strlist-test.c strlist.c strlist.h strbuf.c strbuf.h util.c util.h xmalloc.c xmalloc.h log.c log.h -strlist_test_CFLAGS = $(AM_CFLAGS) -strlist_test_LDADD = $(AM_LDADD) +module_pipe_source_la_SOURCES = module-pipe-source.c +module_pipe_source_la_LDFLAGS = -module -avoid-version +module_pipe_source_la_LIBADD = $(AM_LIBADD) libpolypcore.la libiochannel.la -mcalign_test_SOURCES = mcalign-test.c util.c util.h xmalloc.c xmalloc.h log.c log.h mcalign.c mcalign.h memchunk.c memchunk.h memblock.c memblock.h -mcalign_test_CFLAGS = $(AM_CFLAGS) -mcalign_test_LDADD = $(AM_LDADD) +# Fake sources/sinks -pacmd_SOURCES = pacmd.c util.c util.h xmalloc.c xmalloc.h log.c log.h pid.c pid.h -pacmd_CFLAGS = $(AM_CFLAGS) -pacmd_LDADD = $(AM_LDADD) +module_sine_la_SOURCES = module-sine.c +module_sine_la_LDFLAGS = -module -avoid-version +module_sine_la_LIBADD = $(AM_LIBADD) libpolypcore.la -cpulimit_test_SOURCES = cpulimit-test.c cpulimit.c util.c log.c cpulimit.h util.h log.h -cpulimit_test_CFLAGS = $(AM_CFLAGS) -cpulimit_test_LDADD = $(AM_LDADD) libpolyp-mainloop-@PA_MAJORMINOR@.la +module_null_sink_la_SOURCES = module-null-sink.c +module_null_sink_la_LDFLAGS = -module -avoid-version +module_null_sink_la_LIBADD = $(AM_LIBADD) libpolypcore.la -cpulimit_test2_SOURCES = cpulimit-test.c cpulimit.c util.c log.c cpulimit.h util.h log.h -cpulimit_test2_CFLAGS = $(AM_CFLAGS) -DTEST2 -cpulimit_test2_LDADD = $(AM_LDADD) libpolyp-mainloop-@PA_MAJORMINOR@.la +# Couplings -### X11 stuff +module_combine_la_SOURCES = module-combine.c +module_combine_la_LDFLAGS = -module -avoid-version +module_combine_la_LIBADD = $(AM_LIBADD) libpolypcore.la -if HAVE_X11 -modlib_LTLIBRARIES+= \ - libx11wrap.la \ - libx11prop.la \ - module-x11-bell.la \ - module-x11-publish.la -SYMDEF_FILES += \ - module-x11-bell-symdef.h \ - module-x11-publish-symdef.h +module_match_la_SOURCES = module-match.c +module_match_la_LDFLAGS = -module -avoid-version +module_match_la_LIBADD = $(AM_LIBADD) libpolypcore.la -libx11wrap_la_SOURCES = x11wrap.c x11wrap.h -libx11wrap_la_LDFLAGS = -avoid-version -libx11wrap_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) -libx11wrap_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) +module_tunnel_sink_la_SOURCES = module-tunnel.c +module_tunnel_sink_la_CFLAGS = -DTUNNEL_SINK=1 $(AM_CFLAGS) +module_tunnel_sink_la_LDFLAGS = -module -avoid-version +module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libpolypcore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la -libx11prop_la_SOURCES = x11prop.c x11prop.h -libx11prop_la_LDFLAGS = -avoid-version -libx11prop_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) -libx11prop_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) +module_tunnel_source_la_SOURCES = module-tunnel.c +module_tunnel_source_la_LDFLAGS = -module -avoid-version +module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpolypcore.la libsocket-client.la libpstream.la libpstream-util.la libpdispatch.la libtagstruct.la libauthkey.la libauthkey-prop.la libsocket-util.la libiochannel.la + +# X11 module_x11_bell_la_SOURCES = module-x11-bell.c module_x11_bell_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) @@ -598,41 +905,17 @@ module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) module_x11_publish_la_LDFLAGS = -module -avoid-version module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauthkey-prop.la libx11prop.la libstrlist.la -bin_PROGRAMS+= \ - pax11publish - -pax11publish_SOURCES = pax11publish.c util.c util.h xmalloc.c xmalloc.h log.c log.h authkey.c authkey.h client-conf.c client-conf.h conf-parser.c conf-parser.h x11prop.c x11prop.h random.c random.h -pax11publish_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) -pax11publish_LDADD = $(AM_LDADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) - -libpolyp_@PA_MAJORMINOR@_la_CFLAGS += $(X_CFLAGS) -libpolyp_@PA_MAJORMINOR@_la_LDFLAGS += $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) -libpolyp_@PA_MAJORMINOR@_la_SOURCES += x11prop.c x11prop.h client-conf-x11.c client-conf-x11.h - -endif - -### libasyncns stuff +# OSS -if HAVE_LIBASYNCNS -libpolyp_@PA_MAJORMINOR@_la_CFLAGS += $(LIBASYNCNS_CFLAGS) -libpolyp_@PA_MAJORMINOR@_la_LIBADD += $(LIBASYNCNS_LIBS) -endif - -### ALSA modules +module_oss_la_SOURCES = module-oss.c +module_oss_la_LDFLAGS = -module -avoid-version +module_oss_la_LIBADD = $(AM_LIBADD) libiochannel.la liboss-util.la -if HAVE_ALSA -modlib_LTLIBRARIES+= \ - libalsa-util.la \ - module-alsa-sink.la \ - module-alsa-source.la -SYMDEF_FILES += \ - module-alsa-sink-symdef.h \ - module-alsa-source-symdef.h +module_oss_mmap_la_SOURCES = module-oss-mmap.c +module_oss_mmap_la_LDFLAGS = -module -avoid-version +module_oss_mmap_la_LIBADD = $(AM_LIBADD) liboss-util.la -libalsa_util_la_SOURCES = alsa-util.c alsa-util.h -libalsa_util_la_LDFLAGS = -avoid-version -libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) -libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) +# ALSA module_alsa_sink_la_SOURCES = module-alsa-sink.c module_alsa_sink_la_LDFLAGS = -module -avoid-version @@ -643,184 +926,31 @@ module_alsa_source_la_SOURCES = module-alsa-source.c module_alsa_source_la_LDFLAGS = -module -avoid-version module_alsa_source_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la module_alsa_source_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) -endif - -### HOWL modules -if HAVE_HOWL -modlib_LTLIBRARIES+= \ - libhowl-wrap.la \ - module-zeroconf-publish.la -libhowl_wrap_la_SOURCES = howl-wrap.c howl-wrap.h -libhowl_wrap_la_LDFLAGS = -avoid-version -libhowl_wrap_la_LIBADD = $(AM_LIBADD) $(HOWL_LIBS) -libhowl_wrap_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS) +# HOWL module_zeroconf_publish_la_SOURCES = module-zeroconf-publish.c module_zeroconf_publish_la_LDFLAGS = -module -avoid-version module_zeroconf_publish_la_LIBADD = $(AM_LIBADD) $(HOWL_LIBS) libhowl-wrap.la module_zeroconf_publish_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS) -lib_LTLIBRARIES+= \ - libpolyp-browse-@PA_MAJORMINOR@.la - -libpolyp_browse_@PA_MAJORMINOR@_la_SOURCES = polyplib-browser.c polyplib-browser.h -libpolyp_browse_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS) -libpolyp_browse_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-@PA_MAJORMINOR@.la $(HOWL_LIBS) -libpolyp_browse_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 - -bin_PROGRAMS += \ - pabrowse - -pabrowse_SOURCES = pabrowse.c -pabrowse_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la libpolyp-error-@PA_MAJORMINOR@.la libpolyp-mainloop-@PA_MAJORMINOR@.la libpolyp-browse-@PA_MAJORMINOR@.la -pabrowse_CFLAGS = $(AM_CFLAGS) - -polypinclude_HEADERS+=polyplib-browser.h - -endif - -### GLIB 2.0 support - -if HAVE_GLIB20 -lib_LTLIBRARIES+= \ - libpolyp-mainloop-glib-@PA_MAJORMINOR@.la - -noinst_PROGRAMS+= \ - mainloop-test-glib - -libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_SOURCES = glib-mainloop.h glib-mainloop.c -libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS) -libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-mainloop-@PA_MAJORMINOR@.la $(GLIB20_LIBS) -libpolyp_mainloop_glib_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 - -mainloop_test_glib_SOURCES = $(mainloop_test_SOURCES) -mainloop_test_glib_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB20_CFLAGS) -DGLIB_MAIN_LOOP -mainloop_test_glib_LDADD = $(mainloop_test_LDADD) $(GLIB20_LIBS) libpolyp-mainloop-glib-@PA_MAJORMINOR@.la -endif - -### GLIB 1.2 support - -if HAVE_GLIB12 - -lib_LTLIBRARIES+= \ - libpolyp-mainloop-glib12-@PA_MAJORMINOR@.la - -noinst_PROGRAMS+= \ - mainloop-test-glib12 - -libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_SOURCES = glib-mainloop.h glib12-mainloop.c -libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(GLIB12_CFLAGS) -libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) libpolyp-mainloop-@PA_MAJORMINOR@.la $(GLIB12_LIBS) -libpolyp_mainloop_glib12_@PA_MAJORMINOR@_la_LDFLAGS = -version-info 0:0:0 - -mainloop_test_glib12_SOURCES = $(mainloop_test_SOURCES) -mainloop_test_glib12_CFLAGS = $(mainloop_test_CFLAGS) $(GLIB12_CFLAGS) -DGLIB_MAIN_LOOP -mainloop_test_glib12_LDADD = $(mainloop_test_LDADD) $(GLIB12_LIBS) libpolyp-mainloop-glib12-@PA_MAJORMINOR@.la - -endif - -### LIRC support - -if HAVE_LIRC - -modlib_LTLIBRARIES+= \ - module-lirc.la +# LIRC module_lirc_la_SOURCES = module-lirc.c module_lirc_la_LDFLAGS = -module -avoid-version module_lirc_la_LIBADD = $(AM_LIBADD) $(LIRC_LIBS) module_lirc_la_CFLAGS = $(AM_CFLAGS) $(LIRC_CFLAGS) -endif - - -### Linux evdev - -if HAVE_EVDEV - -modlib_LTLIBRARIES+= \ - module-mmkbd-evdev.la +# Linux evdev module_mmkbd_evdev_la_SOURCES = module-mmkbd-evdev.c module_mmkbd_evdev_la_LDFLAGS = -module -avoid-version module_mmkbd_evdev_la_LIBADD = $(AM_LIBADD) module_mmkbd_evdev_la_CFLAGS = $(AM_CFLAGS) -endif - -### libpolypcore (needs to be updated) - -if BUILD_LIBPOLYPCORE - -polypinclude_HEADERS+=cli-command.h\ - client.h \ - core.h \ - dynarray.h \ - endianmacros.h \ - hashmap.h \ - idxset.h \ - iochannel.h \ - memblock.h \ - memblockq.h \ - memchunk.h \ - modargs.h \ - module.h \ - namereg.h \ - queue.h \ - resampler.h \ - sample-util.h \ - sink.h \ - sink-input.h \ - sioman.h \ - socket-server.h \ - socket-client.h \ - socket-util.h \ - source.h \ - source-output.h \ - strbuf.h \ - tokenizer.h \ - tagstruct.h \ - util.h - -lib_LTLIBRARIES+= libpolypcore.la - -libpolypcore_la_SOURCES = idxset.c idxset.h \ - queue.c queue.h \ - strbuf.c strbuf.h \ - mainloop.c mainloop.h \ - memblock.c memblock.h \ - sample.c sample.h \ - sample-util.c sample-util.h \ - memblockq.c memblockq.h \ - client.c client.h \ - core.c core.h \ - source-output.c source-output.h \ - sink-input.c sink-input.h \ - source.c source.h \ - sink.c sink.h \ - module.c module.h \ - mainloop-signal.c mainloop-signal.h \ - mainloop-api.c mainloop-api.h \ - util.c util.h \ - hashmap.c hashmap.h \ - namereg.c namereg.h \ - sconv.c sconv.h \ - resampler.c resampler.h \ - endianmacros.h \ - memchunk.c memchunk.h \ - sconv-s16le.c sconv-s16le.h \ - sconv-s16be.c sconv-s16be.h \ - sioman.c sioman.h \ - modargs.c modargs.h \ - cli-command.c cli-command.h \ - cli-text.c cli-text.h \ - tokenizer.c tokenizer.h \ - dynarray.c dynarray.h - -endif - -### Some minor stuff +################################### +# Some minor stuff # +################################### suid: polypaudio chown root $< @@ -845,6 +975,3 @@ install-exec-hook: chown root $(DESTDIR)$(bindir)/polypaudio ; true chmod u+s $(DESTDIR)$(bindir)/polypaudio ln -sf pacat $(DESTDIR)$(bindir)/parec - -$(SYMDEF_FILES): module-defs.h.m4 - $(M4) -Dfname="$@" $< > $@ -- 2.7.4