2 echo Configuring GNU Groff for DJGPP v2.x...
\r
4 Rem The SmallEnv tests protect against fixed and too small size
\r
5 Rem of the environment in stock DOS shell.
\r
7 Rem Find out where the sources are
\r
9 if not "%XSRC%" == "." goto SmallEnv
\r
10 if "%1" == "" goto InPlace
\r
12 if not "%XSRC%" == "%1" goto SmallEnv
\r
13 redir -e /dev/null update %XSRC%/configure.orig ./configure
\r
14 if not exist configure update %XSRC%/configure ./configure
\r
17 Rem Update configuration files
\r
18 echo Updating configuration scripts...
\r
19 if not exist configure.orig update configure configure.orig
\r
20 sed -f %XSRC%/arch/djgpp/config.sed configure.orig > configure
\r
21 if errorlevel 1 goto SedError
\r
23 Rem Make sure they have a config.site file
\r
24 set CONFIG_SITE=%XSRC%/arch/djgpp/config.site
\r
25 if not "%CONFIG_SITE%" == "%XSRC%/arch/djgpp/config.site" goto SmallEnv
\r
27 Rem This is required because DOS/Windows are case-insensitive
\r
28 Rem to file names, and "make install" will do nothing if Make
\r
29 Rem finds a file called `install'.
\r
30 if exist INSTALL ren INSTALL INSTALL.txt
\r
32 Rem Set HOSTNAME so it shows in config.status
\r
33 if not "%HOSTNAME%" == "" goto hostdone
\r
34 if "%windir%" == "" goto msdos
\r
36 if not "%OS%" == "MS-Windows" goto SmallEnv
\r
40 if not "%OS%" == "MS-DOS" goto SmallEnv
\r
42 if not "%USERNAME%" == "" goto haveuname
\r
43 if not "%USER%" == "" goto haveuser
\r
44 echo No USERNAME and no USER found in the environment, using default values
\r
45 set HOSTNAME=Unknown PC
\r
46 if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
\r
48 set HOSTNAME=%USER%'s PC
\r
49 if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv
\r
52 set HOSTNAME=%USERNAME%'s PC
\r
53 if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
\r
55 set _HOSTNAME=%HOSTNAME%, %OS%
\r
56 if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
\r
57 set HOSTNAME=%_HOSTNAME%
\r
62 Rem install-sh is required by the configure script but clashes with the
\r
63 Rem various Makefile install-foo targets, so we MUST have it before the
\r
64 Rem script runs and rename it afterwards
\r
66 if not errorlevel 1 goto noren1
\r
67 test -f install-sh.sh
\r
68 if not errorlevel 1 mv -f install-sh.sh install-sh
\r
70 echo Running the ./configure script...
\r
71 sh ./configure --src=%XSRC% --disable-nls --without-x
\r
72 if errorlevel 1 goto CfgError
\r
73 test -f install-sh.sh
\r
74 if not errorlevel 1 goto noren2
\r
76 if not errorlevel 1 mv -f install-sh install-sh.sh
\r
82 echo ./configure script editing failed!
\r
86 echo ./configure script exited abnormally!
\r
90 echo Your environment size is too small. Enlarge it and run me again.
\r
91 echo Configuration NOT done!
\r