common/autoconf/basics.m4

changeset 2224
20daa32eec6f
parent 2219
cb1203f48728
child 2228
1a5c98aae346
     1.1 --- a/common/autoconf/basics.m4	Wed May 16 15:52:51 2018 -0700
     1.2 +++ b/common/autoconf/basics.m4	Mon May 21 06:54:25 2018 -0700
     1.3 @@ -458,6 +458,15 @@
     1.4    AUTOCONF_DIR=$TOPDIR/common/autoconf
     1.5  ])
     1.6  
     1.7 +# Evaluates platform specific overrides for devkit variables.
     1.8 +# $1: Name of variable
     1.9 +AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
    1.10 +[
    1.11 +  if test "x[$]$1" = x; then
    1.12 +    eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
    1.13 +  fi
    1.14 +])
    1.15 +
    1.16  AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
    1.17  [
    1.18    AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
    1.19 @@ -467,12 +476,27 @@
    1.20          DEVKIT_ROOT="$with_devkit"
    1.21          # Check for a meta data info file in the root of the devkit
    1.22          if test -f "$DEVKIT_ROOT/devkit.info"; then
    1.23 +          . $DEVKIT_ROOT/devkit.info
    1.24            # This potentially sets the following:
    1.25 -          # DEVKIT_NAME: A descriptive name of the devkit
    1.26 -          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
    1.27 -          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
    1.28 -          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
    1.29 -          . $DEVKIT_ROOT/devkit.info
    1.30 +          # A descriptive name of the devkit
    1.31 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
    1.32 +          # Corresponds to --with-extra-path
    1.33 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
    1.34 +          # Corresponds to --with-toolchain-path
    1.35 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
    1.36 +          # Corresponds to --with-sysroot
    1.37 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
    1.38 +
    1.39 +          # Identifies the Visual Studio version in the devkit
    1.40 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
    1.41 +          # The Visual Studio include environment variable
    1.42 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
    1.43 +          # The Visual Studio lib environment variable
    1.44 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
    1.45 +          # Corresponds to --with-msvcr-dll
    1.46 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
    1.47 +          # Corresponds to --with-msvcp-dll
    1.48 +          BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
    1.49          fi
    1.50  
    1.51          AC_MSG_CHECKING([for devkit])
    1.52 @@ -482,9 +506,7 @@
    1.53            AC_MSG_RESULT([$DEVKIT_ROOT])
    1.54          fi
    1.55  
    1.56 -        if test "x$DEVKIT_EXTRA_PATH" != x; then
    1.57 -          BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
    1.58 -        fi
    1.59 +        BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
    1.60  
    1.61          # Fallback default of just /bin if DEVKIT_PATH is not defined
    1.62          if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
    1.63 @@ -598,8 +620,12 @@
    1.64        files_present=`$LS $OUTPUT_ROOT`
    1.65        # Configure has already touched config.log and confdefs.h in the current dir when this check
    1.66        # is performed.
    1.67 -      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
    1.68 -      | $TR -d '\n'`
    1.69 +      filtered_files=`$ECHO "$files_present" \
    1.70 +          | $SED -e 's/config.log//g' \
    1.71 +	      -e 's/confdefs.h//g' \
    1.72 +	      -e 's/fixpath.exe//g' \
    1.73 +	      -e 's/ //g' \
    1.74 +          | $TR -d '\n'`
    1.75        if test "x$filtered_files" != x; then
    1.76          AC_MSG_NOTICE([Current directory is $CURDIR.])
    1.77          AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])

mercurial