diff -rwdc cvs-1.9/Makefile.in gnu/cvs-1.9/Makefile.in
*** cvs-1.9/Makefile.in	Fri Sep 27 22:46:40 1996
--- gnu/cvs-1.9/Makefile.in	Mon Apr 13 22:57:58 1998
***************
*** 93,106 ****
  	BUGS MINOR-BUGS FAQ HACKING TESTS \
  	README.VMS build.com \
  	ChangeLog NEWS ChangeLog.zoo \
! 	configure configure.in stamp-h.in config.h.in Makefile.in acconfig.h \
  	cvs-format.el mkinstalldirs install-sh \
  	cvsnt.mak \
  	.cvsignore cvs.spec
  
  ### Subdirectories to run make in for the primary targets.
  # Unix source subdirs, where we'll want to run lint and etags:
! USOURCE_SUBDIRS = lib zlib src
  # All other subdirs:
  SUBDIRS = ${USOURCE_SUBDIRS} man doc contrib tools \
  	windows-NT os2 macintosh vms
--- 93,106 ----
  	BUGS MINOR-BUGS FAQ HACKING TESTS \
  	README.VMS build.com \
  	ChangeLog NEWS ChangeLog.zoo \
! 	configure configure.in stamp-h.in config.in Makefile.in acconfig.h \
  	cvs-format.el mkinstalldirs install-sh \
  	cvsnt.mak \
  	.cvsignore cvs.spec
  
  ### Subdirectories to run make in for the primary targets.
  # Unix source subdirs, where we'll want to run lint and etags:
! USOURCE_SUBDIRS = lib src
  # All other subdirs:
  SUBDIRS = ${USOURCE_SUBDIRS} man doc contrib tools \
  	windows-NT os2 macintosh vms
***************
*** 193,211 ****
  .PHONY: check
  check:
  	cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- 	cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
  	cd src ; $(MAKE) $(FLAGS_TO_PASS) check
  
  .PHONY: remotecheck
  remotecheck:
  	cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- 	cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
  	cd src ; $(MAKE) $(FLAGS_TO_PASS) remotecheck
  
  .PHONY: installcheck
  installcheck:
  	cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- 	cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
  	cd src ; $(MAKE) $(FLAGS_TO_PASS) installcheck
  
  .PHONY: lint
--- 193,208 ----
***************
*** 270,283 ****
  config.h: stamp-h
  
  # This used to do a ./config.status --recheck, to update config.status with
! # any new #defines from config.h.in.  The problem was that the rule itself
  # depends on config.status, so that the --recheck would get run several
  # times, which is bad if the user was trying to specify CFLAGS manually.
  # It was a big pain in the neck.
! stamp-h: config.h.in config.status
  	CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
  
! #config.h.in: stamp-h.in
  #stamp-h.in: configure.in #aclocal.m4 acconfig.h
  #	cd $(srcdir); autoheader
  #	date > $(srcdir)/stamp-h.in
--- 267,280 ----
  config.h: stamp-h
  
  # This used to do a ./config.status --recheck, to update config.status with
! # any new #defines from config.in.  The problem was that the rule itself
  # depends on config.status, so that the --recheck would get run several
  # times, which is bad if the user was trying to specify CFLAGS manually.
  # It was a big pain in the neck.
! stamp-h: config.in config.status
  	CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
  
! #config.in: stamp-h.in
  #stamp-h.in: configure.in #aclocal.m4 acconfig.h
  #	cd $(srcdir); autoheader
  #	date > $(srcdir)/stamp-h.in
diff -rwdc cvs-1.9/configure gnu/cvs-1.9/configure
*** cvs-1.9/configure	Sat Oct  5 20:08:14 1996
--- gnu/cvs-1.9/configure	Wed Feb 17 23:29:42 1999
***************
*** 1,7 ****
  #! /bin/sh
  
  # Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.10 
  # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  #
  # This configure script is free software; the Free Software Foundation
--- 1,7 ----
  #! /bin/sh
  
  # Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.12 
  # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  #
  # This configure script is free software; the Free Software Foundation
***************
*** 9,15 ****
  
  # Defaults:
  ac_help=
! ac_default_prefix=/usr/local
  # Any additions from configure.in:
  ac_help="$ac_help
    --with-krb4=value       set default \$(KRB4) from value"
--- 9,15 ----
  
  # Defaults:
  ac_help=
! ac_default_prefix=${DJDIR}
  # Any additions from configure.in:
  ac_help="$ac_help
    --with-krb4=value       set default \$(KRB4) from value"
***************
*** 53,58 ****
--- 53,60 ----
  # Initialize some other variables.
  subdirs=
  MFLAGS= MAKEFLAGS=
+ # Maximum number of lines to put in a shell here document.
+ ac_max_here_lines=12
  
  ac_prev=
  for ac_option
***************
*** 334,340 ****
      verbose=yes ;;
  
    -version | --version | --versio | --versi | --vers)
!     echo "configure generated by autoconf version 2.10"
      exit 0 ;;
  
    -with-* | --with-*)
--- 336,342 ----
      verbose=yes ;;
  
    -version | --version | --versio | --versi | --vers)
!     echo "configure generated by autoconf version 2.12"
      exit 0 ;;
  
    -with-* | --with-*)
***************
*** 436,446 ****
  done
  
  # NLS nuisances.
! # Only set LANG and LC_ALL to C if already set.
! # These must not be set unconditionally because not all systems understand
! # e.g. LANG=C (notably SCO).
! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  
  # confdefs.h avoids OS command line length limits that DEFS can exceed.
  rm -rf conftest* confdefs.h
--- 438,451 ----
  done
  
  # NLS nuisances.
! # Only set these to C if already set.  These must not be set unconditionally
! # because not all systems understand e.g. LANG=C (notably SCO).
! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
! # Non-C LC_CTYPE values break the ctype check.
  if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  
  # confdefs.h avoids OS command line length limits that DEFS can exceed.
  rm -rf conftest* confdefs.h
***************
*** 501,507 ****
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  
  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
--- 506,513 ----
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest.exe $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
! cross_compiling=$ac_cv_prog_cc_cross
  
  if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
***************
*** 521,536 ****
  # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        ac_cv_prog_CC="gcc"
        break
      fi
--- 527,543 ----
  # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:531: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        ac_cv_prog_CC="gcc"
        break
      fi
***************
*** 549,565 ****
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    ac_prog_rejected=no
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
          ac_prog_rejected=yes
  	continue
--- 556,573 ----
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:560: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    ac_prog_rejected=no
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
          ac_prog_rejected=yes
  	continue
***************
*** 595,601 ****
--- 603,649 ----
    test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  fi
  
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+ echo "configure:608: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest.exe $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ cat > conftest.$ac_ext <<EOF
+ #line 618 "configure"
+ #include "confdefs.h"
+ main(){return(0);}
+ EOF
+ if { (eval echo configure:622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
+   ac_cv_prog_cc_works=yes
+   # If we can't run a trivial program, we are probably using a cross compiler.
+   if (./conftest; exit) 2>/dev/null; then
+     ac_cv_prog_cc_cross=no
+   else
+     ac_cv_prog_cc_cross=yes
+   fi
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   ac_cv_prog_cc_works=no
+ fi
+ rm -fr conftest*
+ 
+ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+ if test $ac_cv_prog_cc_works = no; then
+   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+ echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+ echo "configure:647: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 604,610 ****
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
--- 652,658 ----
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
***************
*** 612,640 ****
  fi
  
  echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
!   if test "${CFLAGS+set}" != set; then
      echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.c
  if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
!   ac_cv_prog_gcc_g=yes
  else
!   ac_cv_prog_gcc_g=no
  fi
  rm -f conftest*
  
  fi
  
! echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
!     if test $ac_cv_prog_gcc_g = yes; then
!       CFLAGS="-g -O"
      else
!       CFLAGS="-O"
!     fi
    fi
  else
    GCC=
--- 660,693 ----
  fi
  
  echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ 
  if test $ac_cv_prog_gcc = yes; then
    GCC=yes
!   ac_test_CFLAGS="${CFLAGS+set}"
!   ac_save_CFLAGS="$CFLAGS"
!   CFLAGS=
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:671: checking whether ${CC-cc} accepts -g" >&5
! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.c
  if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
!   ac_cv_prog_cc_g=yes
  else
!   ac_cv_prog_cc_g=no
  fi
  rm -f conftest*
  
  fi
  
! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
!   if test "$ac_test_CFLAGS" = set; then
!     CFLAGS="$ac_save_CFLAGS"
!   elif test $ac_cv_prog_cc_g = yes; then
!     CFLAGS="-g -O2"
    else
!     CFLAGS="-O2"
    fi
  else
    GCC=
***************
*** 643,648 ****
--- 696,702 ----
  
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+ echo "configure:700: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 657,689 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 661 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 676 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    CPP=/lib/cpp
  fi
--- 711,747 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 715 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 732 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP=/lib/cpp
  fi
***************
*** 699,706 ****
  echo "$ac_t""$CPP" 1>&6
  
  echo $ac_n "checking for AIX""... $ac_c" 1>&6
  cat > conftest.$ac_ext <<EOF
! #line 704 "configure"
  #include "confdefs.h"
  #ifdef _AIX
    yes
--- 757,765 ----
  echo "$ac_t""$CPP" 1>&6
  
  echo $ac_n "checking for AIX""... $ac_c" 1>&6
+ echo "configure:761: checking for AIX" >&5
  cat > conftest.$ac_ext <<EOF
! #line 763 "configure"
  #include "confdefs.h"
  #ifdef _AIX
    yes
***************
*** 721,744 ****
  rm -f conftest*
  
  
! ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 731 "configure"
  #include "confdefs.h"
  #include <minix/config.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
--- 780,806 ----
  rm -f conftest*
  
  
! ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
+ echo "configure:786: checking for minix/config.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 791 "configure"
  #include "confdefs.h"
  #include <minix/config.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
***************
*** 768,773 ****
--- 830,836 ----
  fi
  
  echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+ echo "configure:834: checking for POSIXized ISC" >&5
  if test -d /etc/conf/kconfig.d &&
    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  then
***************
*** 793,802 ****
  fi
  
  if test "x$prefix" = xNONE; then
! echo $ac_n "checking for prefix by ""... $ac_c" 1>&6
  # Extract the first word of "cvs", so it can be a program name with args.
  set dummy cvs; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 856,866 ----
  fi
  
  if test "x$prefix" = xNONE; then
! echo $ac_n "checking for prefix by $ac_c" 1>&6
  # Extract the first word of "cvs", so it can be a program name with args.
  set dummy cvs; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:864: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 805,814 ****
    ac_cv_path_CVS="$CVS" # Let the user override the test with a path.
    ;;
    *)
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        ac_cv_path_CVS="$ac_dir/$ac_word"
        break
      fi
--- 869,878 ----
    ac_cv_path_CVS="$CVS" # Let the user override the test with a path.
    ;;
    *)
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        ac_cv_path_CVS="$ac_dir/$ac_word"
        break
      fi
***************
*** 830,872 ****
  fi
  
  
- # If we cannot run a trivial program, we must be cross compiling.
- echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
- if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test "$cross_compiling" = yes; then
-   ac_cv_c_cross=yes
- else
- cat > conftest.$ac_ext <<EOF
- #line 843 "configure"
- #include "confdefs.h"
- main(){return(0);}
- EOF
- { (eval echo configure:847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
-   ac_cv_c_cross=no
- else
-   ac_cv_c_cross=yes
- fi
- fi
- rm -fr conftest*
- fi
- 
- echo "$ac_t""$ac_cv_c_cross" 1>&6
- cross_compiling=$ac_cv_c_cross
  
  
  echo $ac_n "checking for working const""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 866 "configure"
  #include "confdefs.h"
  
! int main() { return 0; }
! int t() {
  
  /* Ultrix mips cc rejects this.  */
  typedef int charset[2]; const charset x;
--- 894,911 ----
  fi
  
  
  
  
  echo $ac_n "checking for working const""... $ac_c" 1>&6
+ echo "configure:901: checking for working const" >&5
  if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 906 "configure"
  #include "confdefs.h"
  
! int main() {
  
  /* Ultrix mips cc rejects this.  */
  typedef int charset[2]; const charset x;
***************
*** 912,926 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_const=yes
  else
    rm -rf conftest*
    ac_cv_c_const=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$ac_cv_c_const" 1>&6
--- 951,966 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_const=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_c_const=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$ac_cv_c_const" 1>&6
***************
*** 962,972 ****
  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  # ./install, which can be erroneously created by make from ./install.sh.
  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!     IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      # Account for people who put trailing slashes in PATH elements.
      case "$ac_dir/" in
--- 1002,1013 ----
  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  # ./install, which can be erroneously created by make from ./install.sh.
  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+ echo "configure:1006: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!     IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      # Account for people who put trailing slashes in PATH elements.
      case "$ac_dir/" in
***************
*** 974,980 ****
      *)
        # OSF1 and SCO ODT 3.0 have their own names for install.
        for ac_prog in ginstall installbsd scoinst install; do
!         if test -f $ac_dir/$ac_prog; then
  	  if test $ac_prog = install &&
              grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  	    # AIX install.  It has an incompatible calling convention.
--- 1015,1021 ----
      *)
        # OSF1 and SCO ODT 3.0 have their own names for install.
        for ac_prog in ginstall installbsd scoinst install; do
!         if test -x $ac_dir/$ac_prog; then
  	  if test $ac_prog = install &&
              grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  	    # AIX install.  It has an incompatible calling convention.
***************
*** 989,995 ****
        ;;
      esac
    done
!   IFS="$ac_save_ifs"
  
  fi
    if test "${ac_cv_path_install+set}" = set; then
--- 1030,1036 ----
        ;;
      esac
    done
!   IFS="$ac_save_IFS"
  
  fi
    if test "${ac_cv_path_install+set}" = set; then
***************
*** 1013,1028 ****
  # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$RANLIB"; then
    ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        ac_cv_prog_RANLIB="ranlib"
        break
      fi
--- 1054,1070 ----
  # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1058: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$RANLIB"; then
    ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        ac_cv_prog_RANLIB="ranlib"
        break
      fi
***************
*** 1043,1058 ****
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$YACC"; then
    ac_cv_prog_YACC="$YACC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        ac_cv_prog_YACC="$ac_prog"
        break
      fi
--- 1085,1101 ----
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1089: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$YACC"; then
    ac_cv_prog_YACC="$YACC" # Let the user override the test.
  else
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        ac_cv_prog_YACC="$ac_prog"
        break
      fi
***************
*** 1072,1078 ****
  test -n "$YACC" || YACC="yacc"
  
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! set dummy ${MAKE-make}; ac_make=$2
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1115,1122 ----
  test -n "$YACC" || YACC="yacc"
  
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
! echo "configure:1119: checking whether ${MAKE-make} sets \${MAKE}" >&5
! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1101,1106 ****
--- 1145,1151 ----
  # Extract the first word of "perl", so it can be a program name with args.
  set dummy perl; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1149: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_path_perl_path'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1109,1118 ****
    ac_cv_path_perl_path="$perl_path" # Let the user override the test with a path.
    ;;
    *)
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        ac_cv_path_perl_path="$ac_dir/$ac_word"
        break
      fi
--- 1154,1163 ----
    ac_cv_path_perl_path="$perl_path" # Let the user override the test with a path.
    ;;
    *)
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        ac_cv_path_perl_path="$ac_dir/$ac_word"
        break
      fi
***************
*** 1132,1137 ****
--- 1177,1183 ----
  # Extract the first word of "csh", so it can be a program name with args.
  set dummy csh; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+ echo "configure:1181: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_path_csh_path'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1140,1149 ****
    ac_cv_path_csh_path="$csh_path" # Let the user override the test with a path.
    ;;
    *)
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -f $ac_dir/$ac_word; then
        ac_cv_path_csh_path="$ac_dir/$ac_word"
        break
      fi
--- 1186,1195 ----
    ac_cv_path_csh_path="$csh_path" # Let the user override the test with a path.
    ;;
    *)
!   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-;}"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
!     if test -x $ac_dir/$ac_word; then
        ac_cv_path_csh_path="$ac_dir/$ac_word"
        break
      fi
***************
*** 1164,1169 ****
--- 1210,1216 ----
  # Pull the hash mark out of the macro call to avoid m4 problems.
  ac_msg="whether #! works in shell scripts"
  echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
+ echo "configure:1214: checking $ac_msg" >&5
  if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1189,1199 ****
  fi
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1197 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 1236,1247 ----
  fi
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+ echo "configure:1240: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1245 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 1201,1213 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    ac_cv_header_stdc=yes
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    ac_cv_header_stdc=no
  fi
--- 1249,1263 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    ac_cv_header_stdc=yes
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_header_stdc=no
  fi
***************
*** 1216,1222 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1220 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 1266,1272 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1270 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 1234,1240 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1238 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 1284,1290 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1288 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 1255,1261 ****
    :
  else
  cat > conftest.$ac_ext <<EOF
! #line 1259 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1305,1311 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1309 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1266,1280 ****
  exit (0); }
  
  EOF
! { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
! if test -s conftest && (./conftest; exit) 2>/dev/null; then
    :
  else
    ac_cv_header_stdc=no
  fi
- fi
  rm -fr conftest*
  fi
  fi
  
  echo "$ac_t""$ac_cv_header_stdc" 1>&6
--- 1316,1334 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest && (./conftest; exit) 2>/dev/null
! then
    :
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
    ac_cv_header_stdc=no
  fi
  rm -fr conftest*
  fi
+ 
+ fi
  fi
  
  echo "$ac_t""$ac_cv_header_stdc" 1>&6
***************
*** 1289,1312 ****
                   sys/param.h sys/select.h sys/time.h sys/timeb.h \
                   io.h direct.h sys/bsdtypes.h sys/resource.h
  do
! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1299 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
--- 1343,1369 ----
                   sys/param.h sys/select.h sys/time.h sys/timeb.h \
                   io.h direct.h sys/bsdtypes.h sys/resource.h
  do
! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+ echo "configure:1349: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1354 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
    echo "$ac_err" >&5
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=no"
  fi
***************
*** 1314,1320 ****
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
--- 1371,1377 ----
  fi
  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
***************
*** 1324,1335 ****
  fi
  done
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1333 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
--- 1381,1440 ----
  fi
  done
  
+ echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
+ echo "configure:1386: checking for dbm_open in -lgdbm" >&5
+ ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lgdbm  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 1394 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char dbm_open();
+ 
+ int main() {
+ dbm_open()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+     ac_tr_lib=HAVE_LIB`echo gdbm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+   cat >> confdefs.h <<EOF
+ #define $ac_tr_lib 1
+ EOF
+ 
+   LIBS="-lgdbm $LIBS"
+ 
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+ 
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+ echo "configure:1433: checking for sys/wait.h that is POSIX.1 compatible" >&5
  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1438 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
***************
*** 1339,1360 ****
  #ifndef WIFEXITED
  #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  #endif
! int main() { return 0; }
! int t() {
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
    rm -rf conftest*
    ac_cv_header_sys_wait_h=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
--- 1444,1465 ----
  #ifndef WIFEXITED
  #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  #endif
! int main() {
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_header_sys_wait_h=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
***************
*** 1366,1376 ****
  fi
  
  echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1374 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
--- 1471,1482 ----
  fi
  
  echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
+ echo "configure:1475: checking whether stat file-mode macros are broken" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1480 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 1421,1449 ****
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1429 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
  #include <time.h>
! int main() { return 0; }
! int t() {
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
    rm -rf conftest*
    ac_cv_header_time=no
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$ac_cv_header_time" 1>&6
--- 1527,1556 ----
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+ echo "configure:1531: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1536 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
  #include <time.h>
! int main() {
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_header_time=no
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$ac_cv_header_time" 1>&6
***************
*** 1457,1490 ****
  ac_header_dirent=no
  for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  do
! ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1467 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_hdr>
! int main() { return 0; }
! int t() {
  DIR *dirp = 0;
  ; return 0; }
  EOF
! if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_header_dirent_$ac_safe=yes"
  else
    rm -rf conftest*
    eval "ac_cv_header_dirent_$ac_safe=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
--- 1564,1598 ----
  ac_header_dirent=no
  for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  do
! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+ echo "configure:1570: checking for $ac_hdr that defines DIR" >&5
  if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1575 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_hdr>
! int main() {
  DIR *dirp = 0;
  ; return 0; }
  EOF
! if { (eval echo configure:1583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_header_dirent_$ac_safe=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_header_dirent_$ac_safe=no"
  fi
  rm -f conftest*
  fi
  if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_hdr 1
  EOF
***************
*** 1495,1524 ****
  done
  # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  if test $ac_header_dirent = dirent.h; then
! echo $ac_n "checking for -ldir""... $ac_c" 1>&6
! ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldir  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1507 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
! int main() { return 0; }
! int t() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 1603,1634 ----
  done
  # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  if test $ac_header_dirent = dirent.h; then
! echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:1608: checking for opendir in -ldir" >&5
! ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldir  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1616 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
! int main() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 1534,1563 ****
  fi
  
  else
! echo $ac_n "checking for -lx""... $ac_c" 1>&6
! ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lx  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1546 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
! int main() { return 0; }
! int t() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 1644,1675 ----
  fi
  
  else
! echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:1649: checking for opendir in -lx" >&5
! ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lx  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1657 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
! int main() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 1575,1585 ****
  fi
  
  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1583 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
--- 1687,1698 ----
  fi
  
  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+ echo "configure:1691: checking return type of signal handlers" >&5
  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1696 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
***************
*** 1592,1611 ****
  void (*signal ()) ();
  #endif
  
! int main() { return 0; }
! int t() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:1601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_type_signal=void
  else
    rm -rf conftest*
    ac_cv_type_signal=int
  fi
  rm -f conftest*
- 
  fi
  
  echo "$ac_t""$ac_cv_type_signal" 1>&6
--- 1705,1724 ----
  void (*signal ()) ();
  #endif
  
! int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:1713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_type_signal=void
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    ac_cv_type_signal=int
  fi
  rm -f conftest*
  fi
  
  echo "$ac_t""$ac_cv_type_signal" 1>&6
***************
*** 1615,1625 ****
  
  
  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1623 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  EOF
--- 1728,1739 ----
  
  
  echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+ echo "configure:1732: checking for uid_t in sys/types.h" >&5
  if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1737 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  EOF
***************
*** 1648,1666 ****
  fi
  
  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1656 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "mode_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_mode_t=yes
  else
--- 1762,1782 ----
  fi
  
  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+ echo "configure:1766: checking for mode_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1771 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_mode_t=yes
  else
***************
*** 1679,1697 ****
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1687 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "size_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_size_t=yes
  else
--- 1795,1815 ----
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
+ echo "configure:1799: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1804 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_size_t=yes
  else
***************
*** 1710,1728 ****
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1718 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "pid_t" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_pid_t=yes
  else
--- 1828,1848 ----
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+ echo "configure:1832: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1837 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
+ #include <stddef.h>
  #endif
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
!   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    rm -rf conftest*
    ac_cv_type_pid_t=yes
  else
***************
*** 1743,1753 ****
  for ac_func in getwd mkdir rename strdup strstr dup2 strerror valloc waitpid vasprintf strtoul
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1751 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1863,1874 ----
  for ac_func in getwd mkdir rename strdup strstr dup2 strerror valloc waitpid vasprintf strtoul
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:1867: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1872 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1757,1764 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 1878,1884 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 1771,1804 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!   :
  else
    echo "$ac_t""no" 1>&6
  LIBOBJS="$LIBOBJS ${ac_func}.o"
  fi
- 
  done
  
  for ac_func in fchmod fsync ftime mkfifo putenv setvbuf vfork vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1802 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1891,1931 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
!   cat >> confdefs.h <<EOF
! #define $ac_tr_func 1
! EOF
!  
  else
    echo "$ac_t""no" 1>&6
  LIBOBJS="$LIBOBJS ${ac_func}.o"
  fi
  done
  
+ 
  for ac_func in fchmod fsync ftime mkfifo putenv setvbuf vfork vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:1924: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1929 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1808,1815 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 1935,1941 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 1822,1837 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 1948,1965 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
***************
*** 1846,1879 ****
  
  
  echo $ac_n "checking for evidence of shadow passwords""... $ac_c" 1>&6
  if test -f /etc/shadow \
     || test -f /etc/security/passwd.adjunct \
     || test -d /etc/security ; then
    echo "yup"
!   echo $ac_n "checking for -lsec""... $ac_c" 1>&6
! ac_lib_var=`echo sec'_'getspnam | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsec  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1862 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char getspnam();
  
! int main() { return 0; }
! int t() {
  getspnam()
  ; return 0; }
  EOF
! if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 1974,2010 ----
  
  
  echo $ac_n "checking for evidence of shadow passwords""... $ac_c" 1>&6
+ echo "configure:1978: checking for evidence of shadow passwords" >&5
  if test -f /etc/shadow \
     || test -f /etc/security/passwd.adjunct \
     || test -d /etc/security ; then
    echo "yup"
!   echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
! echo "configure:1984: checking for getspnam in -lsec" >&5
! ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsec  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 1992 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char getspnam();
  
! int main() {
  getspnam()
  ; return 0; }
  EOF
! if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 1883,1889 ****
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo sec | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
--- 2014,2021 ----
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
!     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
***************
*** 1897,1907 ****
    for ac_func in getspnam
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1905 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2029,2040 ----
    for ac_func in getspnam
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:2033: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2038 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1911,1918 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2044,2050 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 1925,1940 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 2057,2074 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
***************
*** 1952,1962 ****
  fi
  
  echo $ac_n "checking for re_exec""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_re_exec'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1960 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char re_exec(); below.  */
--- 2086,2097 ----
  fi
  
  echo $ac_n "checking for re_exec""... $ac_c" 1>&6
+ echo "configure:2090: checking for re_exec" >&5
  if eval "test \"`echo '$''{'ac_cv_func_re_exec'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2095 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char re_exec(); below.  */
***************
*** 1966,1973 ****
      builtin and then its argument prototype would still apply.  */
  char re_exec();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2101,2107 ----
      builtin and then its argument prototype would still apply.  */
  char re_exec();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 1980,1995 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_re_exec=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_re_exec=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'re_exec`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
--- 2114,2131 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_re_exec=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_re_exec=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'re_exec`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
***************
*** 1999,2004 ****
--- 2135,2141 ----
  fi
  
  echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
+ echo "configure:2139: checking whether utime accepts a null argument" >&5
  if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2008,2014 ****
    ac_cv_func_utime_null=no
  else
  cat > conftest.$ac_ext <<EOF
! #line 2012 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
--- 2145,2151 ----
    ac_cv_func_utime_null=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 2149 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 2019,2032 ****
  && t.st_mtime - s.st_mtime < 120));
  }
  EOF
! { (eval echo configure:2023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
! if test -s conftest && (./conftest; exit) 2>/dev/null; then
    ac_cv_func_utime_null=yes
  else
    ac_cv_func_utime_null=no
  fi
- fi
  rm -fr conftest*
  rm -f core core.* *.core
  fi
  
--- 2156,2173 ----
  && t.st_mtime - s.st_mtime < 120));
  }
  EOF
! if { (eval echo configure:2160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest && (./conftest; exit) 2>/dev/null
! then
    ac_cv_func_utime_null=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
    ac_cv_func_utime_null=no
  fi
  rm -fr conftest*
+ fi
+ 
  rm -f core core.* *.core
  fi
  
***************
*** 2039,2057 ****
  fi
  
  echo $ac_n "checking for long file names""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_sys_long_file_names=yes
  # Test for long file names in all the places we know might matter:
  #      .		the current directory, where building will happen
- #      /tmp		where it might want to write temporary files
- #      /var/tmp		likewise
- #      /usr/tmp		likewise
  #      $prefix/lib	where we will be installing things
  #      $exec_prefix/lib	likewise
  # eval it to expand exec_prefix.
! for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do
    test -d $ac_dir || continue
    test -w $ac_dir || continue # It is less confusing to not echo anything here.
    (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
--- 2180,2206 ----
  fi
  
  echo $ac_n "checking for long file names""... $ac_c" 1>&6
+ echo "configure:2184: checking for long file names" >&5
  if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_sys_long_file_names=yes
  # Test for long file names in all the places we know might matter:
  #      .		the current directory, where building will happen
  #      $prefix/lib	where we will be installing things
  #      $exec_prefix/lib	likewise
  # eval it to expand exec_prefix.
! #      $TMPDIR		if set, where it might want to write temporary files
! # if $TMPDIR is not set:
! #      /tmp		where it might want to write temporary files
! #      /var/tmp		likewise
! #      /usr/tmp		likewise
! if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
!   ac_tmpdirs="$TMPDIR"
! else
!   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
! fi
! for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
    test -d $ac_dir || continue
    test -w $ac_dir || continue # It is less confusing to not echo anything here.
    (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
***************
*** 2076,2081 ****
--- 2225,2231 ----
  
  
  echo $ac_n "checking for working fnmatch function""... $ac_c" 1>&6
+ echo "configure:2229: checking for working fnmatch function" >&5
  if eval "test \"`echo '$''{'ccvs_cv_sys_working_fnmatch'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2083,2089 ****
    ccvs_cv_sys_working_fnmatch=no
  else
  cat > conftest.$ac_ext <<EOF
! #line 2087 "configure"
  #include "confdefs.h"
  
  #include <fnmatch.h>
--- 2233,2239 ----
    ccvs_cv_sys_working_fnmatch=no
  else
    cat > conftest.$ac_ext <<EOF
! #line 2237 "configure"
  #include "confdefs.h"
  
  #include <fnmatch.h>
***************
*** 2095,2110 ****
  	? 0 : 1);
  }
  EOF
! { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
! if test -s conftest && (./conftest; exit) 2>/dev/null; then
    ccvs_cv_sys_working_fnmatch=yes
  else
    ccvs_cv_sys_working_fnmatch=no
  fi
- fi
  rm -fr conftest*
  fi
  
  if test $ccvs_cv_sys_working_fnmatch = no; then
    LIBOBJS="$LIBOBJS fnmatch.o"
  fi
--- 2245,2264 ----
  	? 0 : 1);
  }
  EOF
! if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest && (./conftest; exit) 2>/dev/null
! then
    ccvs_cv_sys_working_fnmatch=yes
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
    ccvs_cv_sys_working_fnmatch=no
  fi
  rm -fr conftest*
  fi
  
+ fi
+ 
  if test $ccvs_cv_sys_working_fnmatch = no; then
    LIBOBJS="$LIBOBJS fnmatch.o"
  fi
***************
*** 2121,2126 ****
--- 2275,2281 ----
  
  
  echo $ac_n "checking size of long""... $ac_c" 1>&6
+ echo "configure:2279: checking size of long" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2128,2134 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
  cat > conftest.$ac_ext <<EOF
! #line 2132 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
--- 2283,2289 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2287 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
***************
*** 2139,2153 ****
    exit(0);
  }
  EOF
! { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
! if test -s conftest && (./conftest; exit) 2>/dev/null; then
    ac_cv_sizeof_long=`cat conftestval`
  else
    ac_cv_sizeof_long=0
  fi
- fi
  rm -fr conftest*
  fi
  echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  cat >> confdefs.h <<EOF
  #define SIZEOF_LONG $ac_cv_sizeof_long
--- 2294,2312 ----
    exit(0);
  }
  EOF
! if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest && (./conftest; exit) 2>/dev/null
! then
    ac_cv_sizeof_long=`cat conftestval`
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
    ac_cv_sizeof_long=0
  fi
  rm -fr conftest*
  fi
+ 
+ fi
  echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  cat >> confdefs.h <<EOF
  #define SIZEOF_LONG $ac_cv_sizeof_long
***************
*** 2155,2160 ****
--- 2314,2320 ----
  
  
  echo $ac_n "checking size of int""... $ac_c" 1>&6
+ echo "configure:2318: checking size of int" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2162,2168 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
  cat > conftest.$ac_ext <<EOF
! #line 2166 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
--- 2322,2328 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2326 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
***************
*** 2173,2187 ****
    exit(0);
  }
  EOF
! { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
! if test -s conftest && (./conftest; exit) 2>/dev/null; then
    ac_cv_sizeof_int=`cat conftestval`
  else
    ac_cv_sizeof_int=0
  fi
- fi
  rm -fr conftest*
  fi
  echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  cat >> confdefs.h <<EOF
  #define SIZEOF_INT $ac_cv_sizeof_int
--- 2333,2351 ----
    exit(0);
  }
  EOF
! if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest && (./conftest; exit) 2>/dev/null
! then
    ac_cv_sizeof_int=`cat conftestval`
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -fr conftest*
    ac_cv_sizeof_int=0
  fi
  rm -fr conftest*
  fi
+ 
+ fi
  echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  cat >> confdefs.h <<EOF
  #define SIZEOF_INT $ac_cv_sizeof_int
***************
*** 2191,2300 ****
  
  krb_h=
  echo $ac_n "checking for krb.h""... $ac_c" 1>&6
  cat > conftest.$ac_ext <<EOF
! #line 2196 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() { return 0; }
! int t() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    krb_h=yes krb_incdir=
  else
    rm -rf conftest*
    if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
       hold_cflags=$CFLAGS
       CFLAGS="$CFLAGS -I$KRB4/include"
       cat > conftest.$ac_ext <<EOF
! #line 2213 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() { return 0; }
! int t() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    krb_h=yes krb_incdir=$KRB4/include
  fi
  rm -f conftest*
- 
       CFLAGS=$hold_cflags
     fi
  fi
  rm -f conftest*
- 
  if test -z "$krb_h"; then
    cat > conftest.$ac_ext <<EOF
! #line 2234 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() { return 0; }
! int t() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    krb_h=yes krb_incdir=
  else
    rm -rf conftest*
    if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
         hold_cflags=$CFLAGS
         CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
         cat > conftest.$ac_ext <<EOF
! #line 2251 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() { return 0; }
! int t() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    krb_h=yes krb_incdir=$KRB4/include/kerberosIV
  fi
  rm -f conftest*
- 
         CFLAGS=$hold_cflags
       fi
  fi
  rm -f conftest*
- 
  fi
  echo "$ac_t""$krb_h" 1>&6
  
  if test -n "$krb_h"; then
    krb_lib=
!   echo $ac_n "checking for -lkrb""... $ac_c" 1>&6
! ac_lib_var=`echo krb'_'printf | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2283 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() { return 0; }
! int t() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 2355,2469 ----
  
  krb_h=
  echo $ac_n "checking for krb.h""... $ac_c" 1>&6
+ echo "configure:2359: checking for krb.h" >&5
  cat > conftest.$ac_ext <<EOF
! #line 2361 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    krb_h=yes krb_incdir=
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
       hold_cflags=$CFLAGS
       CFLAGS="$CFLAGS -I$KRB4/include"
       cat > conftest.$ac_ext <<EOF
! #line 2379 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    krb_h=yes krb_incdir=$KRB4/include
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
       CFLAGS=$hold_cflags
     fi
  fi
  rm -f conftest*
  if test -z "$krb_h"; then
    cat > conftest.$ac_ext <<EOF
! #line 2400 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    krb_h=yes krb_incdir=
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
         hold_cflags=$CFLAGS
         CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
         cat > conftest.$ac_ext <<EOF
! #line 2418 "configure"
  #include "confdefs.h"
  #include <krb.h>
! int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    krb_h=yes krb_incdir=$KRB4/include/kerberosIV
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
  fi
  rm -f conftest*
         CFLAGS=$hold_cflags
       fi
  fi
  rm -f conftest*
  fi
  echo "$ac_t""$krb_h" 1>&6
  
  if test -n "$krb_h"; then
    krb_lib=
!   echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
! echo "configure:2443: checking for printf in -lkrb" >&5
! ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lkrb  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2451 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2324,2353 ****
      # the user's setting for LDFLAGS
      hold_ldflags=$LDFLAGS
      test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
!     echo $ac_n "checking for -ldes""... $ac_c" 1>&6
! ac_lib_var=`echo des'_'printf | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldes  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2336 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() { return 0; }
! int t() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 2493,2524 ----
      # the user's setting for LDFLAGS
      hold_ldflags=$LDFLAGS
      test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
!     echo $ac_n "checking for printf in -ldes""... $ac_c" 1>&6
! echo "configure:2498: checking for printf in -ldes" >&5
! ac_lib_var=`echo des'_'printf | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldes  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2506 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2372,2382 ****
  for ac_func in krb_get_err_text
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2380 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2543,2554 ----
  for ac_func in krb_get_err_text
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:2547: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2552 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2386,2393 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2558,2564 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2400,2415 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 2571,2588 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
***************
*** 2449,2459 ****
  # it.
  unset ac_cv_func_connect
  echo $ac_n "checking for connect""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2457 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char connect(); below.  */
--- 2622,2633 ----
  # it.
  unset ac_cv_func_connect
  echo $ac_n "checking for connect""... $ac_c" 1>&6
+ echo "configure:2626: checking for connect" >&5
  if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2631 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char connect(); below.  */
***************
*** 2463,2470 ****
      builtin and then its argument prototype would still apply.  */
  char connect();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2637,2643 ----
      builtin and then its argument prototype would still apply.  */
  char connect();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2477,2492 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_connect=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_connect=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
--- 2650,2667 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_connect=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_connect=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
***************
*** 2494,2523 ****
    echo "$ac_t""no" 1>&6
  case "$LIBS" in
  *-lnsl*) ;;
! *) echo $ac_n "checking for -lnsl_s""... $ac_c" 1>&6
! ac_lib_var=`echo nsl_s'_'printf | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl_s  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2506 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() { return 0; }
! int t() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 2669,2700 ----
    echo "$ac_t""no" 1>&6
  case "$LIBS" in
  *-lnsl*) ;;
! *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
! echo "configure:2674: checking for printf in -lnsl_s" >&5
! ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl_s  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2682 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2527,2533 ****
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo nsl_s | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
--- 2704,2711 ----
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
!     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
***************
*** 2541,2570 ****
  esac
  case "$LIBS" in
  *-lnsl*) ;;
! *) echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
! ac_lib_var=`echo nsl'_'printf | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2553 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() { return 0; }
! int t() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 2719,2750 ----
  esac
  case "$LIBS" in
  *-lnsl*) ;;
! *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
! echo "configure:2724: checking for printf in -lnsl" >&5
! ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2732 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char printf();
  
! int main() {
  printf()
  ; return 0; }
  EOF
! if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2574,2580 ****
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
--- 2754,2761 ----
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
!     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
***************
*** 2588,2617 ****
  esac
  case "$LIBS" in
  *-lsocket*) ;;
! *) echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
! ac_lib_var=`echo socket'_'connect | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2600 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char connect();
  
! int main() { return 0; }
! int t() {
  connect()
  ; return 0; }
  EOF
! if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 2769,2800 ----
  esac
  case "$LIBS" in
  *-lsocket*) ;;
! *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
! echo "configure:2774: checking for connect in -lsocket" >&5
! ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2782 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char connect();
  
! int main() {
  connect()
  ; return 0; }
  EOF
! if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2621,2627 ****
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
--- 2804,2811 ----
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
!     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
***************
*** 2635,2664 ****
  esac
  case "$LIBS" in
  *-linet*) ;;
! *) echo $ac_n "checking for -linet""... $ac_c" 1>&6
! ac_lib_var=`echo inet'_'connect | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-linet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2647 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char connect();
  
! int main() { return 0; }
! int t() {
  connect()
  ; return 0; }
  EOF
! if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 2819,2850 ----
  esac
  case "$LIBS" in
  *-linet*) ;;
! *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
! echo "configure:2824: checking for connect in -linet" >&5
! ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-linet  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2832 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char connect();
  
! int main() {
  connect()
  ; return 0; }
  EOF
! if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2668,2674 ****
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo inet | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
--- 2854,2861 ----
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
!     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
***************
*** 2684,2694 ****
  for ac_func in connect
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2692 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2871,2882 ----
  for ac_func in connect
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:2875: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2880 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2698,2705 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2886,2892 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2712,2727 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 2899,2916 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
***************
*** 2738,2748 ****
  
  
  echo $ac_n "checking for gethostname""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2746 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char gethostname(); below.  */
--- 2927,2938 ----
  
  
  echo $ac_n "checking for gethostname""... $ac_c" 1>&6
+ echo "configure:2931: checking for gethostname" >&5
  if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2936 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char gethostname(); below.  */
***************
*** 2752,2759 ****
      builtin and then its argument prototype would still apply.  */
  char gethostname();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 2942,2948 ----
      builtin and then its argument prototype would still apply.  */
  char gethostname();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2766,2781 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_gethostname=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_gethostname=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
--- 2955,2972 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_gethostname=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_gethostname=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
***************
*** 2798,2808 ****
  # Define AUTH_SERVER_SUPPORT only if we could locate the crypt() function
  unset ac_cv_func_crypt
  echo $ac_n "checking for crypt""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2806 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char crypt(); below.  */
--- 2989,3000 ----
  # Define AUTH_SERVER_SUPPORT only if we could locate the crypt() function
  unset ac_cv_func_crypt
  echo $ac_n "checking for crypt""... $ac_c" 1>&6
+ echo "configure:2993: checking for crypt" >&5
  if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2998 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char crypt(); below.  */
***************
*** 2812,2819 ****
      builtin and then its argument prototype would still apply.  */
  char crypt();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 3004,3010 ----
      builtin and then its argument prototype would still apply.  */
  char crypt();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2826,2841 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_crypt=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_crypt=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
--- 3017,3034 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_crypt=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_crypt=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
***************
*** 2843,2872 ****
    echo "$ac_t""no" 1>&6
  case "$LIBS" in
  *-lcrypt*) ;;
! *) echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6
! ac_lib_var=`echo crypt'_'crypt | tr './+\055' '__p_'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypt  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2855 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char crypt();
  
! int main() { return 0; }
! int t() {
  crypt()
  ; return 0; }
  EOF
! if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
--- 3036,3067 ----
    echo "$ac_t""no" 1>&6
  case "$LIBS" in
  *-lcrypt*) ;;
! *) echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
! echo "configure:3041: checking for crypt in -lcrypt" >&5
! ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypt  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3049 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char crypt();
  
! int main() {
  crypt()
  ; return 0; }
  EOF
! if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=no"
  fi
***************
*** 2876,2882 ****
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo crypt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
--- 3071,3078 ----
  fi
  if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    echo "$ac_t""yes" 1>&6
!     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
!     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    cat >> confdefs.h <<EOF
  #define $ac_tr_lib 1
  EOF
***************
*** 2892,2902 ****
  for ac_func in crypt
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2900 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 3088,3099 ----
  for ac_func in crypt
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:3092: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3097 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2906,2913 ****
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() { return 0; }
! int t() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
--- 3103,3109 ----
      builtin and then its argument prototype would still apply.  */
  char $ac_func();
  
! int main() {
  
  /* The GNU C library defines this for functions which it implements
      to always fail with ENOSYS.  Some functions are actually named
***************
*** 2920,2935 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
- 
  fi
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 3116,3133 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -x conftest; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=no"
  fi
  rm -f conftest*
  fi
+ 
  if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    echo "$ac_t""yes" 1>&6
      ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
***************
*** 2976,2986 ****
  # --recheck option to rerun configure.
  #
  EOF
  # Ultrix sh set writes to stderr and can't be redirected directly,
  # and sets the high bit in the cache file unless we assign to the vars.
  (set) 2>&1 |
!   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
!   >> confcache
  if cmp -s $cache_file confcache; then
    :
  else
--- 3174,3198 ----
  # --recheck option to rerun configure.
  #
  EOF
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
  # Ultrix sh set writes to stderr and can't be redirected directly,
  # and sets the high bit in the cache file unless we assign to the vars.
  (set) 2>&1 |
!   case `(ac_space=' '; set) 2>&1` in
!   *ac_space=\ *)
!     # `set' does not quote correctly, so add quotes (double-quote substitution
!     # turns \\\\ into \\, and sed turns \\ into \).
!     sed -n \
!       -e "s/'/'\\\\''/g" \
!       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
!     ;;
!   *)
!     # `set' quotes correctly as required by POSIX, so do not add quotes.
!     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
!     ;;
!   esac >> confcache
  if cmp -s $cache_file confcache; then
    :
  else
***************
*** 3032,3041 ****
  do
    case "\$ac_option" in
    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
!     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
!     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
!     echo "$CONFIG_STATUS generated by autoconf version 2.10"
      exit 0 ;;
    -help | --help | --hel | --he | --h)
      echo "\$ac_cs_usage"; exit 0 ;;
--- 3244,3253 ----
  do
    case "\$ac_option" in
    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
!     echo "running \${CONFIG_SHELL-sh} $0 $ac_configure_args --no-create --no-recursion"
!     exec \${CONFIG_SHELL-sh} $0 $ac_configure_args --no-create --no-recursion ;;
    -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
!     echo "$CONFIG_STATUS generated by autoconf version 2.12"
      exit 0 ;;
    -help | --help | --hel | --he | --h)
      echo "\$ac_cs_usage"; exit 0 ;;
***************
*** 3046,3056 ****
  ac_given_srcdir=$srcdir
  ac_given_INSTALL="$INSTALL"
  
! trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile zlib/Makefile doc/Makefile \
! 	  man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
! 	  contrib/Makefile contrib/elib/Makefile \
! 	  windows-NT/Makefile os2/Makefile macintosh/Makefile vms/Makefile \
! 	  stamp-h config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  EOF
  cat >> $CONFIG_STATUS <<EOF
  
--- 3258,3264 ----
  ac_given_srcdir=$srcdir
  ac_given_INSTALL="$INSTALL"
  
! trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile stamp-h config.h:config.in src/options.h:src/options.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  EOF
  cat >> $CONFIG_STATUS <<EOF
  
***************
*** 3096,3119 ****
  
  CEOF
  EOF
  cat >> $CONFIG_STATUS <<EOF
  
! CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile zlib/Makefile doc/Makefile \
! 	  man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
! 	  contrib/Makefile contrib/elib/Makefile \
! 	  windows-NT/Makefile os2/Makefile macintosh/Makefile vms/Makefile \
! 	  stamp-h"}
  EOF
  cat >> $CONFIG_STATUS <<\EOF
  for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
  
!   # Adjust relative srcdir, etc. for subdirectories.
  
    # Remove last slash and all that follows it.  Not all systems have dirname.
    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
--- 3304,3359 ----
  
  CEOF
  EOF
+ 
+ cat >> $CONFIG_STATUS <<\EOF
+ 
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ ac_file=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=""
+ while $ac_more_lines; do
+   if test $ac_beg -gt 1; then
+     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+   else
+     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+   fi
+   if test ! -s conftest.s$ac_file; then
+     ac_more_lines=false
+     rm -f conftest.s$ac_file
+   else
+     if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f conftest.s$ac_file"
+     else
+       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+     fi
+     ac_file=`expr $ac_file + 1`
+     ac_beg=$ac_end
+     ac_end=`expr $ac_end + $ac_max_sed_cmds`
+   fi
+ done
+ if test -z "$ac_sed_cmds"; then
+   ac_sed_cmds=cat
+ fi
+ EOF
+ 
  cat >> $CONFIG_STATUS <<EOF
  
! CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile stamp-h"}
  EOF
  cat >> $CONFIG_STATUS <<\EOF
  for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
  
!   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  
    # Remove last slash and all that follows it.  Not all systems have dirname.
    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
***************
*** 3141,3146 ****
--- 3381,3387 ----
    [/$]*) INSTALL="$ac_given_INSTALL" ;;
    *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
    esac
+ 
    echo creating "$ac_file"
    rm -f "$ac_file"
    configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
***************
*** 3149,3162 ****
  # $configure_input" ;;
    *) ac_comsub= ;;
    esac
!   sed -e "$ac_comsub
  s%@configure_input@%$configure_input%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
  s%@INSTALL@%$INSTALL%g
! " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  fi; done
! rm -f conftest.subs
  
  # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  # NAME is the cpp macro being defined and VALUE is the value it is being given.
--- 3390,3433 ----
  # $configure_input" ;;
    *) ac_comsub= ;;
    esac
! 
!   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
!   # Replace lines of the form ac_include foo with the contents of foo:
!   # first, from the ac_include lines construct a list of sed
!   # commands to remove them, and include the files; then run sed.
!   # Have to use sed because old (Ultrix, SunOS) awk does not support
!   # getline or system. (Anyway, configure scripts aren't supposed to use awk.)
!   # Use \@...@<cmd> form of sed address because the filename may contain /.
!   # Can't use only one -e and commands {dr foo} because foo has to be last.
!   # Use @e initially instead of -e because GNU echo has a -e option.
!   # Use `X' to mean a bunch of backslashes; this is for FreeBSD.
!   # 
!   # No support for the multiple-output file :-separated stuff.
!   # 
!   file_substs=`sed -n \
! "/^ac_include/s%ac_include[ 	]*\(.*\)%@e 'X@^&@r \1' -e 'X@^&@d'%p" \
!                $ac_given_srcdir/$ac_file_in`
!   if test -n "$file_substs"; then
!     # Change @e back to -e and X@^ to \@^.
!     file_subst_cmd="sed `echo $file_substs \
!                          | sed -e 's/@e/-e/g' -e 's/X@^/\\\@^/g'`"
!   else
!     # If no substitutions and hence no sed commands, don't choke.
!     file_subst_cmd=cat
!   fi
!   # cd into the srcdir because the files being included more or less
!   # must be part of the distribution. I can't find any way to do
!   # variable substitution in the sed commands (so the user could have,
!   # e.g., $top_srcdir in their ac_include line).
!   (cd $ac_given_srcdir && eval $file_subst_cmd $ac_file_in) \
!   | sed -e "$ac_comsub
  s%@configure_input@%$configure_input%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
  s%@INSTALL@%$INSTALL%g
! " | (eval "$ac_sed_cmds") > $ac_file
  fi; done
! rm -f conftest.s*
  
  # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  # NAME is the cpp macro being defined and VALUE is the value it is being given.
***************
*** 3177,3187 ****
  ac_eC=' '
  ac_eD='%g'
  
! CONFIG_HEADERS=${CONFIG_HEADERS-"config.h src/options.h"}
  for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
--- 3448,3464 ----
  ac_eC=' '
  ac_eD='%g'
  
! if test "${CONFIG_HEADERS+set}" != set; then
! EOF
! cat >> $CONFIG_STATUS <<EOF
!   CONFIG_HEADERS="config.h:config.in src/options.h:src/options.in"
! EOF
! cat >> $CONFIG_STATUS <<\EOF
! fi
  for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
!   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    case "$ac_file" in
!   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
         ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    *) ac_file_in="${ac_file}.in" ;;
    esac
***************
*** 3189,3195 ****
    echo creating $ac_file
  
    rm -f conftest.frag conftest.in conftest.out
!   cp $ac_given_srcdir/$ac_file_in conftest.in
  
  EOF
  
--- 3466,3473 ----
    echo creating $ac_file
  
    rm -f conftest.frag conftest.in conftest.out
!   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
!   cat $ac_file_inputs > conftest.in
  
  EOF
  
***************
*** 3217,3224 ****
  
  # Break up conftest.vals because some shells have a limit on
  # the size of here documents, and old seds have small limits too.
- # Maximum number of lines to put in a single here document.
- ac_max_here_lines=12
  
  rm -f conftest.tail
  while :
--- 3495,3500 ----
***************
*** 3260,3270 ****
    fi
  fi; done
  
  
  
  exit 0
  EOF
  chmod +x $CONFIG_STATUS
  rm -fr confdefs* $ac_clean_files
! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  
--- 3536,3554 ----
    fi
  fi; done
  
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
  
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
  
  exit 0
  EOF
  chmod +x $CONFIG_STATUS
+ dtou $CONFIG_STATUS
  rm -fr confdefs* $ac_clean_files
! test "$no_create" = yes || ${CONFIG_SHELL-sh} $CONFIG_STATUS || exit 1
  
+ 
+ echo "configure: warning: You may want to manually disable vfork and mkfifo in config.h" 1>&2
+ echo "configure: warning: as these are no-ops under DOS and using them may break CVS." 1>&2
diff -rwdc cvs-1.9/configure.in gnu/cvs-1.9/configure.in
*** cvs-1.9/configure.in	Mon Sep 30 18:35:24 1996
--- gnu/cvs-1.9/configure.in	Wed Feb 17 23:34:12 1999
***************
*** 2,8 ****
  dnl "$CVSid$"
  AC_INIT(src/cvs.h)
  AC_PREREQ(2.4)dnl Required Autoconf version.
! AC_CONFIG_HEADER(config.h src/options.h)
  
  AC_PROG_CC
  
--- 2,8 ----
  dnl "$CVSid$"
  AC_INIT(src/cvs.h)
  AC_PREREQ(2.4)dnl Required Autoconf version.
! AC_CONFIG_HEADER(config.h:config.in src/options.h:src/options.in)
  
  AC_PROG_CC
  
***************
*** 39,44 ****
--- 39,45 ----
  AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
                   sys/param.h sys/select.h sys/time.h sys/timeb.h \
                   io.h direct.h sys/bsdtypes.h sys/resource.h)
+ AC_CHECK_LIB(gdbm, dbm_open)
  AC_HEADER_SYS_WAIT
  AC_HEADER_STAT
  AC_HEADER_TIME
***************
*** 223,230 ****
    cp ./src/options.h ./src/options.h-SAVED
  )
  
! AC_OUTPUT(Makefile lib/Makefile src/Makefile zlib/Makefile doc/Makefile \
! 	  man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
! 	  contrib/Makefile contrib/elib/Makefile \
! 	  windows-NT/Makefile os2/Makefile macintosh/Makefile vms/Makefile \
! 	  stamp-h)
--- 224,230 ----
    cp ./src/options.h ./src/options.h-SAVED
  )
  
! AC_OUTPUT(Makefile lib/Makefile src/Makefile stamp-h)
! 
! AC_MSG_RESULT(You may want to manually disable 'vfork' and 'mkfifo' in)
! AC_MSG_RESULT( config.h as these are no-ops under DOS and may break CVS)
diff -rwdc cvs-1.9/lib/strippath.c gnu/cvs-1.9/lib/strippath.c
*** cvs-1.9/lib/strippath.c	Sat Dec  3 07:09:38 1994
--- gnu/cvs-1.9/lib/strippath.c	Wed Feb 17 18:28:52 1999
***************
*** 49,55 ****
--- 49,59 ----
    int stripped = 0;
    char *cp, *slash;
  
+ #ifdef __DJGPP__
+   for (cp = path; *(slash = cp + strcspn (cp, "/\\")) != '\0'; cp = slash)
+ #else
    for (cp = path; (slash = strchr(cp, '/')) != NULL; cp = slash)
+ #endif
      {
        *slash = '\0';
        if ((!*cp && (cp != path || stripped)) ||
diff -rwdc cvs-1.9/lib/stripslash.c gnu/cvs-1.9/lib/stripslash.c
*** cvs-1.9/lib/stripslash.c	Sat Dec  3 07:09:38 1994
--- gnu/cvs-1.9/lib/stripslash.c	Wed Feb 17 18:29:02 1999
***************
*** 39,44 ****
    int last;
  
    last = strlen (path) - 1;
!   while (last > 0 && path[last] == '/')
      path[last--] = '\0';
  }
--- 39,48 ----
    int last;
  
    last = strlen (path) - 1;
!   while (last > 0 && (path[last] == '/'
! #ifdef __DJGPP__
! 		      || path[last] == '\\'
! #endif
! 		      ))
      path[last--] = '\0';
  }
diff -rwdc cvs-1.9/lib/system.h gnu/cvs-1.9/lib/system.h
*** cvs-1.9/lib/system.h	Mon Aug 12 17:05:46 1996
--- gnu/cvs-1.9/lib/system.h	Wed Feb 17 18:29:32 1999
***************
*** 159,169 ****
  off_t lseek ();
  #endif
  
! #if TIME_WITH_SYS_TIME
  # include <sys/time.h>
  # include <time.h>
  #else
! # if HAVE_SYS_TIME_H
  #  include <sys/time.h>
  # else
  #  include <time.h>
--- 159,169 ----
  off_t lseek ();
  #endif
  
! #if defined(TIME_WITH_SYS_TIME)
  # include <sys/time.h>
  # include <time.h>
  #else
! # if defined(HAVE_SYS_TIME_H)
  #  include <sys/time.h>
  # else
  #  include <time.h>
***************
*** 286,295 ****
  #  endif
  #endif
  
! #if STDC_HEADERS || HAVE_STRING_H
  #  include <string.h>
     /* An ANSI string.h and pre-ANSI memory.h might conflict. */
! #  if !STDC_HEADERS && HAVE_MEMORY_H
  #    include <memory.h>
  #  endif /* not STDC_HEADERS and HAVE_MEMORY_H */
  #else /* not STDC_HEADERS and not HAVE_STRING_H */
--- 286,295 ----
  #  endif
  #endif
  
! #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
  #  include <string.h>
     /* An ANSI string.h and pre-ANSI memory.h might conflict. */
! #  if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
  #    include <memory.h>
  #  endif /* not STDC_HEADERS and HAVE_MEMORY_H */
  #else /* not STDC_HEADERS and not HAVE_STRING_H */
***************
*** 387,405 ****
  #define R_OK 4
  #endif
  
! #if HAVE_DIRENT_H
  # include <dirent.h>
  # define NAMLEN(dirent) strlen((dirent)->d_name)
  #else
  # define dirent direct
  # define NAMLEN(dirent) (dirent)->d_namlen
! # if HAVE_SYS_NDIR_H
  #  include <sys/ndir.h>
  # endif
! # if HAVE_SYS_DIR_H
  #  include <sys/dir.h>
  # endif
! # if HAVE_NDIR_H
  #  include <ndir.h>
  # endif
  #endif
--- 387,405 ----
  #define R_OK 4
  #endif
  
! #if defined(HAVE_DIRENT_H)
  # include <dirent.h>
  # define NAMLEN(dirent) strlen((dirent)->d_name)
  #else
  # define dirent direct
  # define NAMLEN(dirent) (dirent)->d_namlen
! # if defined(HAVE_SYS_NDIR_H)
  #  include <sys/ndir.h>
  # endif
! # if defined(HAVE_SYS_DIR_H)
  #  include <sys/dir.h>
  # endif
! # if defined(HAVE_NDIR_H)
  #  include <ndir.h>
  # endif
  #endif
***************
*** 480,485 ****
--- 480,488 ----
     case-insensitive system, it would map all alphanumeric characters
     to lower case.  Under Windows NT, / and \ are both path component
     separators, so FOLD_FN_CHAR would map them both to /.  */
+ #ifdef __DJGPP__
+ #define FOLD_FN_CHAR(c) tolower(c)
+ #endif
  #ifndef FOLD_FN_CHAR
  #define FOLD_FN_CHAR(c) (c)
  #define fnfold(filename) (filename)
***************
*** 489,496 ****
--- 492,503 ----
  /* Different file systems have different path component separators.
     For the VMS port we might need to abstract further back than this.  */
  #ifndef ISDIRSEP
+ #ifdef __DJGPP__
+ #define ISDIRSEP(c) (((c) == '/') || ((c) == '\\'))
+ #else
  #define ISDIRSEP(c) ((c) == '/')
  #endif
+ #endif
  
  
  /* On some systems, lines in text files should be terminated with CRLF,
***************
*** 502,508 ****
       untranslated reading.
     - FOPEN_BINARY_WRITE is the string to pass to fopen to get
       untranslated writing.  */
! #if LINES_CRLF_TERMINATED
  #define OPEN_BINARY (O_BINARY)
  #define FOPEN_BINARY_READ ("rb")
  #define FOPEN_BINARY_WRITE ("wb")
--- 509,518 ----
       untranslated reading.
     - FOPEN_BINARY_WRITE is the string to pass to fopen to get
       untranslated writing.  */
! #ifdef __DJGPP__
! #define LINES_CRLF_TERMINATED 1
! #endif
! #if defined(LINES_CRLF_TERMINATED)
  #define OPEN_BINARY (O_BINARY)
  #define FOPEN_BINARY_READ ("rb")
  #define FOPEN_BINARY_WRITE ("wb")
diff -rwdc cvs-1.9/src/Makefile.in gnu/cvs-1.9/src/Makefile.in
*** cvs-1.9/src/Makefile.in	Fri Sep 27 11:32:44 1996
--- gnu/cvs-1.9/src/Makefile.in	Sat Feb 28 14:55:34 1998
***************
*** 63,82 ****
  HEADERS = buffer.h cvs.h rcs.h hash.h myndbm.h \
  	update.h server.h client.h error.h fileattr.h edit.h watch.h
  
! TAGFILES = $(HEADERS) options.h.in $(SOURCES)
  
  DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog-9395 ChangeLog-9194 \
  	    NOTES \
              sanity.sh cvsbug.sh $(TAGFILES) build_src.com
  
! PROGS = cvs cvsbug
  
  DEFS = @DEFS@ @includeopt@
  
  CC	 = @CC@
  CFLAGS = @CFLAGS@
  CPPFLAGS =
! LDFLAGS = @LDFLAGS@
  
  INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
  .c.o:
--- 63,82 ----
  HEADERS = buffer.h cvs.h rcs.h hash.h myndbm.h \
  	update.h server.h client.h error.h fileattr.h edit.h watch.h
  
! TAGFILES = $(HEADERS) options.in $(SOURCES)
  
  DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog-9395 ChangeLog-9194 \
  	    NOTES \
              sanity.sh cvsbug.sh $(TAGFILES) build_src.com
  
! PROGS = cvs.exe # cvsbug
  
  DEFS = @DEFS@ @includeopt@
  
  CC	 = @CC@
  CFLAGS = @CFLAGS@
  CPPFLAGS =
! LDFLAGS = @LDFLAGS@ -lgdbm
  
  INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
  .c.o:
***************
*** 151,160 ****
  
  # Linking rules.
  
! $(PROGS): ../lib/libcvs.a ../zlib/libz.a
  
! cvs: $(OBJECTS)
! 	$(CC) $(OBJECTS) ../lib/libcvs.a ../zlib/libz.a $(LIBS) $(LDFLAGS) -o $@ 
  
  xlint: $(SOURCES)
  	files= ; \
--- 151,160 ----
  
  # Linking rules.
  
! $(PROGS): ../lib/libcvs.a #../zlib/libz.a
  
! cvs.exe: $(OBJECTS)
! 	$(CC) $(OBJECTS) ../lib/libcvs.a $(LIBS) $(LDFLAGS) -o $@ 
  
  xlint: $(SOURCES)
  	files= ; \
***************
*** 191,197 ****
  Makefile: ../config.status Makefile.in
  	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  
! options.h: ../config.status options.h.in
  	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  
  #../config.status: ../configure
--- 191,197 ----
  Makefile: ../config.status Makefile.in
  	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  
! options.h: ../config.status options.in
  	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  
  #../config.status: ../configure
diff -rwdc cvs-1.9/src/add.c gnu/cvs-1.9/src/add.c
*** cvs-1.9/src/add.c	Wed Aug  7 23:46:04 1996
--- gnu/cvs-1.9/src/add.c	Wed Feb 17 17:44:10 1999
***************
*** 125,131 ****
  		free (date);
  	      free (rcsdir);
  
! 	      if (strchr (argv[i], '/') == NULL)
  		  Subdir_Register ((List *) NULL, (char *) NULL, argv[i]);
  	      else
  	      {
--- 125,135 ----
  		free (date);
  	      free (rcsdir);
  
! 	      if ((strchr (argv[i], '/') == NULL)
! #ifdef __DJGPP__
!             && (strchr (argv[i], '\\') == NULL)
! #endif
! 		  )
  		  Subdir_Register ((List *) NULL, (char *) NULL, argv[i]);
  	      else
  	      {
***************
*** 133,138 ****
--- 137,145 ----
  
  		  cp = xstrdup (argv[i]);
  		  b = strrchr (cp, '/');
+ #ifdef __DJGPP__
+ 		  if(b == NULL) b = strchr (cp, '\\');
+ #endif
  		  *b++ = '\0';
  		  Subdir_Register ((List *) NULL, cp, b);
  		  free (cp);
***************
*** 156,162 ****
  
  	user = argv[i];
  	strip_trailing_slashes (user);
! 	if (strchr (user, '/') != NULL)
  	{
  	    error (0, 0,
  	     "cannot add files with '/' in their name; %s not added", user);
--- 163,173 ----
  
  	user = argv[i];
  	strip_trailing_slashes (user);
! 	if ((strchr (user, '/') != NULL)
! #ifdef __DJGPP__
! 	    || (strchr (user, '\\') != NULL)
! #endif
! 	    )
  	{
  	    error (0, 0,
  	     "cannot add files with '/' in their name; %s not added", user);
***************
*** 399,411 ****
      char message[PATH_MAX + 100];
      char *tag, *date;
  
!     if (strchr (dir, '/') != NULL)
      {
  	error (0, 0,
  	       "directory %s not added; must be a direct sub-directory", dir);
  	return (1);
      }
!     if (strcmp (dir, CVSADM) == 0)
      {
  	error (0, 0, "cannot add a `%s' directory", CVSADM);
  	return (1);
--- 410,426 ----
      char message[PATH_MAX + 100];
      char *tag, *date;
  
!     if ((strchr (dir, '/') != NULL)
! #ifdef __DJGPP__
!         || (strchr (dir, '\\') != NULL)
! #endif
! 	)
      {
  	error (0, 0,
  	       "directory %s not added; must be a direct sub-directory", dir);
  	return (1);
      }
!     if (stricmp (dir, CVSADM) == 0)
      {
  	error (0, 0, "cannot add a `%s' directory", CVSADM);
  	return (1);
diff -rwdc cvs-1.9/src/checkout.c gnu/cvs-1.9/src/checkout.c
*** cvs-1.9/src/checkout.c	Tue Sep 17 06:13:00 1996
--- gnu/cvs-1.9/src/checkout.c	Wed Feb 17 17:44:36 1999
***************
*** 405,415 ****
       * attempt to cd to the indicated place.  where then becomes simply the
       * last component
       */
!     if (where != NULL && strchr (where, '/') != NULL)
      {
  	char *slash;
  
  	slash = strrchr (where, '/');
  	*slash = '\0';
  
  	if ( CVS_CHDIR (where) < 0)
--- 405,422 ----
       * attempt to cd to the indicated place.  where then becomes simply the
       * last component
       */
!     if (where != NULL && ((strchr (where, '/') != NULL)
! #ifdef __DJGPP__
! 			  || (strchr (where, '\\') != NULL)
! #endif
! 			  ))
      {
  	char *slash;
  
  	slash = strrchr (where, '/');
+ #ifdef __DJGPP__
+ 	if(slash == NULL) slash = strrchr (where, '\\');
+ #endif
  	*slash = '\0';
  
  	if ( CVS_CHDIR (where) < 0)
***************
*** 452,458 ****
      if (strncmp (current, hardpath, hardpath_len) == 0)
      {
  	if (/* Current is a subdirectory of hardpath.  */
! 	    current[hardpath_len] == '/'
  
  	    /* Current is hardpath itself.  */
  	    || current[hardpath_len] == '\0')
--- 459,465 ----
      if (strncmp (current, hardpath, hardpath_len) == 0)
      {
  	if (/* Current is a subdirectory of hardpath.  */
! 	    ISDIRSEP(current[hardpath_len])
  
  	    /* Current is hardpath itself.  */
  	    || current[hardpath_len] == '\0')
***************
*** 515,521 ****
  	char file[PATH_MAX];
  
  	/* if mfile is really a path, straighten it out first */
! 	if ((cp = strrchr (mfile, '/')) != NULL)
  	{
  	    *cp = 0;
  	    (void) strcat (repository, "/");
--- 522,532 ----
  	char file[PATH_MAX];
  
  	/* if mfile is really a path, straighten it out first */
! 	if ((((cp = strrchr (mfile, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (mfile, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    *cp = 0;
  	    (void) strcat (repository, "/");
***************
*** 543,549 ****
  	    {
  		char *slash;
  
! 		if ((slash = strrchr (mfile, '/')) != NULL)
  		    mwhere = slash + 1;
  		else
  		    mwhere = mfile;
--- 554,564 ----
  	    {
  		char *slash;
  
! 		if ((((slash = strrchr (mfile, '/')) != NULL)
! #ifdef __DJGPP__
! 		     || ((slash = strrchr (mfile, '\\')) != NULL)
! #endif
! 		     ))
  		    mwhere = slash + 1;
  		else
  		    mwhere = mfile;
***************
*** 605,611 ****
       */
      if (shorten && where == NULL)
      {
! 	if ((cp = strrchr (argv[0], '/')) != NULL)
  	{
  	    (void) strcpy (xwhere, cp + 1);
  	    where = xwhere;
--- 620,630 ----
       */
      if (shorten && where == NULL)
      {
! 	if ((((cp = strrchr (argv[0], '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (argv[0], '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    (void) strcpy (xwhere, cp + 1);
  	    where = xwhere;
***************
*** 656,662 ****
--- 675,687 ----
  	 */
  	prepath = xstrdup (repository);
  	cp = strrchr (where, '/');
+ #ifdef __DJGPP__
+ 	if(cp == NULL) cp = strrchr (where, '\\');
+ #endif
  	cp2 = strrchr (prepath, '/');
+ #ifdef __DJGPP__
+ 	if(cp2 == NULL) cp2 = strrchr (prepath, '\\');
+ #endif
  	while (cp != NULL)
  	{
  	    cp = findslash (where, cp - 1);
***************
*** 861,867 ****
      char *start;
      char *p;
  {
!     while (p >= start && *p != '/')
  	p--;
      if (p < start)
  	return (NULL);
--- 886,892 ----
      char *start;
      char *p;
  {
!     while (p >= start && !ISDIRSEP(*p))
  	p--;
      if (p < start)
  	return (NULL);
***************
*** 892,898 ****
      (void) strcpy (path, dir);
      (void) strcpy (path2, realdir);
      for (cp = path, cp2 = path2;
!     (slash = strchr (cp, '/')) != NULL && (slash2 = strchr (cp2, '/')) != NULL;
  	 cp = slash + 1, cp2 = slash2 + 1)
      {
  	*slash = '\0';
--- 917,931 ----
      (void) strcpy (path, dir);
      (void) strcpy (path2, realdir);
      for (cp = path, cp2 = path2;
! 	 (((slash = strchr (cp, '/')) != NULL)
! #ifdef __DJGPP__
! 	  || ((slash = strchr (cp, '\\')) != NULL)
! #endif
! 	  ) && (((slash2 = strchr (cp2, '/')) != NULL)
! #ifdef __DJGPP__
! 		|| ((slash2 = strchr (cp2, '\\')) != NULL)
! #endif
! 	       );
  	 cp = slash + 1, cp2 = slash2 + 1)
      {
  	*slash = '\0';
diff -rwdc cvs-1.9/src/client.c gnu/cvs-1.9/src/client.c
*** cvs-1.9/src/client.c	Fri Oct  4 22:03:06 1996
--- gnu/cvs-1.9/src/client.c	Fri Jul  4 10:46:52 1997
***************
*** 743,749 ****
  	error (1, 0, "server bug: name `%s' doesn't specify file in `%s'",
  	       name, toplevel_repos);
      retval = name + strlen (toplevel_repos) + 1;
!     if (retval[-1] != '/')
  	error (1, 0, "server bug: name `%s' doesn't specify file in `%s'",
  	       name, toplevel_repos);
      return (char *) retval;
--- 743,749 ----
  	error (1, 0, "server bug: name `%s' doesn't specify file in `%s'",
  	       name, toplevel_repos);
      retval = name + strlen (toplevel_repos) + 1;
!     if (!ISDIRSEP(retval[-1]))
  	error (1, 0, "server bug: name `%s' doesn't specify file in `%s'",
  	       name, toplevel_repos);
      return (char *) retval;
***************
*** 814,820 ****
  	else
  	{
  	    short_repos = reposname + strlen (toplevel_repos) + 1;
! 	    if (short_repos[-1] != '/')
  	    {
  		reposdirname_absolute = 1;
  		short_repos = reposname;
--- 814,820 ----
  	else
  	{
  	    short_repos = reposname + strlen (toplevel_repos) + 1;
! 	    if (!ISDIRSEP(short_repos[-1]))
  	    {
  		reposdirname_absolute = 1;
  		short_repos = reposname;
***************
*** 929,937 ****
  		    if (rdirp == NULL)
  			error (0, 0,
  			       "internal error: repository string too short.");
! 		    else
  			rdirp = strchr (rdirp, '/');
  		}
  		else
  		{
  		    /* If there are no more slashes in the dir name,
--- 929,938 ----
  		    if (rdirp == NULL)
  			error (0, 0,
  			       "internal error: repository string too short.");
! 		    else {
  			rdirp = strchr (rdirp, '/');
  		    }
+ 		}
  		else
  		{
  		    /* If there are no more slashes in the dir name,
***************
*** 1045,1051 ****
  	    strcpy (r, reposdirname);
  
  	    r += strlen (r);
! 	    if (r[-1] != '.' || r[-2] != '/')
  	        strcpy (r, "/.");
  
  	    Create_Admin (dir_name, dir_name, repo, (char *) NULL,
--- 1046,1052 ----
  	    strcpy (r, reposdirname);
  
  	    r += strlen (r);
! 	    if (r[-1] != '.' || !ISDIRSEP(r[-2]))
  	        strcpy (r, "/.");
  
  	    Create_Admin (dir_name, dir_name, repo, (char *) NULL,
***************
*** 1340,1346 ****
      {
  	scratch_entries = xstrdup (entries_line);
  
! 	if (scratch_entries[0] != '/')
  	    error (1, 0, "bad entries line `%s' from server", entries_line);
  	user = scratch_entries + 1;
  	if ((cp = strchr (user, '/')) == NULL)
--- 1341,1347 ----
      {
  	scratch_entries = xstrdup (entries_line);
  
! 	if (!(ISDIRSEP(scratch_entries[0]))
  	    error (1, 0, "bad entries line `%s' from server", entries_line);
  	user = scratch_entries + 1;
  	if ((cp = strchr (user, '/')) == NULL)
***************
*** 1898,1912 ****
  		   "server bug: pathname `%s' doesn't specify file in `%s'",
  		   pathname, CVSroot_directory);
  	short_pathname = pathname + strlen (CVSroot_directory) + 1;
! 	if (short_pathname[-1] != '/')
  	    error (1, 0,
  		   "server bug: pathname `%s' doesn't specify file in `%s'",
  		   pathname, CVSroot_directory);
! 	return strchr (short_pathname, '/') == NULL;
      }
      else
      {
! 	return strchr (pathname, '/') == NULL;
      }
  }
  
--- 1899,1913 ----
  		   "server bug: pathname `%s' doesn't specify file in `%s'",
  		   pathname, CVSroot_directory);
  	short_pathname = pathname + strlen (CVSroot_directory) + 1;
! 	if (!(ISDIRSEP(short_pathname[-1]))
  	    error (1, 0,
  		   "server bug: pathname `%s' doesn't specify file in `%s'",
  		   pathname, CVSroot_directory);
! 	return (strchr (short_pathname, '/') == NULL);
      }
      else
      {
! 	return (strchr (pathname, '/') == NULL);
      }
  }
  
***************
*** 2485,2491 ****
  	     * sure it matters what toplevel_repos we get, but it does
  	     * matter that we don't hit the "internal error" code below).
  	     */
! 	    if (update_dir[0] == '/')
  		toplevel_repos = Name_Repository (update_dir, update_dir);
  	    else
  	    {
--- 2486,2492 ----
  	     * sure it matters what toplevel_repos we get, but it does
  	     * matter that we don't hit the "internal error" code below).
  	     */
! 	    if (isabsolute(update_dir[0]))
  		toplevel_repos = Name_Repository (update_dir, update_dir);
  	    else
  	    {
***************
*** 2512,2518 ****
  
  		slashes_in_update_dir = 0;
  		for (p = update_dir; *p != '\0'; ++p)
! 		    if (*p == '/')
  			++slashes_in_update_dir;
  
  		slashes_skipped = 0;
--- 2513,2519 ----
  
  		slashes_in_update_dir = 0;
  		for (p = update_dir; *p != '\0'; ++p)
! 		    if (ISDIRSEP(*p))
  			++slashes_in_update_dir;
  
  		slashes_skipped = 0;
***************
*** 2523,2529 ****
  			error (1, 0,
  			       "internal error: not enough slashes in %s",
  			       repository);
! 		    if (*p == '/')
  			++slashes_skipped;
  		    if (slashes_skipped < slashes_in_update_dir + 1)
  			--p;
--- 2524,2530 ----
  			error (1, 0,
  			       "internal error: not enough slashes in %s",
  			       repository);
! 		    if (ISDIRSEP(*p))
  			++slashes_skipped;
  		    if (slashes_skipped < slashes_in_update_dir + 1)
  			--p;
***************
*** 4398,4410 ****
  	    q = strchr (p, '/');
  	    if (q != NULL)
  		++q;
! 	    if (p[0] == '.' && p[1] == '.' && (p[2] == '\0' || p[2] == '/'))
  	    {
  		--level;
  		if (-level > max_level)
  		    max_level = -level;
  	    }
! 	    else if (p[0] == '.' && (p[1] == '\0' || p[1] == '/'))
  		;
  	    else
  		++level;
--- 4399,4411 ----
  	    q = strchr (p, '/');
  	    if (q != NULL)
  		++q;
! 	    if (p[0] == '.' && p[1] == '.' && (p[2] == '\0' || ISDIRSEP(p[2])))
  	    {
  		--level;
  		if (-level > max_level)
  		    max_level = -level;
  	    }
! 	    else if (p[0] == '.' && (p[1] == '\0' || ISDIRSEP(p[1])))
  		;
  	    else
  		++level;
***************
*** 4461,4467 ****
  		{
  		    char *cp;
  
! 		    if (line[0] != '/')
  			continue;
  		    cp = strchr (line + 1, '/');
  		    if (cp == NULL)
--- 4462,4468 ----
  		{
  		    char *cp;
  
! 		    if (!ISDIRSEP(line[0]))
  			continue;
  		    cp = strchr (line + 1, '/');
  		    if (cp == NULL)
diff -rwdc cvs-1.9/src/commit.c gnu/cvs-1.9/src/commit.c
*** cvs-1.9/src/commit.c	Wed Oct  2 08:03:56 1996
--- gnu/cvs-1.9/src/commit.c	Fri Jul  4 11:01:24 1997
***************
*** 1210,1216 ****
  		     strlen (CVSroot_directory)) != 0)
  	    error (0, 0, "internal error: repository (%s) doesn't begin with root (%s)", repository, CVSroot_directory);
  	p = repository + strlen (CVSroot_directory);
! 	if (*p == '/')
  	    ++p;
  	if (strcmp ("CVSROOT", p) == 0)
  	{
--- 1210,1216 ----
  		     strlen (CVSroot_directory)) != 0)
  	    error (0, 0, "internal error: repository (%s) doesn't begin with root (%s)", repository, CVSroot_directory);
  	p = repository + strlen (CVSroot_directory);
! 	if (ISDIRSEP(*p))
  	    ++p;
  	if (strcmp ("CVSROOT", p) == 0)
  	{
diff -rwdc cvs-1.9/src/cvsrc.c gnu/cvs-1.9/src/cvsrc.c
*** cvs-1.9/src/cvsrc.c	Wed Sep 25 10:17:48 1996
--- gnu/cvs-1.9/src/cvsrc.c	Sat Feb 28 14:39:28 1998
***************
*** 17,23 ****
--- 17,27 ----
  #ifndef	CVSRC_FILENAME
  #define	CVSRC_FILENAME	".cvsrc"
  #endif
+ #ifndef	CVSRC_FILENAME2
+ #define	CVSRC_FILENAME2	"cvs.rc"
+ #endif
  char cvsrc[]  = CVSRC_FILENAME;
+ char cvsrc2[] = CVSRC_FILENAME2;
  
  #define	GROW	10
  
***************
*** 73,79 ****
      strcat (homeinit, "/");
      strcat (homeinit, cvsrc);
  
!     /* if it can't be read, there's no point to continuing */
  
      if (!isreadable (homeinit))
      {
--- 77,92 ----
      strcat (homeinit, "/");
      strcat (homeinit, cvsrc);
  
!     /* if it can't be read, check secondary file */
! 
!     if (!isreadable (homeinit))
!     {
!       strcpy (homeinit, homedir);
!       strcat (homeinit, "/");
!       strcat (homeinit, cvsrc2);
!     }
! 
!     /* if that too can't be read, there's no point to continuing */
  
      if (!isreadable (homeinit))
      {
diff -rwdc cvs-1.9/src/entries.c gnu/cvs-1.9/src/entries.c
*** cvs-1.9/src/entries.c	Wed Aug  7 23:46:24 1996
--- gnu/cvs-1.9/src/entries.c	Wed Feb 17 17:44:46 1999
***************
*** 304,327 ****
  	       Entries file lists all known subdirectories.  */
  	}
  
! 	if (l[0] != '/')
  	    continue;
  
  	user = l + 1;
! 	if ((cp = strchr (user, '/')) == NULL)
! 	    continue;
  	*cp++ = '\0';
  	vn = cp;
! 	if ((cp = strchr (vn, '/')) == NULL)
! 	    continue;
  	*cp++ = '\0';
  	ts = cp;
! 	if ((cp = strchr (ts, '/')) == NULL)
! 	    continue;
  	*cp++ = '\0';
  	options = cp;
! 	if ((cp = strchr (options, '/')) == NULL)
! 	    continue;
  	*cp++ = '\0';
  	tag_or_date = cp;
  	if ((cp = strchr (tag_or_date, '\n')) == NULL)
--- 304,339 ----
  	       Entries file lists all known subdirectories.  */
  	}
  
! 	if (!ISDIRSEP(l[0]))
  	    continue;
  
  	user = l + 1;
! 	if ((((cp = strchr (user, '/')) == NULL)
! #ifdef __DJGPP__
! 	     && ((cp = strchr (user, '\\')) == NULL)
! #endif
! 	     )) continue;
  	*cp++ = '\0';
  	vn = cp;
! 	if ((((cp = strchr (vn, '/')) == NULL)
! #ifdef __DJGPP__
! 	     && ((cp = strchr (vn, '\\')) == NULL)
! #endif
! 	     )) continue;
  	*cp++ = '\0';
  	ts = cp;
! 	if ((((cp = strchr (ts, '/')) == NULL)
! #ifdef __DJGPP__
! 	     && ((cp = strchr (ts, '\\')) == NULL)
! #endif
! 	     )) continue;
  	*cp++ = '\0';
  	options = cp;
! 	if ((((cp = strchr (options, '/')) == NULL)
! #ifdef __DJGPP__
! 	     && ((cp = strchr (options, '\\')) == NULL)
! #endif
! 	     )) continue;
  	*cp++ = '\0';
  	tag_or_date = cp;
  	if ((cp = strchr (tag_or_date, '\n')) == NULL)
diff -rwdc cvs-1.9/src/error.c gnu/cvs-1.9/src/error.c
*** cvs-1.9/src/error.c	Mon Sep 30 18:35:42 1996
--- gnu/cvs-1.9/src/error.c	Thu Jul  3 21:34:24 1997
***************
*** 216,222 ****
     Exit with status EXIT_FAILURE if STATUS is nonzero.  */
  /* VARARGS */
  void
! #if defined (HAVE_VPRINTF) && ((__STDC__ - 0) > 0)
  fperror (FILE *fp, int status, int errnum, char *message, ...)
  #else
  fperror (fp, status, errnum, message, va_alist)
--- 216,222 ----
     Exit with status EXIT_FAILURE if STATUS is nonzero.  */
  /* VARARGS */
  void
! #if defined (HAVE_VPRINTF) && defined(__STDC__)
  fperror (FILE *fp, int status, int errnum, char *message, ...)
  #else
  fperror (fp, status, errnum, message, va_alist)
diff -rwdc cvs-1.9/src/expand_path.c gnu/cvs-1.9/src/expand_path.c
*** cvs-1.9/src/expand_path.c	Wed Jul 24 17:21:48 1996
--- gnu/cvs-1.9/src/expand_path.c	Thu Jul  3 20:27:16 1997
***************
*** 138,149 ****
      {
  	char *t;
  	char *p=s;
! 	if (*s=='/' || *s==0)
  	    t = get_homedir ();
  	else
  	{
  	    struct passwd *ps;
! 	    for (; *p!='/' && *p; p++)
  		;
  	    *p = 0;
  	    ps = getpwnam (s);
--- 138,149 ----
      {
  	char *t;
  	char *p=s;
! 	if (ISDIRSEP(*s) || *s == 0)
  	    t = get_homedir ();
  	else
  	{
  	    struct passwd *ps;
! 	    for (; *p && !ISDIRSEP(*p); p++)
  		;
  	    *p = 0;
  	    ps = getpwnam (s);
diff -rwdc cvs-1.9/src/filesubr.c gnu/cvs-1.9/src/filesubr.c
*** cvs-1.9/src/filesubr.c	Wed Sep 25 16:42:48 1996
--- gnu/cvs-1.9/src/filesubr.c	Wed Feb 17 17:43:42 1999
***************
*** 22,27 ****
--- 22,28 ----
     file system semantics.  */
  
  #include "cvs.h"
+ #include <io.h>
  
  /*
   * I don't know of a convenient way to test this at configure time, or else
***************
*** 55,65 ****
--- 56,77 ----
      if (noexec)
  	return;
  
+ #ifdef __DJGPP__
+     /* Under DOS, binary I/O when copying is always safer */
+     if ((fdin = open (from, O_RDONLY | O_BINARY)) < 0)
+ #else
      if ((fdin = open (from, O_RDONLY)) < 0)
+ #endif
        error (1, errno, "cannot open %s for copying", from);
      if (fstat (fdin, &sb) < 0)
        error (1, errno, "cannot fstat %s", from);
+ #ifdef __DJGPP__
+     /* We need binary I/O, so creat can't be used */
+     if ((fdout = open (to, O_CREAT | O_TRUNC | O_RDWR | O_BINARY,
+                        (int) sb.st_mode & 07777)) < 0)
+ #else
      if ((fdout = creat (to, (int) sb.st_mode & 07777)) < 0)
+ #endif
  	error (1, errno, "cannot create %s for copying", to);
      if (sb.st_size > 0)
      {
***************
*** 280,287 ****
  	error (0, errno, "cannot make path to %s", name);
  	return;
      }
!     if ((cp = strrchr (name, '/')) == NULL)
! 	return;
      *cp = '\0';
      make_directories (name);
      *cp++ = '/';
--- 292,302 ----
  	error (0, errno, "cannot make path to %s", name);
  	return;
      }
!     if (((cp = strrchr (name, '/')) == NULL)
! #ifdef __DJGPP__
!         && ((cp = strrchr (name, '\\')) == NULL)
! #endif
! 	) return;
      *cp = '\0';
      make_directories (name);
      *cp++ = '/';
***************
*** 354,359 ****
--- 369,387 ----
  	error (0, errno, "cannot change mode of file %s", fname);
  }
  
+ #ifdef __DJGPP__
+ /* Read the value of a symbolic link.
+    Under Windows NT and DOS, this function always returns EINVAL.  */
+ /* For DJGPP, a patch to use the fake links used by the RCS port may be
+    appropriate */
+ int
+ readlink (char *path, char *buf, int buf_size)
+ {
+     errno = EINVAL;
+     return -1;
+ }
+ #endif
+ 
  /*
   * Rename a file and die if it fails
   */
***************
*** 561,569 ****
--- 589,606 ----
      int fd1, fd2;
      int ret;
  
+ #ifdef __DJGPP__
+     // We _probably_ want to compare in binary
+     if ((fd1 = open (file1, O_RDONLY | O_BINARY)) < 0)
+ #else
      if ((fd1 = open (file1, O_RDONLY)) < 0)
+ #endif
        error (1, errno, "cannot open file %s for comparing", file1);
+ #ifdef __DJGPP__
+     if ((fd2 = open (file2, O_RDONLY | O_BINARY)) < 0)
+ #else
      if ((fd2 = open (file2, O_RDONLY)) < 0)
+ #endif
        error (1, errno, "cannot open file %s for comparing", file2);
      if (fstat (fd1, &sb1) < 0)
  	error (1, errno, "cannot fstat %s", file1);
***************
*** 648,660 ****
  }
  #endif
  
  /* Return non-zero iff FILENAME is absolute.
     Trivial under Unix, but more complicated under other systems.  */
  int
  isabsolute (filename)
      const char *filename;
  {
!     return filename[0] == '/';
  }
  
  
--- 685,737 ----
  }
  #endif
  
+ #ifdef __DJGPP__
+ /* Fold characters in FILENAME to their canonical forms.  
+    If FOLD_FN_CHAR is not #defined, the system provides a default
+    definition for this.  */
+ /* For DJGPP, _fixpath() might be appropriate here */
+ void
+ fnfold (char *filename)
+ {
+     while (*filename)
+     {
+         *filename = tolower(*filename);
+         if(*filename == '\\') *filename = '/';
+         ++filename;
+     }
+ }
+ 
+ /* Like strcmp, but with the appropriate tweaks for file names.
+    Under djgpp/Win32, filenames are case-insensitive but case-preserving,
+    and both \ and / are path element separators.  */
+ int
+ fncmp (const char *n1, const char *n2)
+ {
+ char* o1 = xstrdup(n1);
+ char* o2 = xstrdup(n2);
+ int ret;
+   fnfold(o1);
+   fnfold(o2);
+   ret = strcmp(o1, o2);
+   free(o1);
+   free(o2);
+   return ret;
+ }
+ #endif
+ 
  /* Return non-zero iff FILENAME is absolute.
     Trivial under Unix, but more complicated under other systems.  */
  int
  isabsolute (filename)
      const char *filename;
  {
!     return (ISDIRSEP (filename[0])
! #ifdef __DJGPP__
! 	    // drive:path is also acceptable
!             || (isalpha(filename[0]) && filename[1] == ':'
!                 && ISDIRSEP (filename[2]))
! #endif
! 	    );
  }
  
  
***************
*** 663,669 ****
  last_component (path)
      char *path;
  {
!     char *last = strrchr (path, '/');
  
      if (last)
          return last + 1;
--- 740,750 ----
  last_component (path)
      char *path;
  {
!   char *last = 0;
!     last = strrchr (path, '/');
! #ifdef __DJGPP__
!     if(last == NULL) last = strrchr (path, '\\');
! #endif
  
      if (last)
          return last + 1;
diff -rwdc cvs-1.9/src/find_names.c gnu/cvs-1.9/src/find_names.c
*** cvs-1.9/src/find_names.c	Wed Aug  7 23:46:26 1996
--- gnu/cvs-1.9/src/find_names.c	Sat Feb 28 14:19:10 1998
***************
*** 304,312 ****
      {
  	if (strcmp (dp->d_name, ".") == 0 ||
  	    strcmp (dp->d_name, "..") == 0 ||
! 	    strcmp (dp->d_name, CVSATTIC) == 0 ||
! 	    strcmp (dp->d_name, CVSLCK) == 0 ||
! 	    strcmp (dp->d_name, CVSREP) == 0)
  	    continue;
  
  	/* findnode() is going to be significantly faster than stat()
--- 304,312 ----
      {
  	if (strcmp (dp->d_name, ".") == 0 ||
  	    strcmp (dp->d_name, "..") == 0 ||
! 	    stricmp (dp->d_name, CVSATTIC) == 0 ||
! 	    stricmp (dp->d_name, CVSLCK) == 0 ||
! 	    stricmp (dp->d_name, CVSREP) == 0)
  	    continue;
  
  	/* findnode() is going to be significantly faster than stat()
diff -rwdc cvs-1.9/src/history.c gnu/cvs-1.9/src/history.c
*** cvs-1.9/src/history.c	Wed Aug 14 07:12:30 1996
--- gnu/cvs-1.9/src/history.c	Wed Feb 17 17:44:58 1999
***************
*** 1245,1251 ****
  		}
  		else
  		{
! 		    if (strchr (cp, '/'))
  		    {
  			(void) sprintf (cp2 = cmpfile, "%s/%s",
  					hr->repos, hr->file);
--- 1245,1255 ----
  		}
  		else
  		{
! 		    if ((strchr (cp, '/') != NULL)
! #ifdef __DJGPP__
! 			|| (strchr (cp, '\\') != NULL)
! #endif
! 			)
  		    {
  			(void) sprintf (cp2 = cmpfile, "%s/%s",
  					hr->repos, hr->file);
***************
*** 1328,1334 ****
  
  	ty = *(lr->type);
  	(void) strcpy (repos, lr->repos);
! 	if ((cp = strrchr (repos, '/')) != NULL)
  	{
  	    if (lr->mod && !strcmp (++cp, lr->mod))
  	    {
--- 1332,1342 ----
  
  	ty = *(lr->type);
  	(void) strcpy (repos, lr->repos);
! 	if ((((cp = strrchr (repos, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (repos, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    if (lr->mod && !strcmp (++cp, lr->mod))
  	    {
***************
*** 1380,1386 ****
  		  user_len, lr->user);
  
  	(void) sprintf (workdir, "%s%s", lr->dir, lr->end);
! 	if ((cp = strrchr (workdir, '/')) != NULL)
  	{
  	    if (lr->mod && !strcmp (++cp, lr->mod))
  	    {
--- 1388,1398 ----
  		  user_len, lr->user);
  
  	(void) sprintf (workdir, "%s%s", lr->dir, lr->end);
! 	if ((((cp = strrchr (workdir, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (workdir, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    if (lr->mod && !strcmp (++cp, lr->mod))
  	    {
***************
*** 1388,1394 ****
  	    }
  	}
  	(void) strcpy (repos, lr->repos);
! 	if ((cp = strrchr (repos, '/')) != NULL)
  	{
  	    if (lr->mod && !strcmp (++cp, lr->mod))
  	    {
--- 1400,1410 ----
  	    }
  	}
  	(void) strcpy (repos, lr->repos);
! 	if ((((cp = strrchr (repos, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (repos, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    if (lr->mod && !strcmp (++cp, lr->mod))
  	    {
diff -rwdc cvs-1.9/src/ignore.c gnu/cvs-1.9/src/ignore.c
*** cvs-1.9/src/ignore.c	Wed Sep 25 07:43:16 1996
--- gnu/cvs-1.9/src/ignore.c	Wed Feb 17 17:19:38 1999
***************
*** 12,33 ****
   *	    element forever, unless a "!" clears it out.
   */
  
! static char **ign_list;			/* List of files to ignore in update
! 					 * and import */
  static char **s_ign_list = NULL;
  static int ign_count;			/* Number of active entries */
  static int s_ign_count = 0;
! static int ign_size;			/* This many slots available (plus
! 					 * one for a NULL) */
! static int ign_hold = -1;		/* Index where first "temporary" item
! 					 * is held */
  
  const char *ign_default = ". .. core RCSLOG tags TAGS RCS SCCS .make.state\
   .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
   *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$";
  
! #define IGN_GROW 16			/* grow the list by 16 elements at a
! 					 * time */
  
  /* Nonzero if we have encountered an -I ! directive, which means one should
     no longer ask the server about what is in CVSROOTADM_IGNORE.  */
--- 12,40 ----
   *          element forever, unless a "!" clears it out.
   */
  
! static char **ign_list;		/* List of files to ignore in update and import */
  static char **s_ign_list = NULL;
  static int ign_count;		/* Number of active entries */
  static int s_ign_count = 0;
! static int ign_size;		/* This many slots available (plus one for a NULL) */
! static int ign_hold = -1;	/* Index where first "temporary" item is held */
  
+ #ifdef __DJGPP__
+ /* We need to be case-insensitive, so we use only lowercase stuff here. 
+    An uppercased version of this string is also added to the ignore list.
+    Admittedly, we _could_ omit some names as they aren't likely to appear on
+    MS-DOS, but better safe than sorry.
+  */
+ const char *ign_default = ". .. core rcslog tags rcs sccs .make.state\
+  .nse_depinfo #* .#* cvslog.* ,* cvs cvs.adm .del-* *.a *.olb *.o *.obj\
+  *.so *.z *~ *.old *.elc *.ln *.bak *.bak *.orig *.rej *.exe _$* *$";
+ #else
  const char *ign_default = ". .. core RCSLOG tags TAGS RCS SCCS .make.state\
   .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
   *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$";
+ #endif
  
! #define IGN_GROW 16		/* grow the list by 16 elements at a time */
  
  /* Nonzero if we have encountered an -I ! directive, which means one should
     no longer ask the server about what is in CVSROOTADM_IGNORE.  */
***************
*** 52,57 ****
--- 59,71 ----
    tmp = xstrdup (ign_default);
    ign_add (tmp, 0);
    free (tmp);
+ #ifdef __DJGPP__
+   /* Add uppercase versions as well */
+   tmp = xstrdup (ign_default);
+   strupr (tmp);
+   ign_add (tmp, 0);
+   free (tmp);
+ #endif
  
  #ifdef CLIENT_SUPPORT
    /* The client handles another way, by (after it does its own ignore file
***************
*** 289,295 ****
  static int dir_ign_current = 0;
  
  /* add a directory to list of dirs to ignore */
! void ign_dir_add (name)
       char *name;
  {
    /* make sure we've got the space for the entry */
--- 303,310 ----
  static int dir_ign_current = 0;
  
  /* add a directory to list of dirs to ignore */
! void 
! ign_dir_add (name)
       char *name;
  {
    /* make sure we've got the space for the entry */
***************
*** 309,315 ****
   * the list of directories to ignore
   */
  
! int ignore_directory (name)
       char *name;
  {
    int i;
--- 324,331 ----
   * the list of directories to ignore
   */
  
! int 
! ignore_directory (name)
       char *name;
  {
    int i;
diff -rwdc cvs-1.9/src/import.c gnu/cvs-1.9/src/import.c
*** cvs-1.9/src/import.c	Wed Oct  2 08:04:00 1996
--- gnu/cvs-1.9/src/import.c	Wed Feb 17 17:45:08 1999
***************
*** 354,360 ****
  	    /* CVS directories are created in the temp directory by
  	       server.c because it doesn't special-case import.  So
  	       don't print a message about them, regardless of -I!.  */
! 	    if (server_active && strcmp (dp->d_name, CVSADM) == 0)
  		continue;
  #endif
  	    if (ign_name (dp->d_name))
--- 354,360 ----
  	    /* CVS directories are created in the temp directory by
  	       server.c because it doesn't special-case import.  So
  	       don't print a message about them, regardless of -I!.  */
! 	    if (server_active && stricmp (dp->d_name, CVSADM) == 0)
  		continue;
  #endif
  	    if (ign_name (dp->d_name))
***************
*** 907,913 ****
--- 907,916 ----
        error (0, errno, "ERROR: cannot read file %s", userfile);
        goto read_error;
      }
+     if (local_opt && strcmp (local_opt, "b") == 0)
        fprcs = CVS_FOPEN (rcs, "w+b");
+     else
+       fprcs = CVS_FOPEN (rcs, "w+");
      if (fprcs == NULL)
      {
        ierrno = errno;
***************
*** 1235,1242 ****
      }
      err = import_descend (message, vtag, targc, targv);
    out:
!     if ((cp = strrchr (repository, '/')) != NULL)
! 	*cp = '\0';
      else
  	repository[0] = '\0';
      if (restore_cwd (&cwd, NULL))
--- 1238,1248 ----
      }
      err = import_descend (message, vtag, targc, targv);
    out:
!     if ((((cp = strrchr (repository, '/')) != NULL)
! #ifdef __DJGPP__
! 	 || ((cp = strrchr (repository, '\\')) != NULL)
! #endif
! 	 )) *cp = '\0';
      else
  	repository[0] = '\0';
      if (restore_cwd (&cwd, NULL))
diff -rwdc cvs-1.9/src/main.c gnu/cvs-1.9/src/main.c
*** cvs-1.9/src/main.c	Wed Oct  2 08:04:02 1996
--- gnu/cvs-1.9/src/main.c	Wed Feb 17 17:32:54 1999
***************
*** 323,328 ****
--- 323,339 ----
          don't use it. */
      int option_index = 0;
      int need_to_create_root = 0;
+ #ifdef __DJGPP__
+     // With this enabled, a non-DJGPP CVS (eg a Linux CVS) will have problems
+     //  correctly accessing your repository.
+     // With this disabled, there may still be cases where a file is treated
+     //  incorrectly. Any info on where in the code text/binary issues arise and
+     //  are not solved is appreciated (mail me: zastai@hotmail.com).
+     // Who knows: this hack may yet evolve into a gen-u-wine port!
+ 
+     //    extern int _fmode;
+     //    _fmode = O_BINARY;
+ #endif
  
      error_set_cleanup (error_cleanup);
  
***************
*** 778,784 ****
  	    int len = strlen (Rcsbin);
  	    char *rcsbin;
  
! 	    if (Rcsbin[len - 1] != '/')
  	    {
  		rcsbin = Rcsbin;
  		Rcsbin = xmalloc (len + 2);	/* one for '/', one for NULL */
--- 789,795 ----
  	    int len = strlen (Rcsbin);
  	    char *rcsbin;
  
! 	    if (!ISDIRSEP(Rcsbin[len - 1]))
  	    {
  		rcsbin = Rcsbin;
  		Rcsbin = xmalloc (len + 2);	/* one for '/', one for NULL */
diff -rwdc cvs-1.9/src/mkmodules.c gnu/cvs-1.9/src/mkmodules.c
*** cvs-1.9/src/mkmodules.c	Mon Aug 26 20:18:06 1996
--- gnu/cvs-1.9/src/mkmodules.c	Fri Jul 11 14:23:52 1997
***************
*** 16,22 ****
  static void make_tempfile PROTO((char *temp));
  static void rename_rcsfile PROTO((char *temp, char *real));
  
! #ifndef MY_NDBM
  static void rename_dbmfile PROTO((char *temp));
  static void write_dbmfile PROTO((char *temp));
  #endif				/* !MY_NDBM */
--- 16,22 ----
  static void make_tempfile PROTO((char *temp));
  static void rename_rcsfile PROTO((char *temp, char *real));
  
! #if !defined(MY_NDBM)
  static void rename_dbmfile PROTO((char *temp));
  static void write_dbmfile PROTO((char *temp));
  #endif				/* !MY_NDBM */
***************
*** 280,286 ****
      /* FIXME: arbitrary limit */
      char temp[PATH_MAX];
      char *cp, *last, *fname;
! #ifdef MY_NDBM
      DBM *db;
  #endif
      FILE *fp;
--- 280,286 ----
      /* FIXME: arbitrary limit */
      char temp[PATH_MAX];
      char *cp, *last, *fname;
! #if defined(MY_NDBM)
      DBM *db;
  #endif
      FILE *fp;
***************
*** 302,308 ****
      {
  
  	case 0:			/* everything ok */
! #ifdef MY_NDBM
  	    /* open it, to generate any duplicate errors */
  	    if ((db = dbm_open (temp, O_RDONLY, 0666)) != NULL)
  		dbm_close (db);
--- 302,308 ----
      {
  
  	case 0:			/* everything ok */
! #if defined(MY_NDBM)
  	  /* open it, to generate any duplicate errors */
  	  if ((db = dbm_open (temp, O_RDONLY, 0666)) != NULL)
  	    dbm_close (db);
***************
*** 443,449 ****
      return (retcode);
  }
  
! #ifndef MY_NDBM
  
  static void
  write_dbmfile (temp)
--- 443,449 ----
      return (retcode);
  }
  
! #if !defined(MY_NDBM)
  
  static void
  write_dbmfile (temp)
***************
*** 615,620 ****
--- 615,621 ----
      int argc;
      char **argv;
  {
+     struct saved_cwd cwd;
      /* Name of CVSROOT directory.  */
      char *adm;
      /* Name of this administrative file.  */
***************
*** 624,629 ****
--- 625,633 ----
  
      const struct admin_file *fileptr;
  
+     if (save_cwd (&cwd))
+ 	exit (EXIT_FAILURE);
+ 
      umask (cvsumask);
  
      if (argc == -1 || argc > 1)
***************
*** 720,725 ****
--- 724,733 ----
      free (info_v);
  
      mkmodules (adm);
+ 
+     if (restore_cwd (&cwd, NULL))
+ 	exit (EXIT_FAILURE);
+     free_cwd (&cwd);
  
      free (adm);
      return 0;
diff -rwdc cvs-1.9/src/modules.c gnu/cvs-1.9/src/modules.c
*** cvs-1.9/src/modules.c	Tue Jul  9 17:20:30 1996
--- gnu/cvs-1.9/src/modules.c	Wed Feb 17 17:45:16 1999
***************
*** 201,207 ****
  	/* check to see if mname is a directory or file */
  
  	(void) sprintf (file, "%s/%s", CVSroot_directory, mname);
! 	if ((acp = strrchr (mname, '/')) != NULL)
  	{
  	    *acp = '\0';
  	    (void) sprintf (attic_file, "%s/%s/%s/%s%s", CVSroot_directory,
--- 201,211 ----
  	/* check to see if mname is a directory or file */
  
  	(void) sprintf (file, "%s/%s", CVSroot_directory, mname);
! 	if ((((acp = strrchr (mname, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((acp = strrchr (mname, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    *acp = '\0';
  	    (void) sprintf (attic_file, "%s/%s/%s/%s%s", CVSroot_directory,
***************
*** 223,235 ****
  	    if (isfile (file) || isfile (attic_file))
  	    {
  		/* if mname was a file, we have to split it into "dir file" */
! 		if ((cp = strrchr (mname, '/')) != NULL && cp != mname)
  		{
  		    char *slashp;
  
  		    /* put the ' ' in a copy so we don't mess up the original */
  		    value = strcpy (xvalue, mname);
  		    slashp = strrchr (value, '/');
  		    *slashp = ' ';
  		}
  		else
--- 227,246 ----
  	    if (isfile (file) || isfile (attic_file))
  	    {
  		/* if mname was a file, we have to split it into "dir file" */
! 		  if ((((cp = strrchr (mname, '/')) != NULL)
! #ifdef __DJGPP__
! 		       || ((cp = strrchr (mname, '\\')) != NULL)
! #endif
! 		       ) && cp != mname)
  		{
  		    char *slashp;
  
  		    /* put the ' ' in a copy so we don't mess up the original */
  		    value = strcpy (xvalue, mname);
  		    slashp = strrchr (value, '/');
+ #ifdef __DJGPP__
+ 		    if(slashp == NULL) slashp = strrchr (value, '\\');
+ #endif
  		    *slashp = ' ';
  		}
  		else
***************
*** 258,264 ****
      }
  
      /* look up everything to the first / as a module */
!     if (mname[0] != '/' && (cp = strchr (mname, '/')) != NULL)
      {
  	/* Make the slash the new end of the string temporarily */
  	*cp = '\0';
--- 269,279 ----
      }
  
      /* look up everything to the first / as a module */
!     if (!ISDIRSEP(mname[0]) && (((cp = strchr (mname, '/')) != NULL)
! #ifdef __DJGPP__
! 				|| ((cp = strchr (mname, '\\')) != NULL)
! #endif
! 				))
      {
  	/* Make the slash the new end of the string temporarily */
  	*cp = '\0';
***************
*** 606,612 ****
  	    char *real_where = (where != NULL ? where : mwhere);
  	    char *expanded_path;
  
! 	    if ((*prog != '/') && (*prog != '.'))
  	    {
  		(void) sprintf (real_prog, "%s/%s", real_where, prog);
  		if (isfile (real_prog))
--- 621,627 ----
  	    char *real_where = (where != NULL ? where : mwhere);
  	    char *expanded_path;
  
! 	    if ((!ISDIRSEP(*prog)) && (*prog != '.'))
  	    {
  		(void) sprintf (real_prog, "%s/%s", real_where, prog);
  		if (isfile (real_prog))
diff -rwdc cvs-1.9/src/patch.c gnu/cvs-1.9/src/patch.c
*** cvs-1.9/src/patch.c	Wed Oct  2 08:04:02 1996
--- gnu/cvs-1.9/src/patch.c	Wed Feb 17 17:45:24 1999
***************
*** 267,273 ****
  	char path[PATH_MAX];
  
  	/* if the portion of the module is a path, put the dir part on repos */
! 	if ((cp = strrchr (mfile, '/')) != NULL)
  	{
  	    *cp = '\0';
  	    (void) strcat (repository, "/");
--- 267,277 ----
  	char path[PATH_MAX];
  
  	/* if the portion of the module is a path, put the dir part on repos */
! 	if ((((cp = strrchr (mfile, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (mfile, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    *cp = '\0';
  	    (void) strcat (repository, "/");
diff -rwdc cvs-1.9/src/repos.c gnu/cvs-1.9/src/repos.c
*** cvs-1.9/src/repos.c	Tue Jul 23 17:13:28 1996
--- gnu/cvs-1.9/src/repos.c	Thu Jul  3 20:34:46 1997
***************
*** 127,133 ****
  		 strlen (CVSroot_directory)) == 0)
      {
  	char *rep = repository + strlen (CVSroot_directory);
! 	return (*rep == '/') ? rep+1 : rep;
      }
      else
  	return (repository);
--- 127,133 ----
  		 strlen (CVSroot_directory)) == 0)
      {
  	char *rep = repository + strlen (CVSroot_directory);
! 	return (ISDIRSEP(*rep)) ? rep+1 : rep;
      }
      else
  	return (repository);
diff -rwdc cvs-1.9/src/root.c gnu/cvs-1.9/src/root.c
*** cvs-1.9/src/root.c	Thu Sep  5 21:16:06 1996
--- gnu/cvs-1.9/src/root.c	Wed Feb 17 17:34:18 1999
***************
*** 88,94 ****
      if ((strchr (root, ':') == NULL)
      	&& ! isabsolute (root))
  #else /* ! CLIENT_SUPPORT */
!     if (root[0] != '/')
  #endif /* CLIENT_SUPPORT */
      {
  	error (0, 0, "in directory %s:", xupdate_dir);
--- 88,94 ----
      if ((strchr (root, ':') == NULL)
      	&& ! isabsolute (root))
  #else /* ! CLIENT_SUPPORT */
!     if (!isabsolute (root))
  #endif /* CLIENT_SUPPORT */
      {
  	error (0, 0, "in directory %s:", xupdate_dir);
***************
*** 201,206 ****
--- 201,219 ----
  parse_cvsroot (CVSroot)
      char *CVSroot;
  {
+ #ifdef __DJGPP__
+   // We have no networking, so we don't need any fancy parsing.
+   // This may break cases where the files were checked out by a non-DJGPP CVS,
+   //  but then the DJGPP CVS has no business being run there anyway.
+   CVSroot_original = xstrdup (CVSroot);
+   CVSroot_method = local_method;
+   CVSroot_username = NULL;
+   CVSroot_hostname = NULL;
+   if(!strncmp(":local:", CVSroot, 7))
+     CVSroot_directory = xstrdup(CVSroot + 7);
+   else
+     CVSroot_directory = xstrdup(CVSroot);
+ #else
      static int cvsroot_parsed = 0;
      char *cvsroot_copy, *p;
  
***************
*** 347,358 ****
  	break;
      }
  
      if (*CVSroot_directory == '\0')
      {
  	error (0, 0, "missing directory in CVSROOT: %s", CVSroot);
  	return 1;
      }
-     
      /* Hooray!  We finally parsed it! */
      return 0;
  }
--- 360,372 ----
  	break;
      }
  
+ #endif    
+ 
      if (*CVSroot_directory == '\0')
      {
  	error (0, 0, "missing directory in CVSROOT: %s", CVSroot);
  	return 1;
      }
      /* Hooray!  We finally parsed it! */
      return 0;
  }
diff -rwdc cvs-1.9/src/rtag.c gnu/cvs-1.9/src/rtag.c
*** cvs-1.9/src/rtag.c	Fri Sep  6 20:13:56 1996
--- gnu/cvs-1.9/src/rtag.c	Wed Feb 17 17:45:34 1999
***************
*** 244,250 ****
  	char path[PATH_MAX];
  
  	/* if the portion of the module is a path, put the dir part on repos */
! 	if ((cp = strrchr (mfile, '/')) != NULL)
  	{
  	    *cp = '\0';
  	    (void) strcat (repository, "/");
--- 244,254 ----
  	char path[PATH_MAX];
  
  	/* if the portion of the module is a path, put the dir part on repos */
! 	if ((((cp = strrchr (mfile, '/')) != NULL)
! #ifdef __DJGPP__
! 	     || ((cp = strrchr (mfile, '\\')) != NULL)
! #endif
! 	     ))
  	{
  	    *cp = '\0';
  	    (void) strcat (repository, "/");
***************
*** 435,441 ****
      char *repository;
      char *filter;
  {
!     if (filter[0] == '/')
      {
          char *s, *cp;
  
--- 439,445 ----
      char *repository;
      char *filter;
  {
!     if (ISDIRSEP(filter[0]))
      {
          char *s, *cp;
  
diff -rwdc cvs-1.9/src/run.c gnu/cvs-1.9/src/run.c
*** cvs-1.9/src/run.c	Thu Feb 29 08:30:54 1996
--- gnu/cvs-1.9/src/run.c	Wed Feb 17 17:35:18 1999
***************
*** 17,22 ****
--- 17,29 ----
     Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
  #include "cvs.h"
+ #ifdef __DJGPP__
+ #include <stdlib.h>
+ #include <process.h>
+ #include <errno.h>
+ #include <io.h>
+ #include <fcntl.h>
+ #endif
  
  #ifdef HAVE_VPRINTF
  #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
***************
*** 170,178 ****
  {
      int shin, shout, sherr;
      int mode_out, mode_err;
-     int status;
      int rc = -1;
      int rerrno = 0;
      int pid, w;
  
  #ifdef POSIX_SIGNALS
--- 177,189 ----
  {
      int shin, shout, sherr;
      int mode_out, mode_err;
      int rc = -1;
      int rerrno = 0;
+ #ifdef __DJGPP__
+     int sain, saout, saerr;
+     void (*old_sigint) (int);
+ #else
+     int status;
      int pid, w;
  
  #ifdef POSIX_SIGNALS
***************
*** 188,193 ****
--- 199,205 ----
      RETSIGTYPE (*istat) (), (*qstat) ();
  #endif
  #endif
+ #endif
  
      if (trace)
      {
***************
*** 199,207 ****
--- 211,230 ----
  	run_print (stderr);
  	(void) fprintf (stderr, ")\n");
      }
+ 
+ #ifdef __DJGPP__
+     // Not sure this is required; WinNT does it, so I'm inclined to do so.
+     fflush (stderr);
+     fflush (stdout);
+ #endif
+ 
      if (noexec && (flags & RUN_REALLY) == 0)
  	return (0);
  
+     /*
+      * start the engine and take off
+      */
+ 
      /* make sure that we are null terminated, since we didn't calloc */
      run_add_arg ((char *) 0);
  
***************
*** 244,249 ****
--- 267,283 ----
      fflush (stdout);
      fflush (stderr);
  
+ #ifdef __DJGPP__
+ 
+     /* now save the standard handles */
+     sain = saout = saerr = -1;
+     sain  = dup( 0); /* dup stdin  */
+     saout = dup( 1); /* dup stdout */
+     saerr = dup( 2); /* dup stderr */
+     /* the new handles will be dup'd to the standard handles
+      * for the spawn.
+      */
+ #else
      /* The output files, if any, are now created.  Do the fork and dups */
  #ifdef HAVE_VFORK
      pid = vfork ();
***************
*** 252,257 ****
--- 286,292 ----
  #endif
      if (pid == 0)
      {
+ #endif
  	if (shin != 0)
  	{
  	    (void) dup2 (shin, 0);
***************
*** 270,275 ****
--- 305,311 ----
  	    (void) close (sherr);
  	}
  
+ #ifndef __DJGPP__
  	/* dup'ing is done.  try to run it now */
  	(void) execvp (run_argv[0], run_argv);
  	error (0, errno, "cannot exec %s", run_argv[0]);
***************
*** 279,286 ****
      {
  	rerrno = errno;
  	goto out;
-     }
- 
      /* the parent.  Ignore some signals for now */
  #ifdef POSIX_SIGNALS
      if (flags & RUN_SIGIGNORE)
--- 315,320 ----
***************
*** 371,376 ****
--- 405,443 ----
  #endif
  #endif
  
+ #else
+     /* Ignore signals while we're running this.  */
+     old_sigint = signal (SIGINT, SIG_IGN);
+ 
+     /* dup'ing is done.  try to run it now */
+     rc = spawnvp ( P_WAIT, run_argv[0], run_argv);
+ 
+     /* Restore signal handling.  */
+     signal (SIGINT, old_sigint);
+ 
+     /* restore the original file handles   */
+     if (sain  != -1) {
+       (void) dup2( sain, 0);	/* re-connect stdin  */
+       (void) close( sain);
+     }
+     if (saout != -1) {
+       (void) dup2( saout, 1);	/* re-connect stdout */
+       (void) close( saout);
+     }
+     if (saerr != -1) {
+       (void) dup2( saerr, 2);	/* re-connect stderr */
+       (void) close( saerr);
+     }
+ 
+     /* Flush standard output and standard error, or otherwise we end
+        up with strange interleavings of stuff called from CYGWIN
+        vs. CMD.  */
+ 
+     fflush (stderr);
+     fflush (stdout);
+ 
+ #endif
+ 
      /* cleanup the open file descriptors */
    out:
      if (sterr)
***************
*** 385,390 ****
--- 452,458 ----
    out0:
      if (rerrno)
  	errno = rerrno;
+ 
      return (rc);
  }
  
diff -rwdc cvs-1.9/src/server.c gnu/cvs-1.9/src/server.c
*** cvs-1.9/src/server.c	Fri Oct  4 22:03:12 1996
--- gnu/cvs-1.9/src/server.c	Wed Feb 17 17:45:38 1999
***************
*** 303,311 ****
      p = dir + 1;
      while (1)
      {
! 	while (*p != '/' && *p != '\0')
  	    ++p;
! 	if (*p == '/')
  	{
  	    strncpy (q, dir, p - dir);
  	    q[p - dir] = '\0';
--- 303,311 ----
      p = dir + 1;
      while (1)
      {
! 	while (!ISDIRSEP(*p) && *p != '\0')
  	    ++p;
! 	if (ISDIRSEP(*p))
  	{
  	    strncpy (q, dir, p - dir);
  	    q[p - dir] = '\0';
***************
*** 572,577 ****
--- 572,580 ----
      }
  
      b = strrchr (dir_name, '/');
+ #ifdef __DJGPP__
+     if(b == NULL) b = strrchr (dir_name, '\\');
+ #endif
      *b = '\0';
      Subdir_Register ((List *) NULL, dir_name, b + 1);
      *b = '/';
***************
*** 3730,3736 ****
  
  	    /* Remove a trailing slash from TMPDIR if present.  */
  	    p = server_temp_dir + strlen (server_temp_dir) - 1;
! 	    if (*p == '/')
  		*p = '\0';
  
  	    /*
--- 3733,3739 ----
  
  	    /* Remove a trailing slash from TMPDIR if present.  */
  	    p = server_temp_dir + strlen (server_temp_dir) - 1;
! 	    if (ISDIRSEP(*p))
  		*p = '\0';
  
  	    /*
diff -rwdc cvs-1.9/src/tag.c gnu/cvs-1.9/src/tag.c
*** cvs-1.9/src/tag.c	Fri Sep  6 20:13:58 1996
--- gnu/cvs-1.9/src/tag.c	Thu Jul  3 22:52:30 1997
***************
*** 343,349 ****
      char *repository;
      char *filter;
  {
!     if (filter[0] == '/')
      {
          char *s, *cp;
  
--- 343,349 ----
      char *repository;
      char *filter;
  {
!     if (ISDIRSEP(filter[0]))
      {
          char *s, *cp;
  
diff -rwdc cvs-1.9/src/update.c gnu/cvs-1.9/src/update.c
*** cvs-1.9/src/update.c	Wed Oct  2 08:04:08 1996
--- gnu/cvs-1.9/src/update.c	Wed Feb 17 17:45:56 1999
***************
*** 849,855 ****
  	free (repository);
      }
  
!     if (strchr (dir, '/') == NULL)
      {
  	/* FIXME: chdir ("..") loses with symlinks.  */
  	/* Prune empty dirs on the way out - if necessary */
--- 849,859 ----
  	free (repository);
      }
  
!     if ((strchr (dir, '/') == NULL)
! #ifdef __DJGPP__
! 	&& (strchr (dir, '\\') == NULL)
! #endif
! 	)
      {
  	/* FIXME: chdir ("..") loses with symlinks.  */
  	/* Prune empty dirs on the way out - if necessary */
***************
*** 887,893 ****
      while ((dp = readdir (dirp)) != NULL)
      {
  	if (strcmp (dp->d_name, ".") != 0 && strcmp (dp->d_name, "..") != 0 &&
! 	    strcmp (dp->d_name, CVSADM) != 0)
  	{
  	    (void) closedir (dirp);
  	    return (0);
--- 891,897 ----
      while ((dp = readdir (dirp)) != NULL)
      {
  	if (strcmp (dp->d_name, ".") != 0 && strcmp (dp->d_name, "..") != 0 &&
! 	    stricmp (dp->d_name, CVSADM) != 0)
  	{
  	    (void) closedir (dirp);
  	    return (0);
