637 fi 638 639 AC_MSG_RESULT(${with_giflib}) 640 641 if test "x${with_giflib}" = "xbundled"; then 642 USE_EXTERNAL_LIBGIF=false 643 elif test "x${with_giflib}" = "xsystem"; then 644 AC_CHECK_HEADER(gif_lib.h, [], 645 [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) 646 AC_CHECK_LIB(gif, DGifGetCode, [], 647 [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) 648 649 USE_EXTERNAL_LIBGIF=true 650 else 651 AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) 652 fi 653 AC_SUBST(USE_EXTERNAL_LIBGIF) 654 655 ############################################################################### 656 # 657 # Check for the png library 658 # 659 660 AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng], 661 [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) 662 663 664 AC_MSG_CHECKING([for which libpng to use]) 665 666 # default is bundled 667 DEFAULT_LIBPNG=bundled 668 669 # 670 # if user didn't specify, use DEFAULT_LIBPNG 671 # 672 if test "x${with_libpng}" = "x"; then 673 with_libpng=${DEFAULT_LIBPNG} 674 fi 675 676 if test "x${with_libpng}" = "xbundled"; then | 637 fi 638 639 AC_MSG_RESULT(${with_giflib}) 640 641 if test "x${with_giflib}" = "xbundled"; then 642 USE_EXTERNAL_LIBGIF=false 643 elif test "x${with_giflib}" = "xsystem"; then 644 AC_CHECK_HEADER(gif_lib.h, [], 645 [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) 646 AC_CHECK_LIB(gif, DGifGetCode, [], 647 [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) 648 649 USE_EXTERNAL_LIBGIF=true 650 else 651 AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) 652 fi 653 AC_SUBST(USE_EXTERNAL_LIBGIF) 654 655 ############################################################################### 656 # 657 # Check for the lcms2 library 658 # 659 660 AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms], 661 [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) 662 663 AC_MSG_CHECKING([for which lcms to use]) 664 665 DEFAULT_LCMS=bundled 666 667 # 668 # If user didn't specify, use DEFAULT_LCMS 669 # 670 if test "x${with_lcms}" = "x"; then 671 with_lcms=${DEFAULT_LCMS} 672 fi 673 674 if test "x${with_lcms}" = "xbundled"; then 675 USE_EXTERNAL_LCMS=false 676 AC_MSG_RESULT([bundled]) 677 elif test "x${with_lcms}" = "xsystem"; then 678 AC_MSG_RESULT([system]) 679 PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no]) 680 if test "x${LCMS_FOUND}" = "xyes"; then 681 USE_EXTERNAL_LCMS=true 682 else 683 AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!]) 684 fi 685 else 686 AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled']) 687 fi 688 689 AC_SUBST(USE_EXTERNAL_LCMS) 690 691 ############################################################################### 692 # 693 # Check for the png library 694 # 695 696 AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng], 697 [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) 698 699 700 AC_MSG_CHECKING([for which libpng to use]) 701 702 # default is bundled 703 DEFAULT_LIBPNG=bundled 704 705 # 706 # if user didn't specify, use DEFAULT_LIBPNG 707 # 708 if test "x${with_libpng}" = "x"; then 709 with_libpng=${DEFAULT_LIBPNG} 710 fi 711 712 if test "x${with_libpng}" = "xbundled"; then |