+@insertcopying
+@end ifhtml
+@end ifset
+
+@c ***Prerequisites**************************************************
+@ifnothtml
+@comment node-name, next, previous, up
+@node Prerequisites, Downloading the source, , Installing GCC
+@end ifnothtml
+@ifset prerequisiteshtml
+@ifnothtml
+@chapter Prerequisites
+@end ifnothtml
+@cindex Prerequisites
+
+GCC requires that various tools and packages be available for use in the
+build procedure. Modifying GCC sources requires additional tools
+described below.
+
+@heading Tools/packages necessary for building GCC
+@table @asis
+@item ISO C90 compiler
+Necessary to bootstrap GCC, although versions of GCC prior
+to 3.4 also allow bootstrapping with a traditional (K&R) C compiler.
+
+To build all languages in a cross-compiler or other configuration where
+3-stage bootstrap is not performed, you need to start with an existing
+GCC binary (version 2.95 or later) because source code for language
+frontends other than C might use GCC extensions.
+
+@item GNAT
+
+In order to build the Ada compiler (GNAT) you must already have GNAT
+installed because portions of the Ada frontend are written in Ada (with
+GNAT extensions.) Refer to the Ada installation instructions for more
+specific information.
+
+@item A ``working'' POSIX compatible shell, or GNU bash
+
+Necessary when running @command{configure} because some
+@command{/bin/sh} shells have bugs and may crash when configuring the
+target libraries. In other cases, @command{/bin/sh} or @command{ksh}
+have disastrous corner-case performance problems. This
+can cause target @command{configure} runs to literally take days to
+complete in some cases.
+
+So on some platforms @command{/bin/ksh} is sufficient, on others it
+isn't. See the host/target specific instructions for your platform, or
+use @command{bash} to be sure. Then set @env{CONFIG_SHELL} in your
+environment to your ``good'' shell prior to running
+@command{configure}/@command{make}.
+
+@command{zsh} is not a fully compliant POSIX shell and will not
+work when configuring GCC@.
+
+@item A POSIX or SVR4 awk
+
+Necessary for creating some of the generated source files for GCC@.
+If in doubt, use a recent GNU awk version, as some of the older ones
+are broken. GNU awk version 3.1.5 is known to work.
+
+@item GNU binutils
+
+Necessary in some circumstances, optional in others. See the
+host/target specific instructions for your platform for the exact
+requirements.
+
+@item gzip version 1.2.4 (or later) or
+@itemx bzip2 version 1.0.2 (or later)
+
+Necessary to uncompress GCC @command{tar} files when source code is
+obtained via FTP mirror sites.
+
+@item GNU make version 3.80 (or later)
+
+You must have GNU make installed to build GCC@.
+
+@item GNU tar version 1.14 (or later)
+
+Necessary (only on some platforms) to untar the source code. Many
+systems' @command{tar} programs will also work, only try GNU
+@command{tar} if you have problems.
+
+@item GNU Multiple Precision Library (GMP) version 4.1 (or later)
+
+Necessary to build GCC@. If you do not have it installed in your
+library search path, you will have to configure with the
+@option{--with-gmp} configure option. See also @option{--with-gmp-lib}
+and @option{--with-gmp-include}. Alternatively, if a GMP source
+distribution is found in a subdirectory of your GCC sources named
+@file{gmp}, it will be built together with GCC@.
+
+@item MPFR Library version 2.3.2 (or later)
+
+Necessary to build GCC@. It can be downloaded from
+@uref{http://www.mpfr.org/}. The version of MPFR that is bundled with
+GMP 4.1.x contains numerous bugs. Although GCC may appear to function
+with the buggy versions of MPFR, there are a few bugs that will not be
+fixed when using this version. It is strongly recommended to upgrade
+to the recommended version of MPFR.
+
+The @option{--with-mpfr} configure option should be used if your MPFR
+Library is not installed in your default library search path. See also
+@option{--with-mpfr-lib} and @option{--with-mpfr-include}.
+Alternatively, if a MPFR source distribution is found in a subdirectory
+of your GCC sources named @file{mpfr}, it will be built together with
+GCC@.
+
+@item Parma Polyhedra Library (PPL) version 0.10
+
+Necessary to build GCC with the Graphite loop optimizations.
+It can be downloaded from @uref{http://www.cs.unipr.it/ppl/Download/}.
+
+The @option{--with-ppl} configure option should be used if PPL is not
+installed in your default library search path.
+
+@item CLooG-PPL version 0.15
+
+Necessary to build GCC with the Graphite loop optimizations. It can
+be downloaded from @uref{ftp://gcc.gnu.org/pub/gcc/infrastructure/}.
+The code in @file{cloog-ppl-0.15.tar.gz} comes from a branch of CLooG
+available from @uref{http://repo.or.cz/w/cloog-ppl.git}. CLooG-PPL
+should be configured with @option{--with-ppl}.
+
+The @option{--with-cloog} configure option should be used if CLooG is
+not installed in your default library search path.
+
+@item @command{jar}, or InfoZIP (@command{zip} and @command{unzip})
+
+Necessary to build libgcj, the GCJ runtime.
+
+@end table
+
+
+@heading Tools/packages necessary for modifying GCC
+@table @asis
+@item autoconf version 2.59
+@itemx GNU m4 version 1.4 (or later)
+
+Necessary when modifying @file{configure.ac}, @file{aclocal.m4}, etc.@:
+to regenerate @file{configure} and @file{config.in} files.
+
+@item automake version 1.9.6
+
+Necessary when modifying a @file{Makefile.am} file to regenerate its
+associated @file{Makefile.in}.
+
+Much of GCC does not use automake, so directly edit the @file{Makefile.in}
+file. Specifically this applies to the @file{gcc}, @file{intl},
+@file{libcpp}, @file{libiberty}, @file{libobjc} directories as well
+as any of their subdirectories.
+
+For directories that use automake, GCC requires the latest release in
+the 1.9.x series, which is currently 1.9.6. When regenerating a directory
+to a newer version, please update all the directories using an older 1.9.x
+to the latest released version.
+
+@item gettext version 0.14.5 (or later)
+
+Needed to regenerate @file{gcc.pot}.
+
+@item gperf version 2.7.2 (or later)
+
+Necessary when modifying @command{gperf} input files, e.g.@:
+@file{gcc/cp/cfns.gperf} to regenerate its associated header file, e.g.@:
+@file{gcc/cp/cfns.h}.
+
+@item DejaGnu 1.4.4
+@itemx Expect
+@itemx Tcl
+
+Necessary to run the GCC testsuite; see the section on testing for details.
+
+@item autogen version 5.5.4 (or later) and
+@itemx guile version 1.4.1 (or later)
+
+Necessary to regenerate @file{fixinc/fixincl.x} from
+@file{fixinc/inclhack.def} and @file{fixinc/*.tpl}.
+
+Necessary to run @samp{make check} for @file{fixinc}.
+
+Necessary to regenerate the top level @file{Makefile.in} file from
+@file{Makefile.tpl} and @file{Makefile.def}.
+
+@item Flex version 2.5.4 (or later)
+
+Necessary when modifying @file{*.l} files.
+
+Necessary to build GCC during development because the generated output
+files are not included in the SVN repository. They are included in
+releases.
+
+@item Texinfo version 4.7 (or later)
+
+Necessary for running @command{makeinfo} when modifying @file{*.texi}
+files to test your changes.
+
+Necessary for running @command{make dvi} or @command{make pdf} to
+create printable documentation in DVI or PDF format. Texinfo version
+4.8 or later is required for @command{make pdf}.
+
+Necessary to build GCC documentation during development because the
+generated output files are not included in the SVN repository. They are
+included in releases.
+
+@item @TeX{} (any working version)
+
+Necessary for running @command{texi2dvi} and @command{texi2pdf}, which
+are used when running @command{make dvi} or @command{make pdf} to create
+DVI or PDF files, respectively.
+
+@item SVN (any version)
+@itemx SSH (any version)
+
+Necessary to access the SVN repository. Public releases and weekly
+snapshots of the development sources are also available via FTP@.
+
+@item Perl version 5.6.1 (or later)
+
+Necessary when regenerating @file{Makefile} dependencies in libiberty.
+Necessary when regenerating @file{libiberty/functions.texi}.
+Necessary when generating manpages from Texinfo manuals.
+Necessary when targetting Darwin, building libstdc++,
+and not using @option{--disable-symvers}.
+Used by various scripts to generate some files included in SVN (mainly
+Unicode-related and rarely changing) from source tables.
+
+@item GNU diffutils version 2.7 (or later)
+
+Useful when submitting patches for the GCC source code.
+
+@item patch version 2.5.4 (or later)
+
+Necessary when applying patches, created with @command{diff}, to one's
+own sources.
+
+@item ecj1
+@itemx gjavah
+
+If you wish to modify @file{.java} files in libjava, you will need to
+configure with @option{--enable-java-maintainer-mode}, and you will need
+to have executables named @command{ecj1} and @command{gjavah} in your path.
+The @command{ecj1} executable should run the Eclipse Java compiler via
+the GCC-specific entry point. You can download a suitable jar from
+@uref{ftp://sourceware.org/pub/java/}, or by running the script
+@command{contrib/download_ecj}.
+
+@item antlr.jar version 2.7.1 (or later)
+@itemx antlr binary
+
+If you wish to build the @command{gjdoc} binary in libjava, you will
+need to have a @file{antlr.jar} library available. The library is
+searched in system locations but can be configured with
+@option{--with-antlr-jar=} instead. When configuring with
+@option{--enable-java-maintainer-mode}, you will need to have one of
+the executables named @command{cantlr}, @command{runantlr} or
+@command{antlr} in your path.
+
+@end table
+
+@html
+<hr />
+<p>
+@end html
+@ifhtml
+@uref{./index.html,,Return to the GCC Installation page}