Skip to content

Commit

Permalink
[change] - make libplist optional via configure closes #11903
Browse files Browse the repository at this point in the history
- the option for configure is --enable-airplay / --disable-airplay - default is auto (enable airplay when libplist is found)
  • Loading branch information
Memphiz committed Sep 26, 2011
1 parent c4e24aa commit 32e8992
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
35 changes: 33 additions & 2 deletions configure.in
Expand Up @@ -112,6 +112,8 @@ libnfs_disabled="== NFS support disabled. =="
libafpclient_not_found="== Could not find libafpclient. AFP support disabled. =="
libafpclient_disabled="== AFP support disabled. =="
samba_disabled="== SAMBA support disabled. =="
libplist_not_found="== Could not find libplist. AirPlay support disabled. =="
libplist_disabled="== AirPlay support disabled. =="
alsa_not_found="== Could not find ALSA. ALSA support disabled. =="
dbus_not_found="== Could not find DBUS. DBUS support disabled. =="

Expand Down Expand Up @@ -289,6 +291,12 @@ AC_ARG_ENABLE([afpclient],
[use_libafpclient=$enableval],
[use_libafpclient=auto])

AC_ARG_ENABLE([airplay],
[AS_HELP_STRING([--enable-airplay],
[enable AirPlay support(default is auto)])],
[use_airplay=$enableval],
[use_airplay=auto])

AC_ARG_ENABLE([ffmpeg_libvorbis],
[AS_HELP_STRING([--enable-ffmpeg-libvorbis],
[enable FFmpeg vorbis encoding (default is no)])],
Expand Down Expand Up @@ -776,7 +784,6 @@ XB_FIND_SONAME([VORBISFILE], [vorbisfile])
XB_FIND_SONAME([MODPLUG], [modplug])
XB_FIND_SONAME([ASS], [ass])
XB_FIND_SONAME([MPEG2], [mpeg2])
XB_FIND_SONAME([PLIST], [plist])

# WebServer
if test "$use_webserver" = "yes"; then
Expand Down Expand Up @@ -979,7 +986,6 @@ else
AC_MSG_NOTICE($libnfs_disabled)
fi


# libafpclient
USE_LIBAFPCLIENT=0
if test "$host_vendor" = "apple" ; then
Expand All @@ -1004,6 +1010,25 @@ else
use_libafpclient="no"
fi

# libplist for airplay feature
USE_AIRPLAY=0
if test "$use_airplay" != "no"; then
AC_CHECK_LIB([plist],[main],,
[if test "$use_airplay" = "yes"; then
AC_MSG_ERROR($libplist_not_found)
elif test "$use_airplay" != "no"; then
AC_MSG_NOTICE($libplist_not_found)
use_airplay="no"
fi
])

if test "$use_airplay" != "no"; then
XB_FIND_SONAME([PLIST], [plist], [use_airplay])
USE_AIRPLAY=1
fi
fi


### External libraries checks
# External FFmpeg
if test "$use_external_ffmpeg" = "yes"; then
Expand Down Expand Up @@ -1599,6 +1624,11 @@ if test "x$use_libafpclient" != "xno"; then
final_message="$final_message\n libafpclient support:\tYes"
else
final_message="$final_message\n libafpclient support:\tNo"

if test "$use_airplay" != "no"; then
final_message="$final_message\n AirPlay support:\tYes"
else
final_message="$final_message\n AirPLay support:\tNo"
fi

if test "$use_optical_drive" = "yes"; then
Expand Down Expand Up @@ -1713,6 +1743,7 @@ AC_SUBST(USE_CRYSTALHD)
AC_SUBST(USE_LIBSMBCLIENT)
AC_SUBST(USE_LIBNFS)
AC_SUBST(USE_LIBAFPCLIENT)
AC_SUBST(USE_AIRPLAY)
AC_SUBST(USE_VDA)
AC_SUBST(USE_OPENMAX)
AC_SUBST(USE_PULSE)
Expand Down
4 changes: 4 additions & 0 deletions xbmc/network/Makefile.in
Expand Up @@ -23,6 +23,10 @@ SRCS=AirPlayServer.cpp \
ZeroconfBrowser.cpp \
Zeroconf.cpp \

ifeq (@USE_AIRPLAY@, 1)
SRCS+=AirPlayServer.cpp
endif

LIB=network.a

include @abs_top_srcdir@/Makefile.include
Expand Down
6 changes: 4 additions & 2 deletions xbmc/system.h
Expand Up @@ -71,6 +71,10 @@
#define HAS_FILESYSTEM_AFP
#endif

#ifdef HAVE_LIBPLIST
#define HAS_AIRPLAY
#endif

/**********************
* Non-free Components
**********************/
Expand Down Expand Up @@ -120,7 +124,6 @@
#endif
#define HAS_ZEROCONF
#define HAS_LINUX_NETWORK
#define HAS_AIRPLAY
#endif

/*****************
Expand Down Expand Up @@ -157,7 +160,6 @@
#ifdef HAVE_LIBXRANDR
#define HAS_XRANDR
#endif
#define HAS_AIRPLAY
#endif

#ifdef HAVE_LIBSSH
Expand Down

0 comments on commit 32e8992

Please sign in to comment.