Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output modules #210

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SUBDIRS = src data
SUBDIRS = src data contribs

EXTRA_DIST = autogen.sh
31 changes: 29 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
AC_PREREQ(2.59)
AC_INIT(gmediarender, 0.0.8, https://github.com/hzeller/gmrender-resurrect)
AC_INIT([gmediarender], 0.0.8, https://github.com/hzeller/gmrender-resurrect)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.8 dist-bzip2 no-dist-gzip check-news])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([1.8 dist-bzip2 no-dist-gzip check-news foreign])

AC_SUBST(GMRENDER_GST_VERSION, [0.0.8])

LT_INIT

AC_SYS_LARGEFILE

Expand Down Expand Up @@ -106,6 +111,27 @@ if test x$HAVE_LIBUPNP = xyes; then
fi
AC_SUBST(HAVE_LIBUPNP)

PKG_CHECK_MODULES(ALSA, alsa, HAVE_ALSA=yes, HAVE_ALSA=no)
if test x$HAVE_ALSA = xyes; then
AC_DEFINE(HAVE_ALSA, , [Use Alsa])
fi
AC_SUBST(HAVE_ALSA)
AM_CONDITIONAL(HAVE_ALSA, test x$HAVE_ALSA = xyes)

AC_ARG_WITH( mpg123,
AC_HELP_STRING([--without-mpg123],[compile without MPG123 support]),
try_mpg123=$withval, try_mpg123=yes )
HAVE_MPG123=no
if test x$try_gstreamer = xyes; then
dnl check for GStreamer
PKG_CHECK_MODULES(MPG123, libmpg123, HAVE_MPG123=yes, HAVE_MPG123=no)
fi
if test x$HAVE_MPG123 = xyes; then
AC_DEFINE(HAVE_MPG123, , [Use mpg123])
fi
AC_SUBST(HAVE_MPG123)
AM_CONDITIONAL(HAVE_MPG123, test x$HAVE_MPG123 = xyes)

# Checks for header files.
AC_HEADER_STDC

Expand All @@ -118,6 +144,7 @@ fi

AC_CONFIG_FILES([Makefile
src/Makefile
contribs/Makefile
data/Makefile])
AC_OUTPUT

22 changes: 22 additions & 0 deletions contribs/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
if HAVE_MPG123
pkglib_LTLIBRARIES = gmrender_mpg123.la
endif

gmrender_mpg123_la_SOURCES = \
sound_module.c sound_module.h \
sound_alsa.c \
webclient.c \
output_mpg123.c

GMRENDER_MPG123_VERSION=0.0.1

MOD_MAJOR_VERSION=$(word 1,$(subst ., ,$(GMRENDER_MPG123_VERSION)))
MOD_MINOR_VERSION=$(word 2,$(subst ., ,$(GMRENDER_MPG123_VERSION)))
MOD_MICRO_VERSION=$(word 3,$(subst ., ,$(GMRENDER_MPG123_VERSION)))

gmrender_mpg123_la_CFLAGS = $(GLIB_CFLAGS) $(ALSA_CFLAGS) -I ../src
gmrender_mpg123_la_CFLAGS += -DMOD_MAJOR_VERSION=$(MOD_MAJOR_VERSION)
gmrender_mpg123_la_CFLAGS += -DMOD_MINOR_VERSION=$(MOD_MINOR_VERSION)
gmrender_mpg123_la_CFLAGS += -DMOD_MICRO_VERSION=$(MOD_MICRO_VERSION)
gmrender_mpg123_la_LIBADD = $(GLIB_LIBS) $(ALSA_LIBS) -lmpg123
gmrender_mpg123_la_LDFLAGS = -module -release $(GMRENDER_MPG123_VERSION)
Loading