mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 04:42:58 -05:00
[spotify] Reintroduce libspotify support, change spotifyc to librespot-c
Select use of either libspotify or librespot-c as streaming backend via config option. librespot-c (renamed/improved spotifyc) impl has the following: - sync interface - seek support - honor bitrate config, set client and thread name - use web access token with "streaming" scope for login - fix issue with podcast playback Also say goodbye to file-based Spotify login.
This commit is contained in:
45
configure.ac
45
configure.ac
@@ -287,23 +287,33 @@ AS_IF([[test "x$with_avahi" = "xno"]],
|
||||
AM_CONDITIONAL([COND_AVAHI], [[test "x$with_avahi" = "xyes"]])
|
||||
|
||||
dnl Spotify support
|
||||
OWNTONE_ARG_ENABLE([Spotify support], [spotify], [SPOTIFY],
|
||||
[AS_IF([[test "x$with_libevent_pthreads" = "xno"]],
|
||||
[AC_MSG_ERROR([[Spotify support requires libevent_pthreads]])])
|
||||
OWNTONE_MODULES_CHECK([OWNTONE_OPTS], [LIBPROTOBUF_C],
|
||||
OWNTONE_ARG_DISABLE([Spotify support], [spotify], [SPOTIFY_LIBRESPOTC],
|
||||
[OWNTONE_MODULES_CHECK([OWNTONE_OPTS], [LIBPROTOBUF_C],
|
||||
[libprotobuf-c >= 1.0.0], [protobuf_c_message_pack],
|
||||
[protobuf-c/protobuf-c.h], [],
|
||||
[OWNTONE_FUNC_REQUIRE([OWNTONE_OPTS], [v0 libprotobuf-c],
|
||||
[LIBPROTOBUF_OLD], [protobuf-c],
|
||||
[protobuf_c_message_pack],
|
||||
[google/protobuf-c/protobuf-c.h],
|
||||
[AC_DEFINE([HAVE_PROTOBUF_OLD], 1,
|
||||
[Define to 1 if you have libprotobuf < 1.0.0])
|
||||
[protobuf_old=yes]],
|
||||
[AC_MSG_ERROR([[Spotify support requires protobuf-c]])])
|
||||
])
|
||||
[protobuf-c/protobuf-c.h])
|
||||
OWNTONE_VAR_PREPEND([OWNTONE_OPTS_LIBS], [inputs/librespot-c/librespot-c.a])
|
||||
AC_DEFINE([SPOTIFY], 1,
|
||||
[Define to 1 to enable Spotify])
|
||||
])
|
||||
AM_CONDITIONAL([COND_SPOTIFY], [[test "x$enable_spotify" = "xyes"]])
|
||||
AM_CONDITIONAL([COND_LIBRESPOTC], [[test "x$enable_spotify" = "xyes"]])
|
||||
|
||||
dnl Spotify with dynamic linking to libspotify (legacy)
|
||||
OWNTONE_ARG_ENABLE([legacy libspotify support], [libspotify], [SPOTIFY_LIBSPOTIFY],
|
||||
[AS_IF([[test "x$with_libevent_pthreads" = "xno"]],
|
||||
[AC_MSG_ERROR([[libspotify support requires libevent_pthreads]])])
|
||||
OWNTONE_MODULES_CHECK([SPOTIFY_LIBSPOTIFY], [LIBSPOTIFY], [libspotify],
|
||||
[], [libspotify/api.h])
|
||||
dnl Don't link with libspotify, use dynamic linking
|
||||
AC_SEARCH_LIBS([dlopen], [dl], [],
|
||||
[AC_MSG_ERROR([[libspotify support requires dlopen]])])
|
||||
OWNTONE_VAR_PREPEND([OWNTONE_OPTS_CPPFLAGS], [$SPOTIFY_LIBSPOTIFY_CPPFLAGS])
|
||||
OWNTONE_VAR_PREPEND([OWNTONE_OPTS_LIBS], [-rdynamic])
|
||||
AC_DEFINE([SPOTIFY], 1,
|
||||
[Define to 1 to enable Spotify])
|
||||
])
|
||||
AM_CONDITIONAL([COND_LIBSPOTIFY], [[test "x$enable_libspotify" = "xyes"]])
|
||||
|
||||
AM_CONDITIONAL([COND_SPOTIFY], [[test "x$enable_spotify" = "xyes" -o "x$enable_libspotify" = "xyes"]])
|
||||
|
||||
dnl LastFM support
|
||||
OWNTONE_ARG_DISABLE([LastFM support], [lastfm], [LASTFM])
|
||||
@@ -362,6 +372,11 @@ OWNTONE_GROUP=${withval:-$OWNTONE_USER}
|
||||
AC_SUBST([OWNTONE_GROUP])
|
||||
dnl --- End options ---
|
||||
|
||||
dnl Unconditional since we always want to produce Makefiles for dist targets
|
||||
AC_CONFIG_SUBDIRS([
|
||||
src/inputs/librespot-c
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
src/Makefile
|
||||
sqlext/Makefile
|
||||
|
||||
Reference in New Issue
Block a user