nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 @echo off
2 Rem Configure libiconv for DJGPP.
3  
4 Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
5 Rem format, or else stock DOS/Windows shells will refuse to run it.
6  
7 echo Configuring GNU libiconv for DJGPP v2.x...
8 Rem The SmallEnv tests protect against fixed and too small size
9 Rem of the environment in stock DOS shell.
10  
11 Rem Find out if NLS is wanted or not,
12 Rem if dependency-tracking is wanted or not,
13 Rem if caching is wanted or not
14 Rem and where the sources are.
15 Rem We always default to NLS support,
16 Rem no dependency tracking
17 Rem and to in place configuration.
18 set ARGS=
19 set NLS=disabled
20 if not "%NLS%" == "disabled" goto SmallEnv
21 set CACHING=enabled
22 if not "%CACHING%" == "enabled" goto SmallEnv
23 set DEPENDENCY_TRACKING=disabled
24 if not "%DEPENDENCY_TRACKING%" == "disabled" goto SmallEnv
25 set LIBICONV_PREFIX=disabled
26 if not "%LIBICONV_PREFIX%" == "disabled" goto SmallEnv
27 set LIBINTL_PREFIX=disabled
28 if not "%LIBINTL_PREFIX%" == "disabled" goto SmallEnv
29 set HTML=enabled
30 if not "%HTML%" == "enabled" goto SmallEnv
31 set XSRC=.
32 if not "%XSRC%" == "." goto SmallEnv
33  
34 Rem Loop over all arguments.
35 Rem Special arguments are: NLS, XSRC, CACHE, STATIC_LIBS, LIBICONV_PREFIX, LIBINTL_PREFIX and DEPS.
36 Rem All other arguments are stored into ARGS.
37 :ArgLoop
38 if "%1" == "nls" goto NextArgument
39 if "%1" == "NLS" goto NextArgument
40 if "%1" == "no-nls" goto NoNLS
41 if "%1" == "no-NLS" goto NoNLS
42 if "%1" == "NO-NLS" goto NoNLS
43 goto CachingOption
44 :NoNLS
45 if "%1" == "no-nls" set NLS=disabled
46 if "%1" == "no-NLS" set NLS=disabled
47 if "%1" == "NO-NLS" set NLS=disabled
48 if not "%NLS%" == "disabled" goto SmallEnv
49 goto NextArgument
50 :CachingOption
51 if "%1" == "cache" goto NextArgument
52 if "%1" == "CACHE" goto NextArgument
53 if "%1" == "no-cache" goto NoCaching
54 if "%1" == "no-CACHE" goto NoCaching
55 if "%1" == "NO-CACHE" goto NoCaching
56 goto DependencyOption
57 :NoCaching
58 if "%1" == "no-cache" set CACHING=disabled
59 if "%1" == "no-CACHE" set CACHING=disabled
60 if "%1" == "NO-CACHE" set CACHING=disabled
61 if not "%CACHING%" == "disabled" goto SmallEnv
62 goto NextArgument
63 :DependencyOption
64 if "%1" == "no-dep" goto NextArgument
65 if "%1" == "no-DEP" goto NextArgument
66 if "%1" == "NO-DEP" goto NextArgument
67 if "%1" == "dep" goto DependecyTraking
68 if "%1" == "DEP" goto DependecyTraking
69 goto LibiconvPrefixOption
70 :DependecyTraking
71 if "%1" == "dep" set DEPENDENCY_TRACKING=enabled
72 if "%1" == "DEP" set DEPENDENCY_TRACKING=enabled
73 if not "%DEPENDENCY_TRACKING%" == "enabled" goto SmallEnv
74 goto NextArgument
75 :LibiconvPrefixOption
76 if "%1" == "no-libiconvprefix" goto NextArgument
77 if "%1" == "no-LIBICONVPREFIX" goto NextArgument
78 if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
79 if "%1" == "libiconvprefix" goto WithLibiconvPrefix
80 if "%1" == "LIBICONVPREFIX" goto WithLibiconvPrefix
81 goto LibintlPrefixOption
82 :WithLibiconvPrefix
83 if "%1" == "libiconvprefix" set LIBICONV_PREFIX=enabled
84 if "%1" == "LIBICONVPREFIX" set LIBICONV_PREFIX=enabled
85 if not "%LIBICONV_PREFIX%" == "enabled" goto SmallEnv
86 goto NextArgument
87 :LibintlPrefixOption
88 if "%1" == "no-libiconvprefix" goto NextArgument
89 if "%1" == "no-LIBICONVPREFIX" goto NextArgument
90 if "%1" == "NO-LIBICONVPREFIX" goto NextArgument
91 if "%1" == "libintlprefix" goto _WithLibintlPrefix
92 if "%1" == "LIBINTLPREFIX" goto _WithLibintlPrefix
93 goto HTMLOption
94 :_WithLibintlPrefix
95 if "%1" == "libintlprefix" set LIBINTL_PREFIX=enabled
96 if "%1" == "LIBINTLPREFIX" set LIBINTL_PREFIX=enabled
97 if not "%LIBINTL_PREFIX%" == "enabled" goto SmallEnv
98 :HTMLOption
99 if "%1" == "withhtml" goto NextArgument
100 if "%1" == "withHTML" goto NextArgument
101 if "%1" == "WITHHTML" goto NextArgument
102 if "%1" == "withouthtml" goto _WithoutHTML
103 if "%1" == "withoutHTML" goto _WithoutHTML
104 if "%1" == "WITHOUTHTML" goto _WithoutHTML
105 goto SrcDirOption
106 :_WithoutHTML
107 if "%1" == "withouthtml" set HTML=disabled
108 if "%1" == "withoutHTML" set HTML=disabled
109 if "%1" == "WITHOUTHTML" set HTML=disabled
110 if not "%HTML%" == "disabled" goto SmallEnv
111 goto NextArgument
112 :SrcDirOption
113 echo %1 | grep -q "/"
114 if errorlevel 1 goto CollectArgument
115 set XSRC=%1
116 if not "%XSRC%" == "%1" goto SmallEnv
117 goto NextArgument
118 :CollectArgument
119 set _ARGS=%ARGS% %1
120 if not "%_ARGS%" == "%ARGS% %1" if not "%_ARGS%" == "%ARGS%%1" goto SmallEnv
121 echo %_ARGS% | grep -q "[^ ]"
122 if not errorlevel 0 set ARGS=%_ARGS%
123 set _ARGS=
124 :NextArgument
125 shift
126 if not "%1" == "" goto ArgLoop
127  
128 Rem Create an arguments file for the configure script.
129 echo --srcdir=%XSRC% > arguments
130 if "%CACHING%" == "enabled" echo --cache-file=%XSRC%/djgpp/config.cache >> arguments
131 if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> arguments
132 if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> arguments
133 if "%LIBICONV_PREFIX%" == "enabled" echo --with-libiconv-prefix >> arguments
134 if "%LIBICONV_PREFIX%" == "disabled" echo --without-libiconv-prefix >> arguments
135 if "%LIBINTL_PREFIX%" == "enabled" echo --with-libintl-prefix >> arguments
136 if "%LIBINTL_PREFIX%" == "disabled" echo --without-libintl-prefix >> arguments
137 if "%HTML%" == "enabled" echo --enable-html >> arguments
138 if "%HTML%" == "disabled" echo --disable-html >> arguments
139 if not "%ARGS%" == "" echo %ARGS% >> arguments
140 set ARGS=
141 set CACHING=
142 set DEPENDENCY_TRACKING=
143 set LIBICONV_PREFIX=
144 set LIBINTL_PREFIX=
145 set HTML=
146  
147 Rem Find out where the sources are
148 if "%XSRC%" == "." goto InPlace
149  
150 :NotInPlace
151 redir -e /dev/null update %XSRC%/configure.org ./configure
152 test -f ./configure
153 if errorlevel 1 update %XSRC%/configure ./configure
154 test -d ./libcharset
155 if errorlevel 1 md libcharset
156 redir -e /dev/null update %XSRC%/libcharset/configure.org ./libcharset/configure
157 test -f ./libcharset/configure
158 if errorlevel 1 update %XSRC%/libcharset/configure ./libcharset/configure
159  
160 :InPlace
161 Rem Update configuration files
162 echo Updating configuration scripts...
163 test -f ./configure.org
164 if errorlevel 1 update ./configure ./configure.org
165 sed -f %XSRC%/djgpp/config.sed ./configure.org > configure
166 if errorlevel 1 goto SedError
167 test -f ./libcharset/configure.org
168 if errorlevel 1 update ./libcharset/configure ./libcharset/configure.org
169 sed -f %XSRC%/djgpp/config.sed ./libcharset/configure.org > configure.tmp
170 if errorlevel 1 goto SedError
171 Rem The following is needed because the toplevel configure script calls the
172 Rem %XSRC%/libcharset/configure script instead of ./libcharset/configure.
173 test -f %XSRC%/libcharset/configure.org
174 if errorlevel 1 update %XSRC%/libcharset/configure %XSRC%/libcharset/configure.org
175 update configure.tmp %XSRC%/libcharset/configure
176 rm ./configure.tmp
177  
178 Rem Make sure they have a config.site file
179 set CONFIG_SITE=%XSRC%/djgpp/config.site
180 if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv
181  
182 Rem Make sure crucial file names are not munged by unpacking
183 test -f %XSRC%/config.h.in
184 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/config.h.in %XSRC%/config.h-in
185 test -f %XSRC%/config.h-in
186 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/config.h %XSRC%/config.h-in
187 test -f %XSRC%/config.h-in
188 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/configh.in %XSRC%/config.h-in
189 test -f %XSRC%/config.h-in
190 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/config_h.in %XSRC%/config.h-in
191 test -f %XSRC%/lib/config.h.in
192 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/lib/config.h.in %XSRC%/lib/config.h-in
193 test -f %XSRC%/lib/config.h-in
194 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/lib/config.h %XSRC%/lib/config.h-in
195 test -f %XSRC%/lib/config.h-in
196 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/lib/configh.in %XSRC%/lib/config.h-in
197 test -f %XSRC%/lib/config.h-in
198 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/lib/config_h.in %XSRC%/lib/config.h-in
199 test -f %XSRC%/include/iconv.h.in
200 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconv.h.in %XSRC%/include/iconv.h-in
201 test -f %XSRC%/include/iconv.h-in
202 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconv.h %XSRC%/include/iconv.h-in
203 test -f %XSRC%/include/iconv.h-in
204 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconvh.in %XSRC%/include/iconv.h-in
205 test -f %XSRC%/include/iconv.h-in
206 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconv_h.in %XSRC%/include/iconv.h-in
207 test -f %XSRC%/include/iconv.h.build.in
208 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconv.h.build.in %XSRC%/include/iconv.h-build-in
209 test -f %XSRC%/include/iconv.h-build-in
210 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconv.h %XSRC%/include/iconv.h-build-in
211 test -f %XSRC%/include/iconv.h-build-in
212 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconvh.build %XSRC%/include/iconv.h-build-in
213 test -f %XSRC%/include/iconv.h-build-in
214 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/include/iconv_h.build %XSRC%/include/iconv.h-build-in
215 test -f %XSRC%/libcharset/config.h.in
216 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/config.h.in %XSRC%/libcharset/config.h-in
217 test -f %XSRC%/libcharset/config.h-in
218 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/config.h %XSRC%/libcharset/config.h-in
219 test -f %XSRC%/libcharset/config.h-in
220 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/configh.in %XSRC%/libcharset/config.h-in
221 test -f %XSRC%/libcharset/config.h-in
222 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/config_h.in %XSRC%/libcharset/config.h-in
223 test -f %XSRC%/libcharset/include/libcharset.h.in
224 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/libcharset.h.in %XSRC%/libcharset/include/libcharset.h-in
225 test -f %XSRC%/libcharset/include/libcharset.h-in
226 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/libcharset.h %XSRC%/libcharset/include/libcharset.h-in
227 test -f %XSRC%/libcharset/include/libcharset.h-in
228 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/libcharseth.in %XSRC%/libcharset/include/libcharset.h-in
229 test -f %XSRC%/libcharset/include/libcharset.h-in
230 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/libcharset_h.in %XSRC%/libcharset/include/libcharset.h-in
231 test -f %XSRC%/libcharset/include/localcharset.h.in
232 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharset.h.in %XSRC%/libcharset/include/localcharset.h-in
233 test -f %XSRC%/libcharset/include/localcharset.h-in
234 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharset.h %XSRC%/libcharset/include/localcharset.h-in
235 test -f %XSRC%/libcharset/include/localcharset.h-in
236 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharseth.in %XSRC%/libcharset/include/localcharset.h-in
237 test -f %XSRC%/libcharset/include/localcharset.h-in
238 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharset_h.in %XSRC%/libcharset/include/localcharset.h-in
239 test -f %XSRC%/libcharset/include/localcharset.h.build.in
240 if not errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharset.h.build.in %XSRC%/libcharset/include/localcharset.h-build-in
241 test -f %XSRC%/libcharset/include/localcharset.h-build-in
242 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharset.h %XSRC%/libcharset/include/localcharset.h-build-in
243 test -f %XSRC%/libcharset/include/localcharset.h-build-in
244 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharseth.build %XSRC%/libcharset/include/localcharset.h-build-in
245 test -f %XSRC%/libcharset/include/localcharset.h-build-in
246 if errorlevel 1 redir -e /dev/null mv -f %XSRC%/libcharset/include/localcharset_h.build %XSRC%/libcharset/include/localcharset.h-build-in
247  
248 Rem DJGPP needs ICONV_CONST set to const.
249 sed "s/^#undef ICONV_CONST/#define ICONV_CONST const/" %XSRC%/config.h-in > config.tmp
250 mv -f config.tmp %XSRC%/config.h-in
251  
252 Rem All fixes needed to get the package configured, compiled and tested.
253 Rem 1: Change the stateless-check script so it knowns about the
254 Rem new filenames.
255 Rem 2: Ditto for Makefile.in
256 Rem 3: Ditto for source files.
257  
258 :test -f %XSRC%/stamp-djgppfixes
259 :if not errorlevel 1 goto TestsuitFixed
260 Rem Fix the Makefile.ins.
261 test -f %XSRC%/lib/Makefile.org
262 if errorlevel 1 update %XSRC%/lib/Makefile.in %XSRC%/lib/Makefile.org
263 sed -f %XSRC%/djgpp/makefile.sed %XSRC%/lib/Makefile.org > Makefile.tmp
264 if errorlevel 1 goto SedError
265 update Makefile.tmp %XSRC%/lib/Makefile.in
266 rm Makefile.tmp
267 test -f %XSRC%/tests/Makefile.org
268 if errorlevel 1 update %XSRC%/tests/Makefile.in %XSRC%/tests/Makefile.org
269 sed -f %XSRC%/djgpp/makefile.sed %XSRC%/tests/Makefile.org > Makefile.tmp
270 if errorlevel 1 goto SedError
271 update Makefile.tmp %XSRC%/tests/Makefile.in
272 rm Makefile.tmp
273  
274 Rem Fix the source files.
275 test -f %XSRC%/lib/aliases/aliases2.org
276 if errorlevel 1 update %XSRC%/lib/aliases/aliases2.h %XSRC%/lib/aliases/aliases2.org
277 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/aliases/aliases2.org > aliases2.tmp
278 if errorlevel 1 goto SedError
279 update aliases2.tmp %XSRC%/lib/aliases/aliases2.h
280 rm aliases2.tmp
281 test -f %XSRC%/lib/iconv.org
282 if errorlevel 1 update %XSRC%/lib/iconv.c %XSRC%/lib/iconv.org
283 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/iconv.org > iconv.tmp
284 if errorlevel 1 goto SedError
285 update iconv.tmp %XSRC%/lib/iconv.c
286 rm iconv.tmp
287 test -f %XSRC%/lib/converters.org
288 if errorlevel 1 update %XSRC%/lib/converters.h %XSRC%/lib/converters.org
289 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/converters.org > converters.tmp
290 if errorlevel 1 goto SedError
291 update converters.tmp %XSRC%/lib/converters.h
292 rm converters.tmp
293 test -f %XSRC%/lib/cns/11643.org
294 if errorlevel 1 update %XSRC%/lib/cns/11643.h %XSRC%/lib/cns/11643.org
295 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/cns/11643.org > 11643.tmp
296 if errorlevel 1 goto SedError
297 update 11643.tmp %XSRC%/lib/cns/11643.h
298 rm 11643.tmp
299 test -f %XSRC%/lib/cns/11643_4.org
300 if errorlevel 1 update %XSRC%/lib/cns/11643_4.h %XSRC%/lib/cns/11643_4.org
301 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/cns/11643_4.org > 11643_4.tmp
302 if errorlevel 1 goto SedError
303 update 11643_4.tmp %XSRC%/lib/cns/11643_4.h
304 rm 11643_4.tmp
305 test -f %XSRC%/lib/iso/ir165.org
306 if errorlevel 1 update %XSRC%/lib/iso/ir165.h %XSRC%/lib/iso/ir165.org
307 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/iso/ir165.org > ir165.tmp
308 if errorlevel 1 goto SedError
309 update ir165.tmp %XSRC%/lib/iso/ir165.h
310 rm ir165.tmp
311 test -f %XSRC%/lib/big5hkscs/1999.org
312 if errorlevel 1 update %XSRC%/lib/big5hkscs/1999.h %XSRC%/lib/big5hkscs/1999.org
313 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/big5hkscs/1999.org > 1999.tmp
314 if errorlevel 1 goto SedError
315 update 1999.tmp %XSRC%/lib/big5hkscs/1999.h
316 rm 1999.tmp
317 test -f %XSRC%/lib/big5hkscs/2001.org
318 if errorlevel 1 update %XSRC%/lib/big5hkscs/2001.h %XSRC%/lib/big5hkscs/2001.org
319 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/big5hkscs/2001.org > 2001.tmp
320 if errorlevel 1 goto SedError
321 update 2001.tmp %XSRC%/lib/big5hkscs/2001.h
322 rm 2001.tmp
323 test -f %XSRC%/lib/big5hkscs/2004.org
324 if errorlevel 1 update %XSRC%/lib/big5hkscs/2004.h %XSRC%/lib/big5hkscs/2004.org
325 sed -f %XSRC%/djgpp/sources.sed %XSRC%/lib/big5hkscs/2004.org > 2004.tmp
326 if errorlevel 1 goto SedError
327 update 2004.tmp %XSRC%/lib/big5hkscs/2004.h
328 rm 2004.tmp
329  
330 Rem Fix the test scripts.
331 if "%XSRC%" == "." goto NoDirChange
332 cd | sed "s|:.*$|:|" > cd_BuildDir.bat
333 cd | sed "s|^.:|cd |" >> cd_BuildDir.bat
334 mv -f cd_BuildDir.bat %XSRC%/cd_BuildDir.bat
335 echo %XSRC% | sed -e "s|^/dev/||" -e "s|/|:|" -e "s|:.*$|:|g" > cd_SrcDir.bat
336 echo %XSRC% | sed -e "s|^/dev/||" -e "s|/|:/|" -e "s|^.*:|cd |" -e "s|^\.\.|cd &|" -e "s|/|\\|g" >> cd_SrcDir.bat
337 call cd_SrcDir.bat
338 call djgpp\edtest.bat
339 call cd_BuildDir.bat
340 rm -f cd_SrcDir.bat cd_BuildDir.bat %XSRC%/cd_BuildDir.bat
341 goto TestsuitFixed
342 :NoDirChange
343 call djgpp\edtest.bat
344 ::TestsuitFixed
345 :touch %XSRC%/stamp-djgppfixes
346  
347 Rem /include/wchar.h from DJGPP 2.03 does not work.
348 Rem Replace it with the one of DJGPP 2.04.
349 test -f %XSRC%/srclib/wchar.h
350 if errorlevel 1 update %XSRC%/djgpp/wchar.h %XSRC%/srclib/wchar.h
351  
352 Rem This is required because DOS/Windows are case-insensitive
353 Rem to file names, and "make install" will do nothing if Make
354 Rem finds a file called `install'.
355 if exist INSTALL mv -f INSTALL INSTALL.txt
356  
357 Rem Set SHELL to a sane default or some configure tests stop working
358 Rem if the package is configured across partitions.
359 if not "%SHELL%" == "" goto HomeName
360 set SHELL=/bin/sh
361 if not "%SHELL%" == "/bin/sh" goto SmallEnv
362 echo No SHELL found in the environment, using default value
363  
364 :HomeName
365 Rem Set HOME to a sane default so configure stops complaining.
366 if not "%HOME%" == "" goto HostName
367 set HOME=%XSRC%/djgpp
368 if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv
369 echo No HOME found in the environment, using default value
370  
371 :HostName
372 Rem Set HOSTNAME so it shows in config.status
373 if not "%HOSTNAME%" == "" goto hostdone
374 if "%windir%" == "" goto msdos
375 set OS=MS-Windows
376 if not "%OS%" == "MS-Windows" goto SmallEnv
377 goto haveos
378 :msdos
379 set OS=MS-DOS
380 if not "%OS%" == "MS-DOS" goto SmallEnv
381 :haveos
382 if not "%USERNAME%" == "" goto haveuname
383 if not "%USER%" == "" goto haveuser
384 echo No USERNAME and no USER found in the environment, using default values
385 set HOSTNAME=Unknown PC
386 if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
387 goto userdone
388 :haveuser
389 set HOSTNAME=%USER%'s PC
390 if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv
391 goto userdone
392 :haveuname
393 set HOSTNAME=%USERNAME%'s PC
394 if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
395 :userdone
396 set _HOSTNAME=%HOSTNAME%, %OS%
397 if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
398 set HOSTNAME=%_HOSTNAME%
399 :hostdone
400 set _HOSTNAME=
401 set OS=
402  
403 Rem install-sh is required by the configure script but clashes with the
404 Rem various Makefile install-foo targets, so we MUST have it before the
405 Rem script runs and rename it afterwards
406 test -f %XSRC%/install-sh
407 if not errorlevel 1 goto NoRen0
408 test -f %XSRC%/install-sh.sh
409 if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh
410 :NoRen0
411  
412 if "%NLS%" == "disabled" goto WithoutNLS
413  
414 :WithNLS
415 test -d %XSRC%/po
416 if errorlevel 1 goto WithoutNLS
417  
418 Rem Check for the needed libraries and binaries.
419 test -x /dev/env/DJDIR/bin/msgfmt.exe
420 if not errorlevel 0 goto MissingNLSTools
421 test -x /dev/env/DJDIR/bin/xgettext.exe
422 if not errorlevel 0 goto MissingNLSTools
423 test -f /dev/env/DJDIR/include/libcharset.h
424 if not errorlevel 0 goto MissingNLSTools
425 test -f /dev/env/DJDIR/lib/libcharset.a
426 if not errorlevel 0 goto MissingNLSTools
427 test -f /dev/env/DJDIR/include/iconv.h
428 if not errorlevel 0 goto MissingNLSTools
429 test -f /dev/env/DJDIR/lib/libiconv.a
430 if not errorlevel 0 goto MissingNLSTools
431 test -f /dev/env/DJDIR/include/libintl.h
432 if not errorlevel 0 goto MissingNLSTools
433 test -f /dev/env/DJDIR/lib/libintl.a
434 if not errorlevel 0 goto MissingNLSTools
435  
436 Rem Recreate the files in the %XSRC%/po subdir with our ported tools.
437 redir -e /dev/null rm %XSRC%/po/*.gmo
438 redir -e /dev/null rm %XSRC%/po/libiconv.pot
439 redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c
440 redir -e /dev/null rm %XSRC%/po/stamp-cat-id
441  
442 Rem Update the arguments file for the configure script.
443 Rem We prefer without-included-gettext because libintl.a from gettext package
444 Rem is the only one that is garanteed to have been ported to DJGPP.
445 echo --enable-nls --without-included-gettext >> arguments
446 goto ConfigurePackage
447  
448 :MissingNLSTools
449 echo Needed libs/tools for NLS not found. Configuring without NLS.
450 :WithoutNLS
451 Rem Update the arguments file for the configure script.
452 echo --disable-nls >> arguments
453  
454 :ConfigurePackage
455 echo Running the ./configure script...
456 sh ./configure @arguments
457 if errorlevel 1 goto CfgError
458 rm arguments
459 echo Done.
460 goto End
461  
462 :SedError
463 echo ./configure script editing failed!
464 goto End
465  
466 :CfgError
467 echo ./configure script exited abnormally!
468 goto End
469  
470 :SmallEnv
471 echo Your environment size is too small. Enlarge it and run me again.
472 echo Configuration NOT done!
473  
474 :End
475 test -f %XSRC%/install-sh.sh
476 if not errorlevel 1 goto NoRen1
477 test -f %XSRC%/install-sh
478 if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh
479 :NoRen1
480 set CONFIG_SITE=
481 set HOSTNAME=
482 set XSRC=