On Tue, Sep 05, 2006 at 03:49:12PM +0200, Jean-Marc Lasgouttes wrote:
> >>>>> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes:
>
> Enrico> I was already aware of the last two, but was missing
> Enrico> LYX_ABS_TOP_SRCDIR, which was being hardcoded in posix style
> Enrico> into package.C. Once taken care of that (a simple call to
> Enrico> cygpath in the configure script does it) everything is right
> Enrico> and running LyX in place works also for a native Windows
> Enrico> build.
>
> Does this mean there some patch I should apply?
I don't think so. When using msys/mingw, the right thing is done.
I need to patch configure because I am actually cross-compiling to
mingw using the cygwin compiler. In this case I have to do
sed '
# Set top_src, locale, and data dir in mixed rather than posix format
/^ *LYX_ABS_TOP_SRCDIR/s/\(^ *\)/\1ac_val=`cygpath -m \"\$ac_val\"`\n\1/
/^ *LYX_ABS_INSTALLED/s/\(^ *\)/\1ac_val=`cygpath -m \"\$ac_val\"`\n\1/' \
configure > configure-win32
before calling
configure-win32 --host=i686-pc-mingw32 --build=i686-pc-cygwin ...
Anyway, if you want to take into account that someone could actually
cross-compile to mingw using cygwin, the attached patch fixes this issue.
--
Enrico
--- config/lyxinclude.m4.orig 2006-08-17 17:53:26.000000000 +0200
+++ config/lyxinclude.m4 2006-09-05 18:26:26.000000000 +0200
@@ -695,6 +695,9 @@
done
ac_dir=`echo "$ac_dir" | sed 's?^[[./]]*??'`
ac_val=`echo "$ac_val" | sed 's?/*$[]??'`
+ case $build_os in
+ cygwin*) ac_val=`cygpath -m "$ac_val"`;;
+ esac
$1=`echo "$2" | sed "s?^[[./]]*$ac_dir/*?$ac_val/?"'
s?/*$[]??'`
])