README.win32 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. When building libintl-perl under 32 bit versions of MS-DOS, you have several
  2. options, depending on the facilities available on your system, and on the Perl
  3. version you use.
  4. Cygwin Perl
  5. ===========
  6. When using the Perl interpreter that ships with cygwin, you are in a pretty
  7. Unix-like environment, and you should be able to build and use libintl-perl
  8. like on ordinary operating system.
  9. ActiveState Perl
  10. ================
  11. By default, the XS version of libintl-perl is not built. You will not win
  12. a lot, by trying to build the XS version, but if you can't help, here are
  13. the instructions that worked on my system. Your mileage may vary, however.
  14. C Compiler
  15. ----------
  16. Windows does not ship with a C compiler. Since ActiveState Perl is built
  17. with Microsoft Visual C, you probably will not have a choice, and have to
  18. purchase MSVC.
  19. Building libiconv and GNU gettext
  20. ---------------------------------
  21. The XS version of libintl-perl requires the runtime facilities provided by
  22. GNU gettext, which in turn rely on libiconv. You can both in source form
  23. from ftp://ftp.gnu.org/pub/gnu.
  24. First, unpack both the libiconv and gettext sources in a directory of your
  25. choice, open the MS-DOS cripple shell ("cmd.exe"), and cd into the directory
  26. where you have unpacked the libiconv sources. There read the file
  27. "README.woe32" or just type
  28. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1
  29. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1 check
  30. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1 install
  31. The second command line will run the test suite (you may omit this step).
  32. Now cd to the directory where you have unpacked the gettext sources, and
  33. read "README.woe32", or just type
  34. nmake -f Makefile.msvc MFLAGS=-MD DLL=1
  35. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 check
  36. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 install
  37. You should now go back into the libiconv build directory, and re-build
  38. the package again with native language support:
  39. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 NO_NLS=1 distclean
  40. nmake -f Makefile.msvc MFLAGS=-MD DLL=1
  41. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 check
  42. nmake -f Makefile.msvc MFLAGS=-MD DLL=1 install
  43. You should now have the gettext and libiconv DLLs installed in "\usr\bin",
  44. and libraries in "\usr\lib". It should be theoretically possible to build
  45. static versions (instead of DLLs) of both gettext and libiconv, but I
  46. did not manage to do so here.
  47. Build libintl-perl
  48. ------------------
  49. The Makefile.PL provided with libintl-perl normally autodetects the presence
  50. of the required gettext shared libraries, but this test (intentionally) fails
  51. under Windows. You have to bypass the mechanism by saying
  52. perl Makefile.PL DIR=gettext_xs
  53. This should produce an output like this:
  54. Checking whether we can compile the XS version ... no
  55. => Cannot build the XS version of libintl-perl (see 'config.log' for
  56. => details). This is harmless!
  57. Writing Makefile Locale::gettext_xs
  58. Writing Makefile for libintl-perl
  59. Ignore the warning, that the XS version cannot be built. It will be
  60. built anyhow.
  61. Now do the usual:
  62. nmake
  63. nmake test
  64. nmake install
  65. Please run the testsuite! If it fails, and you cannot sort out the reason,
  66. re-build the module without the XS version.
  67. Distribution
  68. ------------
  69. If you want a binary version of libintl-perl, you either have to bundle it
  70. with the DLLs and libraries for GNU gettext and libiconv, or you have to
  71. build and link against static versions of the two libraries (which I didn't
  72. manage to do). In any case, please take care that your distribution does
  73. not violate the licenses under which GNU gettext, libiconv, and libintl-perl
  74. are provided! Please read the following statement by Bruno Haible,
  75. maintainer of GNU gettext and libiconv:
  76. Note that DLLs created with MSVC 7.0 cannot be distributed: They depend
  77. on a closed-source library 'msvcr70.dll' which is not normally part of a
  78. Woe32 installation, therefore the distribution of such DLLs - with or
  79. without msvcr70.dll - would be a violation of the LGPL. This problem does
  80. not occur with MSVC 6.0 and earlier.
  81. Guido Flohr <guido@imperia.net>