23 # questions.
24 #
25
26 ################################################################################
27 # Setup bundled libraries.
28 #
29 # For libjpeg, giflib, libpng, lcms2 and zlib the source is present in the
30 # OpenJDK repository (referred to as "bundled"). Default is to use libjpeg,
31 # giflib, libpng and lcms2 libraries as "bundled". The default for zlib is
32 # to use the bundled zlib on Windows and AIX, otherwise the external ("system")
33 # zlib, if present. However the libs may be replaced by an external ("system")
34 # version by the user.
35 ################################################################################
36 AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
37 [
38 LIB_SETUP_LIBJPEG
39 LIB_SETUP_GIFLIB
40 LIB_SETUP_LIBPNG
41 LIB_SETUP_ZLIB
42 LIB_SETUP_LCMS
43 ])
44
45 ################################################################################
46 # Setup libjpeg
47 ################################################################################
48 AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
49 [
50 AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
51 [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
52
53 AC_MSG_CHECKING([for which libjpeg to use])
54 # default is bundled
55 DEFAULT_LIBJPEG=bundled
56 # if user didn't specify, use DEFAULT_LIBJPEG
57 if test "x${with_libjpeg}" = "x"; then
58 with_libjpeg=${DEFAULT_LIBJPEG}
59 fi
60 AC_MSG_RESULT(${with_libjpeg})
61
62 if test "x${with_libjpeg}" = "xbundled"; then
245 USE_EXTERNAL_LCMS=false
246 LCMS_CFLAGS=""
247 LCMS_LIBS=""
248 AC_MSG_RESULT([bundled])
249 elif test "x${with_lcms}" = "xsystem"; then
250 AC_MSG_RESULT([system])
251 PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
252 if test "x${LCMS_FOUND}" = "xyes"; then
253 # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
254 USE_EXTERNAL_LCMS=true
255 else
256 AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
257 fi
258 else
259 AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
260 fi
261
262 AC_SUBST(USE_EXTERNAL_LCMS)
263 AC_SUBST(LCMS_CFLAGS)
264 AC_SUBST(LCMS_LIBS)
265 ])
|
23 # questions.
24 #
25
26 ################################################################################
27 # Setup bundled libraries.
28 #
29 # For libjpeg, giflib, libpng, lcms2 and zlib the source is present in the
30 # OpenJDK repository (referred to as "bundled"). Default is to use libjpeg,
31 # giflib, libpng and lcms2 libraries as "bundled". The default for zlib is
32 # to use the bundled zlib on Windows and AIX, otherwise the external ("system")
33 # zlib, if present. However the libs may be replaced by an external ("system")
34 # version by the user.
35 ################################################################################
36 AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
37 [
38 LIB_SETUP_LIBJPEG
39 LIB_SETUP_GIFLIB
40 LIB_SETUP_LIBPNG
41 LIB_SETUP_ZLIB
42 LIB_SETUP_LCMS
43 LIB_SETUP_HARFBUZZ
44 ])
45
46 ################################################################################
47 # Setup libjpeg
48 ################################################################################
49 AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
50 [
51 AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
52 [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
53
54 AC_MSG_CHECKING([for which libjpeg to use])
55 # default is bundled
56 DEFAULT_LIBJPEG=bundled
57 # if user didn't specify, use DEFAULT_LIBJPEG
58 if test "x${with_libjpeg}" = "x"; then
59 with_libjpeg=${DEFAULT_LIBJPEG}
60 fi
61 AC_MSG_RESULT(${with_libjpeg})
62
63 if test "x${with_libjpeg}" = "xbundled"; then
246 USE_EXTERNAL_LCMS=false
247 LCMS_CFLAGS=""
248 LCMS_LIBS=""
249 AC_MSG_RESULT([bundled])
250 elif test "x${with_lcms}" = "xsystem"; then
251 AC_MSG_RESULT([system])
252 PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
253 if test "x${LCMS_FOUND}" = "xyes"; then
254 # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
255 USE_EXTERNAL_LCMS=true
256 else
257 AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
258 fi
259 else
260 AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
261 fi
262
263 AC_SUBST(USE_EXTERNAL_LCMS)
264 AC_SUBST(LCMS_CFLAGS)
265 AC_SUBST(LCMS_LIBS)
266 ])
267
268 ################################################################################
269 # Setup harfbuzz
270 ################################################################################
271 AC_DEFUN_ONCE([LIB_SETUP_HARFBUZZ],
272 [
273 AC_ARG_WITH(harfbuzz, [AS_HELP_STRING([--with-harfbuzz],
274 [use harfbuzz from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
275
276 AC_MSG_CHECKING([for which harfbuzz to use])
277
278 DEFAULT_HARFBUZZ=bundled
279 # If user didn't specify, use DEFAULT_HARFBUZZ
280 if test "x${with_harfbuzz}" = "x"; then
281 with_harfbuzz=${DEFAULT_HARFBUZZ}
282 fi
283
284 if test "x${with_harfbuzz}" = "xbundled"; then
285 USE_EXTERNAL_HARFBUZZ=false
286 HARFBUZZ_CFLAGS=""
287 HARFBUZZ_LIBS=""
288 AC_MSG_RESULT([bundled])
289 elif test "x${with_harfbuzz}" = "xsystem"; then
290 AC_MSG_RESULT([system])
291 PKG_CHECK_MODULES([HARFBUZZ], [harfbuzz], [HARFBUZZ_FOUND=yes], [HARFBUZZ_FOUND=no])
292 if test "x${HARFBUZZ_FOUND}" = "xyes"; then
293 # PKG_CHECK_MODULES will set HARFBUZZ_CFLAGS and HARFBUZZ_LIBS
294 USE_EXTERNAL_HARFBUZZ=true
295 else
296 HELP_MSG_MISSING_DEPENDENCY([harfbuzz])
297 AC_MSG_ERROR([--with-harfbuzz=system specified, but no harfbuzz found! $HELP_MSG])
298 fi
299 else
300 AC_MSG_ERROR([Invalid value for --with-harfbuzz: ${with_harfbuzz}, use 'system' or 'bundled'])
301 fi
302
303 AC_SUBST(USE_EXTERNAL_HARFBUZZ)
304 AC_SUBST(HARFBUZZ_CFLAGS)
305 AC_SUBST(HARFBUZZ_LIBS)
306 ])
|