4 if [ -n "`which swig 2>/dev/null`" ]; then
5 ver=`swig -version 2>&1 | grep -i version | awk '{ print $3 }' | sed -e 's/^\([0-9.]*\)\(.*\)/\1/'`
6 if [ "$ver" == "1.3.24" ] ; then
15 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
16 #$DELIM ${PRODUCT_TYPE} $DELIM
17 export SWIG_ROOT=\${INSTALL_ROOT}/${PRODUCT}
18 export PATH=\${SWIG_ROOT}/bin:\${PATH}
21 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
22 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
25 # looks for the native product and collects it's environment (used by make_env())
27 swig_root="`find_in_path swig ${PATH}`"
28 if [ -z "${swig_root}" ] ; then
29 swig_root="`find_in_path swig /usr/bin`"
31 if [ -n "${swig_root}" ] ; then
32 swig_root=`cd ${swig_root}/..; pwd`
33 ver=`swig -version 2>&1 | grep -i version | awk '{ print $3 }' | sed -e 's/^\([0-9.]*\)\(.*\)/\1/'`
34 if [ "$ver" == "1.3.24" ] ; then
35 tmp="\${SWIG_ROOT}/bin ${swig_root}/bin \${PATH} ${PATH}";
36 path=`sort_path ${tmp}`
37 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
38 #$DELIM ${PRODUCT_TYPE} $DELIM
39 export SWIG_ROOT=${swig_root}
43 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
51 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
57 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
58 source ${INSTALL_WORK}/$SHRC
60 check_jb tar xfz ${SOURCE_DIR}/swig-1.3.24.tar.gz -C ${INSTALL_WORK}
62 makedir ${PRODUCT_DIR}
63 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
64 ./configure --prefix=${PRODUCT_DIR}
66 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
69 check_job ${PRODUCT_DIR}/MAKE.LOG make
70 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
72 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
73 rm -fr ${PRODUCT_WORK}
79 echo "It impossible to install SWIG 1.3.24 from binaries, try to install it from sources."
84 export INSTALL_WORK=$2;
86 export INSTALL_ROOT=$4;
87 export PRODUCT_SEQUENCE=$5;
88 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="swig" ; fi
89 export PRODUCT="SWIG-1.3.24"
90 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
91 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}