--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : doxygen-1.4.7.sh
+# Created : Thu Dec 18 12:01:00 2002
+# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+# Project : SALOME
+# Module : Installation Wizard
+# Copyright : 2002-2007 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version()
+{
+check_lib_version doxygen $PATH
+if [ "$?" -ne "0" ]; then
+ return 1
+fi
+ver=`doxygen --version`
+maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+let ver=$maj_ver*10000+$min_ver*100+$rel_ver
+if [ $ver -eq 10406 ] ; then
+ return 0
+fi
+return 1
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+# we need version 1.4.4 or newer
+try_native(){
+doxyhome="`find_in_path doxygen ${PATH}:/usr/bin`"
+if [ -n "${doxyhome}" ] ; then
+ ver=`doxygen --version`
+ maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
+ let ver=$maj_ver*10000+$min_ver*100+$rel_ver
+ if [ $ver -ge 10404 ] ; then
+ tmp="${doxyhome} ${doxyhome} \${PATH} ${PATH}";
+ path=`sort_path ${tmp}`
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PATH=${path}
+##
+EOF
+ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+ return 0
+ fi
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/doxygen-1.4.7.tar.gz -C ${INSTALL_WORK}
+
+cd ${PRODUCT_WORK}
+makedir ${PRODUCT_DIR}
+# vsr: fix a bug on Mandrake-10.1: wrong qt library reference
+sed -e "s/-lqt$/-lqt-mt/g" ./tmake/lib/linux-g++/tmake.conf > ./tmake/lib/linux-g++/tmake.conf.new
+mv ./tmake/lib/linux-g++/tmake.conf.new ./tmake/lib/linux-g++/tmake.conf
+# vsr: fix bug - configure fails on Red Hat 9 because of incorrect autodetect check for install tool
+# so it is necessary to put it directly
+f_install="--install "`which install`
+# vsr: removed --with-doxywizard option (not compilable on some platforms)
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix ${PRODUCT_DIR} $f_install
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
+
+#vsr : disable make docs steps because of bugs in make procedure
+#which epstopdf >/dev/null 2>&1; ISFOUND=$?
+#if [ ${ISFOUND} -eq 0 ] ; then which dot >/dev/null 2>&1; ISFOUND=$?; fi
+#if [ ${ISFOUND} -eq 0 ] ; then which makeindex >/dev/null 2>&1; ISFOUND=$?; fi
+#if [ ${ISFOUND} -eq 0 ] ; then which latex >/dev/null 2>&1; ISFOUND=$?; fi
+##if [ ${ISFOUND} -eq 0 ] ; then which latex2html >/dev/null 2>&1; ISFOUND=$?; fi
+#if [ ${ISFOUND} -eq 0 ] ; then which pdflatex >/dev/null 2>&1; ISFOUND=$?; fi
+#if [ ${ISFOUND} -eq 0 ] ; then which pslatex >/dev/null 2>&1; ISFOUND=$?; fi
+##if [ ${ISFOUND} -eq 0 ] ; then which pstoimg >/dev/null 2>&1; ISFOUND=$?; fi
+#if [ ${ISFOUND} -eq 0 ] ; then
+# check_job ${PRODUCT_DIR}/MAKEDOCS.LOG make docs
+# check_job ${PRODUCT_DIR}/MAKEINSTALLDOCS.LOG make install_docs
+#else
+# cat >> ${PRODUCT_DIR}/MAKEDOCS.LOG <<EOF
+#Can't find \"epstopdf\", \"latex\" or another documentation tool on the computer.
+#doxygen documentation can not be built!
+#SALOME DOCUMENTATION MIGHT NOT BE BUILT ALSO!
+#EOF
+#fi
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/doxygen-1.4.7.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="doxygen" ; fi
+export PRODUCT="doxygen-1.4.7"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE