1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
odt2txt is known to compile on Linux, Windows (Cygwin and native),
Solaris, FreeBSD, OpenBSD and NetBSD.
To build odt2txt you need GNU make on all platforms. On platforms
other than Linux and Cygwin, it is usually called "gmake".
Linux:
A modern Linux system has everything you need in the
libc. Just run "make" in the source directory.
Solaris:
Everything you need comes with the system.
I have test-compiled odt2txt on Solaris 9 (sparc) and
Solaris 10 (x86), both with gcc and the Sun C Compiler.
FreeBSD/OpenBSD:
You need to install libiconv from the ports.
The regex library that comes with FreeBSD is extremely slow
on my FreeBSD system (5.3, i386).
Mac OS X:
libiconv has to be installed separately. The Makefile contains
support for a MacPorts installation:
- install MacPorts http://www.macports.org/
- install libiconv in MacPorts
$ sudo port install libiconv
- run "make" in the source directory
NetBSD:
NetBSD > 2.0 comes with an iconv implementation, it has everything
you need.
HP-UX:
If zlib is not already installed on the system, build it. Then
build odt2txt with "gmake ZLIB_DIR=/path/to/zlib"
Windows (Cygwin):
You need to install libiconv.
Windows (mingw32):
This is a little harder, but will produce a binary that has no
further dependencies. I don't have a Windows system here but I have
a Debian Sarge system with a cross-compile environment. The
resulting binary has been reported to work without problems. I guess
the same process should work with a native mingw environment in a
similar way.
Install mingw32, mingw32-binutils and mingw32-runtime. Download and
untar GNU libiconv, configure and build and install it:
$ ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc/
$ make
$ su -c "make install"
Download GNU regex-0.12, untar it (for example to /tmp/regex-0.12)
and compile the source file:
$ i586-mingw32msvc-gcc -DSTDC_HEADERS=1 -c regex.c
Then go into the odt2txt source directory and build it:
$ make CC=i586-mingw32msvc-gcc MINGW32=1 REGEX_DIR=/tmp/regex-0.12
The result should be a file named odt2txt.exe. The only dependency
is the file libiconv-2.dll which was built from your iconv source
directory.
You can also link statically against libiconv if you add
STATIC=1 ICONV_DIR=<your_iconv_dir> to the make command line.
|