common/autoconf/basics.m4
changeset 32716 d3203fd9e447
parent 32715 4d558a41a1ec
child 32920 5bea8a04f0a5
--- a/common/autoconf/basics.m4	Mon Sep 21 09:32:07 2015 +0200
+++ b/common/autoconf/basics.m4	Mon Sep 21 09:40:37 2015 +0200
@@ -445,6 +445,15 @@
   # Save the current directory this script was started from
   CURDIR="$PWD"
 
+  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
+  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
+  # was not available at that time.
+  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
+  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
+    ORIGINAL_PATH="$REWRITTEN_PATH"
+    AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
+  fi
+
   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
     PATH_SEP=";"
     BASIC_CHECK_PATHS_WINDOWS