print_env_bin(){
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
-export PATH=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/lib:\${LD_LIBRARY_PATH}
+export EXPAT_ROOT=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PATH=\${EXPAT_ROOT}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${EXPAT_ROOT}/lib:\${LD_LIBRARY_PATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
sed -i 's%PYTHON_LIBS="\(.*\)"%PYTHON_LIBS="-L\$PYTHON_PREFIX/lib \1"%g' configure
- if test `uname -m` = "x86_64" ; then
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} --with-mylibgd --with-gdlibdir=/usr/lib64 --with-fontconfiglibdir=/usr/lib64 --with-expatlibdir=/usr/lib64 --with-freetypelibdir=/usr/lib64 --with-tcl=${TCLHOME} --disable-rpath --enable-perl=no CFLAGS=-m64 CXXFLAGS=-m64
- else
-check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} --with-tcl=${TCLHOME} --disable-rpath --enable-perl=no
- fi
+CONFIGURE_FLAGS="--disable-rpath"
+if [ "${EXPAT_ROOT}" != "" ] ; then
+ CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-expat --with-expatincludedir=${EXPAT_ROOT}/include --with-expatlibdir=${EXPAT_ROOT}/lib --enable-perl=no "
+fi
+if test `uname -m` == "x86_64" ; then
+ CONFIGURE_FLAGS="${CONFIGURE_FLAGS} CFLAGS=-m64 CXXFLAGS=-m64"
+fi
+
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG configure --prefix=${PRODUCT_DIR} ${CONFIGURE_FLAGS}
+
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
used gcc=$GCC