common/autoconf/libraries.m4

Print this page




 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 zlib library
 658   #
 659 
 660   AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
 661       [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
 662 
 663   AC_CHECK_LIB(z, compress,
 664       [ ZLIB_FOUND=yes ],
 665       [ ZLIB_FOUND=no ])
 666 
 667   AC_MSG_CHECKING([for which zlib to use])
 668 
 669   DEFAULT_ZLIB=bundled
 670   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 671     #
 672     # On macosx default is system...on others default is
 673     #
 674     DEFAULT_ZLIB=system
 675   fi
 676 




 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
 677       USE_EXTERNAL_LIBPNG=false
 678       AC_MSG_RESULT([bundled])
 679   elif test "x${with_libpng}" = "xsystem"; then
 680       PKG_CHECK_MODULES(PNG, libpng,
 681                    [ LIBPNG_FOUND=yes ],
 682                    [ LIBPNG_FOUND=no ])
 683       if test "x${LIBPNG_FOUND}" = "xyes"; then
 684           USE_EXTERNAL_LIBPNG=true
 685           AC_MSG_RESULT([system])
 686       else
 687           AC_MSG_RESULT([system not found])
 688           AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
 689       fi
 690   else
 691       AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
 692   fi
 693   AC_SUBST(USE_EXTERNAL_LIBPNG)
 694 
 695   ###############################################################################
 696   #
 697   # Check for the zlib library
 698   #
 699 
 700   AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
 701       [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
 702 
 703   AC_CHECK_LIB(z, compress,
 704       [ ZLIB_FOUND=yes ],
 705       [ ZLIB_FOUND=no ])
 706 
 707   AC_MSG_CHECKING([for which zlib to use])
 708 
 709   DEFAULT_ZLIB=bundled
 710   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 711     #
 712     # On macosx default is system...on others default is
 713     #
 714     DEFAULT_ZLIB=system
 715   fi
 716