468 ]) |
468 ]) |
469 |
469 |
470 AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], |
470 AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], |
471 [ |
471 [ |
472 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], |
472 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], |
473 [use this devkit for compilers, tools and resources])], |
473 [use this devkit for compilers, tools and resources])]) |
474 [ |
474 |
475 BASIC_FIXUP_PATH([with_devkit]) |
475 if test "x$with_devkit" = xyes; then |
476 DEVKIT_ROOT="$with_devkit" |
476 AC_MSG_ERROR([--with-devkit must have a value]) |
477 # Check for a meta data info file in the root of the devkit |
477 elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then |
478 if test -f "$DEVKIT_ROOT/devkit.info"; then |
478 BASIC_FIXUP_PATH([with_devkit]) |
479 . $DEVKIT_ROOT/devkit.info |
479 DEVKIT_ROOT="$with_devkit" |
480 # This potentially sets the following: |
480 # Check for a meta data info file in the root of the devkit |
481 # A descriptive name of the devkit |
481 if test -f "$DEVKIT_ROOT/devkit.info"; then |
482 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME]) |
482 . $DEVKIT_ROOT/devkit.info |
483 # Corresponds to --with-extra-path |
483 # This potentially sets the following: |
484 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH]) |
484 # A descriptive name of the devkit |
485 # Corresponds to --with-toolchain-path |
485 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME]) |
486 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH]) |
486 # Corresponds to --with-extra-path |
487 # Corresponds to --with-sysroot |
487 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH]) |
488 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT]) |
488 # Corresponds to --with-toolchain-path |
489 |
489 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH]) |
490 # Identifies the Visual Studio version in the devkit |
490 # Corresponds to --with-sysroot |
491 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION]) |
491 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT]) |
492 # The Visual Studio include environment variable |
492 |
493 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE]) |
493 # Identifies the Visual Studio version in the devkit |
494 # The Visual Studio lib environment variable |
494 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION]) |
495 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB]) |
495 # The Visual Studio include environment variable |
496 # Corresponds to --with-msvcr-dll |
496 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE]) |
497 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL]) |
497 # The Visual Studio lib environment variable |
498 # Corresponds to --with-msvcp-dll |
498 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB]) |
499 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL]) |
499 # Corresponds to --with-msvcr-dll |
500 fi |
500 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL]) |
501 |
501 # Corresponds to --with-msvcp-dll |
502 AC_MSG_CHECKING([for devkit]) |
502 BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL]) |
503 if test "x$DEVKIT_NAME" != x; then |
503 fi |
504 AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT]) |
504 |
505 else |
505 AC_MSG_CHECKING([for devkit]) |
506 AC_MSG_RESULT([$DEVKIT_ROOT]) |
506 if test "x$DEVKIT_NAME" != x; then |
507 fi |
507 AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT]) |
508 |
508 else |
509 BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH) |
509 AC_MSG_RESULT([$DEVKIT_ROOT]) |
510 |
510 fi |
511 # Fallback default of just /bin if DEVKIT_PATH is not defined |
511 |
512 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then |
512 BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH) |
513 DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin" |
513 |
514 fi |
514 # Fallback default of just /bin if DEVKIT_PATH is not defined |
515 BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH) |
515 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then |
516 |
516 DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin" |
517 # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known |
517 fi |
518 # places for backwards compatiblity. |
518 BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH) |
519 if test "x$DEVKIT_SYSROOT" != x; then |
519 |
520 SYSROOT="$DEVKIT_SYSROOT" |
520 # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known |
521 elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then |
521 # places for backwards compatiblity. |
522 SYSROOT="$DEVKIT_ROOT/$host_alias/libc" |
522 if test "x$DEVKIT_SYSROOT" != x; then |
523 elif test -d "$DEVKIT_ROOT/$host/sys-root"; then |
523 SYSROOT="$DEVKIT_SYSROOT" |
524 SYSROOT="$DEVKIT_ROOT/$host/sys-root" |
524 elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then |
525 fi |
525 SYSROOT="$DEVKIT_ROOT/$host_alias/libc" |
526 ] |
526 elif test -d "$DEVKIT_ROOT/$host/sys-root"; then |
527 ) |
527 SYSROOT="$DEVKIT_ROOT/$host/sys-root" |
|
528 fi |
|
529 |
|
530 if test "x$DEVKIT_ROOT" != x; then |
|
531 DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib" |
|
532 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
533 DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64" |
|
534 fi |
|
535 AC_SUBST(DEVKIT_LIB_DIR) |
|
536 fi |
|
537 fi |
528 |
538 |
529 # You can force the sysroot if the sysroot encoded into the compiler tools |
539 # You can force the sysroot if the sysroot encoded into the compiler tools |
530 # is not correct. |
540 # is not correct. |
531 AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root], |
541 AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root], |
532 [alias for --with-sysroot for backwards compatability])], |
542 [alias for --with-sysroot for backwards compatability])], |