1 Rem Copyright (C) 2000 Free Software Foundation, Inc.
\r
3 Rem This configure script is free software; the Free Software Foundation
\r
4 Rem gives unlimited permission to copy, distribute and modify it.
\r
7 echo Configuring GNU Groff for DJGPP v2.x...
\r
9 Rem The SmallEnv tests protect against fixed and too small size
\r
10 Rem of the environment in stock DOS shell.
\r
12 Rem Find out where the sources are
\r
14 if not "%XSRC%" == "." goto SmallEnv
\r
15 if "%1" == "" goto InPlace
\r
17 if not "%XSRC%" == "%1" goto SmallEnv
\r
18 redir -e /dev/null update %XSRC%/configure.orig ./configure
\r
19 if not exist configure update %XSRC%/configure ./configure
\r
22 Rem Update configuration files
\r
23 echo Updating configuration scripts...
\r
24 if not exist configure.orig update configure configure.orig
\r
25 sed -f %XSRC%/arch/djgpp/config.sed configure.orig > configure
\r
26 if errorlevel 1 goto SedError
\r
28 Rem Make sure they have a config.site file
\r
29 set CONFIG_SITE=%XSRC%/arch/djgpp/config.site
\r
30 if not "%CONFIG_SITE%" == "%XSRC%/arch/djgpp/config.site" goto SmallEnv
\r
32 Rem This is required because DOS/Windows are case-insensitive
\r
33 Rem to file names, and "make install" will do nothing if Make
\r
34 Rem finds a file called `install'.
\r
35 if exist INSTALL ren INSTALL INSTALL.txt
\r
37 Rem Set HOSTNAME so it shows in config.status
\r
38 if not "%HOSTNAME%" == "" goto hostdone
\r
39 if "%windir%" == "" goto msdos
\r
41 if not "%OS%" == "MS-Windows" goto SmallEnv
\r
45 if not "%OS%" == "MS-DOS" goto SmallEnv
\r
47 if not "%USERNAME%" == "" goto haveuname
\r
48 if not "%USER%" == "" goto haveuser
\r
49 echo No USERNAME and no USER found in the environment, using default values
\r
50 set HOSTNAME=Unknown PC
\r
51 if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
\r
53 set HOSTNAME=%USER%'s PC
\r
54 if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv
\r
57 set HOSTNAME=%USERNAME%'s PC
\r
58 if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
\r
60 set _HOSTNAME=%HOSTNAME%, %OS%
\r
61 if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
\r
62 set HOSTNAME=%_HOSTNAME%
\r
67 Rem install-sh is required by the configure script but clashes with the
\r
68 Rem various Makefile install-foo targets, so we MUST have it before the
\r
69 Rem script runs and rename it afterwards
\r
71 if not errorlevel 1 goto noren1
\r
72 test -f install-sh.sh
\r
73 if not errorlevel 1 mv -f install-sh.sh install-sh
\r
75 echo Running the ./configure script...
\r
76 sh ./configure --src=%XSRC% --disable-nls --without-x
\r
77 if errorlevel 1 goto CfgError
\r
78 test -f install-sh.sh
\r
79 if not errorlevel 1 goto noren2
\r
81 if not errorlevel 1 mv -f install-sh install-sh.sh
\r
87 echo ./configure script editing failed!
\r
91 echo ./configure script exited abnormally!
\r
95 echo Your environment size is too small. Enlarge it and run me again.
\r
96 echo Configuration NOT done!
\r