cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|"| autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
rm -rf autom4te.cache
iftest -e $closed_script_dir/closed-hook.m4;then
# We have closed sources available; also generate configure script
# with closed hooks compiled in.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|"|\
sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|"| autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh