]>
Commit | Line | Data |
---|---|---|
3768a1ae JMG |
1 | @echo off\r |
2 | echo Configuring GNU Bison for DJGPP v2.x...\r | |
3 | \r | |
4 | Rem The SmallEnv tests protect against fixed and too small size\r | |
5 | Rem of the environment in stock DOS shell.\r | |
6 | \r | |
7 | Rem Find out if NLS is wanted or not,\r | |
8 | Rem if dependency-tracking is wanted or not,\r | |
9 | Rem if caching is wanted or not\r | |
10 | Rem and where the sources are.\r | |
11 | Rem We always default to NLS support,\r | |
12 | Rem no dependency tracking\r | |
13 | Rem and to in place configuration.\r | |
14 | set ARGS=\r | |
15 | set NLS=enabled\r | |
16 | if not "%NLS%" == "enabled" goto SmallEnv\r | |
17 | set CACHING=enabled\r | |
18 | if not "%CACHING%" == "enabled" goto SmallEnv\r | |
19 | set DEPENDENCY_TRACKING=disabled\r | |
20 | if not "%DEPENDENCY_TRACKING%" == "disabled" goto SmallEnv\r | |
21 | set LIBICONV_PREFIX=disabled\r | |
22 | if not "%LIBICONV_PREFIX%" == "disabled" goto SmallEnv\r | |
23 | set LIBINTL_PREFIX=disabled\r | |
24 | if not "%LIBINTL_PREFIX%" == "disabled" goto SmallEnv\r | |
25 | set HTML=enabled\r | |
26 | if not "%HTML%" == "enabled" goto SmallEnv\r | |
27 | set XSRC=.\r | |
28 | if not "%XSRC%" == "." goto SmallEnv\r | |
29 | \r | |
30 | Rem Loop over all arguments.\r | |
31 | Rem Special arguments are: NLS, XSRC, CACHE, STATIC_LIBS, LIBICONV_PREFIX, LIBINTL_PREFIX and DEPS.\r | |
32 | Rem All other arguments are stored into ARGS.\r | |
33 | :ArgLoop\r | |
34 | if "%1" == "nls" goto NextArgument\r | |
35 | if "%1" == "NLS" goto NextArgument\r | |
36 | if "%1" == "no-nls" goto NoNLS\r | |
37 | if "%1" == "no-NLS" goto NoNLS\r | |
38 | if "%1" == "NO-NLS" goto NoNLS\r | |
39 | goto CachingOption\r | |
40 | :NoNLS\r | |
41 | if "%1" == "no-nls" set NLS=disabled\r | |
42 | if "%1" == "no-NLS" set NLS=disabled\r | |
43 | if "%1" == "NO-NLS" set NLS=disabled\r | |
44 | if not "%NLS%" == "disabled" goto SmallEnv\r | |
45 | goto NextArgument\r | |
46 | :CachingOption\r | |
47 | if "%1" == "cache" goto NextArgument\r | |
48 | if "%1" == "CACHE" goto NextArgument\r | |
49 | if "%1" == "no-cache" goto NoCaching\r | |
50 | if "%1" == "no-CACHE" goto NoCaching\r | |
51 | if "%1" == "NO-CACHE" goto NoCaching\r | |
52 | goto DependencyOption\r | |
53 | :NoCaching\r | |
54 | if "%1" == "no-cache" set CACHING=disabled\r | |
55 | if "%1" == "no-CACHE" set CACHING=disabled\r | |
56 | if "%1" == "NO-CACHE" set CACHING=disabled\r | |
57 | if not "%CACHING%" == "disabled" goto SmallEnv\r | |
58 | goto NextArgument\r | |
59 | :DependencyOption\r | |
60 | if "%1" == "no-dep" goto NextArgument\r | |
61 | if "%1" == "no-DEP" goto NextArgument\r | |
62 | if "%1" == "NO-DEP" goto NextArgument\r | |
63 | if "%1" == "dep" goto DependecyTraking\r | |
64 | if "%1" == "DEP" goto DependecyTraking\r | |
65 | goto LibiconvPrefixOption\r | |
66 | :DependecyTraking\r | |
67 | if "%1" == "dep" set DEPENDENCY_TRACKING=enabled\r | |
68 | if "%1" == "DEP" set DEPENDENCY_TRACKING=enabled\r | |
69 | if not "%DEPENDENCY_TRACKING%" == "enabled" goto SmallEnv\r | |
70 | goto NextArgument\r | |
71 | :LibiconvPrefixOption\r | |
72 | if "%1" == "no-libiconvprefix" goto NextArgument\r | |
73 | if "%1" == "no-LIBICONVPREFIX" goto NextArgument\r | |
74 | if "%1" == "NO-LIBICONVPREFIX" goto NextArgument\r | |
75 | if "%1" == "libiconvprefix" goto WithLibiconvPrefix\r | |
76 | if "%1" == "LIBICONVPREFIX" goto WithLibiconvPrefix\r | |
77 | goto LibintlPrefixOption\r | |
78 | :WithLibiconvPrefix\r | |
79 | if "%1" == "libiconvprefix" set LIBICONV_PREFIX=enabled\r | |
80 | if "%1" == "LIBICONVPREFIX" set LIBICONV_PREFIX=enabled\r | |
81 | if not "%LIBICONV_PREFIX%" == "enabled" goto SmallEnv\r | |
82 | goto NextArgument\r | |
83 | :LibintlPrefixOption\r | |
84 | if "%1" == "no-libiconvprefix" goto NextArgument\r | |
85 | if "%1" == "no-LIBICONVPREFIX" goto NextArgument\r | |
86 | if "%1" == "NO-LIBICONVPREFIX" goto NextArgument\r | |
87 | if "%1" == "libintlprefix" goto _WithLibintlPrefix\r | |
88 | if "%1" == "LIBINTLPREFIX" goto _WithLibintlPrefix\r | |
89 | goto HTMLOption\r | |
90 | :_WithLibintlPrefix\r | |
91 | if "%1" == "libintlprefix" set LIBINTL_PREFIX=enabled\r | |
92 | if "%1" == "LIBINTLPREFIX" set LIBINTL_PREFIX=enabled\r | |
93 | if not "%LIBINTL_PREFIX%" == "enabled" goto SmallEnv\r | |
94 | :HTMLOption\r | |
95 | if "%1" == "withhtml" goto NextArgument\r | |
96 | if "%1" == "withHTML" goto NextArgument\r | |
97 | if "%1" == "WITHHTML" goto NextArgument\r | |
98 | if "%1" == "withouthtml" goto _WithoutHTML\r | |
99 | if "%1" == "withoutHTML" goto _WithoutHTML\r | |
100 | if "%1" == "WITHOUTHTML" goto _WithoutHTML\r | |
101 | goto SrcDirOption\r | |
102 | :_WithoutHTML\r | |
103 | if "%1" == "withouthtml" set HTML=disabled\r | |
104 | if "%1" == "withoutHTML" set HTML=disabled\r | |
105 | if "%1" == "WITHOUTHTML" set HTML=disabled\r | |
106 | if not "%HTML%" == "disabled" goto SmallEnv\r | |
107 | goto NextArgument\r | |
108 | :SrcDirOption\r | |
109 | echo %1 | grep -q "/"\r | |
110 | if errorlevel 1 goto CollectArgument\r | |
111 | set XSRC=%1\r | |
112 | if not "%XSRC%" == "%1" goto SmallEnv\r | |
113 | goto NextArgument\r | |
114 | :CollectArgument\r | |
115 | set _ARGS=%ARGS% %1\r | |
116 | if not "%_ARGS%" == "%ARGS% %1" if not "%_ARGS%" == "%ARGS%%1" goto SmallEnv\r | |
117 | echo %_ARGS% | grep -q "[^ ]"\r | |
118 | if not errorlevel 0 set ARGS=%_ARGS%\r | |
119 | set _ARGS=\r | |
120 | :NextArgument\r | |
121 | shift\r | |
122 | if not "%1" == "" goto ArgLoop\r | |
123 | \r | |
124 | Rem Create an arguments file for the configure script.\r | |
125 | echo --srcdir=%XSRC% > arguments\r | |
126 | if "%CACHING%" == "enabled" echo --cache-file=%XSRC%/djgpp/config.cache >> arguments\r | |
127 | if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> arguments\r | |
128 | if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> arguments\r | |
129 | if "%LIBICONV_PREFIX%" == "enabled" echo --with-libiconv-prefix >> arguments\r | |
130 | if "%LIBICONV_PREFIX%" == "disabled" echo --without-libiconv-prefix >> arguments\r | |
131 | if "%LIBINTL_PREFIX%" == "enabled" echo --with-libintl-prefix >> arguments\r | |
132 | if "%LIBINTL_PREFIX%" == "disabled" echo --without-libintl-prefix >> arguments\r | |
133 | if "%HTML%" == "enabled" echo --enable-html >> arguments\r | |
134 | if "%HTML%" == "disabled" echo --disable-html >> arguments\r | |
135 | if not "%ARGS%" == "" echo %ARGS% >> arguments\r | |
136 | set ARGS=\r | |
137 | set CACHING=\r | |
138 | set DEPENDENCY_TRACKING=\r | |
139 | \r | |
140 | if "%XSRC%" == "." goto InPlace\r | |
141 | \r | |
142 | :NotInPlace\r | |
143 | redir -e /dev/null update %XSRC%/configure.orig ./configure\r | |
144 | test -f ./configure\r | |
145 | if errorlevel 1 update %XSRC%/configure ./configure\r | |
146 | \r | |
147 | :InPlace\r | |
148 | Rem Update configuration files\r | |
149 | echo Updating configuration scripts...\r | |
150 | test -f ./configure.orig\r | |
151 | if errorlevel 1 update configure configure.orig\r | |
152 | sed -f %XSRC%/djgpp/config.sed configure.orig > configure\r | |
153 | if errorlevel 1 goto SedError\r | |
154 | \r | |
155 | Rem Make sure they have a config.site file\r | |
156 | set CONFIG_SITE=%XSRC%/djgpp/config.site\r | |
157 | if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv\r | |
158 | \r | |
159 | Rem Make sure crucial file names are not munged by unpacking\r | |
160 | test -f %XSRC%/po/Makefile.in.in\r | |
161 | if not errorlevel 1 mv -f %XSRC%/po/Makefile.in.in %XSRC%/po/Makefile.in-in\r | |
162 | test -f %XSRC%/po/Makefile.in-in\r | |
163 | if errorlevel 1 mv -f %XSRC%/po/Makefile.in %XSRC%/po/Makefile.in-in\r | |
164 | test -f %XSRC%/runtime-po/Makefile.in.in\r | |
165 | if not errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in.in %XSRC%/runtime-po/Makefile.in-in\r | |
166 | test -f %XSRC%/runtime-po/Makefile.in-in\r | |
167 | if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in %XSRC%/runtime-po/Makefile.in-in\r | |
168 | test -f %XSRC%/data/c++.m4\r | |
169 | if not errorlevel 1 mv -f %XSRC%/data/c++.m4 %XSRC%/data/cxx.m4\r | |
170 | test -f %XSRC%/data/cxx.m4\r | |
171 | if errorlevel 1 mv -f %XSRC%/data/cpp.m4 %XSRC%/data/cxx.m4\r | |
172 | \r | |
173 | Rem Fix data/lalr1.cc to reflect the renaming of c++.m4\r | |
174 | sed "s/c++\.m4/cxx.m4/" %XSRC%/data/lalr1.cc > lalr1.cc\r | |
175 | if errorlevel 1 goto lalr1_ccFileError\r | |
176 | mv ./lalr1.cc %XSRC%/data/lalr1.cc\r | |
177 | \r | |
178 | Rem Define DJGPP specific defs in config.hin\r | |
179 | echo Editing config.hin...\r | |
180 | test -f %XSRC%/config_h.orig\r | |
181 | if errorlevel 1 update %XSRC%/config.hin %XSRC%/config_h.orig\r | |
182 | sed -f %XSRC%/djgpp/config_h.sed %XSRC%/config_h.orig > config.hin\r | |
183 | if errorlevel 1 goto SedError2\r | |
184 | mv -f config.hin %XSRC%/config.hin\r | |
185 | \r | |
186 | \r | |
187 | Rem Fixing ilicit testsuite file name.\r | |
188 | test -f %XSRC%/tests/c++.at\r | |
189 | if not errorlevel 1 mv -f %XSRC%/tests/c++.at %XSRC%/tests/cxx.at\r | |
190 | \r | |
191 | Rem Fixing ilicit calc++ file names in the calc++ directory.\r | |
192 | test -d %XSRC%/examples/calc++\r | |
193 | if not errorlevel 1 mv -f %XSRC%/examples/calc++ %XSRC%/examples/calcxx\r | |
194 | test -d %XSRC%/examples/calcxx\r | |
195 | if errorlevel 1 mv -f %XSRC%/examples/calcpp %XSRC%/examples/calcxx\r | |
196 | test -f %XSRC%/examples/calcxx/calc++-scanner.cc\r | |
197 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
198 | test -f %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
199 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
200 | test -f %XSRC%/examples/calcxx/calc++-scanner.ll\r | |
201 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
202 | test -f %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
203 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
204 | test -f %XSRC%/examples/calcxx/calc++-driver.cc\r | |
205 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
206 | test -f %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
207 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
208 | test -f %XSRC%/examples/calcxx/calc++-driver.hh\r | |
209 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
210 | test -f %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
211 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
212 | test -f %XSRC%/examples/calcxx/calc++-parser.cc\r | |
213 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
214 | test -f %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
215 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
216 | test -f %XSRC%/examples/calcxx/calc++-parser.hh\r | |
217 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
218 | test -f %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
219 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
220 | test -f %XSRC%/examples/calcxx/calc++-parser.stamp\r | |
221 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp\r | |
222 | test -f %XSRC%/examples/calcxx/calcxx-parser.stamp\r | |
223 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp\r | |
224 | test -f %XSRC%/examples/calcxx/calc++-parser.yy\r | |
225 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
226 | test -f %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
227 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
228 | test -f %XSRC%/examples/calcxx/calc++.cc\r | |
229 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++.cc %XSRC%/examples/calcxx/calcxx.cc\r | |
230 | test -f %XSRC%/examples/calcxx/calcxx.cc\r | |
231 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp.cc %XSRC%/examples/calcxx/calcxx.cc\r | |
232 | \r | |
233 | Rem Fixing #include lines in calcxx files.\r | |
234 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc\r | |
235 | if errorlevel 1 goto calcxxFileError\r | |
236 | mv ./calcxx.cc %XSRC%/examples/calcxx/calcxx.cc\r | |
237 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc\r | |
238 | if errorlevel 1 goto calcxxFileError\r | |
239 | mv ./calcxx-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
240 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh\r | |
241 | if errorlevel 1 goto calcxxFileError\r | |
242 | mv ./calcxx-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
243 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc\r | |
244 | if errorlevel 1 goto calcxxFileError\r | |
245 | mv ./calcxx-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
246 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh\r | |
247 | if errorlevel 1 goto calcxxFileError\r | |
248 | mv ./calcxx-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
249 | :sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy\r | |
250 | :if errorlevel 1 goto calcxxFileError\r | |
251 | :mv ./calcxx-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
252 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc\r | |
253 | if errorlevel 1 goto calcxxFileError\r | |
254 | mv ./calcxx-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
255 | :sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll\r | |
256 | :if errorlevel 1 goto calcxxFileError\r | |
257 | :mv ./calcxx-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
258 | sed "s/calc++/calcxx/" %XSRC%/examples/calcxx/test > test\r | |
259 | if errorlevel 1 goto calcxxFileError\r | |
260 | mv ./test %XSRC%/examples/calcxx/test\r | |
261 | \r | |
262 | \r | |
263 | Rem Fixing the scanner files to make file names 8.3 valid.\r | |
264 | Rem Use only if you want to change the scan-gram.l and scan-skel.l files.\r | |
265 | : sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-gram.l > scan-gram.l\r | |
266 | : if errorlevel 1 goto ScannerFileError\r | |
267 | : mv ./scan-gram.l %XSRC%/src/scan-gram.l\r | |
268 | : sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-skel.l > scan-skel.l\r | |
269 | : if errorlevel 1 goto ScannerFileError\r | |
270 | : mv ./scan-skel.l %XSRC%/src/scan-skel.l\r | |
271 | \r | |
272 | \r | |
273 | Rem This is required because DOS/Windows are case-insensitive\r | |
274 | Rem to file names, and "make install" will do nothing if Make\r | |
275 | Rem finds a file called `install'.\r | |
276 | if exist INSTALL ren INSTALL INSTALL.txt\r | |
277 | \r | |
278 | Rem Set SHELL to a sane default or some configure tests stop working\r | |
279 | Rem if the package is configured across partitions.\r | |
280 | if not "%SHELL%" == "" goto HomeName\r | |
281 | set SHELL=/bin/sh\r | |
282 | if not "%SHELL%" == "/bin/sh" goto SmallEnv\r | |
283 | echo No SHELL found in the environment, using default value\r | |
284 | \r | |
285 | :HomeName\r | |
286 | Rem Set HOME to a sane default so configure stops complaining.\r | |
287 | if not "%HOME%" == "" goto HostName\r | |
288 | set HOME=%XSRC%/djgpp\r | |
289 | if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv\r | |
290 | echo No HOME found in the environment, using default value\r | |
291 | \r | |
292 | :HostName\r | |
293 | Rem Set HOSTNAME so it shows in config.status\r | |
294 | if not "%HOSTNAME%" == "" goto hostdone\r | |
295 | if "%windir%" == "" goto msdos\r | |
296 | set OS=MS-Windows\r | |
297 | if not "%OS%" == "MS-Windows" goto SmallEnv\r | |
298 | goto haveos\r | |
299 | :msdos\r | |
300 | set OS=MS-DOS\r | |
301 | if not "%OS%" == "MS-DOS" goto SmallEnv\r | |
302 | :haveos\r | |
303 | if not "%USERNAME%" == "" goto haveuname\r | |
304 | if not "%USER%" == "" goto haveuser\r | |
305 | echo No USERNAME and no USER found in the environment, using default values\r | |
306 | set HOSTNAME=Unknown PC\r | |
307 | if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv\r | |
308 | goto userdone\r | |
309 | :haveuser\r | |
310 | set HOSTNAME=%USER%'s PC\r | |
311 | if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv\r | |
312 | goto userdone\r | |
313 | :haveuname\r | |
314 | set HOSTNAME=%USERNAME%'s PC\r | |
315 | if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv\r | |
316 | :userdone\r | |
317 | set _HOSTNAME=%HOSTNAME%, %OS%\r | |
318 | if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv\r | |
319 | set HOSTNAME=%_HOSTNAME%\r | |
320 | :hostdone\r | |
321 | set _HOSTNAME=\r | |
322 | set OS=\r | |
323 | \r | |
324 | Rem install-sh is required by the configure script but clashes with the\r | |
325 | Rem various Makefile install-foo targets, so we MUST have it before the\r | |
326 | Rem script runs and rename it afterwards\r | |
327 | test -f %XSRC%/install-sh\r | |
328 | if not errorlevel 1 goto NoRen0\r | |
329 | test -f %XSRC%/install-sh.sh\r | |
330 | if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh\r | |
331 | :NoRen0\r | |
332 | \r | |
333 | if "%NLS%" == "disabled" goto WithoutNLS\r | |
334 | \r | |
335 | :WithNLS\r | |
336 | Rem Check for the needed libraries and binaries.\r | |
337 | test -x /dev/env/DJDIR/bin/msgfmt.exe\r | |
338 | if errorlevel 1 goto MissingNLSTools\r | |
339 | test -x /dev/env/DJDIR/bin/xgettext.exe\r | |
340 | if errorlevel 1 goto MissingNLSTools\r | |
341 | test -f /dev/env/DJDIR/include/libcharset.h\r | |
342 | if errorlevel 1 goto MissingNLSTools\r | |
343 | test -f /dev/env/DJDIR/lib/libcharset.a\r | |
344 | if errorlevel 1 goto MissingNLSTools\r | |
345 | test -f /dev/env/DJDIR/include/iconv.h\r | |
346 | if errorlevel 1 goto MissingNLSTools\r | |
347 | test -f /dev/env/DJDIR/lib/libiconv.a\r | |
348 | if errorlevel 1 goto MissingNLSTools\r | |
349 | test -f /dev/env/DJDIR/include/libintl.h\r | |
350 | if errorlevel 1 goto MissingNLSTools\r | |
351 | test -f /dev/env/DJDIR/lib/libintl.a\r | |
352 | if errorlevel 1 goto MissingNLSTools\r | |
353 | \r | |
354 | Rem Recreate the files in the %XSRC%/po subdir with our ported tools.\r | |
355 | redir -e /dev/null rm %XSRC%/po/*.gmo\r | |
356 | redir -e /dev/null rm %XSRC%/po/bison.pot\r | |
357 | redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c\r | |
358 | redir -e /dev/null rm %XSRC%/po/stamp-cat-id\r | |
359 | \r | |
360 | Rem Update the arguments file for the configure script.\r | |
361 | Rem We prefer without-included-gettext because libintl.a from gettext package\r | |
362 | Rem is the only one that is garanteed to have been ported to DJGPP.\r | |
363 | echo --enable-nls --without-included-gettext >> arguments\r | |
364 | goto ConfigurePackage\r | |
365 | \r | |
366 | :MissingNLSTools\r | |
367 | echo Needed libs/tools for NLS not found. Configuring without NLS.\r | |
368 | :WithoutNLS\r | |
369 | Rem Update the arguments file for the configure script.\r | |
370 | echo --disable-nls >> arguments\r | |
371 | \r | |
372 | :ConfigurePackage\r | |
373 | echo Running the ./configure script...\r | |
374 | sh ./configure @arguments\r | |
375 | if errorlevel 1 goto CfgError\r | |
376 | rm arguments\r | |
377 | echo Done.\r | |
378 | goto End\r | |
379 | \r | |
380 | :lalr1_ccFileError\r | |
381 | echo ./data/lalr1.cc file editing failed!\r | |
382 | goto End\r | |
383 | \r | |
384 | :calcxxFileError\r | |
385 | echo ./examples/calcxx file editing failed!\r | |
386 | goto End\r | |
387 | \r | |
388 | :ScannerFileError\r | |
389 | echo ./scanner file editing failed!\r | |
390 | goto End\r | |
391 | \r | |
392 | :SedError\r | |
393 | echo ./configure script editing failed!\r | |
394 | goto End\r | |
395 | \r | |
396 | :SedError2\r | |
397 | echo ./config.hin editing failed!\r | |
398 | goto End\r | |
399 | \r | |
400 | :CfgError\r | |
401 | echo ./configure script exited abnormally!\r | |
402 | goto End\r | |
403 | \r | |
404 | :SmallEnv\r | |
405 | echo Your environment size is too small. Enlarge it and run me again.\r | |
406 | echo Configuration NOT done!\r | |
407 | \r | |
408 | :End\r | |
409 | test -f %XSRC%/install-sh.sh\r | |
410 | if not errorlevel 1 goto NoRen1\r | |
411 | test -f %XSRC%/install-sh\r | |
412 | if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh\r | |
413 | :NoRen1\r | |
414 | if "%SHELL%" == "/bin/sh" set SHELL=\r | |
415 | if "%HOME%" == "%XSRC%/djgpp" set HOME=\r | |
416 | set ARGS=\r | |
417 | set CONFIG_SITE=\r | |
418 | set HOSTNAME=\r | |
419 | set NLS=\r | |
420 | set CACHING=\r | |
421 | set DEPENDENCY_TRACKING=\r | |
422 | set XSRC=\r |