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