Jean-Marc Lasgouttes wrote:
> Angus> I assume that the idea is to have a
> Angus> "--packaging={windows,macosx,posix}" option to configure. Not
> Angus> passing "--packaging=foo" on the command line will lead to the
> Angus> "native" packaging being chosen. The three macros above will be
> Angus> defined appropriately in config.h.
> 
> Yes. The following patch does just that.
> 
> Angus> However, it seems that this option should have an effect only
> Angus> on the Mac and, moreover, will respect only the {macosx,posix}
> Angus> strings.
> 
> Let's say we trust configure to do the right thing. So if macosx is
> the packaging, the user should really have the relevant API available.

Seems fair.

> I have to note that the patch below has issues:
> 
> - the places where autoconf wants to install system_lyxdir is always
>   $datadir/$PACKAGE (hardcoded in the Makefile, not produced by
>   configure). This means that we get for MacOSX
> 
>   Packaging:            macosx
>     LyX binary dir:     /Applications/LyX.app/Contents/MacOS
>     LyX files dir:      /Applications/LyX.app/Contents/Resources/lyx
> 
>   It should be possible to hack around it, but I suspect it is asking
>   for trouble. I propose to keep this extra 'lyx' directory under
>   Resources to avoid problems. OK?

Fine. Then that is what I'll do in package.C. I'll even make a note to 
this effect in the appropriate function ;-)

> - the same holds for windows, but here the situation is a bit worse:
> 
> configure: configuring in lib/reLyX
> configure: running /bin/sh '../../../1.3.x/lib/reLyX/configure'
> --prefix=C:Program Files/LyX  '--enable-maintainer-mode'
> '--disable-debug' '--disable-optimization' '--with-frontend=qt'
> '--with-qt-dir=/usr/lib/qt-3.1' '--with-packaging=windows'
> --cache-file=/dev/null --srcdir=../../../1.3.x/lib/reLyX configure:
> WARNING: you should use --build, --host, --target configure: WARNING:
> invalid host type: Files/LyX configure: error: expected an absolute
> directory name for --prefix: C:Program configure: error: /bin/sh
> '../../../1.3.x/lib/reLyX/configure' failed for lib/reLyX
> 
> However, I do not know what happens on mingw/msys, of course.

I'm sure that it'll be same, but everything appears to be fine on this 
linux machine (using the existing configure script) if I 
quote 'C:/Program Files/LyX'...

$ ../configure --prefix='C:/Program Files/LyX' --enable-maintainer-mode

Configuration
  Host type:                      alphaev6-unknown-linux-gnu
  Special build flags:            warnings assertions xforms-image-loader
  C   Compiler:                   gcc
  C   Compiler flags:             -g -O2
  C++ Compiler:                   g++ (3.3.5)
  C++ Compiler flags:              -W -Wall
  Linker flags:
  Frontend:                       xforms
    libXpm version:               4.11
    libforms version:             1.0.0
  LyX binary dir:                 C:/Program Files/LyX/bin
  LyX files dir:                  C:/Program Files/LyX/share/lyx

Configuration of LyX was successful.

> Anyway, here is it so that you can play a bit. I do not have specific
> plans to improve it, so it's yours if you want it.

Many, many thanks for doing this JMarc. I'll try it out this evening.

-- 
Angus

Reply via email to