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