Skip to content

Commit 2f10fb7

Browse files
brad0hpi1
authored andcommitted
Add build option to force building without external libudfread
1 parent 4ae2a2c commit 2f10fb7

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

configure.ac

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ AC_ARG_WITH([bdj-bootclasspath],
132132
AC_ARG_WITH([java9],
133133
[AS_HELP_STRING([--with-java9], [build with Java 9+ (drop support for Java <1.6) @<:@default=without@:>@])])
134134

135+
AC_ARG_WITH([external-libudfread],
136+
[AS_HELP_STRING([--without-external-libudfread],
137+
[build without external libudfread @<:@default=with@:>@])],
138+
[with_external_libudfread=$withwal],
139+
[with_external_libudfread=yes])
140+
135141
dnl required programs
136142
AC_PROG_CC
137143
AM_PROG_CC_C_O
@@ -310,11 +316,14 @@ AM_CONDITIONAL([BDJ_J2SE], [ test x"$BDJ_TYPE" != x"j2me" ])
310316
dnl bootclasspath
311317
AC_SUBST(BDJ_BOOTCLASSPATH)
312318

313-
PKG_CHECK_MODULES([LIBUDFREAD], [libudfread >= 1.1.0],
314-
[with_libudfread=yes
315-
AC_DEFINE([HAVE_LIBUDFREAD], [1], [Define to 1 if external libudfread is to be used])
316-
PACKAGES="$PACKAGES libudfread >= 1.1.0"
317-
],[
319+
AS_IF([test "x$with_external_libudfread" = "xyes"], [
320+
PKG_CHECK_MODULES([LIBUDFREAD], [libudfread >= 1.1.0],
321+
[with_libudfread=yes
322+
AC_DEFINE([HAVE_LIBUDFREAD], [1], [Define to 1 if external libudfread is to be used])
323+
PACKAGES="$PACKAGES libudfread >= 1.1.0"
324+
],[break;])
325+
])
326+
AS_IF([test "x$with_libudfread" != "xyes"], [
318327
dnl udf support (using git submodule)
319328
with_libudfread=no
320329
AS_IF([test ! -f "${srcdir}/contrib/libudfread/src/udfread.h"], [AC_MSG_ERROR("libudfread source tree not found")])

0 commit comments

Comments
 (0)