configure.ac: detect jack_set_info_function()
jack_set_info_function() is not provided by older libjack versions. Attempt to detect if it is available.
This commit is contained in:
10
configure.ac
10
configure.ac
@ -620,6 +620,16 @@ if test x$enable_jack = xyes; then
|
|||||||
[enable_jack=no;AC_MSG_WARN([JACK not found -- disabling])])
|
[enable_jack=no;AC_MSG_WARN([JACK not found -- disabling])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x$enable_jack = xyes; then
|
||||||
|
# check whether jack_set_info_function() is available
|
||||||
|
old_LIBS=$LIBS
|
||||||
|
LIBS="$LIBS $JACK_LIBS"
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(jack_set_info_function)
|
||||||
|
|
||||||
|
LIBS=$old_LIBS
|
||||||
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
|
AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
|
||||||
|
|
||||||
if test x$enable_id3 = xyes; then
|
if test x$enable_id3 = xyes; then
|
||||||
|
@ -165,11 +165,13 @@ mpd_jack_error(const char *msg)
|
|||||||
g_warning("%s", msg);
|
g_warning("%s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_JACK_SET_INFO_FUNCTION
|
||||||
static void
|
static void
|
||||||
mpd_jack_info(const char *msg)
|
mpd_jack_info(const char *msg)
|
||||||
{
|
{
|
||||||
g_message("%s", msg);
|
g_message("%s", msg);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
mpd_jack_init(struct audio_output *ao,
|
mpd_jack_init(struct audio_output *ao,
|
||||||
@ -205,7 +207,10 @@ mpd_jack_init(struct audio_output *ao,
|
|||||||
config_get_block_unsigned(param, "ringbuffer_size", 32768);
|
config_get_block_unsigned(param, "ringbuffer_size", 32768);
|
||||||
|
|
||||||
jack_set_error_function(mpd_jack_error);
|
jack_set_error_function(mpd_jack_error);
|
||||||
|
|
||||||
|
#ifdef HAVE_JACK_SET_INFO_FUNCTION
|
||||||
jack_set_info_function(mpd_jack_info);
|
jack_set_info_function(mpd_jack_info);
|
||||||
|
#endif
|
||||||
|
|
||||||
return jd;
|
return jd;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user