--- /dev/c/develop/ports/orig/shtool-1.6.2/configure	2002-11-02 12:53:34.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/configure	2003-06-08 14:53:48.000000000 +0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.ac 1.0.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.54.
+# Generated by GNU Autoconf 2.57.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
@@ -37,7 +37,10 @@ PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
 do
   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
@@ -83,15 +86,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conftest.sh
-  echo  "exit 0"   >>conftest.sh
-  chmod +x conftest.sh
-  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
+  echo "#! $SHELL" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
     PATH_SEPARATOR=';'
   else
     PATH_SEPARATOR=:
   fi
-  rm -f conftest.sh
+  rm -f conf$$.sh
 fi
 
 
@@ -132,7 +135,7 @@ do
   test -z "$as_dir" && as_dir=.
   for as_base in sh bash ksh sh5; do
 	 case $as_dir in
-	 /*)
+	 \\/* | ?:\\/*)
 	   if ("$as_dir/$as_base" -c '
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
@@ -248,7 +251,11 @@ exec 6>&1
 #
 # Initializations.
 #
-ac_default_prefix=/usr/local
+if test -n "$DJDIR" && test -f /dev/env/DJDIR/djgpp.env; then
+  ac_default_prefix=/dev/env/DJDIR
+else
+  ac_default_prefix=/usr/local
+fi
 ac_config_libobj_dir=.
 cross_compiling=no
 subdirs=
@@ -854,7 +861,7 @@ This file contains any messages produced
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.54.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
@@ -906,24 +913,54 @@ _ACEOF
 
 # Keep a trace of the command line.
 # Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
 # Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
 ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
 ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
 do
-  case $ac_arg in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n ) continue ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    continue ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-  esac
-  ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-  # Get rid of the leading space.
-  ac_sep=" "
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+        ac_must_keep_next=false # Got value, back to normal.
+      else
+        case $ac_arg in
+          *=* | --config-cache | -C | -disable-* | --disable-* \
+          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+          | -with-* | --with-* | -without-* | --without-* | --x)
+            case "$ac_configure_args0 " in
+              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+            esac
+            ;;
+          -* ) ac_must_keep_next=true ;;
+        esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
 done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
@@ -1061,8 +1098,10 @@ done
 
 if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
+  # files actually), so we avoid doing that.  The LFN=n is needed
+  # is needed for DJGPP's bash to DTRT under Win2K/XP.  The case
+  # without LFN=n is for normal operation under DJGPP's bash.
+  if LFN=n test -f "$cache_file" || test -f "$cache_file"; then
     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
@@ -1158,15 +1197,15 @@ echo "Copyright (c) 1994-2002 Ralf S. En
 
 
 
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.make <<\_ACEOF
 all:
-	@echo 'ac_maketemp="${MAKE}"'
+	@echo 'ac_maketemp="$(MAKE)"'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
@@ -1260,7 +1299,7 @@ _ACEOF
      t end
      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
      : end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
   if test -w $cache_file; then
     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
     cat confcache >$cache_file
@@ -1351,6 +1390,8 @@ cat >$CONFIG_STATUS <<_ACEOF
 # configure, is in config.log if it exists.
 
 debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
 SHELL=\${CONFIG_SHELL-$SHELL}
 _ACEOF
 
@@ -1385,7 +1426,10 @@ PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
 do
   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
@@ -1431,15 +1475,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conftest.sh
-  echo  "exit 0"   >>conftest.sh
-  chmod +x conftest.sh
-  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
+  echo "#! $SHELL" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
     PATH_SEPARATOR=';'
   else
     PATH_SEPARATOR=:
   fi
-  rm -f conftest.sh
+  rm -f conf$$.sh
 fi
 
 
@@ -1481,7 +1525,7 @@ do
   test -z "$as_dir" && as_dir=.
   for as_base in sh bash ksh sh5; do
 	 case $as_dir in
-	 /*)
+	 \\/* | ?:\\/*)
 	   if ("$as_dir/$as_base" -c '
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
@@ -1602,7 +1646,7 @@ _ASBOX
 cat >&5 <<_CSEOF
 
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.54.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -1642,6 +1686,7 @@ Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
@@ -1659,7 +1704,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.54,
+configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -1695,12 +1740,9 @@ do
   case $ac_option in
   # Handling of the options.
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
-    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-_ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
   --version | --vers* | -V )
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
@@ -1722,6 +1764,9 @@ Try \`$0 --help' for more information." 
     $ac_shift
     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
 
   # This is an error.
   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
@@ -1736,6 +1781,20 @@ Try \`$0 --help' for more information." 
   shift
 done
 
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
 _ACEOF
 
 
@@ -1765,6 +1824,9 @@ if $ac_need_defaults; then
   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
 # Create a temporary directory, and hook for its removal unless debugging.
 $debug ||
 {
@@ -1773,17 +1835,17 @@ $debug ||
 }
 
 # Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
 {
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=$TMPDIR/cs$$-$RANDOM
+  tmp=./confstat$$-$RANDOM
   (umask 077 && mkdir $tmp)
 } ||
 {
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
@@ -1993,14 +2055,14 @@ echo "$as_me: creating $ac_file" >&6;}
          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         echo $f;;
+         echo "$f";;
       *) # Relative
          if test -f "$f"; then
            # Build tree
-           echo $f
+           echo "$f"
          elif test -f "$srcdir/$f"; then
            # Source tree
-           echo $srcdir/$f
+           echo "$srcdir/$f"
          else
            # /dev/null tree
            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
@@ -2116,8 +2178,11 @@ ac_clean_files=$ac_clean_files_save
 # need to make the FD available again.
 if test "$no_create" != yes; then
   ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
   exec 5>/dev/null
-  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.common	2001-09-23 10:58:10.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.common	2003-06-08 15:10:48.000000000 +0000
@@ -174,3 +174,11 @@ if [ ".$gen_tmpfile" = .yes ]; then
     chmod 600 $tmpfile
 fi
 
+#   check whether we're running under DJGPP
+if [ -n "$DJGPP" ]; then
+    testshell=$DJDIR/bin/bash
+    pathsep=';'
+else
+    testshell=/bin/sh
+    pathsep=':'
+fi
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.echo	2002-10-30 16:21:50.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.echo	2003-06-08 15:02:34.000000000 +0000
@@ -64,7 +64,7 @@ if [ ".$opt_e" = .yes -a ".`echo $text |
             ;;
         #   for all others, we try to use a possibly existing `tput' or `tcout' utility
         * )
-            paths=`echo $PATH | sed -e 's/:/ /g'`
+            paths=`echo $PATH | sed -e "s/$pathsep/ /g"`
             for tool in tput tcout; do
                 for dir in $paths; do
                     if [ -r "$dir/$tool" ]; then
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.fixperm	2001-12-31 15:06:04.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.fixperm	2003-06-08 15:04:16.000000000 +0000
@@ -32,7 +32,7 @@ opt_t=no
 paths="$*"
 
 #   check whether the test command supports the -x option
-if [ -x /bin/sh ] 2>/dev/null; then
+if [ -x $testshell ] 2>/dev/null; then
     minusx="-x"
 else
     minusx="-r"
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.path	2002-02-23 09:18:02.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.path	2003-06-08 15:03:56.000000000 +0000
@@ -37,7 +37,7 @@ opt_p="$PATH"
 namelist="$*"
 
 #   check whether the test command supports the -x option
-if [ -x /bin/sh ] 2>/dev/null; then
+if [ -x $testshell ] 2>/dev/null; then
     minusx="-x"
 else
     minusx="-r"
@@ -45,10 +45,10 @@ fi
 
 #   split path string
 paths="`echo $opt_p |\
-        sed -e 's/^:/.:/' \
-            -e 's/::/:.:/g' \
-            -e 's/:$/:./' \
-            -e 's/:/ /g'`"
+        sed -e "s/^$pathsep/.$pathsep/" \
+            -e "s/$pathsep$pathsep/$pathsep.$pathsep/g" \
+            -e "s/$pathsep\$/$pathsep./" \
+            -e "s/$pathsep/ /g"`"
 
 #   SPECIAL REQUEST
 #   translate forward to reverse path
@@ -92,7 +92,7 @@ if [ ".$opt_m" = .yes  -a ".$namelist" =
              if [ $minusx "$dir/$name" -a ! -d "$dir/$name" ]; then
                  perl="$dir/$name"
                  pv=`$perl -e 'printf("%.3f", $]);'`
-                 echo "$pv:$pc:$nc:$perl" >>$tmpfile
+                 echo "$pv$pathsep$pc$pathsep$nc$pathsep$perl" >>$tmpfile
                  found=1
              fi
              nc=`expr $nc - 1`
@@ -100,7 +100,7 @@ if [ ".$opt_m" = .yes  -a ".$namelist" =
         pc=`expr $pc - 1`
     done
     if [ $found = 1 ]; then
-        perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d: -f4`"
+        perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d$pathsep -f4`"
         rm -f $tmpfile >/dev/null 2>&1
         echo "$perl"
         exit 0
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.rotate	2002-07-11 17:23:24.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.rotate	2003-06-08 15:07:06.000000000 +0000
@@ -113,16 +113,19 @@ if [ ".$opt_z" != . ]; then
     #   determine a suitable compression tool
     if [ ".$comp_prg" = . ]; then
         #   check whether the test command supports the -x option
-        if [ -x /bin/sh ] 2>/dev/null; then
+        if [ -x $testshell ] 2>/dev/null; then
             minusx="-x"
         else
             minusx="-r"
         fi
         #   search for tools in $PATH
         paths="`echo $PATH |\
-                sed -e 's%/*:%:%g' -e 's%/*$%%' \
-                    -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
-                    -e 's/:/ /g'`"
+                sed -e "s%/*$pathsep%$pathsep%g" \
+                    -e "s%/*$%%" \
+                    -e "s/^$pathsep/.$pathsep/" \
+                    -e "s/$pathsep$pathsep/$pathsep.$pathsep/g" \
+                    -e "s/$pathsep$/$pathsep./" \
+                    -e "s/$pathsep/ /g"`"
         for prg in bzip2 gzip compress; do
             for path in $paths; do
                 if [ $minusx "$path/$prg" -a ! -d "$path/$prg" ]; then
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.scpp	2002-11-02 11:32:42.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.scpp	2003-06-08 15:17:26.000000000 +0000
@@ -39,15 +39,25 @@ opt_C="intern"
 srcs="$*"
 output="${opt_o}.n"
 
+#   check whether the test command supports the -x option
+if [ -x $testshell ] 2>/dev/null; then
+    minusx="-x"
+else
+    minusx="-r"
+fi
+
 #   find a reasonable Awk
 awk=''
 paths=`echo $PATH |\
-       sed -e 's%/*:%:%g' -e 's%/$%%' \
-           -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
-           -e 's/:/ /g'`
+       sed -e "s%/*$pathsep%$pathsep%g" \
+           -e "s%/$%%" \
+           -e "s/^$pathsep/.$pathsep/" \
+           -e "s/$pathsep$pathsep/$pathsep.$pathsep/g" \
+           -e "s/$pathsep$/$pathsep./" \
+           -e "s/$pathsep/ /g"`
 for name in gawk nawk awk; do
     for path in $paths; do
-        if [ -r "$path/$name" ]; then
+        if [ $minusx "$path/$name" ]; then
             awk="$path/$name"
             break
         fi
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.slo	2001-12-31 15:06:04.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.slo	2003-06-08 15:13:58.000000000 +0000
@@ -52,16 +52,19 @@ do
     opt="`echo $opt | cut -c1-2`"
     #   store into containers
     case $opt in
-        -L) DIRS="$DIRS:$arg" ;;
-        -l) LIBS="$LIBS:$arg" ;;
+        -L) DIRS="$DIRS$pathsep$arg" ;;
+        -l) LIBS="$LIBS$pathsep$arg" ;;
          *) ARGV="$ARGV $opt" ;;
     esac
 done
 
 #   set linker default directories
-DIRS_DEFAULT='/lib:/usr/lib'
+DIRS_DEFAULT="/lib$pathsep/usr/lib"
+if [ -n "$DJGPP" ]; then
+   DIRS_DEFAULT="$DIRS_DEFAULT$pathsep$DJDIR/lib"
+fi
 if [ ".$LD_LIBRARY_PATH" != . ]; then
-    DIRS_DEFAULT="$DIRS_DEFAULT:$LD_LIBRARY_PATH"
+    DIRS_DEFAULT="$DIRS_DEFAULT$pathsep$LD_LIBRARY_PATH"
 fi
 
 #   sort options by class
@@ -73,7 +76,7 @@ DIRS_DSO=''
 LIBS_DSO=''
 
 #    for each library...
-OIFS="$IFS"; IFS=':'
+OIFS="$IFS"; IFS="$pathsep"
 for lib in $LIBS; do
     [ ".$lib" = . ] && continue
 
@@ -83,7 +86,7 @@ for lib in $LIBS; do
     found_dir=''
 
     #    for each directory...
-    OIFS2="$IFS"; IFS=":$DIFS"
+    OIFS2="$IFS"; IFS="$pathsep$DIFS"
     for dir in ${DIRS} switch-to-defdirs ${DIRS_DEFAULT}; do
         [ ".$dir" = . ] && continue
         [ ".$dir" = .switch-to-defdirs ] && found_indefdir=yes
@@ -121,17 +124,17 @@ for lib in $LIBS; do
 
     if [ ".$found" = .yes ]; then
         if [ ".$found_indefdir" != .yes ]; then
-            eval "dirlist=\"\${DIRS_${found_type}}:\""
-            if [ ".`echo \"$dirlist\" | fgrep :$found_dir:`" = . ]; then
-                eval "DIRS_${found_type}=\"\$DIRS_${found_type}:${found_dir}\""
+            eval "dirlist=\"\${DIRS_${found_type}}$pathsep\""
+            if [ ".`echo \"$dirlist\" | fgrep $pathsep$found_dir$pathsep`" = . ]; then
+                eval "DIRS_${found_type}=\"\$DIRS_${found_type}$pathsep${found_dir}\""
             fi
-            eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\""
+            eval "LIBS_${found_type}=\"\$LIBS_${found_type}$pathsep$lib\""
         else
-            eval "LIBS_${found_type}=\"\$LIBS_${found_type}:$lib\""
+            eval "LIBS_${found_type}=\"\$LIBS_${found_type}$pathsep$lib\""
         fi
     else
-        LIBS_OBJ="$LIBS_OBJ:$lib"
-        #dirlist="`echo $DIRS $DIRS_DEFAULT | sed -e 's/:/ /g'`"
+        LIBS_OBJ="$LIBS_OBJ$pathsep$lib"
+        #dirlist="`echo $DIRS $DIRS_DEFAULT | sed -e "s/$pathsep/ /g"`"
         #echo "slo:Warning: library \"$lib\" not found in any of the following dirs:" 2>&1
         #echo "slo:Warning: $dirlist" 1>&1
     fi
@@ -139,18 +142,18 @@ done
 IFS="$OIFS"
 
 #   also pass-through unused dirs even if it's useless
-OIFS="$IFS"; IFS=':'
+OIFS="$IFS"; IFS="$pathsep"
 for dir in $DIRS; do
-    dirlist="${DIRS_OBJ}:${DIRS_PIC}:${DIRS_DSO}:"
-    if [ ".`echo \"$dirlist\" | fgrep :$dir:`" = . ]; then
-        DIRS_OBJ="$DIRS_OBJ:$dir"
+    dirlist="${DIRS_OBJ}$pathsep${DIRS_PIC}$pathsep${DIRS_DSO}$pathsep"
+    if [ ".`echo \"$dirlist\" | fgrep $pathsep$dir$pathsep`" = . ]; then
+        DIRS_OBJ="$DIRS_OBJ$pathsep$dir"
     fi
 done
 IFS="$OIFS"
 
 #   reassemble the options but separated by type
 for type in OBJ PIC DSO; do
-    OIFS="$IFS"; IFS=':'
+    OIFS="$IFS"; IFS="$pathsep"
     eval "libs=\"\$LIBS_${type}\""
     opts=''
     for lib in $libs; do
--- /dev/c/develop/ports/orig/shtool-1.6.2/sh.tarball	2001-12-31 15:06:04.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/sh.tarball	2003-06-08 15:04:36.000000000 +0000
@@ -39,7 +39,7 @@ opt_e="CVS,\\.cvsignore,\\.[oa]\$"
 srcs="$*"
 
 #   check whether the test command supports the -x option
-if [ -x /bin/sh ] 2>/dev/null; then
+if [ -x $testshell ] 2>/dev/null; then
     minusx="-x"
 else
     minusx="-r"
--- /dev/c/develop/ports/orig/shtool-1.6.2/test.db	2001-12-31 15:06:04.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/shtool-1.6.2/test.db	2003-06-21 09:44:50.000000000 +0000
@@ -8,7 +8,7 @@ test ".`shtool echo foo bar quux`" = ".f
 bytes=`shtool echo -n foo | wc -c | awk '{ printf("%s", $1); }'`
 test ".$bytes" = .3
 bytes=`shtool echo '\1' | wc -c | awk '{ printf("%s", $1); }'`
-test ".$bytes" = .3
+test ".$bytes" = .4
 @end{echo}
 
 @begin{mdate}
@@ -106,7 +106,7 @@ shtool rotate -n2 foo
 
 @begin{tarball}
 #   cannot be checked easily, so just start it
-shtool tarball -o test .
+shtool tarball -o somereallyunlikelyname .
 @end{tarball}
 
 @begin{subst}
@@ -214,6 +214,6 @@ test "x`shtool path -b a/b/c`" = "xc"
 echo '#!/bin/sh' >foo.sh
 echo 'true' >>foo.sh
 chmod a+x foo.sh
-test "x`shtool path -p $PATH:. foo.sh`" = "x./foo.sh"
+test "x`shtool path -p "$PATH;." foo.sh`" = "x./foo.sh"
 @end{path}
 
