[Libreoffice-commits] .: configure.in
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Sat Dec 31 05:27:18 PST 2011
configure.in | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
New commits:
commit cd1b89a23a3c0c8ee8cdc7f36d23255a642e46a2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sat Dec 31 06:59:29 2011 -0600
Path format issue with cygwin... try to restore the original behavior
diff --git a/configure.in b/configure.in
index 8263c66..6d3d3aa 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`
More information about the Libreoffice-commits
mailing list