

  INSTALL file for PyLucene build
  -------------------------------

  Contents
  --------

   - Building PyLucene
   - Requirements
   - Notes for Linux
   - Notes for Mac OS X 10.3 and 10.4
   - Notes for Mac OS X 10.2
   - Notes for FreeBSD
   - Notes for Windows


  Building PyLucene
  -----------------

  PyLucene's build is not based on autoconf or distutils but on a Makefile.
  Currently, you are required to uncomment and edit some Makefile variables
  according to your installation as documented at the top of the Makefile.

  The Makefile requires GNU make and is setup to build PyLucene on Mac OS X,
  Linux, FreeBSD and Windows.

  Patches are welcome !

  PyLucene can be built with or without support for the Berkeley DB-based
  implementation of the Lucene index store interface.


  Requirements
  ------------

  Building PyLucene requires GNU's compiler for Java, GCJ.
  See the notes specific to your operating system below for instructions on
  getting GCJ for your platform. Currently, we support Linux, Mac OS X and
  Windows.
  You may download pre-built binaries of the GCJ compiler for Mac OS X 10.3,
  Mac OS X 10.4 or Windows from http://downloads.osafoundation.org/compilers. 

  On Windows, the Cygwin environment is required to build PyLucene.
  Your Cygwin installation must include the following programs:
     make, tar, find, bash, install, cygpath, patch, uname
  Using Cygwin's gcc/gcj is not supported, see the Notes for Windows for
  more details.

  Building PyLucene with Berkeley DB support requires a Berkeley DB 4.3.29
  or 4.4.20 source tree built and configured with support for C. 
  See http://www.sleepycat.com for more information on obtaining and
  building Berkeley DB.


  Notes for Linux
  ---------------

  The version of gcc currently recommended is gcc 3.4.4. See below for
  instructions on how to build it.


  Notes for Mac OS X 10.3 (panther) and Mac OS X 10.4 (tiger)
  -----------------------------------------------------------

  Mac OS X development tools do not ship with gcj. A separate installation
  of gcc 3.4.4, with gcj, needs to be built. Be sure to not supercede the
  gcc installation that came with Apple's dev tools with the one you're
  building.


  Notes for Mac OS X 10.2
  -----------------------

  Upgrade to Mac OS X 10.3 or Mac OS X 10.4


  Notes for FreeBSD
  -----------------

  PyLucene has been built on FreeBSD 4.11 with gcj 4.1


  Notes for Windows
  -----------------

  On Windows, PyLucene is built with gcc 3.4.2 installed on top of the MinGW
  3.1 compiler suite, a minimalistic port of GNU's gcc compiler tool chain to
  Windows. Even though the cygwin environment and GNU make are required to
  process the Makefile, the cygwin version of gcc/gcj is not supported.

  To install the MinGW compiler suite, follow the instructions below:
   - download http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download
   - download http://prdownloads.sf.net/mingw/gcc-core-3.4.2-20040916-1.tar.gz
   - download http://prdownloads.sf.net/mingw/gcc-g++-3.4.2-20040916-1.tar.gz
   - download http://prdownloads.sf.net/mingw/gcc-java-3.4.2-20040916-1.tar.gz
   - download http://prdownloads.sf.net/mingw/libiconv-1.8.0-2003.02.01-1.exe
   - choose a root directory for your installation, say d:\mingw-3.1-3.4.2, the
     MinGW-3.1.0-1.exe installer will prompt you
   - install MinGW-3.1.0-1.exe by running this executable
   - install the three gcc components (core, g++ and java) by untarring the
     archives while in the d:\mingw-3.1-3.4.2 directory

  When building PyLucene with Berkeley DB support on Windows, the sources for
  the libdb_java43.dll JNI library are patched to undefine JNIEXPORT and
  JNICALL. This causes this DLL to be only usable from programs compiled
  with Mingw's gcc/gcj.


  Building gcc from sources
  -------------------------

  You may download a gcc source tarball from a variety of mirror sites:
      ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.4.4/gcc-3.4.4.tar.bz2

    - mkdir gcc-3.4.4
    - cd gcc-3.4.4
    - bunzip2 -c ../gcc-3.4.4.tar.bz2 | tar -xvf -

      (on Mac OS X only)
    - add #define LARGE_CONFIG to gcc-3.4.4/boehm-gc/include/private/gc_priv.h

    - mkdir build
    - cd build
    - ../gcc-3.4.4/configure --enable-threads=posix --prefix=/usr/local/gcc-3.4.4 --enable-languages=c,c++,java
    - make bootstrap
    - sudo make install

  The path given to --prefix needs to be absolute.

  Do not supercede your Mac OS X gcc installation with the compiler you just
  built.
