On Wed, Oct 12, 2005 at 09:50:53PM +0000, Luis Rivera wrote:
> > Are you trying to compile for xforms or for qt?
> 
> I did it with xforms.  
> 
> I'm trying with qt...
> 
> Now I'll try --with-included-gettext (thanks to Lars!)
> 
> > I do both all the time with LyX CVS. Maybe I can help you.
> 
> Do you? On cygwin?!

Yes, on cygwin. I have no trouble at all.

There are a couple of vagaries:

1) Any compiler more recent than gcc-3.3.3 seems to screw me up. Even
   if I recompile xforms and qt-3.

2) The qt-3 build needs you to use a linker script in the final ld phase.

I have attached my build script. I use this with the latest CVS lyx
almost every day.

My directories are set up like this:

build_stage/
   lyx/ <--- This is the CVS lyx directory
   qtbuild/ <--- Where the QT version is built
   build/ <--- for the xforms version
   build_lyx <--- The build script attached to this email.

I do this:

  cd build_stage/qtbuild
  ../build-lyx all-qt

And QT lyx is installed in /usr/local/bin

  cd ../build
  ../build_lyx all

to install xforms lyx.

You will probably have to change some paths in the script (it was a quick
and dirty thing --- not really meant to be a generic build script).

I hope you find it useful.

                        ---Kayvan
-- 
Kayvan A. Sylvan          | Proud husband of       | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
#!/bin/sh

LYXSRC=$LYXSRC # from env
if [ "x"$LYXSRC = "x" ]
then
  LYXSRC=../lyx
  if [ -z "$MKLYXDBG" ]
  then
    echo "No LYXSRC environment, assuming $LYXSRC"
    MKLYXDBG=1
    export MKLYXDBG
  fi
fi

LYXBUILD=`pwd`

QT_LD_SCRIPT=/home/kayvan/src/qt-3/mkspecs/cygwin-g++/i386pe.x-no-rdata

usage() {
  echo "Usage: $0 [help|cvs|config|debug|config-qt|debug-qt|build|install]";
  echo "You can also use \"all\" or \"all-qt\" for combined actions."
  exit 0;
}

while [ $# -ge 1 ]
do
  arg=$1; shift;
  case $arg in
  all)
    $0 cvs config build install
    ;;
  all-qt)
    $0 cvs config-qt build install
    ;;
  help)
    usage
    ;;
  cvs)
    cd $LYXSRC; cvs update -dP 2>&1 | grep -v 'cvs server'
    ;;
  config)
    cd $LYXSRC; ./autogen.sh; cd $LYXBUILD
    $LYXSRC/configure --disable-debug --enable-optimization=-O2 \
        --with-frontend=xforms \
        --with-extra-lib=/usr/local/lib \
        --with-extra-inc=/usr/local/include
    ;;
  debug)
    cd $LYXSRC; ./autogen.sh; cd $LYXBUILD
    $LYXSRC/configure --enable-debug --enable-optimization=-g \
        --with-frontend=xforms \
        --with-extra-lib=/usr/local/lib \
        --with-extra-inc=/usr/local/include
    ;;
  config-qt)
    cd $LYXSRC; ./autogen.sh; cd $LYXBUILD
    LDFLAGS="-L/usr/local/lib  -Wl,--export-all-symbols \
             -Wl,--enable-runtime-pseudo-reloc \
             -Wl,--script,$QT_LD_SCRIPT" \
    $LYXSRC/configure --disable-debug --enable-optimization=-O2 \
        --with-extra-lib=/usr/local/lib \
        --with-extra-inc=/usr/local/include \
        --with-frontend=qt --with-qt-dir=$QTDIR \
        --with-qt-includes=$QTDIR/include --with-qt-libraries=$QTDIR/lib 
    ;;
  debug-qt)
    cd $LYXSRC; ./autogen.sh; cd $LYXBUILD
    LDFLAGS="-L/usr/local/lib  -Wl,--export-all-symbols \
             -Wl,--enable-runtime-pseudo-reloc \
             -Wl,--script,$QT_LD_SCRIPT" \
    $LYXSRC/configure --enable-debug --enable-optimization=-g \
        --with-extra-lib=/usr/local/lib \
        --with-extra-inc=/usr/local/include \
        --with-frontend=qt --with-qt-dir=$QTDIR \
        --with-qt-includes=$QTDIR/include --with-qt-libraries=$QTDIR/lib 
    ;;
  build)
    make
    ;;
  install) 
    make install
    ;;
  *)
    usage
    ;;
  esac
done

Reply via email to