@echo off
echo Configuring GNU Tar for DJGPP v2.x...

Rem Update configuration files
echo Updating configuration scripts...
if not exist configure.orig update configure configure.orig
update djgpp/configure ./configure

Rem `configure' won't run correctly without these variables
set PATH_SEPARATOR=:
if not "%PATH_SEPARATOR%" == ":" goto SmallEnv
set PATH_EXPAND=y
if not "%PATH_EXPAND%" == "y" goto SmallEnv
set INSTALL=${DJDIR}/bin/ginstall -c
if not "%INSTALL%" == "${DJDIR}/bin/ginstall -c" goto SmallEnv

echo Running ./configure...
sh ./configure --host=i386-pc-msdosdjgpp --disable-nls

echo Done.
goto End

Rem Protect them against too small environment size
:SmallEnv
echo Your environment size is too small.  Enlarge it and run me again.

:End
set INSTALL=
