+}
+
+gnulib_modules=
+newline='
+'
+
+get_modules() {
+ new_gnulib_modules=`sed '/^[ ]*#/d; /^[ ]*$/d' $*`
+ case $gnulib_modules,$new_gnulib_modules in
+ ?*,?*) new_gnulib_modules=$newline$new_gnulib_modules;;
+ esac
+ gnulib_modules=$gnulib_modules$new_gnulib_modules
+}
+
+# Get paxutils files
+case ${PAXUTILS_SRCDIR--} in
+-) checkout paxutils
+ PAXUTILS_SRCDIR=paxutils
+esac
+
+if [ -r $PAXUTILS_SRCDIR/gnulib.modules ]; then
+ get_modules $PAXUTILS_SRCDIR/gnulib.modules
+fi
+
+# copy_files srcdir dstdir
+copy_files() {
+ for file in `cat $1/DISTFILES`
+ do
+ case $file in
+ "#*") continue;;
+ esac
+ echo "$0: Copying file $1/$file"
+ cp -p $1/$file $2/`expr $file : '.*/\(.*\)'`
+ done
+}
+
+copy_files ${PAXUTILS_SRCDIR}/m4 m4
+echo "$0: Creating m4/paxutils.m4"
+(echo "# This file is generated automatically. Please, do not edit."
+ echo "#"
+ echo "AC_DEFUN([tar_PAXUTILS],["
+ cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
+ echo "])") > ./m4/paxutils.m4
+
+if [ -d rmt ]; then
+ :
+else
+ mkdir rmt
+fi
+
+for dir in doc rmt lib tests
+do
+ copy_files ${PAXUTILS_SRCDIR}/$dir $dir
+done
+
+# Get gnulib files.
+
+case ${GNULIB_SRCDIR--} in
+-) checkout gnulib
+ GNULIB_SRCDIR=gnulib