< prev index next >

common/autoconf/basics.m4

Print this page




 441   else
 442     PATH_SEP=":"
 443   fi
 444   AC_SUBST(PATH_SEP)
 445 
 446   # We get the top-level directory from the supporting wrappers.
 447   AC_MSG_CHECKING([for top-level directory])
 448   AC_MSG_RESULT([$TOPDIR])
 449   AC_SUBST(TOPDIR)
 450 
 451   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
 452   BASIC_FIXUP_PATH(CURDIR)
 453   BASIC_FIXUP_PATH(TOPDIR)
 454   # SRC_ROOT is a traditional alias for TOPDIR.
 455   SRC_ROOT=$TOPDIR
 456 
 457   # Locate the directory of this script.
 458   AUTOCONF_DIR=$TOPDIR/common/autoconf
 459 ])
 460 









 461 AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
 462 [
 463   AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
 464       [use this devkit for compilers, tools and resources])],
 465       [
 466         BASIC_FIXUP_PATH([with_devkit])
 467         DEVKIT_ROOT="$with_devkit"
 468         # Check for a meta data info file in the root of the devkit
 469         if test -f "$DEVKIT_ROOT/devkit.info"; then
 470           # This potentially sets the following:
 471           # DEVKIT_NAME: A descriptive name of the devkit
 472           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
 473           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
 474           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
 475           . $DEVKIT_ROOT/devkit.info




















 476         fi
 477 
 478         AC_MSG_CHECKING([for devkit])
 479         if test "x$DEVKIT_NAME" != x; then
 480           AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
 481         else
 482           AC_MSG_RESULT([$DEVKIT_ROOT])
 483         fi
 484 
 485         if test "x$DEVKIT_EXTRA_PATH" != x; then
 486           BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
 487         fi
 488 
 489         # Fallback default of just /bin if DEVKIT_PATH is not defined
 490         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
 491           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
 492         fi
 493         BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
 494 
 495         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
 496         # places for backwards compatiblity.
 497         if test "x$DEVKIT_SYSROOT" != x; then
 498           SYSROOT="$DEVKIT_SYSROOT"
 499         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
 500           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
 501         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
 502           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
 503         fi
 504       ]
 505   )
 506 
 507   # You can force the sysroot if the sysroot encoded into the compiler tools


 581   else
 582     # We are running configure from outside of the src dir.
 583     # Then use the current directory as output dir!
 584     # If configuration is situated in normal build directory, just use the build
 585     # directory name as configuration name, otherwise use the complete path.
 586     if test "x${CONF_NAME}" = x; then
 587       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
 588     fi
 589     OUTPUT_ROOT="$CURDIR"
 590     AC_MSG_RESULT([in current directory])
 591 
 592     # WARNING: This might be a bad thing to do. You need to be sure you want to
 593     # have a configuration in this directory. Do some sanity checks!
 594 
 595     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
 596       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
 597       # other files
 598       files_present=`$LS $OUTPUT_ROOT`
 599       # Configure has already touched config.log and confdefs.h in the current dir when this check
 600       # is performed.
 601       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \




 602       | $TR -d '\n'`
 603       if test "x$filtered_files" != x; then
 604         AC_MSG_NOTICE([Current directory is $CURDIR.])
 605         AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
 606         AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
 607         AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
 608         AC_MSG_NOTICE([seriously mess up just about everything.])
 609         AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure])
 610         AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
 611         AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
 612       fi
 613     fi
 614   fi
 615   AC_MSG_CHECKING([what configuration name to use])
 616   AC_MSG_RESULT([$CONF_NAME])
 617 
 618   BASIC_FIXUP_PATH(OUTPUT_ROOT)
 619 
 620   AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
 621   AC_SUBST(CONF_NAME, $CONF_NAME)




 441   else
 442     PATH_SEP=":"
 443   fi
 444   AC_SUBST(PATH_SEP)
 445 
 446   # We get the top-level directory from the supporting wrappers.
 447   AC_MSG_CHECKING([for top-level directory])
 448   AC_MSG_RESULT([$TOPDIR])
 449   AC_SUBST(TOPDIR)
 450 
 451   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
 452   BASIC_FIXUP_PATH(CURDIR)
 453   BASIC_FIXUP_PATH(TOPDIR)
 454   # SRC_ROOT is a traditional alias for TOPDIR.
 455   SRC_ROOT=$TOPDIR
 456 
 457   # Locate the directory of this script.
 458   AUTOCONF_DIR=$TOPDIR/common/autoconf
 459 ])
 460 
 461 # Evaluates platform specific overrides for devkit variables.
 462 # $1: Name of variable
 463 AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
 464 [
 465   if test "x[$]$1" = x; then
 466     eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
 467   fi
 468 ])
 469 
 470 AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
 471 [
 472   AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
 473       [use this devkit for compilers, tools and resources])],
 474       [
 475         BASIC_FIXUP_PATH([with_devkit])
 476         DEVKIT_ROOT="$with_devkit"
 477         # Check for a meta data info file in the root of the devkit
 478         if test -f "$DEVKIT_ROOT/devkit.info"; then





 479           . $DEVKIT_ROOT/devkit.info
 480           # This potentially sets the following:
 481           # A descriptive name of the devkit
 482           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
 483           # Corresponds to --with-extra-path
 484           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
 485           # Corresponds to --with-toolchain-path
 486           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
 487           # Corresponds to --with-sysroot
 488           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
 489 
 490           # Identifies the Visual Studio version in the devkit
 491           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
 492           # The Visual Studio include environment variable
 493           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
 494           # The Visual Studio lib environment variable
 495           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
 496           # Corresponds to --with-msvcr-dll
 497           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
 498           # Corresponds to --with-msvcp-dll
 499           BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
 500         fi
 501 
 502         AC_MSG_CHECKING([for devkit])
 503         if test "x$DEVKIT_NAME" != x; then
 504           AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
 505         else
 506           AC_MSG_RESULT([$DEVKIT_ROOT])
 507         fi
 508 

 509         BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)

 510 
 511         # Fallback default of just /bin if DEVKIT_PATH is not defined
 512         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
 513           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
 514         fi
 515         BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
 516 
 517         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
 518         # places for backwards compatiblity.
 519         if test "x$DEVKIT_SYSROOT" != x; then
 520           SYSROOT="$DEVKIT_SYSROOT"
 521         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
 522           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
 523         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
 524           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
 525         fi
 526       ]
 527   )
 528 
 529   # You can force the sysroot if the sysroot encoded into the compiler tools


 603   else
 604     # We are running configure from outside of the src dir.
 605     # Then use the current directory as output dir!
 606     # If configuration is situated in normal build directory, just use the build
 607     # directory name as configuration name, otherwise use the complete path.
 608     if test "x${CONF_NAME}" = x; then
 609       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
 610     fi
 611     OUTPUT_ROOT="$CURDIR"
 612     AC_MSG_RESULT([in current directory])
 613 
 614     # WARNING: This might be a bad thing to do. You need to be sure you want to
 615     # have a configuration in this directory. Do some sanity checks!
 616 
 617     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
 618       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
 619       # other files
 620       files_present=`$LS $OUTPUT_ROOT`
 621       # Configure has already touched config.log and confdefs.h in the current dir when this check
 622       # is performed.
 623       filtered_files=`$ECHO "$files_present" \
 624           | $SED -e 's/config.log//g' \
 625               -e 's/confdefs.h//g' \
 626               -e 's/fixpath.exe//g' \
 627               -e 's/ //g' \
 628           | $TR -d '\n'`
 629       if test "x$filtered_files" != x; then
 630         AC_MSG_NOTICE([Current directory is $CURDIR.])
 631         AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
 632         AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
 633         AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
 634         AC_MSG_NOTICE([seriously mess up just about everything.])
 635         AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure])
 636         AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
 637         AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
 638       fi
 639     fi
 640   fi
 641   AC_MSG_CHECKING([what configuration name to use])
 642   AC_MSG_RESULT([$CONF_NAME])
 643 
 644   BASIC_FIXUP_PATH(OUTPUT_ROOT)
 645 
 646   AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
 647   AC_SUBST(CONF_NAME, $CONF_NAME)


< prev index next >