%
% $Id: install.tex,v 1.1 1997/02/08 16:26:41 prudhomm Exp $
%
% SUMMARY:      
% USAGE:        
%
% AUTHOR:       Christophe Prud'homme
% ORG:           
% E-MAIL:       Christophe.Prudhomme@asci.fr
%
% ORIG-DATE:     8-Feb-97 at 16:50:12
% LAST-MOD:      8-Feb-97 at 16:55:48 by Christophe Prud'homme
%
% DESCRIPTION:  
%
% $Log: install.tex,v $
% Revision 1.1  1997/02/08 16:26:41  prudhomm
% Splitted freefem.tex into parts each parts containing a chapter of the documentation
%
% DESCRIP-END.



\chapter{Installation}
\label{cha:install}

The installation steps differs with the operating system.
\textbf{Freefem} supports three systems :
\begin{itemize}
\item 
Windows 32bits, Windows 95 and Windows NT
\item
Macintosh, Power Mac
\item
X Windows, unix systems
\end{itemize}

%% node  Windows, Macintosh, Installation, Installation
\section{Windows}
%%  node-name,  next,  previous,  up
\begin{itemize}
\item 
Create a project with all the files(.cxx extension) (including \texttt{adapt/*.cpp})
except \texttt{macrgraph.cpp} and \texttt{xrgraph.cpp}.
\item
If you use Microsoft Visual 2.0, add \verb+ _COMPLEX_DEFINED+  as a preprocessor
variable and the variable MVC(see pcrgraph.cpp)
\item
Do not forget the set up the correct include directories (adapt), because we
add \verb+ADAPT+ or \verb+DEBUG+  to your preprocessing directives.
\item
Add include path to freefem folder to unable the compiler to find the .h files
(because all .h files are declared as \verb+#include <filename.h>+ 
\item
Then launch freefem; a window with a dialog box will appear to select the
.pde file
\end{itemize}


%% node  Macintosh, X Windows, Windows, Installation
\section{Macintosh}
%%  node-name,  next,  previous,  up
for the Mac it compiles without problems under MetroWerks C++;
you can even localize the installation with the flag \verb+__MWERKS__+.

%% node  X Windows,  , Macintosh, Installation
\section{X Windows}
%%  node-name,  next,  previous,  up

It is strongly recommended to use the \texttt{configure} script. It is much easier and should
be platform independent, you don't have to know anything about your
system. Everything is done for you. However one suggests the use of \texttt{make}
for the GNU Project: it is the best \texttt{make} utility and will work
without problems with \textbf{freefem}. This utility is available at several
ftp sites in France or in the USA.
\begin{itemize}
\item \htmladdnormallink{prep.mit.ai.edu}{ftp://prep.ai.mit.edu}
\item \htmladdnormallink{ftp.ibp.fr}{ftp://ftp.ibp.fr}
\end{itemize}


\subsection{Configure script}
\label{sec:conf}

type:
\begin{verbatim}
configure
make
make install #if you want to install the software on a site
\end{verbatim}

The binary \texttt{freefem} will be in the directory \texttt{src}.

We use \texttt{autoconf} and \texttt{automake} in conjunction in order to be
as general as possible. These tools are not required to use or compile
\textbf{freeFEM} but if you want to change the code you will need these.
\par
These tools are available on the \textbf{GNU} ftp site:
\texttt{ftp://prep.ai.mit.edu}. You can get them in France at
\texttt{ftp://ftp.ibp.fr/pub/gnu}.

\paragraph{Mesh adaptation library}

If you want to compile the mesh adaptation library type:
\begin{verbatim}
configure --with-adapt
make
make install #if you want to install the software on a site
\end{verbatim}
It will enable the mesh adaptation features in \textbf{freeFEM}. Note that you
have to recompile almost everything.


\paragraph{FreeFEM and Gfem}


\textbf{XGfem} is a commercial product. You can use \textbf{FreeFEM} and
\textbf{XGfem} together. If you want to do it (i.e. so you have purchased \textbf{XGfem},
congratulations) do the following thing:


\begin{verbatim}
configure --with-gfem
make
make install #if you want to install the software on a site
\end{verbatim}

Note that it will enable the mesh adaptation library also.


\paragraph{Optimization}

There is an optional flag for \texttt{configure} which enables optimization
flags for the compiler:
\begin{verbatim}
configure --with-optimization
\end{verbatim}
It can be used with the others flags without problems. It guesses the
optimization flags according to the compiler.

%% node  Without the configure script,  , With the configure script, X Windows
\subsection{Without the configure script}
%%  node-name,  next,  previous,  up
edit the makefile.x and make the changes
\begin{itemize}
\item 
check and change the name of your C++ compiler
\item
X11 directories for include files and libraries
\item
add \verb+ -DADAPT+  if you want to use the adaptation mesh facilities in freefem
\item
add \verb+-DDEBUG+  if you want 'adapt' to be in debugging mode
\end{itemize}

then do

\begin{verbatim}
% make -f makefile.x
\end{verbatim}

normally everything should compile correctly

%
%%%%%%%%%%%%% Some Settings for emacs and auc-TeX
% Local Variables:
% TeX-master: "freefem"
% TeX-parse-self: t
% TeX-auto-save: t
% TeX-auto-regexp-list: TeX-auto-full-regexp-list
% End:
% 

