common/autoconf/basics_windows.m4

changeset 972
f3697e0783e2
parent 839
174a54ce39c4
child 1133
50aaf272884f
child 1395
ff2690c06dd8
     1.1 --- a/common/autoconf/basics_windows.m4	Thu Sep 12 12:29:17 2013 -0700
     1.2 +++ b/common/autoconf/basics_windows.m4	Tue Nov 05 17:33:48 2013 -0800
     1.3 @@ -145,7 +145,7 @@
     1.4      # Not in mixed or Windows style, start by that.
     1.5      new_path=`cmd //c echo $path`
     1.6    fi
     1.7 -  
     1.8 +
     1.9    BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
    1.10    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
    1.11    if test "x$path" != "x$new_path"; then
    1.12 @@ -175,8 +175,8 @@
    1.13    # bat and cmd files are not always considered executable in cygwin causing which
    1.14    # to not find them
    1.15    if test "x$new_path" = x \
    1.16 -           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
    1.17 -           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    1.18 +      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
    1.19 +      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    1.20      new_path=`$CYGPATH -u "$path"`
    1.21    fi
    1.22    if test "x$new_path" = x; then
    1.23 @@ -191,8 +191,8 @@
    1.24      # bat and cmd files are not always considered executable in cygwin causing which
    1.25      # to not find them
    1.26      if test "x$new_path" = x \
    1.27 -             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
    1.28 -             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    1.29 +        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
    1.30 +        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
    1.31        new_path=`$CYGPATH -u "$path"`
    1.32      fi
    1.33      if test "x$new_path" = x; then
    1.34 @@ -211,16 +211,16 @@
    1.35    # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
    1.36    # "foo.exe" is OK but "foo" is an error.
    1.37    #
    1.38 -  # This test is therefore slightly more accurate than "test -f" to check for file precense.
    1.39 +  # This test is therefore slightly more accurate than "test -f" to check for file presence.
    1.40    # It is also a way to make sure we got the proper file name for the real test later on.
    1.41    test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
    1.42    if test "x$test_shortpath" = x; then
    1.43      # Short path failed, file does not exist as specified.
    1.44      # Try adding .exe or .cmd
    1.45      if test -f "${new_path}.exe"; then
    1.46 -       input_to_shortpath="${new_path}.exe"
    1.47 +      input_to_shortpath="${new_path}.exe"
    1.48      elif test -f "${new_path}.cmd"; then
    1.49 -       input_to_shortpath="${new_path}.cmd"
    1.50 +      input_to_shortpath="${new_path}.cmd"
    1.51      else
    1.52        AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
    1.53        AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
    1.54 @@ -254,7 +254,7 @@
    1.55  
    1.56    # Now try to locate executable using which
    1.57    new_path=`$WHICH "$new_path" 2> /dev/null`
    1.58 -  
    1.59 +
    1.60    if test "x$new_path" = x; then
    1.61      # Oops. Which didn't find the executable.
    1.62      # The splitting of arguments from the executable at a space might have been incorrect,
    1.63 @@ -264,9 +264,9 @@
    1.64      arguments="EOL"
    1.65      new_path="$path"
    1.66      BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
    1.67 -    
    1.68 +
    1.69      new_path=`$WHICH "$new_path" 2> /dev/null`
    1.70 -    
    1.71 +
    1.72      if test "x$new_path" = x; then
    1.73        # It's still not found. Now this is an unrecoverable error.
    1.74        AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
    1.75 @@ -302,7 +302,7 @@
    1.76  [
    1.77    SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
    1.78    if test $SRC_ROOT_LENGTH -gt 100; then
    1.79 -      AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
    1.80 +    AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
    1.81    fi
    1.82  
    1.83    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
    1.84 @@ -311,14 +311,14 @@
    1.85      AC_MSG_RESULT([$CYGWIN_VERSION])
    1.86      WINDOWS_ENV_VENDOR='cygwin'
    1.87      WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
    1.88 -    
    1.89 +
    1.90      CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
    1.91      if test "x$CYGWIN_VERSION_OK" = x; then
    1.92        AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
    1.93        AC_MSG_ERROR([Cannot continue])
    1.94      fi
    1.95      if test "x$CYGPATH" = x; then
    1.96 -        AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
    1.97 +      AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
    1.98      fi
    1.99      AC_MSG_CHECKING([cygwin root directory as unix-style path])
   1.100      # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
   1.101 @@ -329,13 +329,13 @@
   1.102      WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
   1.103      test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
   1.104      if test "x$test_cygdrive_prefix" = x; then
   1.105 -        AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
   1.106 +      AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
   1.107      fi
   1.108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   1.109      AC_MSG_CHECKING([msys release])
   1.110      MSYS_VERSION=`$UNAME -r`
   1.111      AC_MSG_RESULT([$MSYS_VERSION])
   1.112 -    
   1.113 +
   1.114      WINDOWS_ENV_VENDOR='msys'
   1.115      WINDOWS_ENV_VERSION="$MSYS_VERSION"
   1.116  
   1.117 @@ -367,12 +367,12 @@
   1.118  
   1.119  AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
   1.120  [
   1.121 -# When using cygwin or msys, we need a wrapper binary that renames
   1.122 -# /cygdrive/c/ arguments into c:/ arguments and peeks into
   1.123 -# @files and rewrites these too! This wrapper binary is
   1.124 -# called fixpath.
   1.125 -FIXPATH=
   1.126 -if test "x$OPENJDK_BUILD_OS" = xwindows; then
   1.127 +  # When using cygwin or msys, we need a wrapper binary that renames
   1.128 +  # /cygdrive/c/ arguments into c:/ arguments and peeks into
   1.129 +  # @files and rewrites these too! This wrapper binary is
   1.130 +  # called fixpath.
   1.131 +  FIXPATH=
   1.132 +  if test "x$OPENJDK_BUILD_OS" = xwindows; then
   1.133      AC_MSG_CHECKING([if fixpath can be created])
   1.134      FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
   1.135      FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
   1.136 @@ -389,7 +389,7 @@
   1.137        # @ was chosen as separator to minimize risk of other tools messing around with it
   1.138        all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
   1.139        fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
   1.140 -      
   1.141 +
   1.142        FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
   1.143      fi
   1.144      rm -f $OUTPUT_ROOT/fixpath*
   1.145 @@ -397,24 +397,24 @@
   1.146      $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
   1.147      cd $CURDIR
   1.148  
   1.149 -    if test ! -x $OUTPUT_ROOT/fixpath.exe; then 
   1.150 -        AC_MSG_RESULT([no])
   1.151 -        cat $OUTPUT_ROOT/fixpath1.log
   1.152 -        AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
   1.153 +    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
   1.154 +      AC_MSG_RESULT([no])
   1.155 +      cat $OUTPUT_ROOT/fixpath1.log
   1.156 +      AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
   1.157      fi
   1.158      AC_MSG_RESULT([yes])
   1.159      AC_MSG_CHECKING([if fixpath.exe works])
   1.160      cd $OUTPUT_ROOT
   1.161 -    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 
   1.162 +    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
   1.163      cd $CURDIR
   1.164 -    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then 
   1.165 -        AC_MSG_RESULT([no])
   1.166 -        cat $OUTPUT_ROOT/fixpath2.log
   1.167 -        AC_MSG_ERROR([fixpath did not work!])
   1.168 +    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
   1.169 +      AC_MSG_RESULT([no])
   1.170 +      cat $OUTPUT_ROOT/fixpath2.log
   1.171 +      AC_MSG_ERROR([fixpath did not work!])
   1.172      fi
   1.173      AC_MSG_RESULT([yes])
   1.174      rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
   1.175 -fi
   1.176 +  fi
   1.177  
   1.178 -AC_SUBST(FIXPATH)
   1.179 +  AC_SUBST(FIXPATH)
   1.180  ])

mercurial