Compiling gpc from sources for DJGPP 2.05.

gpc is compiled as a member of the Gnu Compiler Collection (gcc)

The present archive enables you to compile gpc from original gnu sources.

It contains the content of gcc346s2.zip with changes to enable gpc compilation:
  gpc specific diffs, 
  changes in build.gcc\djbuild.sh build.gcc\djconfig.sh and install.gcc\makepkg.sh
    to compile only gpc and gcc (which is required as part of compilation of gpc)
   (the change to djconfig.sh can be reverted to compile the whole gcc collection)

  the gpc sources obtained from Waldek Hebisch's site:
  http://www.math.uni.wroc.pl/~hebisch/gpc/gpc-20070904.tar.bz2
    
You need in addition 

- the gnu gcc sources (obtained from any gnu mirror) gcc-3.4.6.tar.bz2

It can be compiled only with LFN=y (e.g. W9X or win XP dos box).

You need a fairly complete and working djgpp 2.05 setup: 
see diffs\source\readme.DJGPP.
Notice that in addition amake176b and  both autoconf versions 2.13 and 2.57 are needed.
They have been recompiled under DJGPP 2.05 from DJGPP 2.04 sources.
To be able to use both versions, see the beginning of the file
unpack-gcc.sh in the same directory as this file and follow
instructions there.

In addition you will need to put in the %DJGPP%\bin directory a shell script
named "pwdnodrv" which contains the following four lines
-----------------------------------------------------------
#! /bin/sh

out=`pwd | sed -e 's,^[a-zA-Z]:/,/,'`
echo $out
-----------------------------------------------------------

Suppose your djgpp root dir is c:\djgpp, and you have put the sources in c:\temp
Type:

cd c:\djgpp
unzip32 c:\temp\gpc346s.zip

(LFN aware and preserving directory structure) 
will create a directory c:\djgpp\build and unzip files into it. Then

cd build
cp c:\temp\gcc-3.4.6.tar.bz2 .
sh build gcc-3.4.6.tar.bz2 gpc-20070904.tar.bz2

will untar and patch the sources, and compile gcc and gpc (three stages build)

At the end you get the binary gpc346b.zip in the directory
c:\djgpp\build\gnu\install.gcc\
(together with irrelevant files and zips)

You install this binary in the usual way (it contains a file 
gnu\gcc-3.46\gcc\p\readme.djgpp which explains what to do).

To compile the docs: dvi ps pdf html I have installed txi48b from DJGPP 2.04
(more modern releases work but produce lots of warnings).
In addition since the TeX setup in DJGPP is very old I prefered to use MiKTeX.
I put the PATH of its binaries at the _end_ of the PATH of DJGPP
so that DJGPP's makeinfo 4.8 takes precedence.
Then to produce dvi ps pdf I use the normal way:
cd c:\djgpp\build\gnu\build.gcc
sh djmake.sh -C gcc gpc.dvi
sh djmake.sh -C gcc gpc.ps
sh djmake.sh -C gcc gpc.pdf
The resulting files are in the gcc subdirectory
html cannot be generated this way because it produces two couples of files
index.html, Index.html and pi.html,Pi.html which cannot be distinguished
in a case insensitive DOS box.
Thus I go to the _source_ directory
cd c:\djgpp\build\gnu\gcc-3.46\gcc\p\doc
mkdir html
makeinfo --html --no-split -o html\gpcs-en.html en\gpcs.texi
makeinfo --html --no-split --force -o html\gpc.html -I generated -I en en\gpc.texi
The --no-split option solves the couple of files problem by producing a single 
large file, which is no more a problem in modern times.