common/autoconf/libraries.m4
changeset 25035 2c0a89ff0198
parent 24415 43aa54df554d
child 25039 a0f814f72ad4
equal deleted inserted replaced
24416:d07ed422bdca 25035:2c0a89ff0198
   618   ###############################################################################
   618   ###############################################################################
   619   #
   619   #
   620   # Check for the jpeg library
   620   # Check for the jpeg library
   621   #
   621   #
   622 
   622 
   623   USE_EXTERNAL_LIBJPEG=true
   623   AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
   624   AC_CHECK_LIB(jpeg, main, [],
   624       [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
   625       [ USE_EXTERNAL_LIBJPEG=false
   625 
   626       AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
   626   AC_MSG_CHECKING([for which libjpeg to use])
   627   ])
   627 
       
   628   # default is bundled
       
   629   DEFAULT_LIBJPEG=bundled
       
   630 
       
   631   #
       
   632   # if user didn't specify, use DEFAULT_LIBJPEG
       
   633   #
       
   634   if test "x${with_libjpeg}" = "x"; then
       
   635     with_libjpeg=${DEFAULT_LIBJPEG}
       
   636   fi
       
   637 
       
   638   AC_MSG_RESULT(${with_libjpeg})
       
   639 
       
   640   if test "x${with_libjpeg}" = "xbundled"; then
       
   641     USE_EXTERNAL_LIBJPEG=false
       
   642   elif test "x${with_libjpeg}" = "xsystem"; then
       
   643     AC_CHECK_HEADER(jpeglib.h, [],
       
   644         [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
       
   645     AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
       
   646         [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
       
   647 
       
   648     USE_EXTERNAL_LIBJPEG=true
       
   649   else
       
   650     AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
       
   651   fi
       
   652 
   628   AC_SUBST(USE_EXTERNAL_LIBJPEG)
   653   AC_SUBST(USE_EXTERNAL_LIBJPEG)
   629 
   654 
   630   ###############################################################################
   655   ###############################################################################
   631   #
   656   #
   632   # Check for the gif library
   657   # Check for the gif library