749 AC_SUBST(SDKROOT) 750 fi 751 752 # Prepend the extra path to the global path 753 BASIC_PREPEND_TO_PATH([PATH],$EXTRA_PATH) 754 755 AC_MSG_CHECKING([for sysroot]) 756 AC_MSG_RESULT([$SYSROOT]) 757 AC_MSG_CHECKING([for toolchain path]) 758 AC_MSG_RESULT([$TOOLCHAIN_PATH]) 759 AC_MSG_CHECKING([for extra path]) 760 AC_MSG_RESULT([$EXTRA_PATH]) 761 ]) 762 763 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], 764 [ 765 766 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], 767 [use this as the name of the configuration @<:@generated from important configuration options@:>@])], 768 [ CONF_NAME=${with_conf_name} ]) 769 AC_ARG_WITH(output-base-dir, [AS_HELP_STRING([--with-output-base-dir], 770 [override the default output base directory @<:@./build@:>@])], 771 [ OUTPUT_BASE=${with_output_base_dir} ], [ OUTPUT_BASE="$TOPDIR/build" ] ) 772 773 # Test from where we are running configure, in or outside of src root. 774 AC_MSG_CHECKING([where to store configuration]) 775 if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$TOPDIR/common" \ 776 || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \ 777 || test "x$CURDIR" = "x$TOPDIR/make" ; then 778 # We are running configure from the src root. 779 # Create a default ./build/target-variant-debuglevel output root. 780 if test "x${CONF_NAME}" = x; then 781 AC_MSG_RESULT([in default location]) 782 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}" 783 else 784 AC_MSG_RESULT([in build directory with custom name]) 785 fi 786 OUTPUTDIR="${OUTPUT_BASE}/${CONF_NAME}" 787 $MKDIR -p "$OUTPUTDIR" 788 if test ! -d "$OUTPUTDIR"; then 789 AC_MSG_ERROR([Could not create build directory $OUTPUTDIR]) 790 fi 791 else 792 # We are running configure from outside of the src dir. 793 # Then use the current directory as output dir! 794 # If configuration is situated in normal build directory, just use the build 795 # directory name as configuration name, otherwise use the complete path. 796 if test "x${CONF_NAME}" = x; then 797 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"` 798 fi 799 OUTPUTDIR="$CURDIR" 800 AC_MSG_RESULT([in current directory]) 801 802 # WARNING: This might be a bad thing to do. You need to be sure you want to 803 # have a configuration in this directory. Do some sanity checks! 804 805 if test ! -e "$OUTPUTDIR/spec.gmk"; then 806 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for | 749 AC_SUBST(SDKROOT) 750 fi 751 752 # Prepend the extra path to the global path 753 BASIC_PREPEND_TO_PATH([PATH],$EXTRA_PATH) 754 755 AC_MSG_CHECKING([for sysroot]) 756 AC_MSG_RESULT([$SYSROOT]) 757 AC_MSG_CHECKING([for toolchain path]) 758 AC_MSG_RESULT([$TOOLCHAIN_PATH]) 759 AC_MSG_CHECKING([for extra path]) 760 AC_MSG_RESULT([$EXTRA_PATH]) 761 ]) 762 763 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], 764 [ 765 766 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], 767 [use this as the name of the configuration @<:@generated from important configuration options@:>@])], 768 [ CONF_NAME=${with_conf_name} ]) 769 770 # Test from where we are running configure, in or outside of src root. 771 AC_MSG_CHECKING([where to store configuration]) 772 if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \ 773 || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \ 774 || test "x$CURDIR" = "x$TOPDIR/make" ; then 775 # We are running configure from the src root. 776 # Create a default ./build/target-variant-debuglevel output root. 777 if test "x${CONF_NAME}" = x; then 778 AC_MSG_RESULT([in default location]) 779 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}" 780 else 781 AC_MSG_RESULT([in build directory with custom name]) 782 fi 783 784 if test "x$CUSTOM_ROOT" != x; then 785 OUTPUTDIR="${CUSTOM_ROOT}/build/${CONF_NAME}" 786 else 787 OUTPUTDIR="${TOPDIR}/build/${CONF_NAME}" 788 fi 789 $MKDIR -p "$OUTPUTDIR" 790 if test ! -d "$OUTPUTDIR"; then 791 AC_MSG_ERROR([Could not create build directory $OUTPUTDIR]) 792 fi 793 else 794 # We are running configure from outside of the src dir. 795 # Then use the current directory as output dir! 796 # If configuration is situated in normal build directory, just use the build 797 # directory name as configuration name, otherwise use the complete path. 798 if test "x${CONF_NAME}" = x; then 799 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"` 800 fi 801 OUTPUTDIR="$CURDIR" 802 AC_MSG_RESULT([in current directory]) 803 804 # WARNING: This might be a bad thing to do. You need to be sure you want to 805 # have a configuration in this directory. Do some sanity checks! 806 807 if test ! -e "$OUTPUTDIR/spec.gmk"; then 808 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for |