259 |
258 |
260 AC_SUBST(CUPS_CFLAGS) |
259 AC_SUBST(CUPS_CFLAGS) |
261 |
260 |
262 ]) |
261 ]) |
263 |
262 |
|
263 AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE], |
|
264 [ |
|
265 POTENTIAL_FREETYPE_INCLUDE_PATH="$1" |
|
266 POTENTIAL_FREETYPE_LIB_PATH="$2" |
|
267 METHOD="$3" |
|
268 |
|
269 # First check if the files exists. |
|
270 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then |
|
271 # We found an arbitrary include file. That's a good sign. |
|
272 AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD]) |
|
273 FOUND_FREETYPE=yes |
|
274 |
|
275 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" |
|
276 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then |
|
277 AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.]) |
|
278 FOUND_FREETYPE=no |
|
279 else |
|
280 if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
281 # On Windows, we will need both .lib and .dll file. |
|
282 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then |
|
283 AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.]) |
|
284 FOUND_FREETYPE=no |
|
285 fi |
|
286 elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then |
|
287 # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! |
|
288 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" |
|
289 fi |
|
290 fi |
|
291 fi |
|
292 |
|
293 if test "x$FOUND_FREETYPE" = xyes; then |
|
294 BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH) |
|
295 BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH) |
|
296 |
|
297 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" |
|
298 AC_MSG_CHECKING([for freetype includes]) |
|
299 AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH]) |
|
300 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" |
|
301 AC_MSG_CHECKING([for freetype libraries]) |
|
302 AC_MSG_RESULT([$FREETYPE_LIB_PATH]) |
|
303 fi |
|
304 ]) |
|
305 |
264 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], |
306 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], |
265 [ |
307 [ |
266 |
308 |
267 ############################################################################### |
309 ############################################################################### |
268 # |
310 # |
269 # The ubiquitous freetype2 library is used to render fonts. |
311 # The ubiquitous freetype library is used to render fonts. |
270 # |
312 # |
271 AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], |
313 AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], |
272 [specify prefix directory for the freetype2 package |
314 [specify prefix directory for the freetype package |
273 (expecting the libraries under PATH/lib and the headers under PATH/include)])]) |
315 (expecting the libraries under PATH/lib and the headers under PATH/include)])]) |
274 |
316 AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include], |
275 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree |
317 [specify directory for the freetype include files])]) |
276 USING_SYSTEM_FT_LIB=false |
318 AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib], |
277 |
319 [specify directory for the freetype library])]) |
278 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then |
320 AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling], |
|
321 [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])]) |
|
322 |
|
323 FREETYPE_CFLAGS= |
|
324 FREETYPE_LIBS= |
|
325 FREETYPE_BUNDLE_LIB_PATH= |
|
326 |
|
327 if test "x$FREETYPE_NOT_NEEDED" = xyes; then |
279 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then |
328 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then |
280 AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) |
329 AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) |
281 fi |
330 fi |
282 FREETYPE2_CFLAGS= |
331 if test "x$enable_freetype_bundling" != x; then |
283 FREETYPE2_LIBS= |
332 AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored]) |
284 FREETYPE2_LIB_PATH= |
333 fi |
285 else |
334 else |
286 FREETYPE2_FOUND=no |
335 # freetype is needed to build; go get it! |
287 |
336 |
288 if test "x$with_freetype" != x; then |
337 BUNDLE_FREETYPE="$enable_freetype_bundling" |
289 BASIC_FIXUP_PATH(with_freetype) |
338 |
290 FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" |
339 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then |
291 FREETYPE2_LIB_PATH="$with_freetype/lib" |
340 # User has specified settings |
292 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then |
341 |
293 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" |
342 if test "x$BUNDLE_FREETYPE" = x; then |
294 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" |
343 # If not specified, default is to bundle freetype |
295 fi |
344 BUNDLE_FREETYPE=yes |
|
345 fi |
|
346 |
|
347 if test "x$with_freetype" != x; then |
|
348 POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include" |
|
349 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib" |
|
350 fi |
|
351 |
|
352 # Allow --with-freetype-lib and --with-freetype-include to override |
|
353 if test "x$with_freetype_include" != x; then |
|
354 POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include" |
|
355 fi |
|
356 if test "x$with_freetype_lib" != x; then |
|
357 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib" |
|
358 fi |
|
359 |
|
360 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then |
|
361 # Okay, we got it. Check that it works. |
|
362 LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype]) |
|
363 if test "x$FOUND_FREETYPE" != xyes; then |
|
364 AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype]) |
|
365 fi |
|
366 else |
|
367 # User specified only one of lib or include. This is an error. |
|
368 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then |
|
369 AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include]) |
|
370 AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) |
|
371 else |
|
372 AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib]) |
|
373 AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) |
|
374 fi |
|
375 fi |
|
376 else |
|
377 # User did not specify settings, but we need freetype. Try to locate it. |
|
378 |
|
379 if test "x$BUNDLE_FREETYPE" = x; then |
|
380 # If not specified, default is to bundle freetype only on windows |
|
381 if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
382 BUNDLE_FREETYPE=yes |
|
383 else |
|
384 BUNDLE_FREETYPE=no |
|
385 fi |
|
386 fi |
|
387 |
|
388 if test "x$FOUND_FREETYPE" != xyes; then |
|
389 # Check builddeps |
|
390 BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) |
|
391 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. |
|
392 if test "x$FOUND_FREETYPE" = xyes; then |
|
393 if test "x$BUNDLE_FREETYPE" = xyes; then |
|
394 AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that]) |
|
395 FOUND_FREETYPE=no |
|
396 else |
|
397 AC_MSG_CHECKING([for freetype]) |
|
398 AC_MSG_RESULT([yes (using builddeps)]) |
|
399 fi |
|
400 fi |
|
401 fi |
|
402 |
|
403 if test "x$FOUND_FREETYPE" != xyes; then |
|
404 # Check modules using pkg-config, but only if we have it (ugly output results otherwise) |
|
405 if test "x$PKG_CONFIG" != x; then |
|
406 PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) |
|
407 if test "x$FOUND_FREETYPE" = xyes; then |
|
408 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. |
|
409 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` |
|
410 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 |
|
411 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
|
412 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` |
|
413 fi |
|
414 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. |
|
415 if test "x$BUNDLE_FREETYPE" = xyes; then |
|
416 AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that]) |
|
417 FOUND_FREETYPE=no |
|
418 else |
|
419 AC_MSG_CHECKING([for freetype]) |
|
420 AC_MSG_RESULT([yes (using pkg-config)]) |
|
421 fi |
|
422 fi |
|
423 fi |
|
424 fi |
|
425 |
|
426 if test "x$FOUND_FREETYPE" != xyes; then |
|
427 # Check in well-known locations |
|
428 if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
429 FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32" |
|
430 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) |
|
431 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
432 if test "x$FOUND_FREETYPE" != xyes; then |
|
433 FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" |
|
434 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) |
|
435 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
436 fi |
|
437 else |
|
438 if test "x$SYS_ROOT" = "x/"; then |
|
439 FREETYPE_ROOT= |
|
440 else |
|
441 FREETYPE_ROOT="$SYS_ROOT" |
|
442 fi |
|
443 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" |
|
444 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
445 |
|
446 if test "x$FOUND_FREETYPE" != xyes; then |
|
447 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11" |
|
448 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
449 fi |
|
450 |
|
451 if test "x$FOUND_FREETYPE" != xyes; then |
|
452 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" |
|
453 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
454 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location]) |
|
455 else |
|
456 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) |
|
457 if test "x$FOUND_FREETYPE" != xyes; then |
|
458 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location]) |
|
459 fi |
|
460 fi |
|
461 fi |
|
462 fi |
|
463 fi # end check in well-known locations |
|
464 |
|
465 if test "x$FOUND_FREETYPE" != xyes; then |
|
466 HELP_MSG_MISSING_DEPENDENCY([freetype]) |
|
467 AC_MSG_ERROR([Could not find freetype! $HELP_MSG ]) |
|
468 fi |
|
469 fi # end user specified settings |
|
470 |
|
471 # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir. |
|
472 if test "x$FREETYPE_CFLAGS" = x; then |
|
473 BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH) |
|
474 if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then |
|
475 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH" |
|
476 else |
|
477 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH" |
|
478 fi |
|
479 fi |
|
480 |
|
481 if test "x$FREETYPE_LIBS" = x; then |
|
482 BASIC_FIXUP_PATH(FREETYPE_LIB_PATH) |
296 if test "x$OPENJDK_TARGET_OS" = xwindows; then |
483 if test "x$OPENJDK_TARGET_OS" = xwindows; then |
297 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" |
484 FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib" |
298 fi |
485 else |
299 FREETYPE2_CFLAGS="-I$with_freetype/include" |
486 FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype" |
300 if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then |
487 fi |
301 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" |
488 fi |
302 fi |
489 |
303 FREETYPE2_FOUND=yes |
490 # Try to compile it |
304 if test "x$FREETYPE2_FOUND" = xyes; then |
491 AC_MSG_CHECKING([if we can compile and link with freetype]) |
305 # Verify that the directories exist |
492 AC_LANG_PUSH(C++) |
306 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then |
493 PREV_CXXCFLAGS="$CXXFLAGS" |
307 AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include]) |
494 PREV_LDFLAGS="$LDFLAGS" |
308 fi |
495 PREV_CXX="$CXX" |
309 # List the contents of the lib. |
496 CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" |
310 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` |
497 LDFLAGS="$LDFLAGS $FREETYPE_LIBS" |
311 if test "x$FREETYPELIB" = x; then |
498 CXX="$FIXPATH $CXX" |
312 AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib]) |
499 AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
313 fi |
500 #include<ft2build.h> |
314 # Check one h-file |
501 #include FT_FREETYPE_H |
315 if ! test -s "$with_freetype/include/ft2build.h"; then |
502 int main () { |
316 AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h]) |
503 FT_Init_FreeType(NULL); |
317 fi |
504 return 0; |
318 fi |
505 } |
319 fi |
506 ]])], |
320 if test "x$FREETYPE2_FOUND" = xno; then |
507 [ |
321 BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) |
508 AC_MSG_RESULT([yes]) |
322 USING_SYSTEM_FT_LIB=true |
509 ], |
323 fi |
510 [ |
324 if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then |
511 AC_MSG_RESULT([no]) |
325 FREETYPELOCATION="$PROGRAMFILES/GnuWin32" |
512 AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.]) |
326 BASIC_FIXUP_PATH(FREETYPELOCATION) |
513 AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS]) |
327 AC_MSG_CHECKING([for freetype in some standard windows locations]) |
514 |
328 if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then |
515 HELP_MSG_MISSING_DEPENDENCY([freetype]) |
329 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" |
516 |
330 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" |
517 AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG]) |
331 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" |
518 ] |
332 if ! test -s "$FREETYPE2_LIBS"; then |
519 ) |
333 AC_MSG_ERROR([Could not find $FREETYPE2_LIBS]) |
520 CXXCFLAGS="$PREV_CXXFLAGS" |
334 fi |
521 LDFLAGS="$PREV_LDFLAGS" |
335 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then |
522 CXX="$PREV_CXX" |
336 AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll]) |
523 AC_LANG_POP(C++) |
337 fi |
524 |
338 USING_SYSTEM_FT_LIB=true |
525 AC_MSG_CHECKING([if we should bundle freetype]) |
339 FREETYPE2_FOUND=yes |
526 if test "x$BUNDLE_FREETYPE" = xyes; then |
340 fi |
527 FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH" |
341 AC_MSG_RESULT([$FREETYPE2_FOUND]) |
528 fi |
342 fi |
529 AC_MSG_RESULT([$BUNDLE_FREETYPE]) |
343 if test "x$FREETYPE2_FOUND" = xno; then |
530 |
344 PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) |
531 fi # end freetype needed |
345 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. |
532 |
346 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` |
533 AC_SUBST(FREETYPE_BUNDLE_LIB_PATH) |
347 USING_SYSTEM_FT_LIB=true |
534 AC_SUBST(FREETYPE_CFLAGS) |
348 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 |
535 AC_SUBST(FREETYPE_LIBS) |
349 if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
|
350 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` |
|
351 fi |
|
352 fi |
|
353 if test "x$FREETYPE2_FOUND" = xno; then |
|
354 AC_MSG_CHECKING([for freetype in some standard locations]) |
|
355 |
|
356 if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then |
|
357 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include" |
|
358 DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype" |
|
359 fi |
|
360 if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then |
|
361 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2" |
|
362 DEFAULT_FREETYPE_LIBS="-lfreetype" |
|
363 fi |
|
364 |
|
365 PREV_CXXCFLAGS="$CXXFLAGS" |
|
366 PREV_LDFLAGS="$LDFLAGS" |
|
367 CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" |
|
368 LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" |
|
369 AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
370 #include<ft2build.h> |
|
371 #include FT_FREETYPE_H |
|
372 int main() { return 0; } |
|
373 ]])], |
|
374 [ |
|
375 # Yes, the default cflags and libs did the trick. |
|
376 FREETYPE2_FOUND=yes |
|
377 FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" |
|
378 FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" |
|
379 ], |
|
380 [ |
|
381 FREETYPE2_FOUND=no |
|
382 ] |
|
383 ) |
|
384 CXXCFLAGS="$PREV_CXXFLAGS" |
|
385 LDFLAGS="$PREV_LDFLAGS" |
|
386 AC_MSG_RESULT([$FREETYPE2_FOUND]) |
|
387 USING_SYSTEM_FT_LIB=true |
|
388 fi |
|
389 if test "x$FREETYPE2_FOUND" = xno; then |
|
390 HELP_MSG_MISSING_DEPENDENCY([freetype2]) |
|
391 AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]) |
|
392 fi |
|
393 |
|
394 if test "x$OPENJDK_TARGET_OS" != xwindows; then |
|
395 # AC_CHECK_LIB does not support use of cl.exe |
|
396 PREV_LDFLAGS="$LDFLAGS" |
|
397 LDFLAGS="$FREETYPE2_LIBS" |
|
398 AC_CHECK_LIB(freetype, FT_Init_FreeType, |
|
399 FREETYPE2_FOUND=true, |
|
400 AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])) |
|
401 LDFLAGS="$PREV_LDFLAGS" |
|
402 fi |
|
403 fi |
|
404 |
|
405 AC_SUBST(USING_SYSTEM_FT_LIB) |
|
406 AC_SUBST(FREETYPE2_LIB_PATH) |
|
407 AC_SUBST(FREETYPE2_CFLAGS) |
|
408 AC_SUBST(FREETYPE2_LIBS) |
|
409 ]) |
536 ]) |
410 |
537 |
411 AC_DEFUN_ONCE([LIB_SETUP_ALSA], |
538 AC_DEFUN_ONCE([LIB_SETUP_ALSA], |
412 [ |
539 [ |
413 |
540 |