* src/preproc/html/pre-html.cpp (write_upto_newline): Don't use
[s-roff.git] / arch / djgpp / config.bat
blob699a8682301c33d9c1081193eb156f1b8a8159a4
1 @echo off\r
2 echo Configuring GNU Groff 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 where the sources are\r
8 set XSRC=.\r
9 if not "%XSRC%" == "." goto SmallEnv\r
10 if "%1" == "" goto InPlace\r
11 set XSRC=%1\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
16 :InPlace\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
35 set OS=MS-Windows\r
36 if not "%OS%" == "MS-Windows" goto SmallEnv\r
37 goto haveos\r
38 :msdos\r
39 set OS=MS-DOS\r
40 if not "%OS%" == "MS-DOS" goto SmallEnv\r
41 :haveos\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
47 :haveuser\r
48 set HOSTNAME=%USER%'s PC\r
49 if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv\r
50 goto userdone\r
51 :haveuname\r
52 set HOSTNAME=%USERNAME%'s PC\r
53 if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv\r
54 :userdone\r
55 set _HOSTNAME=%HOSTNAME%, %OS%\r
56 if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv\r
57 set HOSTNAME=%_HOSTNAME%\r
58 :hostdone\r
59 set _HOSTNAME=\r
60 set OS=\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
65 test -f install-sh\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
69 :noren1\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
75 test -f install-sh\r
76 if not errorlevel 1 mv -f install-sh install-sh.sh\r
77 :noren2\r
78 echo Done.\r
79 goto End\r
81 :SedError\r
82 echo ./configure script editing failed!\r
83 goto End\r
85 :CfgError\r
86 echo ./configure script exited abnormally!\r
87 goto End\r
89 :SmallEnv\r
90 echo Your environment size is too small.  Enlarge it and run me again.\r
91 echo Configuration NOT done!\r
92 :End\r
93 set XSRC=\r
94 set CONFIG_SITE=\r
95 set HOSTNAME=\r