--- /dev/c/develop/ports/orig/autoconf-2.57/NEWS	2002-12-03 07:56:24.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/NEWS	2003-01-02 15:21:16.000000000 +0000
@@ -1,3 +1,13 @@
+* Major changes in Autoconf 2.57 (DJGPP)                -*- outline -*-
+
+Mostly DOSish compatibility fixes.
+
+** Generic macros
+
+- AC_PROG_YACC
+  Now checks what suffix is used by yacc (.tab.* or _tab.*); this is needed
+  for proper support for DOSish systems in makefile rules.
+
 * Major changes in Autoconf 2.57                       -*- outline -*-
 
   Released 2002-12-03.
--- /dev/c/develop/ports/orig/autoconf-2.57/configure	2002-12-03 08:01:20.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/configure	2003-03-27 12:24:36.000000000 +0000
@@ -87,7 +87,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
+  echo "#! $SHELL" >conf$$.sh
   echo  "exit 0"   >>conf$$.sh
   chmod +x conf$$.sh
   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
@@ -136,7 +136,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
@@ -252,7 +252,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=
@@ -1109,8 +1113,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
@@ -1429,7 +1435,7 @@ done
 
 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_,'`
+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
@@ -2154,7 +2160,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
+  echo "#! $SHELL" >conf$$.sh
   echo  "exit 0"   >>conf$$.sh
   chmod +x conf$$.sh
   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
@@ -2204,7 +2210,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
@@ -2778,14 +2784,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
--- /dev/c/develop/ports/orig/autoconf-2.57/bin/autoheader.in	2002-10-22 11:14:44.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/bin/autoheader.in	2003-01-04 12:58:50.000000000 +0000
@@ -29,6 +29,11 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
 
 BEGIN
 {
+  # <rich@phekda.freeserve.co.uk>: We need to use bash as the shell,
+  # to support command-line redirection. $ENV{SHELL} may be set
+  # to COMMAND.COM, which will not work.
+  $ENV{'SHELL'} = "@SHELL@";
+
   my $perllibdir = $ENV{'autom4te_perllibdir'} || '@datadir@';
   unshift @INC, "$perllibdir";
 }
--- /dev/c/develop/ports/orig/autoconf-2.57/bin/autom4te.in	2002-12-03 08:20:16.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/bin/autom4te.in	2003-01-03 20:58:44.000000000 +0000
@@ -26,6 +26,11 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
 
 BEGIN
 {
+  # <rich@phekda.freeserve.co.uk>: We need to use bash as the shell,
+  # to support command-line redirection. $ENV{SHELL} may be set
+  # to COMMAND.COM, which will not work.
+  $ENV{'SHELL'} = "@SHELL@";
+
   my $datadir = ($ENV{'autom4te_perllibdir'} || '@datadir@');
   unshift @INC, "$datadir";
 }
--- /dev/c/develop/ports/orig/autoconf-2.57/bin/autoreconf.in	2002-11-03 17:39:30.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/bin/autoreconf.in	2003-01-04 12:56:36.000000000 +0000
@@ -28,6 +28,11 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
 
 BEGIN
 {
+  # <rich@phekda.freeserve.co.uk>: We need to use bash as the shell,
+  # to support command-line redirection. $ENV{SHELL} may be set
+  # to COMMAND.COM, which will not work.
+  $ENV{'SHELL'} = "@SHELL@";
+
   my $perllibdir = $ENV{'autom4te_perllibdir'} || '@datadir@';
   unshift @INC, "$perllibdir";
 }
--- /dev/c/develop/ports/orig/autoconf-2.57/bin/autoupdate.in	2002-10-25 08:24:16.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/bin/autoupdate.in	2003-01-04 12:56:00.000000000 +0000
@@ -26,6 +26,11 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
 
 BEGIN
 {
+  # <rich@phekda.freeserve.co.uk>: We need to use bash as the shell,
+  # to support command-line redirection. $ENV{SHELL} may be set
+  # to COMMAND.COM, which will not work.
+  $ENV{'SHELL'} = "@SHELL@";
+
   my $perllibdir = $ENV{'autom4te_perllibdir'} || "@datadir@";
   unshift @INC, "$perllibdir";
 }
--- /dev/c/develop/ports/orig/autoconf-2.57/doc/autoconf.texi	2002-12-03 07:16:32.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/doc/autoconf.texi	2003-01-02 15:21:16.000000000 +0000
@@ -3202,6 +3202,8 @@ is found, and otherwise to @samp{:} (do 
 If @code{bison} is found, set output variable @code{YACC} to @samp{bison
 -y}.  Otherwise, if @code{byacc} is found, set @code{YACC} to
 @samp{byacc}.  Otherwise set @code{YACC} to @samp{yacc}.
+Then check what suffix (@samp{.tab} or @samp{_tab}) is used by that program.
+This is needed for proper support for DOSish systems in makefile rules.
 @end defmac
 
 @node Generic Programs
--- /dev/c/develop/ports/orig/autoconf-2.57/lib/Autom4te/General.pm	2002-10-16 06:38:50.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/lib/Autom4te/General.pm	2003-03-27 09:58:56.000000000 +0000
@@ -324,6 +324,10 @@ sub mktmpdir ($)
   my ($signature) = @_;
   my $TMPDIR = $ENV{'TMPDIR'} || '/tmp';
 
+  # <rich@phekda.freeserve.co.uk>: Forward-slashify TMPDIR.
+  # TMPDIR may have backward slashes in it under DJGPP.
+  $TMPDIR =~ s,\\,/,g;
+
   # If mktemp supports dirs, use it.
   $tmp = `(umask 077 &&
            mktemp -d -q "$TMPDIR/${signature}XXXXXX") 2>/dev/null`;
--- /dev/c/develop/ports/orig/autoconf-2.57/lib/autoconf/general.m4	2002-11-12 10:54:46.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/lib/autoconf/general.m4	2003-01-04 19:46:34.000000000 +0000
@@ -442,7 +442,11 @@ exec AS_MESSAGE_FD>&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=
@@ -1725,8 +1729,10 @@ done
 m4_define([AC_CACHE_LOAD],
 [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
     AC_MSG_NOTICE([loading cache $cache_file])
     case $cache_file in
       [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
--- /dev/c/develop/ports/orig/autoconf-2.57/lib/autoconf/programs.m4	2002-10-31 13:15:02.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/lib/autoconf/programs.m4	2003-01-04 13:08:14.000000000 +0000
@@ -403,12 +403,14 @@ _ACEOF
 AC_TRY_EVAL(LEX conftest.l)
 if test -f lex.yy.c; then
   ac_cv_prog_lex_root=lex.yy
+  rm -f lex.yy.c
 elif test -f lexyy.c; then
   ac_cv_prog_lex_root=lexyy
+  rm -f lexyy.c
 else
   AC_MSG_ERROR([cannot find output from $LEX; giving up])
-fi])
-rm -f conftest.l
+fi
+rm -f conftest.l])
 AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])dnl
 
 AC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer,
@@ -458,7 +460,7 @@ AN_MAKEVAR([MAKE], [AC_PROG_MAKE_SET])
 AN_PROGRAM([make], [AC_PROG_MAKE_SET])
 AC_DEFUN([AC_PROG_MAKE_SET],
 [AC_MSG_CHECKING([whether ${MAKE-make} sets \$(MAKE)])
-set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,./+-,__p_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,:./+-,___p_,'`
 AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
 [cat >conftest.make <<\_ACEOF
 all:
@@ -507,4 +509,27 @@ AN_PROGRAM([yacc],  [AC_PROG_YACC])
 AN_PROGRAM([byacc], [AC_PROG_YACC])
 AN_PROGRAM([bison], [AC_PROG_YACC])
 AC_DEFUN([AC_PROG_YACC],
-[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
+[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)
+AC_CACHE_CHECK($YACC output file suffix, ac_cv_prog_yacc_suffix,
+[cat >conf$$.y <<_ACEOF
+%%
+foo: /* dummy rule */;
+%%
+_ACEOF
+AC_TRY_EVAL(YACC conf$$.y)
+if test -f y.tab.c; then
+  ac_cv_prog_yacc_suffix=.tab
+  rm -f y.tab.c
+elif test -f y_tab.c; then
+  ac_cv_prog_yacc_suffix=_tab
+  rm -f y_tab.c
+else
+dnl For historical reasons, YACC is set to yacc even if no yacc was
+dnl found.  So we have to default to .tab if we can't find the output.
+  AC_MSG_WARN([cannot find output from $YACC])
+  ac_cv_prog_yacc_suffix=.tab
+fi
+rm -f conf$$.y])
+AC_SUBST([YACC_OUTPUT_SUFFIX], [$ac_cv_prog_yacc_suffix])dnl
+])
+
--- /dev/c/develop/ports/orig/autoconf-2.57/lib/autoconf/status.m4	2002-11-12 10:54:46.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/lib/autoconf/status.m4	2003-03-27 09:58:56.000000000 +0000
@@ -523,14 +523,14 @@ for ac_file in : $CONFIG_HEADERS; do tes
       [[\\/$]]*)
          # Absolute (can't be DOS-style, as IFS=:)
          test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
-         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
            AC_MSG_ERROR([cannot find input file: $f])
@@ -979,14 +979,14 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
       [[\\/$]]*)
          # Absolute (can't be DOS-style, as IFS=:)
          test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
-         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
            AC_MSG_ERROR([cannot find input file: $f])
--- /dev/c/develop/ports/orig/autoconf-2.57/lib/m4sugar/m4sh.m4	2002-11-05 07:09:14.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/lib/m4sugar/m4sh.m4	2003-03-27 09:58:56.000000000 +0000
@@ -557,7 +557,7 @@ _AS_LINENO_WORKS || {
     _AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
       [for as_base in sh bash ksh sh5; do
 	 case $as_dir in
-	 /*)
+	 [\\/]* | ?:[\\/]*)
 	   if ("$as_dir/$as_base" -c '_AS_LINENO_WORKS') 2>/dev/null; then
 	     AS_UNSET(BASH_ENV)
 	     AS_UNSET(ENV)
@@ -633,7 +633,7 @@ rm -f conf$$ conf$$.exe conf$$.file
 m4_defun([_AS_PATH_SEPARATOR_PREPARE],
 [# The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
+  echo "#! $SHELL" >conf$$.sh
   echo  "exit 0"   >>conf$$.sh
   chmod +x conf$$.sh
   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
--- /dev/c/develop/ports/orig/autoconf-2.57/man/Makefile.am	2001-10-05 16:12:06.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/man/Makefile.am	2003-01-08 19:28:40.000000000 +0000
@@ -19,10 +19,10 @@
 ## 02111-1307, USA.
 
 dist_man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 \
-autoscan.1 autom4te.1 config.guess.1 config.sub.1
+autoscan.1 autom4te.1 config_guess.1 config_sub.1
 
 man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x \
-autoscan.x autom4te.x config.guess.x config.sub.x
+autoscan.x autom4te.x config_guess.x config_sub.x
 
 EXTRA_DIST = $(man_aux) common.x
 MAINTAINERCLEANFILES = $(dist_man_MANS)
@@ -39,8 +39,8 @@ autoupdate.1: $(common_dep) $(srcdir)/au
 ifnames.1:    $(common_dep) $(srcdir)/ifnames.x    $(binsrcdir)/ifnames.in
 
 # Independent from this package.
-config.guess.1: $(srcdir)/config.guess.x  $(top_srcdir)/config/config.guess
-config.sub.1:   $(srcdir)/config.sub.x    $(top_srcdir)/config/config.sub
+config_guess.1: $(srcdir)/config_guess.x  $(top_srcdir)/config/config.guess
+config_sub.1:   $(srcdir)/config_sub.x    $(top_srcdir)/config/config.sub
 
 SUFFIXES = .x .1
 
--- /dev/c/develop/ports/orig/autoconf-2.57/man/Makefile.in	2002-12-03 06:33:36.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/man/Makefile.in	2003-01-08 19:28:56.000000000 +0000
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.7.1 from Makefile.am.
+# Makefile.in generated by automake 1.7.2 from Makefile.am.
 # @configure_input@
 
 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
@@ -93,11 +93,11 @@ sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 
 dist_man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 \
-autoscan.1 autom4te.1 config.guess.1 config.sub.1
+autoscan.1 autom4te.1 config_guess.1 config_sub.1
 
 
 man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x \
-autoscan.x autom4te.x config.guess.x config.sub.x
+autoscan.x autom4te.x config_guess.x config_sub.x
 
 
 EXTRA_DIST = $(man_aux) common.x
@@ -163,6 +163,10 @@ uninstall-man1:
 	done; \
 	for i in $$list; do \
 	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
 	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
 	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
 	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
@@ -303,8 +307,8 @@ autoupdate.1: $(common_dep) $(srcdir)/au
 ifnames.1:    $(common_dep) $(srcdir)/ifnames.x    $(binsrcdir)/ifnames.in
 
 # Independent from this package.
-config.guess.1: $(srcdir)/config.guess.x  $(top_srcdir)/config/config.guess
-config.sub.1:   $(srcdir)/config.sub.x    $(top_srcdir)/config/config.sub
+config_guess.1: $(srcdir)/config_guess.x  $(top_srcdir)/config/config.guess
+config_sub.1:   $(srcdir)/config_sub.x    $(top_srcdir)/config/config.sub
 
 .x.1:
 	echo "Updating man page $@"
--- /dev/c/develop/ports/orig/autoconf-2.57/tests/atspecific.m4	2002-10-31 13:57:36.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/tests/atspecific.m4	2003-03-27 10:00:10.000000000 +0000
@@ -55,6 +55,8 @@ m4_ifval([$4],
 [AT_CHECK([[sed -e 's,^\([^:]*\): *\([0-9][0-9]*\): *[^:]*m4: ,m4: \1: \2: ,' \
                 -e 's,^[^:]*m4: *\([^:]*\): *\([0-9][0-9]*\): ,m4: \1: \2: ,' \
                 -e 's/^autom4te: [^ ]*m4 /autom4te: m4 /' \
+                -e 's/^autom4te: [^ ]*m4.exe /autom4te: m4 /' \
+                -e 's/ (E[A-Z]*)$//' \
            stderr]], [0],[$4])])
 ])
 
@@ -221,7 +223,7 @@ m4_define([AT_CHECK_AUTOHEADER],
 
 # AT_CHECK_CONFIGURE(END-COMMAND,
 #                    [EXIT-STATUS = 0],
-#                    [SDOUT = IGNORE], STDERR)
+#                    [STDOUT = IGNORE], STDERR)
 # --------------------------------------------
 # `abs_top_srcdir' is needed so that `./configure' finds install-sh.
 # Using --srcdir is more expensive.
--- /dev/c/develop/ports/orig/autoconf-2.57/tests/torture.at	2002-11-06 10:29:22.000000000 +0000
+++ /dev/c/develop/ports/gnu.dev/autoconf-2.57/tests/torture.at	2003-01-04 17:52:40.000000000 +0000
@@ -613,7 +613,7 @@ AT_CHECK([cat inner/innermost/config], 0
 [INNER=inner
 srcdir=.
 top_srcdir=..
-prefix=/usr/local
+prefix=/dev/env/DJDIR
 ])
 
 # The same, but from a builddir.
@@ -623,7 +623,7 @@ AT_CHECK([cat builddir/inner/innermost/c
 [INNER=inner
 srcdir=../../../inner/innermost
 top_srcdir=../../../inner
-prefix=/usr/local
+prefix=/dev/env/DJDIR
 ])
 
 # Make sure precious variables and command line options are properly
