Ed Wildgoose wrote:
> Hi folks, congrats on getting v1.0 out!
>
> I have written what I hope is the code for a jack output driver. Can
> someone please help me out with a quickstart guide on using automake,
> etc so that I can have a bash at compiling the darn thing...
>
> (It's obviously called "audio_jack_out.c" and it's sitting in
> src/audio_out, so what do I do next...?)
hi ed,
here's what you need to get it integrated properly:
1) a check in configure.ac to test for the presence of jack on the
system. on my system, jack uses pkg-config, so using the
PKG_CHECK_MODULES() macro, along with an AM_CONDITIONAL(), should be enough:
PKG_CHECK_MODULES(JACK, jack, have_jack="yes", have_jack="no")
AM_CONDITIONAL(HAVE_JACK, [test "x$have_jack" = "xyes"])
you might want to do some extra processing to add --enable-jack and/or
--disable-jack option to configure. i'm sure there are existing
examples in configure.ac.
2) rules in src/audio_out/Makefile.am to conditionally compile the jack
plugin if configure found that jack is present on the system. something
like this should work:
first, add $(JACK_CFLAGS) to the "AM_CFLAGS =" line at the top. then
add a block to set $(jack_module) if it's available:
if HAVE_JACK
jack_module = xineplug_ao_out_jack.la
endif
then to the "lib_LTLIBRARIES =" section, add $(jack_module) to the
list. if you add it to the bottom, be sure to add a "\" to the end of
the previous line so it's all treated as one line. then add the rules
to make the shared lib:
xineplug_ao_out_jack_la_SOURCES = audio_jack_out.c
xineplug_ao_out_jack_la_LIBADD = $(JACK_LIBS) $(XINE_LIB)
xineplug_ao_out_jack_la_LDFLAGS = -avoid-version -module
@XINE_PLUGIN_MIN_SYMS@
then re-run autogen.sh and configure, and carefully watch the output to
see if jack is found on the system. if not, perhaps i left something
out. otherwise, run make and be sure it builds your plugin and links it
to the jack libraries properly.
that should do it, though i may have left something out. and now i'll
stop procrastinating and clean my apartment ^_~.
-brian
|