Skip to content

Commit

Permalink
Merge pull request #3972 from Memphiz/fixshairportfallback
Browse files Browse the repository at this point in the history
[configure/airtunes] - fix the fallback to libshairport if libshairplay can't be found...
  • Loading branch information
Memphiz committed Jan 6, 2014
2 parents ba9411e + a51b182 commit 16c449f
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions configure.in
Expand Up @@ -1612,43 +1612,38 @@ fi
# libshairplay for AirTunes (prefered lib) # libshairplay for AirTunes (prefered lib)
USE_AIRTUNES=0 USE_AIRTUNES=0
if test "x$use_airtunes" != "xno"; then if test "x$use_airtunes" != "xno"; then
AC_CHECK_HEADERS([shairplay/raop.h],, AC_CHECK_HEADERS([shairplay/raop.h],USE_AIRTUNES=1,
[if test "x$use_airtunes" = "xyes"; then [AC_MSG_NOTICE($libshairplay_not_found)
AC_MSG_ERROR($libshairplay_not_found)
elif test "x$use_airtunes" != "xno"; then
AC_MSG_NOTICE($libshairplay_not_found)
use_airtunes="no"
fi
]) ])


if test "x$use_airtunes" != "xno"; then if test "x$USE_AIRTUNES" != "x0"; then
XB_FIND_SONAME([SHAIRPLAY], [shairplay], [use_airtunes]) XB_FIND_SONAME([SHAIRPLAY], [shairplay], [USE_AIRTUNES])
USE_AIRTUNES=1 USE_LIBSHAIRPLAY=1
USE_LIBSHAIRPORT=1
AC_CHECK_MEMBERS([struct raop_callbacks_s.cls],,, AC_CHECK_MEMBERS([struct raop_callbacks_s.cls],,,
[[#include <shairplay/raop.h>]]) [[#include <shairplay/raop.h>]])
AC_DEFINE([HAVE_LIBSHAIRPLAY],[1],["Define to 1 if you have libshairplay."]) AC_DEFINE([HAVE_LIBSHAIRPLAY],[1],["Define to 1 if you have libshairplay."])
fi fi


#libshairport - as a fallback for AirTunes #libshairport - as a fallback for AirTunes
if test "x$USE_AIRTUNES" == "x0"; then if test "x$USE_AIRTUNES" == "x0"; then
AC_CHECK_HEADERS([shairport/shairport.h],, AC_CHECK_HEADERS([shairport/shairport.h],USE_AIRTUNES=1,
[if test "x$use_airtunes" = "xyes"; then [AC_MSG_NOTICE($libshairport_not_found)
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 if test "x$USE_AIRTUNES" != "x0"; then
XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes]) XB_FIND_SONAME([SHAIRPORT], [shairport], [USE_AIRTUNES])
USE_AIRTUNES=1
AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,, AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,,
[[#include <shairport/shairport.h>]]) [[#include <shairport/shairport.h>]])
AC_DEFINE([HAVE_LIBSHAIRPORT],[1],["Define to 1 if you have libshairport."]) AC_DEFINE([HAVE_LIBSHAIRPORT],[1],["Define to 1 if you have libshairport."])
fi fi
fi fi

if test "x$USE_AIRTUNES" == "x0"; then
if test "x$use_airtunes" == "xyes"; then
AC_MSG_ERROR("No airtunes library could be found. (libshairport/libshairplay)")
fi
use_airtunes="no"
fi
fi fi


# libudev # libudev
Expand Down Expand Up @@ -2387,7 +2382,7 @@ else
fi fi


if test "x$use_airtunes" != "xno"; then if test "x$use_airtunes" != "xno"; then
if test "x$USE_LIBSHAIRPORT" == "x1"; then if test "x$USE_LIBSHAIRPLAY" == "x1"; then
final_message="$final_message\n AirTunes support (libshairplay):\tYes" final_message="$final_message\n AirTunes support (libshairplay):\tYes"
else else
final_message="$final_message\n AirTunes support (libshairport):\tYes" final_message="$final_message\n AirTunes support (libshairport):\tYes"
Expand Down

0 comments on commit 16c449f

Please sign in to comment.