[libbluray-devel] Add configure checks and build rules for UDF reading library
hpi1
git at videolan.org
Tue Feb 10 12:15:31 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Feb 9 15:14:50 2015 +0200| [c6a7390bd5e4d8d0a02a0ed84e1e4d26d9101cc4] | committer: hpi1
Add configure checks and build rules for UDF reading library
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=c6a7390bd5e4d8d0a02a0ed84e1e4d26d9101cc4
---
ChangeLog | 1 +
Makefile.am | 29 +++++++++++++++++++++++++----
configure.ac | 21 +++++++++++++++++++++
3 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c72545b..e6f9c5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- Add support for UDF image files and unmounted discs
- Fix infinite loop with some broken HDMV menus
2015-01-26: Version 0.7.0
diff --git a/Makefile.am b/Makefile.am
index 59fc488..b01688d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,14 +1,20 @@
include $(top_srcdir)/doxygen-include.am
ACLOCAL_AMFLAGS = -I m4
-DISTCHECK_CONFIGURE_FLAGS = --enable-bdjava
+DISTCHECK_CONFIGURE_FLAGS = --enable-bdjava --enable-udf
MOSTLYCLEANFILES = $(DX_CLEANFILES)
-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
+if ENABLE_UDF
+POSIX_C_SOURCE=200809L
+else
+POSIX_C_SOURCE=200112L
+endif
+
+SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) -D_REENTRANT
SET_INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libbluray -I$(top_builddir)/src/libbluray $(BDJAVA_CFLAGS)
-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS)
+AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(UDF_CFLAGS)
EXTRA_DIST = \
bootstrap \
@@ -142,7 +148,7 @@ libbluray_la_SOURCES+= \
endif
endif
-libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO)
+libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO) -export-symbols-regex "^bd_"
libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS)
noinst_HEADERS = \
@@ -162,6 +168,21 @@ pkginclude_HEADERS = \
src/libbluray/decoders/overlay.h \
src/util/log_control.h
+if ENABLE_UDF
+libbluray_la_SOURCES += \
+ src/libbluray/disc/udf_fs.h \
+ src/libbluray/disc/udf_fs.c\
+ \
+ contrib/libudfread/src/blockinput.h \
+ contrib/libudfread/src/default_blockinput.h \
+ contrib/libudfread/src/default_blockinput.c \
+ contrib/libudfread/src/ecma167.h \
+ contrib/libudfread/src/ecma167.c \
+ contrib/libudfread/src/udfread.h \
+ contrib/libudfread/src/udfread.c
+endif
+
+
if USING_BDJAVA
jardir=$(datadir)/java/
jar_DATA=$(top_builddir)/.libs/libbluray-$(BDJ_TYPE)-$(VERSION).jar
diff --git a/configure.ac b/configure.ac
index 5e44fad..3609d88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,9 @@ AC_ARG_ENABLE([bdjava],
[use_bdjava=$enableval],
[use_bdjava=yes])
+AC_ARG_ENABLE([udf],
+ [AS_HELP_STRING([--enable-udf], [enable UDF support @<:@default=disabled@:>@])])
+
AC_ARG_WITH([libxml2],
[AS_HELP_STRING([--without-libxml2], [build without libxml2 support @<:@default=with@:>@])])
@@ -237,6 +240,23 @@ AC_SUBST(BDJ_TYPE)
dnl bootclasspath
AC_SUBST(BDJ_BOOTCLASSPATH)
+dnl udf support (using git submodule)
+AS_IF([test "x$enable_udf" = "xyes"],
+ [ AC_CHECK_FILE([${srcdir}/contrib/libudfread/src/udfread.h],, [AC_MSG_ERROR("libudfread source tree not found")])
+
+ AC_CHECK_HEADERS([unistd.h fcntl.h])
+ AS_IF([test "${SYS}" != "mingw32"], [
+ AC_CHECK_FUNC([pread],, [AC_MSG_ERROR("Function pread not found. Try with --disable-udf.")])
+ ])
+
+ AC_DEFINE([ENABLE_UDF], [1], [Define to 1 if libudfread is to be used for disc image access])
+ UDF_CFLAGS='-I${srcdir}/contrib/libudfread/src/'
+ AC_SUBST(UDF_CFLAGS)
+ ],
+ [enable_udf=no])
+
+AM_CONDITIONAL([ENABLE_UDF], [test $enable_udf = "yes" ])
+
dnl generate documentation
DX_INIT_DOXYGEN(libbluray, doc/doxygen-config, [doc/doxygen])
@@ -282,5 +302,6 @@ fi
fi
fi
echo " Metadata support (libxml2): $with_libxml2"
+echo " UDF filesystem support: $enable_udf"
echo " Build examples: $use_examples"
More information about the libbluray-devel
mailing list