diff options
author | Memphiz <memphis@machzwo.de> | 2013-04-17 15:29:14 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2013-05-02 19:12:50 +0200 |
commit | ad20c6f9073ad2852d1cf981f91ca7b66019c773 (patch) | |
tree | 3f01d3e86898e79074f041a4d92da0785dcb5d7c /configure.in | |
parent | c45b4e0593a407821d737ddf33037d4b398ed7db (diff) |
[airtunes] - make libshairplay the new default airtunes library and allow configure to detect and fallback to libshairport if needed
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/configure.in b/configure.in index 18b6c2ed53..0be28379a2 100644 --- a/configure.in +++ b/configure.in @@ -140,8 +140,8 @@ libnfs_not_found="== Could not find libnfs. NFS client support disabled. ==" libnfs_disabled="== NFS support disabled. ==" libafpclient_not_found="== Could not find libafpclient. AFP client support disabled. ==" libafpclient_disabled="== AFP support disabled. ==" -libshairport_not_found="== Could not find libshairport. AirTunes support disabled. ==" -libshairport_disabled="== AirTunes support disabled. ==" +libshairport_not_found="== Could not find libshairport. ==" +libshairplay_not_found="== Could not find libshairplay. ==" samba_disabled="== SAMBA support disabled. ==" libplist_not_found="== Could not find libplist. AirPlay support disabled. ==" libplist_disabled="== AirPlay support disabled. ==" @@ -1436,24 +1436,45 @@ if test "$use_airplay" != "no"; then fi fi -# libshairport for AirTunes +# libshairplay for AirTunes (prefered lib) USE_AIRTUNES=0 if test "x$use_airtunes" != "xno"; then - AC_CHECK_HEADERS([shairport/shairport.h],, + AC_CHECK_HEADERS([shairplay/raop.h],, [if test "x$use_airtunes" = "xyes"; then - AC_MSG_ERROR($libshairport_not_found) + AC_MSG_ERROR($libshairplay_not_found) elif test "x$use_airtunes" != "xno"; then - AC_MSG_NOTICE($libshairport_not_found) + AC_MSG_NOTICE($libshairplay_not_found) use_airtunes="no" fi ]) if test "x$use_airtunes" != "xno"; then - XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes]) + XB_FIND_SONAME([SHAIRPLAY], [shairplay], [use_airtunes]) USE_AIRTUNES=1 - AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,, - [[#include <shairport/shairport.h>]]) - AC_DEFINE([HAVE_LIBSHAIRPORT],[1],["Define to 1 if you have libshairport."]) + USE_LIBSHAIRPORT=1 + AC_CHECK_MEMBERS([struct raop_callbacks_s.cls],,, + [[#include <shairplay/raop.h>]]) + AC_DEFINE([HAVE_LIBSHAIRPLAY],[1],["Define to 1 if you have libshairplay."]) + fi + + #libshairport - as a fallback for AirTunes + if test "x$USE_AIRTUNES" == "x0"; then + AC_CHECK_HEADERS([shairport/shairport.h],, + [if test "x$use_airtunes" = "xyes"; then + AC_MSG_ERROR($libshairport_not_found) + elif test "x$use_airtunes" != "xno"; then + AC_MSG_NOTICE($libshairport_not_found) + use_airtunes="no" + fi + ]) + + if test "x$use_airtunes" != "xno"; then + XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes]) + USE_AIRTUNES=1 + AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,, + [[#include <shairport/shairport.h>]]) + AC_DEFINE([HAVE_LIBSHAIRPORT],[1],["Define to 1 if you have libshairport."]) + fi fi fi @@ -2240,7 +2261,11 @@ else fi if test "x$use_airtunes" != "xno"; then - final_message="$final_message\n AirTunes support:\tYes" + if test "x$USE_LIBSHAIRPORT" == "x1"; then + final_message="$final_message\n AirTunes support (libshairplay):\tYes" + else + final_message="$final_message\n AirTunes support (libshairport):\tYes" + fi else final_message="$final_message\n AirTunes support:\tNo" fi |