summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2019-11-24 11:03:33 +0000
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2019-11-25 14:52:01 +0100
commit07d98c4d46df4a8b26d7ad3e8182edf988e5e982 (patch)
treeb7e2c7c47b8a68db99d01d2c174d752032e900a5 /configure.ac
parent861278a89575146be3b2657425c0ea6bc4390b99 (diff)
downloadocaml-07d98c4d46df4a8b26d7ad3e8182edf988e5e982.tar.gz
Ensure Makefile.config gets Windows-style prefix
Prefix may be passed to configure using a Cygwin-style PATH (e.g. `./configure --prefix ~/local`). Use cygpath to ensure that the correct version gets written to Makefile.config, or the resulting compiler has an invalid default stdlib path.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 63e2354ee3..b5d44c0476 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1781,7 +1781,11 @@ AS_IF([test x"$prefix" = "xNONE"],
[i686-w64-mingw32], [prefix='C:/ocamlmgw'],
[x86_64-w64-mingw32], [prefix='C:/ocamlmgw64'],
[i686-pc-windows], [prefix='C:/ocamlms'],
- [x86_64-pc-windows], [prefix='C:/ocamlms64'])])
+ [x86_64-pc-windows], [prefix='C:/ocamlms64'])],
+ [AS_IF([test x"$unix_or_win32" = "xwin32" \
+ && test "$host_vendor-$host_os" != "$build_vendor-$build_os" ],
+ [AS_CASE([$build],
+ [*-pc-cygwin], [prefix=`cygpath -m "$prefix"`])])])
# Define a few macros that were defined in config/m-nt.h
# but whose value is not guessed properly by configure