changeset 1346:46e8332cefba

8073864: Configure must handle invalid elements on INCLUDE/LIB for visualstudio Reviewed-by: erikj
author ihse
date Wed, 25 Feb 2015 14:50:07 +0100
parents 6fcde8f7bf77
children d6ed47125a76 62137d84ff9c
files common/autoconf/generated-configure.sh common/autoconf/toolchain_windows.m4
diffstat 2 files changed, 65 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/generated-configure.sh	Wed Feb 25 14:48:41 2015 +0100
+++ b/common/autoconf/generated-configure.sh	Wed Feb 25 14:50:07 2015 +0100
@@ -4393,7 +4393,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1424872060
+DATE_WHEN_GENERATED=1424872170
 
 ###############################################################################
 #
@@ -27696,7 +27696,22 @@
       IFS=";"
       for i in $VS_INCLUDE; do
         ipath=$i
-	IFS="$OLDIFS"
+        # Only process non-empty elements
+        if test "x$ipath" != x; then
+          IFS="$OLDIFS"
+          # Check that directory exists before calling fixup_path
+          testpath=$ipath
+
+  windows_path="$testpath"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    testpath="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    testpath="$unix_path"
+  fi
+
+          if test -d "$testpath"; then
 
   # Only process if variable expands to non-empty
 
@@ -27823,13 +27838,30 @@
     fi
   fi
 
-	IFS=";"
-      	SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
+            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
+          fi
+          IFS=";"
+        fi
       done
       # Convert VS_LIB into SYSROOT_LDFLAGS
       for i in $VS_LIB; do
         libpath=$i
-	IFS="$OLDIFS"
+        # Only process non-empty elements
+        if test "x$libpath" != x; then
+          IFS="$OLDIFS"
+          # Check that directory exists before calling fixup_path
+          testpath=$libpath
+
+  windows_path="$testpath"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    testpath="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    testpath="$unix_path"
+  fi
+
+          if test -d "$testpath"; then
 
   # Only process if variable expands to non-empty
 
@@ -27956,8 +27988,10 @@
     fi
   fi
 
-	IFS=";"
-      	SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
+            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
+          fi
+          IFS=";"
+        fi
       done
       IFS="$OLDIFS"
     fi
--- a/common/autoconf/toolchain_windows.m4	Wed Feb 25 14:48:41 2015 +0100
+++ b/common/autoconf/toolchain_windows.m4	Wed Feb 25 14:50:07 2015 +0100
@@ -351,18 +351,34 @@
       IFS=";"
       for i in $VS_INCLUDE; do
         ipath=$i
-	IFS="$OLDIFS"
-        BASIC_FIXUP_PATH([ipath])
-	IFS=";"
-      	SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
+        # Only process non-empty elements
+        if test "x$ipath" != x; then
+          IFS="$OLDIFS"
+          # Check that directory exists before calling fixup_path
+          testpath=$ipath
+          BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
+          if test -d "$testpath"; then
+            BASIC_FIXUP_PATH([ipath])
+            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
+          fi
+          IFS=";"
+        fi
       done
       # Convert VS_LIB into SYSROOT_LDFLAGS
       for i in $VS_LIB; do
         libpath=$i
-	IFS="$OLDIFS"
-        BASIC_FIXUP_PATH([libpath])
-	IFS=";"
-      	SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
+        # Only process non-empty elements
+        if test "x$libpath" != x; then
+          IFS="$OLDIFS"
+          # Check that directory exists before calling fixup_path
+          testpath=$libpath
+          BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
+          if test -d "$testpath"; then
+            BASIC_FIXUP_PATH([libpath])
+            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
+          fi
+          IFS=";"
+        fi
       done
       IFS="$OLDIFS"
     fi