641 642 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], 643 [use this as the name of the configuration @<:@generated from important configuration options@:>@])], 644 [ CONF_NAME=${with_conf_name} ]) 645 646 # Test from where we are running configure, in or outside of src root. 647 AC_MSG_CHECKING([where to store configuration]) 648 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ 649 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ 650 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then 651 # We are running configure from the src root. 652 # Create a default ./build/target-variant-debuglevel output root. 653 if test "x${CONF_NAME}" = x; then 654 AC_MSG_RESULT([in default location]) 655 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 656 else 657 AC_MSG_RESULT([in build directory with custom name]) 658 fi 659 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 660 $MKDIR -p "$OUTPUT_ROOT" 661 if test ! -d "$OUTPUT_ROOT"; then 662 AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) 663 fi 664 else 665 # We are running configure from outside of the src dir. 666 # Then use the current directory as output dir! 667 # If configuration is situated in normal build directory, just use the build 668 # directory name as configuration name, otherwise use the complete path. 669 if test "x${CONF_NAME}" = x; then 670 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 671 fi 672 OUTPUT_ROOT="$CURDIR" 673 AC_MSG_RESULT([in current directory]) 674 675 # WARNING: This might be a bad thing to do. You need to be sure you want to 676 # have a configuration in this directory. Do some sanity checks! 677 678 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 679 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 680 # other files | 641 642 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], 643 [use this as the name of the configuration @<:@generated from important configuration options@:>@])], 644 [ CONF_NAME=${with_conf_name} ]) 645 646 # Test from where we are running configure, in or outside of src root. 647 AC_MSG_CHECKING([where to store configuration]) 648 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ 649 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ 650 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then 651 # We are running configure from the src root. 652 # Create a default ./build/target-variant-debuglevel output root. 653 if test "x${CONF_NAME}" = x; then 654 AC_MSG_RESULT([in default location]) 655 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 656 else 657 AC_MSG_RESULT([in build directory with custom name]) 658 fi 659 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 660 $MKDIR -p "$OUTPUT_ROOT" 661 CONFIGURE_SUPPORT="$OUTPUT_ROOT/configure-support" 662 $MKDIR -p "$CONFIGURE_SUPPORT" 663 if test ! -d "$OUTPUT_ROOT"; then 664 AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) 665 fi 666 else 667 # We are running configure from outside of the src dir. 668 # Then use the current directory as output dir! 669 # If configuration is situated in normal build directory, just use the build 670 # directory name as configuration name, otherwise use the complete path. 671 if test "x${CONF_NAME}" = x; then 672 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 673 fi 674 OUTPUT_ROOT="$CURDIR" 675 AC_MSG_RESULT([in current directory]) 676 677 # WARNING: This might be a bad thing to do. You need to be sure you want to 678 # have a configuration in this directory. Do some sanity checks! 679 680 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 681 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 682 # other files |