]>
Commit | Line | Data |
---|---|---|
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 and data/location.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 | sed "s/c++\.m4/cxx.m4/" %XSRC%/data/location.cc > location.cc\r | |
178 | if errorlevel 1 goto location.ccFileError\r | |
179 | mv ./location.cc %XSRC%/data/location.cc\r | |
180 | \r | |
181 | Rem Define DJGPP specific defs in config.hin\r | |
182 | echo Editing config.hin...\r | |
183 | test -f %XSRC%/config_h.orig\r | |
184 | if errorlevel 1 update %XSRC%/config.hin %XSRC%/config_h.orig\r | |
185 | sed -f %XSRC%/djgpp/config_h.sed %XSRC%/config_h.orig > config.hin\r | |
186 | if errorlevel 1 goto SedError2\r | |
187 | mv -f config.hin %XSRC%/config.hin\r | |
188 | \r | |
189 | \r | |
190 | Rem Fixing ilicit testsuite file name.\r | |
191 | test -f %XSRC%/tests/c++.at\r | |
192 | if not errorlevel 1 mv -f %XSRC%/tests/c++.at %XSRC%/tests/cxx.at\r | |
193 | \r | |
194 | Rem Fixing ilicit calc++ file names in the calc++ directory.\r | |
195 | test -d %XSRC%/examples/calc++\r | |
196 | if not errorlevel 1 mv -f %XSRC%/examples/calc++ %XSRC%/examples/calcxx\r | |
197 | test -d %XSRC%/examples/calcxx\r | |
198 | if errorlevel 1 mv -f %XSRC%/examples/calcpp %XSRC%/examples/calcxx\r | |
199 | test -f %XSRC%/examples/calcxx/calc++-scanner.cc\r | |
200 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
201 | test -f %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
202 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
203 | test -f %XSRC%/examples/calcxx/calc++-scanner.ll\r | |
204 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
205 | test -f %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
206 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
207 | test -f %XSRC%/examples/calcxx/calc++-driver.cc\r | |
208 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
209 | test -f %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
210 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
211 | test -f %XSRC%/examples/calcxx/calc++-driver.hh\r | |
212 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
213 | test -f %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
214 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
215 | test -f %XSRC%/examples/calcxx/calc++-parser.cc\r | |
216 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
217 | test -f %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
218 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
219 | test -f %XSRC%/examples/calcxx/calc++-parser.hh\r | |
220 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
221 | test -f %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
222 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
223 | test -f %XSRC%/examples/calcxx/calc++-parser.stamp\r | |
224 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp\r | |
225 | test -f %XSRC%/examples/calcxx/calcxx-parser.stamp\r | |
226 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp\r | |
227 | test -f %XSRC%/examples/calcxx/calc++-parser.yy\r | |
228 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
229 | test -f %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
230 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
231 | test -f %XSRC%/examples/calcxx/calc++.cc\r | |
232 | if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++.cc %XSRC%/examples/calcxx/calcxx.cc\r | |
233 | test -f %XSRC%/examples/calcxx/calcxx.cc\r | |
234 | if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp.cc %XSRC%/examples/calcxx/calcxx.cc\r | |
235 | \r | |
236 | Rem Fixing #include lines in calcxx files.\r | |
237 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc\r | |
238 | if errorlevel 1 goto calcxxFileError\r | |
239 | mv ./calcxx.cc %XSRC%/examples/calcxx/calcxx.cc\r | |
240 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc\r | |
241 | if errorlevel 1 goto calcxxFileError\r | |
242 | mv ./calcxx-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc\r | |
243 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh\r | |
244 | if errorlevel 1 goto calcxxFileError\r | |
245 | mv ./calcxx-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh\r | |
246 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc\r | |
247 | if errorlevel 1 goto calcxxFileError\r | |
248 | mv ./calcxx-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc\r | |
249 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh\r | |
250 | if errorlevel 1 goto calcxxFileError\r | |
251 | mv ./calcxx-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh\r | |
252 | :sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy\r | |
253 | :if errorlevel 1 goto calcxxFileError\r | |
254 | :mv ./calcxx-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy\r | |
255 | sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc\r | |
256 | if errorlevel 1 goto calcxxFileError\r | |
257 | mv ./calcxx-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc\r | |
258 | :sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll\r | |
259 | :if errorlevel 1 goto calcxxFileError\r | |
260 | :mv ./calcxx-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll\r | |
261 | sed "s/calc++/calcxx/" %XSRC%/examples/calcxx/test > test\r | |
262 | if errorlevel 1 goto calcxxFileError\r | |
263 | mv ./test %XSRC%/examples/calcxx/test\r | |
264 | \r | |
265 | \r | |
266 | Rem Fixing the scanner files to make file names 8.3 valid.\r | |
267 | Rem Use only if you want to change the scan-gram.l and scan-skel.l files.\r | |
268 | : sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-gram.l > scan-gram.l\r | |
269 | : if errorlevel 1 goto ScannerFileError\r | |
270 | : mv ./scan-gram.l %XSRC%/src/scan-gram.l\r | |
271 | : sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-skel.l > scan-skel.l\r | |
272 | : if errorlevel 1 goto ScannerFileError\r | |
273 | : mv ./scan-skel.l %XSRC%/src/scan-skel.l\r | |
274 | \r | |
275 | \r | |
276 | Rem This is required because DOS/Windows are case-insensitive\r | |
277 | Rem to file names, and "make install" will do nothing if Make\r | |
278 | Rem finds a file called `install'.\r | |
279 | if exist INSTALL ren INSTALL INSTALL.txt\r | |
280 | \r | |
281 | Rem Set SHELL to a sane default or some configure tests stop working\r | |
282 | Rem if the package is configured across partitions.\r | |
283 | if not "%SHELL%" == "" goto HomeName\r | |
284 | set SHELL=/bin/sh\r | |
285 | if not "%SHELL%" == "/bin/sh" goto SmallEnv\r | |
286 | echo No SHELL found in the environment, using default value\r | |
287 | \r | |
288 | :HomeName\r | |
289 | Rem Set HOME to a sane default so configure stops complaining.\r | |
290 | if not "%HOME%" == "" goto HostName\r | |
291 | set HOME=%XSRC%/djgpp\r | |
292 | if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv\r | |
293 | echo No HOME found in the environment, using default value\r | |
294 | \r | |
295 | :HostName\r | |
296 | Rem Set HOSTNAME so it shows in config.status\r | |
297 | if not "%HOSTNAME%" == "" goto hostdone\r | |
298 | if "%windir%" == "" goto msdos\r | |
299 | set OS=MS-Windows\r | |
300 | if not "%OS%" == "MS-Windows" goto SmallEnv\r | |
301 | goto haveos\r | |
302 | :msdos\r | |
303 | set OS=MS-DOS\r | |
304 | if not "%OS%" == "MS-DOS" goto SmallEnv\r | |
305 | :haveos\r | |
306 | if not "%USERNAME%" == "" goto haveuname\r | |
307 | if not "%USER%" == "" goto haveuser\r | |
308 | echo No USERNAME and no USER found in the environment, using default values\r | |
309 | set HOSTNAME=Unknown PC\r | |
310 | if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv\r | |
311 | goto userdone\r | |
312 | :haveuser\r | |
313 | set HOSTNAME=%USER%'s PC\r | |
314 | if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv\r | |
315 | goto userdone\r | |
316 | :haveuname\r | |
317 | set HOSTNAME=%USERNAME%'s PC\r | |
318 | if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv\r | |
319 | :userdone\r | |
320 | set _HOSTNAME=%HOSTNAME%, %OS%\r | |
321 | if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv\r | |
322 | set HOSTNAME=%_HOSTNAME%\r | |
323 | :hostdone\r | |
324 | set _HOSTNAME=\r | |
325 | set OS=\r | |
326 | \r | |
327 | Rem install-sh is required by the configure script but clashes with the\r | |
328 | Rem various Makefile install-foo targets, so we MUST have it before the\r | |
329 | Rem script runs and rename it afterwards\r | |
330 | test -f %XSRC%/install-sh\r | |
331 | if not errorlevel 1 goto NoRen0\r | |
332 | test -f %XSRC%/install-sh.sh\r | |
333 | if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh\r | |
334 | :NoRen0\r | |
335 | \r | |
336 | if "%NLS%" == "disabled" goto WithoutNLS\r | |
337 | \r | |
338 | :WithNLS\r | |
339 | Rem Check for the needed libraries and binaries.\r | |
340 | test -x /dev/env/DJDIR/bin/msgfmt.exe\r | |
341 | if errorlevel 1 goto MissingNLSTools\r | |
342 | test -x /dev/env/DJDIR/bin/xgettext.exe\r | |
343 | if errorlevel 1 goto MissingNLSTools\r | |
344 | test -f /dev/env/DJDIR/include/libcharset.h\r | |
345 | if errorlevel 1 goto MissingNLSTools\r | |
346 | test -f /dev/env/DJDIR/lib/libcharset.a\r | |
347 | if errorlevel 1 goto MissingNLSTools\r | |
348 | test -f /dev/env/DJDIR/include/iconv.h\r | |
349 | if errorlevel 1 goto MissingNLSTools\r | |
350 | test -f /dev/env/DJDIR/lib/libiconv.a\r | |
351 | if errorlevel 1 goto MissingNLSTools\r | |
352 | test -f /dev/env/DJDIR/include/libintl.h\r | |
353 | if errorlevel 1 goto MissingNLSTools\r | |
354 | test -f /dev/env/DJDIR/lib/libintl.a\r | |
355 | if errorlevel 1 goto MissingNLSTools\r | |
356 | \r | |
357 | Rem Recreate the files in the %XSRC%/po subdir with our ported tools.\r | |
358 | redir -e /dev/null rm %XSRC%/po/*.gmo\r | |
359 | redir -e /dev/null rm %XSRC%/po/bison.pot\r | |
360 | redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c\r | |
361 | redir -e /dev/null rm %XSRC%/po/stamp-cat-id\r | |
362 | \r | |
363 | Rem Update the arguments file for the configure script.\r | |
364 | Rem We prefer without-included-gettext because libintl.a from gettext package\r | |
365 | Rem is the only one that is garanteed to have been ported to DJGPP.\r | |
366 | echo --enable-nls --without-included-gettext >> arguments\r | |
367 | goto ConfigurePackage\r | |
368 | \r | |
369 | :MissingNLSTools\r | |
370 | echo Needed libs/tools for NLS not found. Configuring without NLS.\r | |
371 | :WithoutNLS\r | |
372 | Rem Update the arguments file for the configure script.\r | |
373 | echo --disable-nls >> arguments\r | |
374 | \r | |
375 | :ConfigurePackage\r | |
376 | echo Running the ./configure script...\r | |
377 | sh ./configure @arguments\r | |
378 | if errorlevel 1 goto CfgError\r | |
379 | rm arguments\r | |
380 | echo Done.\r | |
381 | goto End\r | |
382 | \r | |
383 | :lalr1_ccFileError\r | |
384 | echo ./data/lalr1.cc file editing failed!\r | |
385 | goto End\r | |
386 | \r | |
387 | :location_ccFileError\r | |
388 | echo ./data/location.cc file editing failed!\r | |
389 | goto End\r | |
390 | \r | |
391 | :calcxxFileError\r | |
392 | echo ./examples/calcxx file editing failed!\r | |
393 | goto End\r | |
394 | \r | |
395 | :ScannerFileError\r | |
396 | echo ./scanner file editing failed!\r | |
397 | goto End\r | |
398 | \r | |
399 | :SedError\r | |
400 | echo ./configure script editing failed!\r | |
401 | goto End\r | |
402 | \r | |
403 | :SedError2\r | |
404 | echo ./config.hin editing failed!\r | |
405 | goto End\r | |
406 | \r | |
407 | :CfgError\r | |
408 | echo ./configure script exited abnormally!\r | |
409 | goto End\r | |
410 | \r | |
411 | :SmallEnv\r | |
412 | echo Your environment size is too small. Enlarge it and run me again.\r | |
413 | echo Configuration NOT done!\r | |
414 | \r | |
415 | :End\r | |
416 | test -f %XSRC%/install-sh.sh\r | |
417 | if not errorlevel 1 goto NoRen1\r | |
418 | test -f %XSRC%/install-sh\r | |
419 | if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh\r | |
420 | :NoRen1\r | |
421 | if "%SHELL%" == "/bin/sh" set SHELL=\r | |
422 | if "%HOME%" == "%XSRC%/djgpp" set HOME=\r | |
423 | set ARGS=\r | |
424 | set CONFIG_SITE=\r | |
425 | set HOSTNAME=\r | |
426 | set NLS=\r | |
427 | set CACHING=\r | |
428 | set DEPENDENCY_TRACKING=\r | |
429 | set XSRC=\r |