提交 84f57479 编写于 作者: O omajid

8011278: Allow using a system-installed giflib

Reviewed-by: andrew, prr
上级 ff158f8f
...@@ -499,11 +499,36 @@ AC_SUBST(USE_EXTERNAL_LIBJPEG) ...@@ -499,11 +499,36 @@ AC_SUBST(USE_EXTERNAL_LIBJPEG)
# Check for the gif library # Check for the gif library
# #
USE_EXTERNAL_LIBJPEG=true AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
AC_CHECK_LIB(gif, main, [], [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
[ USE_EXTERNAL_LIBGIF=false
AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
]) AC_MSG_CHECKING([for which giflib to use])
# default is bundled
DEFAULT_GIFLIB=bundled
#
# if user didn't specify, use DEFAULT_GIFLIB
#
if test "x${with_giflib}" = "x"; then
with_giflib=${DEFAULT_GIFLIB}
fi
AC_MSG_RESULT(${with_giflib})
if test "x${with_giflib}" = "xbundled"; then
USE_EXTERNAL_LIBGIF=false
elif test "x${with_giflib}" = "xsystem"; then
AC_CHECK_HEADER(gif_lib.h, [],
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
AC_CHECK_LIB(gif, DGifGetCode, [],
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
USE_EXTERNAL_LIBGIF=true
else
AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
fi
AC_SUBST(USE_EXTERNAL_LIBGIF) AC_SUBST(USE_EXTERNAL_LIBGIF)
############################################################################### ###############################################################################
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册