Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a problem with the erlang grade on Windows.

m4/mercury.m4:
	Only keep the basename of ERLC and ERL if their initial values
	are qualified with directories whose names contains spaces.  This
	avoids build problems on Windows.  (We do the same thing for the
	Java tools.)
  • Loading branch information...
commit bc38f5f9ac5a24ada1886f3ec0ba31c203842970 1 parent 5f74b30
Julien Fischer juliensf authored
Showing with 18 additions and 2 deletions.
  1. +18 −2 m4/mercury.m4
20 m4/mercury.m4
View
@@ -619,8 +619,24 @@ else
mercury_cv_erlang="no"
fi
-AC_SUBST(ERLC)
-AC_SUBST(ERL)
+# On Windows, Erlang/OTP has a high chance of being installed in a path
+# containing spaces. The simplest solution is to keep only the basename.
+# Everything will still work so long as the executables can be found on the
+# PATH later.
+case "$ERLC" in
+ *" "*)
+ ERLC=`basename "$ERLC"`
+ ;;
+esac
+
+case "$ERL" in
+ *" "*)
+ ERL=`basename "$ERL"`
+ ;;
+esac
+
+AC_SUBST([ERLC])
+AC_SUBST([ERL])
])
#-----------------------------------------------------------------------------#
Please sign in to comment.
Something went wrong with that request. Please try again.