						Mon Nov 11 23:06:24 WET 1996

                       Compilation instructions for 
                        GNU Pascal on MS-DOS, using 
                    DJ Delorie's port of GNU CC (djgpp)

Before you begin
----------------
To compile GNU Pascal for MS-DOS, you need a fairly complete setup of
djgpp v2.01. You also need the gcc-2.7.2.1 sources. These are in the file
gcc2721s.zip

>>>> DO NOT ATTEMPT TO BUILD GPC USING ANOTHER VERSION THAN GCC-2.7.2.1 <<<<

It won't work. period. 
In the djgpp v2.0 C library, mktemp() does not return a unique name for
recursive processes; this breaks GPC's automake feature. v2.01 fixes this.

Step 0: Prepare.
----------------
If you have LFN enabled for djgpp, disable it now (set LFN=n).
Turn it back on once you're finished. The 4DOS command interpreter doesn't
like the quotes in the configure.bat file; command.com is fine.

Unzip gcc2721s.zip and gpc120s.zip in a location of your choice, for example
c:\djgpp\ This creates a `gnu\gcc-2721' subdirectory with gcc sources and
a `gnu\gpc120' subdirectory with the sources for GNU Pascal.

Step 1: Build gcc
-----------------

cd to gnu\gcc-2721 and type:

		configur go32

to configure GCC, then:

		make CFLAGS=-O2 LDFLAGS=-s

to build GCC.

You do not have to install the C compiler you just built, just leave the
sources and object code in place while you build GPC.

Step 2: Build gpc
-----------------

cd to gnu\gpc-120 and type:

		configur

to configure GPC, then:

		make

to build the compiler.


Step 3: Installing gpc
----------------------

To install your new Pascal compiler:

    copy gpc.exe, gpc1.exe and gpc-cpp.exe to \djgpp\bin\
    copy specs.gpc to \djgpp\lib\
    copy rts\libgpc.a to \djgpp\lib\

If you want to install the online documentation:

    copy doc\gpc.i* \djgpp\info\

And edit the \djgpp\info\dir file to add an entry for GNU Pascal


Finally, add these lines to your \djgpp\djgpp.env file:

--------- cut here ------- cut here ---------

[gpc-cpp]
C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include

[gpc]
COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib

--------- cut here ------- cut here ---------

Enjoy!

Jan-Jaap van der Heijden  <j.j.vanderheijden@student.utwente.nl>
