[vlc-commits] Link dvdread and dvdnav plugins to libdvdcss, always

Rafaël Carré git at videolan.org
Fri Nov 25 00:28:33 CET 2011


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Nov 24 18:27:35 2011 -0500| [1424165964f3c4b27269780f4d7eefd7107c6892] | committer: Rafaël Carré

Link dvdread and dvdnav plugins to libdvdcss, always

Also add missing libraries for darwin

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1424165964f3c4b27269780f4d7eefd7107c6892
---

 configure.ac |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2c0567a..a520c68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1811,10 +1811,21 @@ fi
 dnl
 dnl dvdread module: check for libdvdread
 dnl
-dnl prepend -ldvdcss on OS that need it
-AS_CASE(["${SYS}"], [mingw32|darwin], [VLC_ADD_LIBS([dvdread], [-ldvdcss])])
 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto])
 
+dnl libdvdcss
+darwin_libdvdcss_extralibs="-Wl,-framework,CoreFoundation -Wl,-framework,IOKit"
+libdvdcss_extralibs=""
+test "${SYS}" = darwin && libdvdcss_extralibs="${darwin_libdvdcss_extralibs}"
+AC_CHECK_LIB(dvdcss, dvdcss_interface_2, [
+    VLC_ADD_LIBS([dvdread], [-ldvdcss])
+    VLC_ADD_LIBS([dvdnav], [-ldvdcss])
+    if test "${SYS}" = darwin; then
+        VLC_ADD_LIBS([dvdread], "${darwin_libdvdcss_extralibs}")
+        VLC_ADD_LIBS([dvdnav], "${darwin_libdvdcss_extralibs}")
+    fi
+    ],, "${darwin_libdvdcss_extralibs}")
+
 dnl
 dnl libdvdnav plugin
 dnl
@@ -1823,9 +1834,6 @@ AC_ARG_ENABLE(dvdnav,
     [disable DVD navigation with libdvdnav (default auto)])])
 if test "${enable_dvdnav}" != "no"
 then
-  dnl prepend -ldvdcss on OS that need it
-  AS_CASE(["${SYS}"], [mingw32|darwin], [VLC_ADD_LIBS([dvdnav], [-ldvdcss])])
-
   PKG_CHECK_MODULES(DVDNAV, dvdnav, [
     VLC_ADD_PLUGIN([dvdnav])
     VLC_ADD_CFLAGS([dvdnav],[${DVDNAV_CFLAGS}])



More information about the vlc-commits mailing list