497 ############################################################################### |
497 ############################################################################### |
498 # |
498 # |
499 # Check for the gif library |
499 # Check for the gif library |
500 # |
500 # |
501 |
501 |
502 USE_EXTERNAL_LIBJPEG=true |
502 AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib], |
503 AC_CHECK_LIB(gif, main, [], |
503 [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
504 [ USE_EXTERNAL_LIBGIF=false |
504 |
505 AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source]) |
505 |
506 ]) |
506 AC_MSG_CHECKING([for which giflib to use]) |
|
507 |
|
508 # default is bundled |
|
509 DEFAULT_GIFLIB=bundled |
|
510 |
|
511 # |
|
512 # if user didn't specify, use DEFAULT_GIFLIB |
|
513 # |
|
514 if test "x${with_giflib}" = "x"; then |
|
515 with_giflib=${DEFAULT_GIFLIB} |
|
516 fi |
|
517 |
|
518 AC_MSG_RESULT(${with_giflib}) |
|
519 |
|
520 if test "x${with_giflib}" = "xbundled"; then |
|
521 USE_EXTERNAL_LIBGIF=false |
|
522 elif test "x${with_giflib}" = "xsystem"; then |
|
523 AC_CHECK_HEADER(gif_lib.h, [], |
|
524 [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) |
|
525 AC_CHECK_LIB(gif, DGifGetCode, [], |
|
526 [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) |
|
527 |
|
528 USE_EXTERNAL_LIBGIF=true |
|
529 else |
|
530 AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) |
|
531 fi |
507 AC_SUBST(USE_EXTERNAL_LIBGIF) |
532 AC_SUBST(USE_EXTERNAL_LIBGIF) |
508 |
533 |
509 ############################################################################### |
534 ############################################################################### |
510 # |
535 # |
511 # Check for the zlib library |
536 # Check for the zlib library |