Commit c6a7390b authored by Petri Hintukainen's avatar Petri Hintukainen

Add configure checks and build rules for UDF reading library

parent 60c023f3
- Add support for UDF image files and unmounted discs
- Fix infinite loop with some broken HDMV menus
2015-01-26: Version 0.7.0
......
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
......
......@@ -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"
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