_baseversion="${surum%.*}"
	
if [ "${CARCH}" = "x86_64" ]; then
	# x86_64
	arch_opts="-Dcccdlflags='-fPIC'"
else
	# i686
	arch_opts=""
fi

export BUILD_ZLIB=False
export BUILD_BZIP2=0

./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
-Dprefix=/usr -Dvendorprefix=/usr \
-Dprivlib=/usr/share/perl5/core_perl \
-Darchlib=/usr/lib/perl5/$_baseversion/core_perl \
-Dsitelib=/usr/share/perl5/site_perl \
-Dsitearch=/usr/lib/perl5/$_baseversion/site_perl \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/$_baseversion/vendor_perl \
-Dscriptdir=/usr/bin/core_perl \
-Dsitescript=/usr/bin/site_perl \
-Dvendorscript=/usr/bin/vendor_perl \
-Dinc_version_list=none \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
-Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"

make
[ -L /tools ] && make -k test || true
