summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-12-31 06:59:29 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-12-31 06:59:29 -0600
commitcd1b89a23a3c0c8ee8cdc7f36d23255a642e46a2 (patch)
treeb56bce93d86de6d224503141f1548e2d8ac38124 /configure.in
parent36ff143909a1c5297080371cf0cb1a701e6c7f50 (diff)
Path format issue with cygwin... try to restore the original behavior
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in31
1 files changed, 29 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 8263c664b1f9..6d3d3aae6a1c 100644
--- a/configure.in
+++ b/configure.in
@@ -13,6 +13,33 @@ SCPDEFS=""
GIT_REPO_NAMES=""
MINGW_EXTERNAL_DLLS=""
+PathFormat()
+{
+ formatted_path="$1"
+ if test "$host_os" = "cygwin" ; then
+ pf_part1=
+ pf_conv_to_dos=
+ for pf_part in $formated_path ; do
+ if test -z "$pf_part1" ; then
+ pf_part1="$pf_part"
+ else
+ pf_conv_to_dos="yes"
+ fi
+ done
+ if test "$pf_conv_to_dos" = "yes" ; then
+ formatted_path=`cygpath -d "$formatted_path"`
+ fi
+ fp_count_colon=`cat "$formattted_path" | grep -c "[:]"`
+ fp_count_slash=`cat "$formattted_path" | grep -c "[/]"`
+ if test "$fp_count_slash$fp_count_colon" != "00" ; then
+ if test "$fp_count_colon" = "0" ; then
+ formatted_path=`realpath "$formatted_path"`
+ fi
+ formatted_path=`cygpath -m "$formatted_path"`
+ fi
+ fi
+}
+
if test -n "$SOLARENV" ; then
AC_MSG_ERROR([You have sourced Env.Host.sh in this shell. This may lead to trouble, please run in a fresh (login) shell.])
fi
@@ -41,8 +68,8 @@ AC_SUBST(CROSS_COMPILING)
if test "$build_os" = "cygwin"; then
EXEEXT_FOR_BUILD=.exe
SRC_ROOT=`pwd`
- SRC_ROOT=`cygpath -d "$SRC_ROOT"`
- SRC_ROOT=`cygpath -u "$SRC_ROOT"`
+ PathFormat "$SRC_ROOT"
+ SRC_ROOT="$formatted_path"
else
EXEEXT_FOR_BUILD=
SRC_ROOT=`pwd`