if    [[  "${SMGL_COMPAT_ARCHS[1]}"  ==  "ia32"    ]];  then
  ARCH=386
elif  [[  "${SMGL_COMPAT_ARCHS[1]}"  ==  "x86_64"  ]];  then
  ARCH=x64
else
  ARCH=386
fi  &&

local FPCDEST FPCDIR FPC_COMP FPC_MAKE                                         &&
FPCDEST=${INSTALL_ROOT}/usr                                                    &&
FPCDIR=$FPCDEST/lib/fpc/${VERSION//rc?}                                        &&
FPC_COMP=$SOURCE_DIRECTORY/compiler/ppc$ARCH                                   &&
FPC_MAKE=$SOURCE_DIRECTORY/utils/fpcm/fpcmake                                  &&
mkdir -p $FPCDIR                                                               &&
make PP=$FPC_COMP INSTALL_PREFIX=$FPCDEST FPCMAKE=$FPC_MAKE install &&
ln -sf $FPCDIR/ppc$ARCH $FPCDEST/bin  &&

#
# Generate a default /etc/fpc.cfg
#
fpcmkcfg -d basepath=$FPCDIR > $SOURCE_DIRECTORY/fpc.cfg &&
install_config_file  $SOURCE_DIRECTORY/fpc.cfg  \
                     $INSTALL_ROOT/etc/fpc.cfg
