]> err.no Git - sope/blob - libFoundation/README.mingw32
minor improvement to WOHttpAdaptor, bumped framework revisions
[sope] / libFoundation / README.mingw32
1 libFoundation on Windows mingw32 README
2 =======================================
3
4 Intro
5 =====
6
7     I have started to port the libFoundation library to Windows 95/NT by
8     using the so called mingw32 environment. Mingw32 is a GNU compilation
9     environment containing gcc, ld and other tools.
10     The port is done in a cross-compilation environment. This is significant
11     mostly because configure and the Makefiles might not work on Win32 because
12     of file naming problems (slash vs backslash).
13     First attempts are made to compile lF using mingw32 only, that is, without
14     cross-compilation and without cygwin, see below for issues.
15
16 Mingw32
17 =======
18
19     The libFoundation compiles with a sparc-solaris-X-i386-mingw32 compiler in
20     the GNUstep make environment. Quite a lot information regarding Unix
21     to Windows porting using GNU tools is contained on this site:
22         
23         http://www.xraylith.wisc.edu/~khan/software/gnu-win32/
24     
25     The site includes a HOWTO file for creating a cross-compiler with a
26     i386-mingw32 target which I found *very* useful.
27
28     I recently modified libFoundation to use the Win32 API libraries at
29
30         http://www.acc.umu.se/~anorland/gnu-win32/w32api.html
31
32     These includes/libraries are much more extensive than the ones delivered
33     with mingw32. Probably they will make it into the mingw32 distribution.
34
35     There are some other Unix-to-Windows porting packages, especially Cygwin
36     from http://www.cygnus.com. Cygwin emulates large parts of Unix
37     in it's environment and also provides a Unix shell environment that
38     might be used to host native mingw32 compiles.
39     The major advantages of mingw32 is that the resulting executables are
40     not covered by GPL and that it doesn't require any additional libraries but
41     the ones provided by Windows itself. The disadvantage is that more porting
42     is required ..
43
44 GNUstep-make
45 ============
46
47     If compiling lF with gstep-make (--with-gnustep configure switch) you
48     have to configure gstep-make for cross-compilation. This is usually 
49     done with a sequence like this:
50
51       cd make
52       setenv CC      i386-mingw32-gcc
53       setenv RANLIB  i386-mingw32-ranlib
54       setenv AR      i386-mingw32-ar
55       setenv DLLTOOL i386-mingw32-dlltool
56       rm -f config.cache
57       ./configure --prefix=/usr/local/GNUstep \
58         --target="i386-mingw32" \
59         --program-suffix=exe
60       unsetenv CC RANLIB AR DLLTOOL
61       make install
62
63     Never forget to remove config.cache before calling configure on a different
64     target !!!
65     If you have done this you can use just
66
67       make target="i386-mingw32"
68
69     to cross compile a gstep-make package.
70
71 Building lF
72 ===========
73
74     If you have correctly installed your mingw32 x-tools and gstep-make package,
75     compilation of libFoundation for Windows is quite easy:
76
77       cd libFoundation
78       setenv CC i386-mingw32-gcc
79       rm -f config.cache
80       ./configure --with-gnustep --target="i386-mingw32"
81       unsetenv CC
82       make target="i386-mingw32" install
83
84     That's it ! The resulting binaries will be placed in the appropriate 
85     platform subdirectories of the GNUstep hierachy, this way you can keep 
86     libraries for multiple targets in one hierachy.
87
88 Native Build of lF with cygwin tools
89 ====================================
90
91     I managed to compile lF on NT using the cygwin environment (this is 
92     actually a x-compilation as well, from cygwin->mingw32). Note that the
93     cygwin environment is only used as the compilation environment, the 
94     resulting binary is still mingw32-only.
95     
96     To get this running I got the b20 version of cygwin:
97     
98        http://sourceware.cygnus.com
99     
100     The gcc 2.95.2 compilers from Mumit Khan:
101     
102        ftp://www.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/
103     
104     The GNUstep-make package:
105     
106        ftp://ftp.gnustep.org/pub/gnustep
107     
108     First you need to configure gstep-make:
109     
110        cd make
111        ./configure --target=i386-mingw32        \
112                    --prefix=/cygwin/GNUstep     \
113                    --program-suffix=.exe        \
114                    --with-library-combo=gnu-fd-gnu-nil
115        make target=i386-mingw32 install
116     
117     Note the --target switch. If you miss that, gstep-make will be configured
118     for producing cygwin binaries, which is a different story - so don't
119     forget it ! (See below for a hack avoiding this x-setup).
120     If you get a message from native make like 'unmatched "', you probably
121     are using a wrong shell. Check whether the SHELL variable and /bin/sh
122     matches your standard shell (eg cygwin bash or zsh)
123     If you get makefiles errors, you may want to make sure that you are
124     running cygwin in unix-make-mode (eg echo $MAKE_MODE)
125     
126     If you like you can patch config.guess to output 'i386-pc-mingw32', this
127     makes running tools a bit nicer (this way you avoid making config.guess
128     guess the environment as being cygwin). To do that, replace config.guess
129     with these contents:
130
131       #!/bin/sh
132       echo "i386-pc-mingw32"
133     
134     After you have installed GNUstep makefiles, source them (you might also
135     want to source them on every startup in the .profile file).
136
137 Native Build of lF with mingw32 tools
138 =====================================
139     
140     It will also be possible to compile libFoundation without the help of a
141     Unix system or a Unix emulation like cygwin. The native build process needs
142     some more stuff than just the mingw32 binaries provided by Mumit Khan.
143     
144     You need at least:
145     
146       egcs and make binaries as provided by Mumit Khan:
147
148         ftp://www.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/
149       
150       an appropriate sh.exe, eg the zsh:
151       
152         ftp://ftp.blarg.net/users/amol/
153       
154       (note that the native bash I retrieved didn't work with make)
155       
156       a sed:
157       
158         ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/newnew/
159       
160       some other tools are useful but not required if one does some handwork:
161       
162         mkdir  (the DOS mkdir is an internal command and not available in zsh)
163         rm
164       
165       I figured out that you need at least these to run configure:
166       
167         a sh shell:
168         
169           see above
170         
171         grep:
172         
173           http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/download.html
174         
175         cat
176       
177       The Unix95 kit provides some Unix utilities described (it's also called
178       'Virtually Unix'):
179       
180         http://www.itribe.net/virtunix/files/unix95.7.zip
181     
182     Note that the library doesn't yet build cleanly, I work on this.
183
184 Other useful native Windows software
185 ====================================
186
187     Native Xemacs:
188     
189       ftp://ftp.ese-metz.fr/pub/xemacs/win32/
190     
191     Native tcsh:
192     
193       ftp://ftp.blarg.net/users/amol/tcsh/
194
195     Further Mingw32 software:
196     
197       ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32
198       ftp://www.xraylith.wisc.edu/pub/khan
199       ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32
200
201 ---
202 Helge Hess (hh@mdlink.de)
203 MDlink online service center
204 2000-02-09
205
206 ! Local variables:
207 ! mode: indented-text
208 ! End: