Commit ec537474 authored by Rafaël Carré's avatar Rafaël Carré

Add --enable-libdvdcss to the autotools install

This commit adds the argument --enable-libdvdcss (off by default). When
used it directly links libdvdcss into libdvdread. This prevents
libdvdread from having to use dlopen() to get at the libdvdcss
functions.

Currently this feature is used when building VLC for mingw32 and darwin.
parent 30b4cbfd
......@@ -137,6 +137,11 @@ esac
dnl ---------------------------------------------
dnl dynamic linker
dnl ---------------------------------------------
AC_ARG_ENABLE([libdvdcss], [ --enable-libdvdcss force linking against libdvdcss])
CSS_LIBS=""
if test x"$enable_libdvdcss" != xyes; then
dnl dlopen libdvdcss
case $host in
*mingw32*)
CFLAGS="-idirafter \$(top_srcdir)/msvc/include $CFLAGS"
......@@ -157,6 +162,18 @@ case $host in
AC_SUBST(DYNAMIC_LD_LIBS)
;;
esac
else
dnl link with libdvdcss
CSS_LIBS=-ldvdcss
case "${host}" in
*darwin*) CSS_LIBS="${CSS_LIBS} -Wl,-framework,CoreFoundation -Wl,-framework,IOKit"
;;
esac
AC_CHECK_LIB(dvdcss, dvdcss_interface_2,, AC_MSG_ERROR(You need libdvdcss.so.2 or later))
AC_CHECK_HEADERS(dvdcss/dvdcss.h,, AC_MSG_ERROR(You need libdvdcss (dvdcss.h)))
fi
AC_SUBST(CSS_LIBS)
dnl ---------------------------------------------
dnl cflags
......
......@@ -8,4 +8,4 @@ Description: Low level DVD access library
Version: @VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -ldvdread
Libs: -L${libdir} -ldvdread @CSS_LIBS@
......@@ -10,7 +10,7 @@ libdvdread_la_SOURCES = dvd_reader.c nav_read.c ifo_read.c \
dvd_input.c dvd_udf.c md5.c nav_print.c ifo_print.c bitreader.c \
bswap.h dvd_input.h dvdread_internal.h md5.h
libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS)
libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS) @CSS_LIBS@
libdvdread_la_LDFLAGS = -version-info $(DVDREAD_LT_CURRENT):$(DVDREAD_LT_REVISION):$(DVDREAD_LT_AGE) \
-export-symbols-regex "(^dvd.*|^nav.*|^ifo.*|^DVD.*|^UDF.*)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment