|
Packit |
583149 |
When building libintl-perl under 32 bit versions of MS-DOS, you have several
|
|
Packit |
583149 |
options, depending on the facilities available on your system, and on the Perl
|
|
Packit |
583149 |
version you use.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Cygwin Perl
|
|
Packit |
583149 |
===========
|
|
Packit |
583149 |
|
|
Packit |
583149 |
When using the Perl interpreter that ships with cygwin, you are in a pretty
|
|
Packit |
583149 |
Unix-like environment, and you should be able to build and use libintl-perl
|
|
Packit |
583149 |
like on ordinary operating system.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
ActiveState Perl
|
|
Packit |
583149 |
================
|
|
Packit |
583149 |
|
|
Packit |
583149 |
By default, the XS version of libintl-perl is not built. You will not win
|
|
Packit |
583149 |
a lot, by trying to build the XS version, but if you can't help, here are
|
|
Packit |
583149 |
the instructions that worked on my system. Your mileage may vary, however.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
C Compiler
|
|
Packit |
583149 |
----------
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Windows does not ship with a C compiler. Since ActiveState Perl is built
|
|
Packit |
583149 |
with Microsoft Visual C, you probably will not have a choice, and have to
|
|
Packit |
583149 |
purchase MSVC.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Building libiconv and GNU gettext
|
|
Packit |
583149 |
---------------------------------
|
|
Packit |
583149 |
|
|
Packit |
583149 |
The XS version of libintl-perl requires the runtime facilities provided by
|
|
Packit |
583149 |
GNU gettext, which in turn rely on libiconv. You can both in source form
|
|
Packit |
583149 |
from ftp://ftp.gnu.org/pub/gnu.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
First, unpack both the libiconv and gettext sources in a directory of your
|
|
Packit |
583149 |
choice, open the MS-DOS cripple shell ("cmd.exe"), and cd into the directory
|
|
Packit |
583149 |
where you have unpacked the libiconv sources. There read the file
|
|
Packit |
583149 |
"README.woe32" or just type
|
|
Packit |
583149 |
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1 check
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1 install
|
|
Packit |
583149 |
|
|
Packit |
583149 |
The second command line will run the test suite (you may omit this step).
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Now cd to the directory where you have unpacked the gettext sources, and
|
|
Packit |
583149 |
read "README.woe32", or just type
|
|
Packit |
583149 |
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 check
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 install
|
|
Packit |
583149 |
|
|
Packit |
583149 |
You should now go back into the libiconv build directory, and re-build
|
|
Packit |
583149 |
the package again with native language support:
|
|
Packit |
583149 |
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1 distclean
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 check
|
|
Packit |
583149 |
nmake -f Makefile.msvc MFLAGS=-MD DLL=1 install
|
|
Packit |
583149 |
|
|
Packit |
583149 |
You should now have the gettext and libiconv DLLs installed in "\usr\bin",
|
|
Packit |
583149 |
and libraries in "\usr\lib". It should be theoretically possible to build
|
|
Packit |
583149 |
static versions (instead of DLLs) of both gettext and libiconv, but I
|
|
Packit |
583149 |
did not manage to do so here.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Build libintl-perl
|
|
Packit |
583149 |
------------------
|
|
Packit |
583149 |
|
|
Packit |
583149 |
The Makefile.PL provided with libintl-perl normally autodetects the presence
|
|
Packit |
583149 |
of the required gettext shared libraries, but this test (intentionally) fails
|
|
Packit |
583149 |
under Windows. You have to bypass the mechanism by saying
|
|
Packit |
583149 |
|
|
Packit |
583149 |
perl Makefile.PL DIR=gettext_xs
|
|
Packit |
583149 |
|
|
Packit |
583149 |
This should produce an output like this:
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Checking whether we can compile the XS version ... no
|
|
Packit |
583149 |
=> Cannot build the XS version of libintl-perl (see 'config.log' for
|
|
Packit |
583149 |
=> details). This is harmless!
|
|
Packit |
583149 |
Writing Makefile Locale::gettext_xs
|
|
Packit |
583149 |
Writing Makefile for libintl-perl
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Ignore the warning, that the XS version cannot be built. It will be
|
|
Packit |
583149 |
built anyhow.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Now do the usual:
|
|
Packit |
583149 |
|
|
Packit |
583149 |
nmake
|
|
Packit |
583149 |
nmake test
|
|
Packit |
583149 |
nmake install
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Please run the testsuite! If it fails, and you cannot sort out the reason,
|
|
Packit |
583149 |
re-build the module without the XS version.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Distribution
|
|
Packit |
583149 |
------------
|
|
Packit |
583149 |
|
|
Packit |
583149 |
If you want a binary version of libintl-perl, you either have to bundle it
|
|
Packit |
583149 |
with the DLLs and libraries for GNU gettext and libiconv, or you have to
|
|
Packit |
583149 |
build and link against static versions of the two libraries (which I didn't
|
|
Packit |
583149 |
manage to do). In any case, please take care that your distribution does
|
|
Packit |
583149 |
not violate the licenses under which GNU gettext, libiconv, and libintl-perl
|
|
Packit |
583149 |
are provided! Please read the following statement by Bruno Haible,
|
|
Packit |
583149 |
maintainer of GNU gettext and libiconv:
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Note that DLLs created with MSVC 7.0 cannot be distributed: They depend
|
|
Packit |
583149 |
on a closed-source library 'msvcr70.dll' which is not normally part of a
|
|
Packit |
583149 |
Woe32 installation, therefore the distribution of such DLLs - with or
|
|
Packit |
583149 |
without msvcr70.dll - would be a violation of the LGPL. This problem does
|
|
Packit |
583149 |
not occur with MSVC 6.0 and earlier.
|
|
Packit |
583149 |
|
|
Packit |
583149 |
Guido Flohr <guido.flohr@cantanea.com>
|