Permalink
Browse files

build: add --disable-dvdread option

  • Loading branch information...
theuni
theuni committed Apr 10, 2012
1 parent a2a5b69 commit ce70964850b1e13988fd8e2adaf87d88d840ae94
Showing with 35 additions and 6 deletions.
  1. +7 −1 Makefile.in
  2. +28 −5 configure.in
View
@@ -8,7 +8,11 @@ XBMCTEX_DIRS= \
DVDPCODECS_DIRS= \
lib \
- lib/libdvd
+
+ifeq (@USE_DVDREAD@,1)
+DVDPCODECS_DIRS+= lib/libdvd \
+
+endif
DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \
xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a \
@@ -260,7 +264,9 @@ libpython: dllloader
$(MAKE) -C xbmc/interfaces/python/xbmcmodule
dvdpcodecs: dllloader
$(MAKE) -C lib
+ifeq (@USE_DVDREAD@,1)
$(MAKE) -C lib/libdvd
+endif
eventclients:
ifeq ($(findstring osx,@ARCH@), osx)
ifneq ($(findstring arm,@ARCH@), arm)
View
@@ -85,6 +85,8 @@ x11_enabled="== X11 enabled. =="
x11_disabled="== X11 disabled. =="
pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
pulse_disabled="== PulseAudio support manually disabled. =="
+dvdread_enabled="== DVD Playback support enabled. =="
+dvdread_disabled="== DVD Playback support disabled. =="
dvdcss_enabled="== DVDCSS support enabled. =="
dvdcss_disabled="== DVDCSS support disabled. =="
hal_not_found="== Could not find hal. HAL support disabled. =="
@@ -325,6 +327,12 @@ AC_ARG_ENABLE([ffmpeg_libvorbis],
[use_ffmpeg_libvorbis=$enableval],
[use_ffmpeg_libvorbis=no])
+AC_ARG_ENABLE([dvdread],
+ [AS_HELP_STRING([--enable-dvdread],
+ [enable dvd image playback (default is yes)])],
+ [use_dvdread=$enableval],
+ [use_dvdread=yes])
+
AC_ARG_ENABLE([dvdcss],
[AS_HELP_STRING([--enable-dvdcss],
[enable DVDCSS support (default is yes)])],
@@ -1678,8 +1686,20 @@ else
final_message="$final_message\n HAL Support:\tNo"
fi
+if test "$use_dvdread" = "yes"; then
+ AC_MSG_NOTICE($dvdread_enabled)
+ final_message="$final_message\n DVD Playback:\tYes"
+ USE_DVDREAD=1
+ SKIP_CONFIG_DVDREAD=0
+else
+ AC_MSG_NOTICE($dvdread_disabled)
+ final_message="$final_message\n DVD Playback:\tNo"
+ USE_DVDREAD=0
+ SKIP_CONFIG_DVDREAD=1
+fi
+
# DVDCSS
-if test "$use_dvdcss" = "yes"; then
+if test "$use_dvdcss" = "yes" && test "$use_dvdread" = "yes"; then
AC_MSG_NOTICE($dvdcss_enabled)
final_message="$final_message\n DVDCSS:\tYes"
BUILD_DVDCSS=1
@@ -1825,7 +1845,6 @@ OUTPUT_FILES="Makefile \
xbmc/cores/VideoRenderers/Makefile \
xbmc/cores/dvdplayer/Makefile \
lib/Makefile \
- lib/libdvd/Makefile \
xbmc/cores/DllLoader/Makefile \
xbmc/cores/dvdplayer/DVDCodecs/Makefile \
xbmc/cores/dvdplayer/DVDCodecs/Audio/Makefile \
@@ -1881,6 +1900,10 @@ if test "$use_skin_touched" = "yes"; then
OUTPUT_FILES="$OUTPUT_FILES addons/skin.touched/media/Makefile"
fi
+if test "$use_dvdread" = "yes"; then
+OUTPUT_FILES="$OUTPUT_FILES lib/libdvd/Makefile"
+fi
+
# Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
# .dummy.am does nothing.
AC_CONFIG_FILES([.dummy])
@@ -1936,7 +1959,7 @@ AC_SUBST(USE_LIBUDEV)
AC_SUBST(USE_LIBUSB)
AC_SUBST(USE_LIBCEC)
AC_SUBST(USE_WEB_SERVER)
-
+AC_SUBST(USE_DVDREAD)
# pushd and popd are not available in other shells besides bash, so implement
# our own pushd/popd functions
@@ -2103,7 +2126,7 @@ XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
$MAKE dvdread-config &&
mkdir -p `pwd`/../includes/dvdread
cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
-], [0])
+], [$SKIP_CONFIG_DVDREAD])
XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
./configure2 \
@@ -2117,7 +2140,7 @@ XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
--enable-static \
--disable-shared \
--cc="$CC"
-], [0])
+], [$SKIP_CONFIG_DVDREAD])
XB_CONFIG_MODULE([lib/libid3tag/libid3tag],[
./configure \

0 comments on commit ce70964

Please sign in to comment.