Browse Source

Merge pull request #7 from speidy/autotools

add Autotools scripts
pull/10/head
metalefty 6 years ago
committed by GitHub
parent
commit
0d80384dd9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 161 additions and 22 deletions
  1. +52
    -2
      .gitignore
  2. +0
    -18
      Makefile
  3. +4
    -0
      Makefile.am
  4. +2
    -0
      bootstrap.sh
  5. +76
    -0
      configure.ac
  6. +18
    -0
      src/Makefile.am
  7. +0
    -0
      src/module-xrdp-sink-symdef.h
  8. +5
    -1
      src/module-xrdp-sink.c
  9. +0
    -0
      src/module-xrdp-source-symdef.h
  10. +4
    -1
      src/module-xrdp-source.c

+ 52
- 2
.gitignore View File

@ -1,2 +1,52 @@
*.so
*.o
module-config.h
module-config.h.in
build-aux/*
.deps/
.libs/
*.la
*.lo
# http://www.gnu.org/software/automake
Makefile
Makefile.in
/ar-lib
/mdate-sh
/py-compile
/test-driver
/ylwrap
# http://www.gnu.org/software/autoconf
autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.guess
/config.log
/config.status
/config.sub
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1
# https://www.gnu.org/software/libtool/
/ltmain.sh
# http://www.gnu.org/software/texinfo
/texinfo.tex
# http://www.gnu.org/software/m4/
libtool
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4

+ 0
- 18
Makefile View File

@ -1,18 +0,0 @@
#
# build xrdp pulseaudio modules
#
# change this to your pulseaudio source directory
PULSE_DIR = /tmp/pulseaudio-10.0
CFLAGS = -Wall -O2 -I $(PULSE_DIR) -I $(PULSE_DIR)/src -DHAVE_CONFIG_H -fPIC
all: module-xrdp-sink.so module-xrdp-source.so
module-xrdp-sink.so: module-xrdp-sink.o
$(CC) $(LDFLAGS) -shared -o module-xrdp-sink.so module-xrdp-sink.o
module-xrdp-source.so: module-xrdp-source.o
$(CC) $(LDFLAGS) -shared -o module-xrdp-source.so module-xrdp-source.o
clean:
rm -f module-xrdp-sink.o module-xrdp-sink.so module-xrdp-source.o module-xrdp-source.so

+ 4
- 0
Makefile.am View File

@ -0,0 +1,4 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src
EXTRA_DIST = bootstrap.sh

+ 2
- 0
bootstrap.sh View File

@ -0,0 +1,2 @@
#!/bin/sh
autoreconf -ivf

+ 76
- 0
configure.ac View File

@ -0,0 +1,76 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([pulseaudio-module-xrdp], [0.1], [xrdp-devel@googlegroups.com])
# specify module-config.h so we don't collide with pulseaudio's config.h
AC_CONFIG_HEADERS([module-config.h])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIRS([m4])
AM_PROG_AR
AM_INIT_AUTOMAKE([-Wall foreign silent-rules])
AM_SILENT_RULES([yes])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# get system's pulseaudio version
m4_define([pa_major], [`echo $(pulseaudio --version) | cut -d' ' -f2 | cut -d. -f1`])
m4_define([pa_minor], [`echo $(pulseaudio --version) | cut -d' ' -f2 | cut -d. -f2`])
AC_SUBST([PA_MAJOR], [pa_major])
AC_SUBST([PA_MINOR], [pa_minor])
AC_SUBST([PA_MAJORMINOR], [pa_major].[pa_minor])
# Build shared libraries
LT_INIT([shared disable-static])
# Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
# Checks for libraries.
PKG_CHECK_MODULES([XRDP], [xrdp >= 0.9.0])
AC_SUBST(XRDP_CFLAGS)
m4_define([PULSE_MSG], [pulseaudio source code directory not specified.
please download the required sources from:
https://freedesktop.org/software/pulseaudio/releases/
and run ./configure PULSE_DIR=<path to sources>])
AC_ARG_VAR([PULSE_DIR], [pulseaudio source code directory])
AS_IF([test x"$PULSE_DIR" == x""],
AC_MSG_ERROR([m4_text_box([PULSE_MSG])])
)
# change default prefix so modules will be installed where system pulseaudio is
AC_PREFIX_DEFAULT(["/usr"])
# copied from pulseaudio
AC_ARG_WITH(
[module-dir],
[AS_HELP_STRING([--with-module-dir],
[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules)])],
[modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules"])
AC_SUBST(modlibexecdir)
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
# Checks for library functions.
AC_CHECK_FUNCS([memset socket])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT

+ 18
- 0
src/Makefile.am View File

@ -0,0 +1,18 @@
AM_CFLAGS = -O2 \
-fPIC \
-I $(PULSE_DIR) \
-I $(PULSE_DIR)/src \
$(XRDP_CFLAGS)
AM_LDFLAGS = -module \
-avoid-version
modlibexec_LTLIBRARIES = module-xrdp-sink.la module-xrdp-source.la
module_xrdp_sink_la_SOURCES = module-xrdp-sink.c
module_xrdp_sink_la_CFLAGS = $(AM_CFLAGS)
module_xrdp_sink_la_LDFLAGS = $(AM_LDFLAGS)
module_xrdp_source_la_SOURCES = module-xrdp-source.c
module_xrdp_source_la_CFLAGS = $(AM_CFLAGS)
module_xrdp_source_la_LDFLAGS = $(AM_LDFLAGS)

module-xrdp-sink-symdef.h → src/module-xrdp-sink-symdef.h View File


module-xrdp-sink.c → src/module-xrdp-sink.c View File

@ -21,6 +21,7 @@
* see pulse-notes.txt
*/
// config.h from pulseaudio sources
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -58,6 +59,9 @@
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
#include <xrdp_sockets.h>
/* defined in pulse/version.h */
#if PA_PROTOCOL_VERSION > 28
/* these used to be defined in pulsecore/macro.h */
@ -68,7 +72,7 @@ typedef bool pa_bool_t;
#endif
#include "module-xrdp-sink-symdef.h"
#include "../../../common/xrdp_sockets.h"
PA_MODULE_AUTHOR("Jay Sorg");
PA_MODULE_DESCRIPTION("xrdp sink");

module-xrdp-source-symdef.h → src/module-xrdp-source-symdef.h View File


module-xrdp-source.c → src/module-xrdp-source.c View File

@ -20,6 +20,7 @@
USA.
***/
// config.h from pulseaudio sources
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -45,6 +46,9 @@
#include <pulsecore/thread-mq.h>
#include <pulsecore/thread.h>
#include <xrdp_sockets.h>
/* defined in pulse/version.h */
#if PA_PROTOCOL_VERSION > 28
/* these used to be defined in pulsecore/macro.h */
@ -55,7 +59,6 @@ typedef bool pa_bool_t;
#endif
#include "module-xrdp-source-symdef.h"
#include "../../../common/xrdp_sockets.h"
PA_MODULE_AUTHOR("Laxmikant Rashinkar");
PA_MODULE_DESCRIPTION("xrdp source");

Loading…
Cancel
Save