95 # |
95 # |
96 |
96 |
97 # Check if the user has specified sysroot, but not --x-includes or --x-libraries. |
97 # Check if the user has specified sysroot, but not --x-includes or --x-libraries. |
98 # Make a simple check for the libraries at the sysroot, and setup --x-includes and |
98 # Make a simple check for the libraries at the sysroot, and setup --x-includes and |
99 # --x-libraries for the sysroot, if that seems to be correct. |
99 # --x-libraries for the sysroot, if that seems to be correct. |
100 if test "x$SYS_ROOT" != "x/"; then |
100 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then |
101 if test "x$x_includes" = xNONE; then |
101 if test "x$SYSROOT" != "x"; then |
102 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then |
102 if test "x$x_includes" = xNONE; then |
103 x_includes="$SYS_ROOT/usr/X11R6/include" |
103 if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then |
104 elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then |
104 x_includes="$SYSROOT/usr/X11R6/include" |
105 x_includes="$SYS_ROOT/usr/include" |
105 elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then |
106 fi |
106 x_includes="$SYSROOT/usr/include" |
107 fi |
107 fi |
108 if test "x$x_libraries" = xNONE; then |
108 fi |
109 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then |
109 if test "x$x_libraries" = xNONE; then |
110 x_libraries="$SYS_ROOT/usr/X11R6/lib" |
110 if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then |
111 elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
111 x_libraries="$SYSROOT/usr/X11R6/lib" |
112 x_libraries="$SYS_ROOT/usr/lib64" |
112 elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
113 elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then |
113 x_libraries="$SYSROOT/usr/lib64" |
114 x_libraries="$SYS_ROOT/usr/lib" |
114 elif test -f "$SYSROOT/usr/lib/libX11.so"; then |
|
115 x_libraries="$SYSROOT/usr/lib" |
|
116 fi |
115 fi |
117 fi |
116 fi |
118 fi |
117 fi |
119 fi |
118 |
120 |
119 # Now let autoconf do it's magic |
121 # Now let autoconf do it's magic |
129 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then |
131 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then |
130 HELP_MSG_MISSING_DEPENDENCY([x11]) |
132 HELP_MSG_MISSING_DEPENDENCY([x11]) |
131 AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) |
133 AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) |
132 fi |
134 fi |
133 |
135 |
|
136 |
134 if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
137 if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
135 OPENWIN_HOME="/usr/openwin" |
138 OPENWIN_HOME="/usr/openwin" |
136 fi |
139 X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions" |
137 AC_SUBST(OPENWIN_HOME) |
140 X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \ |
138 |
141 -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \ |
|
142 -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \ |
|
143 -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR" |
|
144 fi |
139 |
145 |
140 # |
146 # |
141 # Weird Sol10 something check...TODO change to try compile |
147 # Weird Sol10 something check...TODO change to try compile |
142 # |
148 # |
143 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then |
149 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then |
222 fi |
228 fi |
223 if test "x$CUPS_FOUND" = xno; then |
229 if test "x$CUPS_FOUND" = xno; then |
224 # Getting nervous now? Lets poke around for standard Solaris third-party |
230 # Getting nervous now? Lets poke around for standard Solaris third-party |
225 # package installation locations. |
231 # package installation locations. |
226 AC_MSG_CHECKING([for cups headers]) |
232 AC_MSG_CHECKING([for cups headers]) |
227 if test -s /opt/sfw/cups/include/cups/cups.h; then |
233 if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then |
228 # An SFW package seems to be installed! |
234 # An SFW package seems to be installed! |
229 CUPS_FOUND=yes |
235 CUPS_FOUND=yes |
230 CUPS_CFLAGS="-I/opt/sfw/cups/include" |
236 CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include" |
231 elif test -s /opt/csw/include/cups/cups.h; then |
237 elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then |
232 # A CSW package seems to be installed! |
238 # A CSW package seems to be installed! |
233 CUPS_FOUND=yes |
239 CUPS_FOUND=yes |
234 CUPS_CFLAGS="-I/opt/csw/include" |
240 CUPS_CFLAGS="-I$SYSROOT/opt/csw/include" |
235 fi |
241 fi |
236 AC_MSG_RESULT([$CUPS_FOUND]) |
242 AC_MSG_RESULT([$CUPS_FOUND]) |
237 fi |
243 fi |
238 if test "x$CUPS_FOUND" = xno; then |
244 if test "x$CUPS_FOUND" = xno; then |
239 HELP_MSG_MISSING_DEPENDENCY([cups]) |
245 HELP_MSG_MISSING_DEPENDENCY([cups]) |
383 AC_MSG_RESULT([yes (using builddeps)]) |
389 AC_MSG_RESULT([yes (using builddeps)]) |
384 fi |
390 fi |
385 fi |
391 fi |
386 fi |
392 fi |
387 |
393 |
388 if test "x$FOUND_FREETYPE" != xyes; then |
394 # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config. |
389 # Check modules using pkg-config, but only if we have it (ugly output results otherwise) |
395 if test "x$SYSROOT" = x; then |
390 if test "x$PKG_CONFIG" != x; then |
396 if test "x$FOUND_FREETYPE" != xyes; then |
391 PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) |
397 # Check modules using pkg-config, but only if we have it (ugly output results otherwise) |
392 if test "x$FOUND_FREETYPE" = xyes; then |
398 if test "x$PKG_CONFIG" != x; then |
393 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. |
399 PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) |
394 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` |
400 if test "x$FOUND_FREETYPE" = xyes; then |
395 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 |
401 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. |
396 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
402 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` |
397 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` |
403 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 |
398 fi |
404 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
399 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. |
405 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` |
400 if test "x$BUNDLE_FREETYPE" = xyes; then |
406 fi |
401 AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that]) |
407 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. |
402 FOUND_FREETYPE=no |
408 if test "x$BUNDLE_FREETYPE" = xyes; then |
403 else |
409 AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that]) |
404 AC_MSG_CHECKING([for freetype]) |
410 FOUND_FREETYPE=no |
405 AC_MSG_RESULT([yes (using pkg-config)]) |
411 else |
|
412 AC_MSG_CHECKING([for freetype]) |
|
413 AC_MSG_RESULT([yes (using pkg-config)]) |
|
414 fi |
406 fi |
415 fi |
407 fi |
416 fi |
408 fi |
417 fi |
409 fi |
418 fi |
410 |
419 |
418 FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" |
427 FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" |
419 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) |
428 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) |
420 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
429 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
421 fi |
430 fi |
422 else |
431 else |
423 if test "x$SYS_ROOT" = "x/"; then |
432 FREETYPE_BASE_DIR="$SYSROOT/usr" |
424 FREETYPE_ROOT= |
|
425 else |
|
426 FREETYPE_ROOT="$SYS_ROOT" |
|
427 fi |
|
428 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" |
|
429 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
433 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
430 |
434 |
431 if test "x$FOUND_FREETYPE" != xyes; then |
435 if test "x$FOUND_FREETYPE" != xyes; then |
432 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11" |
436 FREETYPE_BASE_DIR="$SYSROOT/usr/X11" |
433 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
437 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
434 fi |
438 fi |
435 |
439 |
436 if test "x$FOUND_FREETYPE" != xyes; then |
440 if test "x$FOUND_FREETYPE" != xyes; then |
437 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" |
441 FREETYPE_BASE_DIR="$SYSROOT/usr/sfw" |
|
442 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
443 fi |
|
444 |
|
445 if test "x$FOUND_FREETYPE" != xyes; then |
|
446 FREETYPE_BASE_DIR="$SYSROOT/usr" |
438 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
447 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
439 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location]) |
448 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location]) |
440 else |
449 else |
441 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) |
450 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) |
442 if test "x$FOUND_FREETYPE" != xyes; then |
451 if test "x$FOUND_FREETYPE" != xyes; then |
562 ALSA_FOUND=yes |
571 ALSA_FOUND=yes |
563 fi |
572 fi |
564 if test "x$ALSA_FOUND" = xno; then |
573 if test "x$ALSA_FOUND" = xno; then |
565 BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
574 BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
566 fi |
575 fi |
567 if test "x$ALSA_FOUND" = xno; then |
576 # Do not try pkg-config if we have a sysroot set. |
568 PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
577 if test "x$SYSROOT" = x; then |
|
578 if test "x$ALSA_FOUND" = xno; then |
|
579 PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
|
580 fi |
569 fi |
581 fi |
570 if test "x$ALSA_FOUND" = xno; then |
582 if test "x$ALSA_FOUND" = xno; then |
571 AC_CHECK_HEADERS([alsa/asoundlib.h], |
583 AC_CHECK_HEADERS([alsa/asoundlib.h], |
572 [ |
584 [ |
573 ALSA_FOUND=yes |
585 ALSA_FOUND=yes |
862 AC_SUBST(LLVM_LIBS) |
874 AC_SUBST(LLVM_LIBS) |
863 fi |
875 fi |
864 |
876 |
865 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) |
877 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) |
866 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then |
878 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then |
867 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" |
879 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" |
868 fi |
880 fi |
869 |
881 |
870 # TODO better (platform agnostic) test |
882 # TODO better (platform agnostic) test |
871 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then |
883 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then |
872 LIBCXX="-lstdc++" |
884 LIBCXX="-lstdc++" |