[libbluray-devel] Added configure option for build-time Java bootclasspath

hpi1 git at videolan.org
Sat Feb 2 21:02:50 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Feb  2 21:41:09 2013 +0200| [63189d43af9b30b83b7576553ff8cca9505d8d11] | committer: hpi1

Added configure option for build-time Java bootclasspath

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=63189d43af9b30b83b7576553ff8cca9505d8d11
---

 configure.ac                |   12 ++++++++++++
 src/Makefile.am             |    4 +++-
 src/libbluray/bdj/build.xml |    5 +++--
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4677240..48790ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,12 @@ AC_ARG_WITH([bdj-type],
   [BDJ_TYPE=$withval],
   [BDJ_TYPE=j2se])
 
+AC_ARG_WITH([bdj-bootclasspath],
+  [AS_HELP_STRING([--with-bdj-bootclasspath=PATH],
+  [Specify BD-J build-time bootclass path (example /opt/PhoneME/lib/btclasses.zip;/opt/PhoneME/lib/xmlparer.jar). Default is empty.])],
+  [BDJ_BOOTCLASSPATH=$withval],
+  [BDJ_BOOTCLASSPATH=])
+
 # required programs
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -284,6 +290,7 @@ if [[ $use_bdjava = "yes" ]]; then
 
   AC_DEFINE([USING_BDJAVA], [1], ["Define to 1 if using BD-Java"])
   AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."])
+  AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
 fi
 AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
 
@@ -294,6 +301,8 @@ else
   BDJ_TYPE=j2se
 fi
 AC_SUBST(BDJ_TYPE)
+# bootclasspath
+AC_SUBST(BDJ_BOOTCLASSPATH)
 
 # generate documentation
 DX_INIT_DOXYGEN(libbluray, doc/doxygen-config, [doc/doxygen])
@@ -330,6 +339,9 @@ echo "  BD-J support:                  $use_bdjava"
 if [[ $use_bdjava = "yes" ]]; then
 echo "  BD-J font support (freetype2): $use_freetype"
 echo "  BD-J type:                     $BDJ_TYPE"
+if test x"$BDJ_BOOTCLASSPATH" != x""; then
+echo "  BD-J bootclasspath:            $BDJ_BOOTCLASSPATH"
+fi
 fi
 echo "  Metadata support (libxml):     $use_libxml2"
 echo "  Build examples:                $use_examples"
diff --git a/src/Makefile.am b/src/Makefile.am
index def2e43..5c19726 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -114,7 +114,9 @@ libbluray_la_SOURCES+=$(SOURCES_bdj)
 AM_CFLAGS+=@BDJAVA_CFLAGS@
 
 all-local:
-	ant -f $(top_srcdir)/src/libbluray/bdj/build.xml -Dsrc_awt=:java-$(BDJ_TYPE)
+	ant -f $(top_srcdir)/src/libbluray/bdj/build.xml \
+	    -Dsrc_awt=:java-$(BDJ_TYPE) \
+	    -Dbootclasspath="$(BDJ_BOOTCLASSPATH)"
 
 clean-local:
 	ant -f $(top_srcdir)/src/libbluray/bdj/build.xml clean
diff --git a/src/libbluray/bdj/build.xml b/src/libbluray/bdj/build.xml
index f274201..7bf06b3 100644
--- a/src/libbluray/bdj/build.xml
+++ b/src/libbluray/bdj/build.xml
@@ -1,12 +1,13 @@
 <project name="BDJ" default="dist" basedir=".">
     <description>
-        Build file for the java portion of libBDJ
+        Build file for the java portion of libbluray
     </description>
 
     <property name="src" location="java"/>
     <property name="build" location="build"/>
     <property name="dist"  location="../../.libs"/>
     <property name="src_awt" value=""/>
+    <property name="bootclasspath" value=""/>
 
     <target name="init">
         <tstamp/>
@@ -17,9 +18,9 @@
     <target name="compile" depends="init"
             description="compile the source " >
         <javac srcdir="${src}${src_awt}" destdir="${build}" debug="yes"
+               bootclasspath="${bootclasspath}"
                source="1.4" target="1.4" />
     </target>
-
     <target name="dist" depends="compile"
             description="generate the distribution" >
         <jar jarfile="${dist}/libbluray.jar" basedir="${build}" />



More information about the libbluray-devel mailing list