diff -Naur openssh-3.0.2p1/Makefile.in openssh-3.0.2p1-gssapi/Makefile.in
--- openssh-3.0.2p1/Makefile.in	Sun Nov 11 17:34:23 2001
+++ openssh-3.0.2p1-gssapi/Makefile.in	Fri Jan 11 13:34:40 2002
@@ -46,11 +46,11 @@
 
 TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) $(SFTP_PROGS)
 
-LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o mac.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o 
+LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o mac.o hostfile.o key.o kex.o kexdh.o kexgex.o kexgss.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o gss-genr.o
 
 SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o
 
-SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o
+SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-krb5.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o gss-serv.o
 
 MANPAGES	= scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out
 MANPAGES_IN	= scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1
diff -Naur openssh-3.0.2p1/acconfig.h openssh-3.0.2p1-gssapi/acconfig.h
--- openssh-3.0.2p1/acconfig.h	Sat Nov  3 13:09:33 2001
+++ openssh-3.0.2p1-gssapi/acconfig.h	Fri Jan 11 13:34:40 2002
@@ -184,11 +184,23 @@
 /* Define if libc defines __progname */
 #undef HAVE___PROGNAME
 
+/* Define this is you want GSSAPI support in the version 2 protocol */
+#undef GSSAPI
+
+/* Define if you want Kerberos 5 support */
+#undef KRB5
+
+/* Define this if you are using Heimdal version of Kerberos V5 */
+#undef HEIMDAL
+
 /* Define if you want Kerberos 4 support */
 #undef KRB4
 
 /* Define if you want AFS support */
 #undef AFS
+
+/* Define if you want GSI/Globus authentication support */
+#undef GSI
 
 /* Define if you want S/Key support */
 #undef SKEY
diff -Naur openssh-3.0.2p1/auth-krb5.c openssh-3.0.2p1-gssapi/auth-krb5.c
--- openssh-3.0.2p1/auth-krb5.c	Tue Nov 13 07:02:11 2001
+++ openssh-3.0.2p1-gssapi/auth-krb5.c	Fri Jan 11 13:34:32 2002
@@ -17,6 +17,9 @@
 
 #ifdef KRB5
 #include <krb5.h>
+#ifndef HEIMDAL
+#define krb5_get_err_text(context,code) error_message(code)
+#endif /* !HEIMDAL */
 
 extern ServerOptions	 options;
 
@@ -69,8 +72,15 @@
 		goto err;
 	
 	fd = packet_get_connection_in();
+#ifdef HEIMDAL
 	problem = krb5_auth_con_setaddrs_from_fd(authctxt->krb5_ctx,
 	    authctxt->krb5_auth_ctx, &fd);
+#else
+	problem = krb5_auth_con_genaddrs(authctxt->krb5_ctx, 
+	    authctxt->krb5_auth_ctx,fd,
+	    KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
+	    KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
+#endif
 	if (problem)
 		goto err;
 	
@@ -84,8 +94,13 @@
 	if (problem)
 		goto err;
 	
+#ifdef HEIMDAL	
 	problem = krb5_copy_principal(authctxt->krb5_ctx, ticket->client,
 	    &authctxt->krb5_user);
+#else
+	problem = krb5_copy_principal(authctxt->krb5_ctx, ticket->enc_part2->client,
+	    &authctxt->krb5_user);
+#endif
 	if (problem)
 		goto err;
 	
@@ -131,13 +146,23 @@
 	krb5_error_code problem;
 	krb5_ccache ccache = NULL;
 	char *pname;
+	krb5_creds **creds;
 	
 	if (authctxt->pw == NULL || authctxt->krb5_user == NULL)
 		return (0);
 	
 	temporarily_use_uid(authctxt->pw);
 	
+#ifdef HEIMDAL	
 	problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, &ccache);
+#else
+{
+	char ccname[35];
+	
+	snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%d", authctxt->pw->pw_uid);
+	problem = krb5_cc_resolve(authctxt->krb5_ctx, ccname, &ccache);
+}
+#endif
 	if (problem)
 		goto fail;
 	
@@ -146,10 +171,20 @@
 	if (problem)
 		goto fail;
 	
+#ifdef HEIMDAL	
 	problem = krb5_rd_cred2(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
 	    ccache, tgt);
 	if (problem)
 		goto fail;
+#else
+	problem = krb5_rd_cred(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
+	    tgt, &creds, NULL);
+	if (problem) 
+		goto fail;
+	problem = krb5_cc_store_cred(authctxt->krb5_ctx, ccache, *creds);
+	if (problem)
+	        goto fail;
+#endif
 	
 	authctxt->krb5_fwd_ccache = ccache;
 	ccache = NULL;
@@ -182,6 +217,10 @@
 int
 auth_krb5_password(Authctxt *authctxt, const char *password)
 {
+#ifndef HEIMDAL
+        krb5_creds creds;
+	krb5_principal server;
+#endif	
 	krb5_error_code problem;
 	
 	if (authctxt->pw == NULL)
@@ -198,8 +237,13 @@
 	if (problem)
 		goto out;
 	
+#ifdef HEIMDAL	
 	problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops,
 	    &authctxt->krb5_fwd_ccache);
+#else
+	problem = krb5_cc_resolve(authctxt->krb5_ctx, "MEMORY:", 
+	    &authctxt->krb5_fwd_ccache);
+#endif
 	if (problem)
 		goto out;
 	
@@ -208,11 +252,38 @@
 	if (problem)
 		goto out;
 	
+#ifdef HEIMDAL	
 	problem = krb5_verify_user(authctxt->krb5_ctx, authctxt->krb5_user,
 	    authctxt->krb5_fwd_ccache, password, 1, NULL);
 	if (problem)
 		goto out;
 	
+#else
+        problem = krb5_get_init_creds_password(authctxt->krb5_ctx, &creds, 
+            authctxt->krb5_user, password, NULL, NULL, 0, NULL, NULL);
+        if (problem)
+        	goto out;
+
+        problem = krb5_sname_to_principal(authctxt->krb5_ctx, NULL, NULL, 
+            KRB5_NT_SRV_HST, &server);
+        if (problem)
+        	goto out;
+
+	restore_uid();
+        problem = krb5_verify_init_creds(authctxt->krb5_ctx, &creds, server, NULL, NULL, 
+            NULL);
+	temporarily_use_uid(authctxt->pw);
+	
+        krb5_free_principal(authctxt->krb5_ctx, server);
+        if (problem)
+        	goto out;
+
+	problem = krb5_cc_store_cred(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache, &creds);
+	if (problem)
+		goto out;
+
+#endif /* HEIMDAL */
+
 	authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
 	
  out:
diff -Naur openssh-3.0.2p1/auth-pam.c openssh-3.0.2p1-gssapi/auth-pam.c
--- openssh-3.0.2p1/auth-pam.c	Fri Nov  9 14:22:17 2001
+++ openssh-3.0.2p1-gssapi/auth-pam.c	Fri Jan 11 13:34:40 2002
@@ -394,6 +394,24 @@
 #endif /* HAVE_PAM_GETENVLIST */
 }
 
+/* Set a PAM environment string. We need to do this so that the session
+ * modules can handle things like Kerberos/GSI credentials that appear
+ * during the ssh authentication process.
+ */
+
+int do_pam_putenv(char *name, char *value) {
+	char *compound;
+	int ret=1;
+	
+	compound=xmalloc(strlen(name)+strlen(value)+2);
+	if (compound) {
+		sprintf(compound,"%s=%s",name,value);
+		ret=pam_putenv(__pamh,compound);
+		xfree(compound);
+	}
+	return(ret);
+}
+
 /* Print any messages that have been generated during authentication */
 /* or account checking to stderr */
 void print_pam_messages(void)
diff -Naur openssh-3.0.2p1/auth-pam.h openssh-3.0.2p1-gssapi/auth-pam.h
--- openssh-3.0.2p1/auth-pam.h	Tue Mar 27 00:12:24 2001
+++ openssh-3.0.2p1-gssapi/auth-pam.h	Fri Jan 11 13:34:40 2002
@@ -17,6 +17,7 @@
 int is_pam_password_change_required(void);
 void do_pam_chauthtok(void);
 void do_pam_set_conv(struct pam_conv *);
+int do_pam_putenv(char *, char *);
 void message_cat(char **p, const char *a);
 
 #endif /* USE_PAM */
diff -Naur openssh-3.0.2p1/auth.h openssh-3.0.2p1-gssapi/auth.h
--- openssh-3.0.2p1/auth.h	Tue Jul  3 23:46:57 2001
+++ openssh-3.0.2p1-gssapi/auth.h	Fri Jan 11 13:34:40 2002
@@ -67,6 +67,7 @@
 	krb5_principal	 krb5_user;
 	char		*krb5_ticket_file;
 #endif
+	void *methoddata;
 };
 
 /*
diff -Naur openssh-3.0.2p1/auth2.c openssh-3.0.2p1-gssapi/auth2.c
--- openssh-3.0.2p1/auth2.c	Tue Nov 13 06:46:19 2001
+++ openssh-3.0.2p1-gssapi/auth2.c	Fri Jan 11 13:34:40 2002
@@ -52,6 +52,10 @@
 #include "canohost.h"
 #include "match.h"
 
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
+
 /* import */
 extern ServerOptions options;
 extern u_char *session_id2;
@@ -87,10 +91,23 @@
 static int userauth_hostbased(Authctxt *);
 static int userauth_kbdint(Authctxt *);
 
+#ifdef GSSAPI
+int 	userauth_external(Authctxt *authctxt);
+int	userauth_gssapi(Authctxt *authctxt);
+#endif
+
 Authmethod authmethods[] = {
 	{"none",
 		userauth_none,
 		&one},
+#ifdef GSSAPI
+	{"external-keyx",
+		userauth_external,
+		&options.gss_authentication},
+	{"gssapi",
+		userauth_gssapi,
+		&options.gss_authentication},
+#endif
 	{"publickey",
 		userauth_pubkey,
 		&options.pubkey_authentication},
@@ -221,6 +238,12 @@
 	}
 	/* reset state */
 	dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, &protocol_error);
+
+#ifdef GSSAPI
+	dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &protocol_error);
+	dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, &protocol_error);
+#endif
+
 	authctxt->postponed = 0;
 #ifdef BSD_AUTH
 	if (authctxt->as) {
diff -Naur openssh-3.0.2p1/config.h.in openssh-3.0.2p1-gssapi/config.h.in
--- openssh-3.0.2p1/config.h.in	Sat Dec  1 17:38:56 2001
+++ openssh-3.0.2p1-gssapi/config.h.in	Fri Jan 11 13:36:48 2002
@@ -1,4 +1,4 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
+/* config.h.in.  Generated automatically from configure.ac by autoheader.  */
 /* $Id: acconfig.h,v 1.119 2001/11/03 19:09:33 tim Exp $ */
 
 #ifndef _CONFIG_H
@@ -8,6 +8,7 @@
 /* Please make your changes there */
 
 
+
 /* Define to a Set Process Title type if your system is */
 /* supported by bsd-setproctitle.c */
 #undef SPT_TYPE
@@ -184,12 +185,24 @@
 /* Define if libc defines __progname */
 #undef HAVE___PROGNAME
 
+/* Define this is you want GSSAPI support in the version 2 protocol */
+#undef GSSAPI
+
+/* Define if you want Kerberos 5 support */
+#undef KRB5
+
+/* Define this if you are using Heimdal version of Kerberos V5 */
+#undef HEIMDAL
+
 /* Define if you want Kerberos 4 support */
 #undef KRB4
 
 /* Define if you want AFS support */
 #undef AFS
 
+/* Define if you want GSI/Globus authentication support */
+#undef GSI
+
 /* Define if you want S/Key support */
 #undef SKEY
 
@@ -446,6 +459,9 @@
 
 /* Define if you have the <glob.h> header file. */
 #undef HAVE_GLOB_H
+
+/* Define if you have the <gssapi.h> header file. */
+#undef HAVE_GSSAPI_H
 
 /* Define if you have the `inet_aton' function. */
 #undef HAVE_INET_ATON
diff -Naur openssh-3.0.2p1/configure openssh-3.0.2p1-gssapi/configure
--- openssh-3.0.2p1/configure	Sat Dec  1 17:38:55 2001
+++ openssh-3.0.2p1-gssapi/configure	Fri Jan 11 13:36:15 2002
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52d.
+# Generated by Autoconf 2.52.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -20,10 +20,6 @@
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
 
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
@@ -557,10 +553,10 @@
 fi
 if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
    { (exit 1); exit 1; }; }
   else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+    { echo "$as_me: error: cannot find sources in $srcdir" >&2
    { (exit 1); exit 1; }; }
   fi
 fi
@@ -604,7 +600,7 @@
 if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
+  cat <<EOF
 \`configure' configures this package to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -625,9 +621,9 @@
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
-_ACEOF
+EOF
 
-  cat <<_ACEOF
+  cat <<EOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           [$ac_default_prefix]
@@ -654,19 +650,19 @@
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
   --infodir=DIR          info documentation [PREFIX/info]
   --mandir=DIR           man documentation [PREFIX/man]
-_ACEOF
+EOF
 
-  cat <<\_ACEOF
+  cat <<\EOF
 
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       build programs to run on HOST [BUILD]
-_ACEOF
+EOF
 fi
 
 if test -n "$ac_init_help"; then
 
-  cat <<\_ACEOF
+  cat <<\EOF
 
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
@@ -701,7 +697,10 @@
   --with-pam              Enable PAM support
   --with-ssl-dir=PATH     Specify path to OpenSSL installation
   --with-smartcard        Enable smartcard support
+  --with-kerberos5=PATH   Enable Kerberos 5 support
   --with-kerberos4=PATH   Enable Kerberos 4 support
+  --with-gsi=PATH         Enable GSI/Globus authentication support
+  --with-globus=PATH      Enable GSI/Globus authentication support
   --with-afs=PATH         Enable AFS support
   --with-rsh=PATH         Specify path to remote shell program
   --with-xauth=PATH       Specify path to xauth program
@@ -732,51 +731,40 @@
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-_ACEOF
+EOF
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   ac_popdir=`pwd`
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    cd $ac_dir
-    if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\./,,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+    cd $ac_subdir
+    # A "../" for each directory in /$ac_subdir.
+    ac_dots=`echo $ac_subdir |
+             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+    case $srcdir in
+    .) # No --srcdir option.  We are building in place.
+      ac_sub_srcdir=$srcdir ;;
+    [\\/]* | ?:[\\/]* ) # Absolute path.
+      ac_sub_srcdir=$srcdir/$ac_subdir ;;
+    *) # Relative path.
+      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+    esac
 
     # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
+    if test -f $ac_sub_srcdir/configure.gnu; then
       echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
+      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_sub_srcdir/configure; then
       echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-           test -f $ac_srcdir/configure.in; then
+      $SHELL $ac_sub_srcdir/configure  --help=recursive
+    elif test -f $ac_sub_srcdir/configure.ac ||
+           test -f $ac_sub_srcdir/configure.in; then
       echo
       $ac_configure --help
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
     fi
     cd $ac_popdir
   done
@@ -784,31 +772,31 @@
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
-  cat <<\_ACEOF
+  cat <<\EOF
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
-_ACEOF
+EOF
   exit 0
 fi
 exec 5>config.log
-cat >&5 <<_ACEOF
+cat >&5 <<EOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.52d.  Invocation command line was
+generated by GNU Autoconf 2.52.  Invocation command line was
 
   $ $0 $@
 
-_ACEOF
+EOF
 {
 cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+## ---------- ##
+## Platform.  ##
+## ---------- ##
 
 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
 uname -m = `(uname -m) 2>/dev/null || echo unknown`
@@ -832,12 +820,12 @@
 _ASUNAME
 } >&5
 
-cat >&5 <<_ACEOF
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+cat >&5 <<EOF
+## ------------ ##
+## Core tests.  ##
+## ------------ ##
 
-_ACEOF
+EOF
 
 # Keep a trace of the command line.
 # Strip out --no-create and --no-recursion so they do not pile up.
@@ -864,19 +852,14 @@
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
 # would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
 trap 'exit_status=$?
   # Save into config.log some information that might help in debugging.
-  {
-    echo
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
+  echo >&5
+  echo "## ----------------- ##" >&5
+  echo "## Cache variables.  ##" >&5
+  echo "## ----------------- ##" >&5
+  echo >&5
+  # The following way of writing the cache mishandles newlines in values,
 {
   (set) 2>&1 |
     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
@@ -890,22 +873,20 @@
         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
       ;;
     esac;
-}
-    echo
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      sed "/^$/d" confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
+} >&5
+  sed "/^$/d" confdefs.h >conftest.log
+  if test -s conftest.log; then
+    echo >&5
+    echo "## ------------ ##" >&5
+    echo "## confdefs.h.  ##" >&5
+    echo "## ------------ ##" >&5
+    echo >&5
+    cat conftest.log >&5
+  fi
+  (echo; echo) >&5
+  test "$ac_signal" != 0 &&
+    echo "$as_me: caught signal $ac_signal" >&5
+  echo "$as_me: exit $exit_status" >&5
   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
     exit $exit_status
      ' 0
@@ -930,9 +911,9 @@
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    { echo "$as_me:933: loading site script $ac_site_file" >&5
+    { echo "$as_me:914: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
+    cat "$ac_site_file" >&5
     . "$ac_site_file"
   fi
 done
@@ -941,7 +922,7 @@
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { echo "$as_me:944: loading cache $cache_file" >&5
+    { echo "$as_me:925: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -949,7 +930,7 @@
     esac
   fi
 else
-  { echo "$as_me:952: creating cache $cache_file" >&5
+  { echo "$as_me:933: creating cache $cache_file" >&5
 echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -965,21 +946,21 @@
   eval ac_new_val="\$ac_env_${ac_var}_value"
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:968: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { echo "$as_me:949: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:972: error: \`$ac_var' was not set in the previous run" >&5
+      { echo "$as_me:953: error: \`$ac_var' was not set in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:978: error: \`$ac_var' has changed since the previous run:" >&5
+        { echo "$as_me:959: error: \`$ac_var' has changed since the previous run:" >&5
 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:980:   former value:  $ac_old_val" >&5
+        { echo "$as_me:961:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:982:   current value: $ac_new_val" >&5
+        { echo "$as_me:963:   current value: $ac_new_val" >&5
 echo "$as_me:   current value: $ac_new_val" >&2;}
         ac_cache_corrupted=:
       fi;;
@@ -998,9 +979,9 @@
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:1001: error: changes in the environment can compromise the build" >&5
+  { echo "$as_me:982: error: changes in the environment can compromise the build" >&5
 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:1003: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+  { { echo "$as_me:984: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1020,10 +1001,10 @@
 echo "#! $SHELL" >conftest.sh
 echo  "exit 0"   >>conftest.sh
 chmod +x conftest.sh
-if { (echo "$as_me:1023: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:1004: PATH=\".;.\"; conftest.sh") >&5
   (PATH=".;."; conftest.sh) 2>&5
   ac_status=$?
-  echo "$as_me:1026: \$? = $ac_status" >&5
+  echo "$as_me:1007: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   ac_path_separator=';'
 else
@@ -1042,7 +1023,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:1045: checking for $ac_word" >&5
+echo "$as_me:1026: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1057,7 +1038,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:1060: found $ac_dir/$ac_word" >&5
+echo "$as_me:1041: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1065,10 +1046,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1068: result: $CC" >&5
+  echo "$as_me:1049: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1071: result: no" >&5
+  echo "$as_me:1052: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1077,7 +1058,7 @@
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:1080: checking for $ac_word" >&5
+echo "$as_me:1061: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1092,7 +1073,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1095: found $ac_dir/$ac_word" >&5
+echo "$as_me:1076: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1100,10 +1081,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1103: result: $ac_ct_CC" >&5
+  echo "$as_me:1084: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1106: result: no" >&5
+  echo "$as_me:1087: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1116,7 +1097,7 @@
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1119: checking for $ac_word" >&5
+echo "$as_me:1100: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1131,7 +1112,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1134: found $ac_dir/$ac_word" >&5
+echo "$as_me:1115: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1139,10 +1120,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1142: result: $CC" >&5
+  echo "$as_me:1123: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1145: result: no" >&5
+  echo "$as_me:1126: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1151,7 +1132,7 @@
   ac_ct_CC=$CC
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1154: checking for $ac_word" >&5
+echo "$as_me:1135: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1166,7 +1147,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1169: found $ac_dir/$ac_word" >&5
+echo "$as_me:1150: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1174,10 +1155,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1177: result: $ac_ct_CC" >&5
+  echo "$as_me:1158: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1180: result: no" >&5
+  echo "$as_me:1161: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1190,7 +1171,7 @@
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1193: checking for $ac_word" >&5
+echo "$as_me:1174: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1210,7 +1191,7 @@
   continue
 fi
 ac_cv_prog_CC="cc"
-echo "$as_me:1213: found $ac_dir/$ac_word" >&5
+echo "$as_me:1194: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1232,10 +1213,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1235: result: $CC" >&5
+  echo "$as_me:1216: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1238: result: no" >&5
+  echo "$as_me:1219: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1246,7 +1227,7 @@
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1249: checking for $ac_word" >&5
+echo "$as_me:1230: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1261,7 +1242,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1264: found $ac_dir/$ac_word" >&5
+echo "$as_me:1245: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1269,10 +1250,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1272: result: $CC" >&5
+  echo "$as_me:1253: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1275: result: no" >&5
+  echo "$as_me:1256: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1285,7 +1266,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:1288: checking for $ac_word" >&5
+echo "$as_me:1269: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1300,7 +1281,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1303: found $ac_dir/$ac_word" >&5
+echo "$as_me:1284: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1308,10 +1289,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1311: result: $ac_ct_CC" >&5
+  echo "$as_me:1292: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1314: result: no" >&5
+  echo "$as_me:1295: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1323,40 +1304,34 @@
 
 fi
 
-test -z "$CC" && { { echo "$as_me:1326: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1307: error: no acceptable cc found in \$PATH" >&5
 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:1331:" \
+echo "$as_me:1312:" \
      "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1334: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1315: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1337: \$? = $ac_status" >&5
+  echo "$as_me:1318: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1339: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1320: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1342: \$? = $ac_status" >&5
+  echo "$as_me:1323: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1344: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1325: \"$ac_compiler -V </dev/null >&5\"") >&5
   (eval $ac_compiler -V </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1347: \$? = $ac_status" >&5
+  echo "$as_me:1328: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 1351 "configure"
+#line 1332 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1370,13 +1345,13 @@
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:1373: checking for C compiler default output" >&5
+echo "$as_me:1348: checking for C compiler default output" >&5
 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:1376: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1351: \"$ac_link_default\"") >&5
   (eval $ac_link_default) 2>&5
   ac_status=$?
-  echo "$as_me:1379: \$? = $ac_status" >&5
+  echo "$as_me:1354: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # Find the output, starting from the most likely.  This scheme is
 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
@@ -1385,7 +1360,7 @@
                 ls a.out conftest 2>/dev/null;
                 ls a.* conftest.* 2>/dev/null`; do
   case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
     a.out ) # We found the default executable, but exeext='' is most
             # certainly right.
             break;;
@@ -1399,34 +1374,34 @@
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1402: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1377: error: C compiler cannot create executables" >&5
 echo "$as_me: error: C compiler cannot create executables" >&2;}
    { (exit 77); exit 77; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:1408: result: $ac_file" >&5
+echo "$as_me:1383: result: $ac_file" >&5
 echo "${ECHO_T}$ac_file" >&6
 
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:1413: checking whether the C compiler works" >&5
+echo "$as_me:1388: checking whether the C compiler works" >&5
 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (eval echo "$as_me:1419: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1394: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1422: \$? = $ac_status" >&5
+  echo "$as_me:1397: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { echo "$as_me:1429: error: cannot run C compiled programs.
+	{ { echo "$as_me:1404: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'." >&5
 echo "$as_me: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'." >&2;}
@@ -1434,24 +1409,24 @@
     fi
   fi
 fi
-echo "$as_me:1437: result: yes" >&5
+echo "$as_me:1412: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 rm -f a.out a.exe conftest$ac_cv_exeext
 ac_clean_files=$ac_clean_files_save
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:1444: checking whether we are cross compiling" >&5
+echo "$as_me:1419: checking whether we are cross compiling" >&5
 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1446: result: $cross_compiling" >&5
+echo "$as_me:1421: result: $cross_compiling" >&5
 echo "${ECHO_T}$cross_compiling" >&6
 
-echo "$as_me:1449: checking for executable suffix" >&5
+echo "$as_me:1424: checking for executable suffix" >&5
 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1451: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1426: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:1454: \$? = $ac_status" >&5
+  echo "$as_me:1429: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
@@ -1467,33 +1442,27 @@
   esac
 done
 else
-  { { echo "$as_me:1470: error: cannot compute EXEEXT: cannot compile and link" >&5
+  { { echo "$as_me:1445: error: cannot compute EXEEXT: cannot compile and link" >&5
 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:1476: result: $ac_cv_exeext" >&5
+echo "$as_me:1451: result: $ac_cv_exeext" >&5
 echo "${ECHO_T}$ac_cv_exeext" >&6
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-echo "$as_me:1482: checking for object suffix" >&5
+echo "$as_me:1457: checking for object suffix" >&5
 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
 if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1488 "configure"
+#line 1463 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1503,10 +1472,10 @@
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1506: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1475: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1509: \$? = $ac_status" >&5
+  echo "$as_me:1478: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
   case $ac_file in
@@ -1518,32 +1487,26 @@
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-{ { echo "$as_me:1521: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1490: error: cannot compute OBJEXT: cannot compile" >&5
 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:1528: result: $ac_cv_objext" >&5
+echo "$as_me:1497: result: $ac_cv_objext" >&5
 echo "${ECHO_T}$ac_cv_objext" >&6
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:1532: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1501: checking whether we are using the GNU C compiler" >&5
 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1538 "configure"
+#line 1507 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1556,16 +1519,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1559: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1522: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1562: \$? = $ac_status" >&5
+  echo "$as_me:1525: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1565: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1528: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1568: \$? = $ac_status" >&5
+  echo "$as_me:1531: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_compiler_gnu=yes
 else
@@ -1577,27 +1540,21 @@
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:1580: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1543: result: $ac_cv_c_compiler_gnu" >&5
 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 CFLAGS="-g"
-echo "$as_me:1586: checking whether $CC accepts -g" >&5
+echo "$as_me:1549: checking whether $CC accepts -g" >&5
 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1592 "configure"
+#line 1555 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1607,16 +1564,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1567: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1613: \$? = $ac_status" >&5
+  echo "$as_me:1570: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1616: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1573: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1619: \$? = $ac_status" >&5
+  echo "$as_me:1576: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_g=yes
 else
@@ -1626,7 +1583,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:1629: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1586: result: $ac_cv_prog_cc_g" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
@@ -1653,16 +1610,16 @@
 #endif
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1613: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1659: \$? = $ac_status" >&5
+  echo "$as_me:1616: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1662: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1619: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1665: \$? = $ac_status" >&5
+  echo "$as_me:1622: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
    ''\
@@ -1674,16 +1631,10 @@
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line 1677 "configure"
+#line 1634 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1693,16 +1644,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1647: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1699: \$? = $ac_status" >&5
+  echo "$as_me:1650: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1702: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1653: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1705: \$? = $ac_status" >&5
+  echo "$as_me:1656: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -1712,15 +1663,9 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 1715 "configure"
+#line 1666 "configure"
 #include "confdefs.h"
 $ac_declaration
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1730,16 +1675,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1733: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1678: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1736: \$? = $ac_status" >&5
+  echo "$as_me:1681: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1739: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1684: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1742: \$? = $ac_status" >&5
+  echo "$as_me:1687: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -1783,7 +1728,7 @@
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:1786: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+  { { echo "$as_me:1731: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -1793,11 +1738,11 @@
 
 # Make sure we can run config.sub.
 $ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:1796: error: cannot run $ac_config_sub" >&5
+  { { echo "$as_me:1741: error: cannot run $ac_config_sub" >&5
 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
    { (exit 1); exit 1; }; }
 
-echo "$as_me:1800: checking build system type" >&5
+echo "$as_me:1745: checking build system type" >&5
 echo $ECHO_N "checking build system type... $ECHO_C" >&6
 if test "${ac_cv_build+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1806,23 +1751,23 @@
 test -z "$ac_cv_build_alias" &&
   ac_cv_build_alias=`$ac_config_guess`
 test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:1809: error: cannot guess build type; you must specify one" >&5
+  { { echo "$as_me:1754: error: cannot guess build type; you must specify one" >&5
 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:1813: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+  { { echo "$as_me:1758: error: $ac_config_sub $ac_cv_build_alias failed." >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1818: result: $ac_cv_build" >&5
+echo "$as_me:1763: result: $ac_cv_build" >&5
 echo "${ECHO_T}$ac_cv_build" >&6
 build=$ac_cv_build
 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
-echo "$as_me:1825: checking host system type" >&5
+echo "$as_me:1770: checking host system type" >&5
 echo $ECHO_N "checking host system type... $ECHO_C" >&6
 if test "${ac_cv_host+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1831,36 +1776,31 @@
 test -z "$ac_cv_host_alias" &&
   ac_cv_host_alias=$ac_cv_build_alias
 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:1834: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+  { { echo "$as_me:1779: error: $ac_config_sub $ac_cv_host_alias failed" >&5
 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:1839: result: $ac_cv_host" >&5
+echo "$as_me:1784: result: $ac_cv_host" >&5
 echo "${ECHO_T}$ac_cv_host" >&6
 host=$ac_cv_host
 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
-echo "$as_me:1846: checking whether byte ordering is bigendian" >&5
+echo "$as_me:1791: checking whether byte ordering is bigendian" >&5
 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
 if test "${ac_cv_c_bigendian+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # See if sys/param.h defines the BYTE_ORDER macro.
+  ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
 cat >conftest.$ac_ext <<_ACEOF
-#line 1853 "configure"
+#line 1799 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1873,30 +1813,24 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1876: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1816: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1879: \$? = $ac_status" >&5
+  echo "$as_me:1819: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1882: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1822: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1885: \$? = $ac_status" >&5
+  echo "$as_me:1825: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat >conftest.$ac_ext <<_ACEOF
-#line 1889 "configure"
+#line 1829 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -1909,16 +1843,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1912: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:1915: \$? = $ac_status" >&5
+  echo "$as_me:1849: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1918: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1852: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:1921: \$? = $ac_status" >&5
+  echo "$as_me:1855: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_bigendian=yes
 else
@@ -1930,64 +1864,16 @@
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
-  # try to guess the endianess by grep'ing values into an object file
-  ac_cv_c_bigendian=unknown
-  cat >conftest.$ac_ext <<_ACEOF
-#line 1938 "configure"
-#include "confdefs.h"
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
- _ascii (); _ebcdic ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1961: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:1964: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:1967: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:1970: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
-  ac_cv_c_bigendian=yes
-fi
-if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-  if test "$ac_cv_c_bigendian" = unknown; then
-    ac_cv_c_bigendian=no
-  else
-    # finding both strings is unlikely to happen, but who knows?
-    ac_cv_c_bigendian=unknown
-  fi
-fi
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
+if test $ac_cv_c_bigendian = unknown; then
+if test "$cross_compiling" = yes; then
+  { { echo "$as_me:1871: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 1990 "configure"
+#line 1876 "configure"
 #include "confdefs.h"
 int
 main ()
@@ -2003,15 +1889,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:2006: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1892: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:2009: \$? = $ac_status" >&5
+  echo "$as_me:1895: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:2011: \"$ac_try\"") >&5
+  { (eval echo "$as_me:1897: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2014: \$? = $ac_status" >&5
+  echo "$as_me:1900: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_bigendian=no
 else
@@ -2023,26 +1909,16 @@
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:2028: result: $ac_cv_c_bigendian" >&5
+echo "$as_me:1913: result: $ac_cv_c_bigendian" >&5
 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
-  yes)
+if test $ac_cv_c_bigendian = yes; then
 
-cat >>confdefs.h <<\_ACEOF
+cat >>confdefs.h <<\EOF
 #define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
-  no)
-     ;;
-  *)
-    { { echo "$as_me:2040: error: unknown endianess
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianess
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
+EOF
+
+fi
 
 # Checks for programs.
 ac_ext=c
@@ -2050,7 +1926,7 @@
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:2053: checking how to run the C preprocessor" >&5
+echo "$as_me:1929: checking how to run the C preprocessor" >&5
 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -2071,18 +1947,18 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2074 "configure"
+#line 1950 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2079: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2085: \$? = $ac_status" >&5
+  echo "$as_me:1961: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2105,17 +1981,17 @@
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2108 "configure"
+#line 1984 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2112: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:1988: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2118: \$? = $ac_status" >&5
+  echo "$as_me:1994: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2152,7 +2028,7 @@
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:2155: result: $CPP" >&5
+echo "$as_me:2031: result: $CPP" >&5
 echo "${ECHO_T}$CPP" >&6
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -2162,18 +2038,18 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2165 "configure"
+#line 2041 "configure"
 #include "confdefs.h"
 #include <assert.h>
                      Syntax error
 _ACEOF
-if { (eval echo "$as_me:2170: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2176: \$? = $ac_status" >&5
+  echo "$as_me:2052: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2196,17 +2072,17 @@
   # OK, works on sane cases.  Now check whether non-existent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line 2199 "configure"
+#line 2075 "configure"
 #include "confdefs.h"
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:2203: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2079: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:2209: \$? = $ac_status" >&5
+  echo "$as_me:2085: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2234,7 +2110,7 @@
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:2237: error: C preprocessor \"$CPP\" fails sanity check" >&5
+  { { echo "$as_me:2113: error: C preprocessor \"$CPP\" fails sanity check" >&5
 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -2248,7 +2124,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:2251: checking for $ac_word" >&5
+echo "$as_me:2127: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2263,7 +2139,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-echo "$as_me:2266: found $ac_dir/$ac_word" >&5
+echo "$as_me:2142: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2271,10 +2147,10 @@
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  echo "$as_me:2274: result: $RANLIB" >&5
+  echo "$as_me:2150: result: $RANLIB" >&5
 echo "${ECHO_T}$RANLIB" >&6
 else
-  echo "$as_me:2277: result: no" >&5
+  echo "$as_me:2153: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2283,7 +2159,7 @@
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-echo "$as_me:2286: checking for $ac_word" >&5
+echo "$as_me:2162: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2298,7 +2174,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_RANLIB="ranlib"
-echo "$as_me:2301: found $ac_dir/$ac_word" >&5
+echo "$as_me:2177: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -2307,10 +2183,10 @@
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:2310: result: $ac_ct_RANLIB" >&5
+  echo "$as_me:2186: result: $ac_ct_RANLIB" >&5
 echo "${ECHO_T}$ac_ct_RANLIB" >&6
 else
-  echo "$as_me:2313: result: no" >&5
+  echo "$as_me:2189: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2331,7 +2207,7 @@
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:2334: checking for a BSD compatible install" >&5
+echo "$as_me:2210: checking for a BSD compatible install" >&5
 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
@@ -2380,7 +2256,7 @@
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:2383: result: $INSTALL" >&5
+echo "$as_me:2259: result: $INSTALL" >&5
 echo "${ECHO_T}$INSTALL" >&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2393,7 +2269,7 @@
 
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
-echo "$as_me:2396: checking for $ac_word" >&5
+echo "$as_me:2272: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_AR+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2410,7 +2286,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_AR="$ac_dir/$ac_word"
-   echo "$as_me:2413: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2289: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2421,10 +2297,10 @@
 AR=$ac_cv_path_AR
 
 if test -n "$AR"; then
-  echo "$as_me:2424: result: $AR" >&5
+  echo "$as_me:2300: result: $AR" >&5
 echo "${ECHO_T}$AR" >&6
 else
-  echo "$as_me:2427: result: no" >&5
+  echo "$as_me:2303: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2432,7 +2308,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:2435: checking for $ac_word" >&5
+echo "$as_me:2311: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PERL+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2449,7 +2325,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PERL="$ac_dir/$ac_word"
-   echo "$as_me:2452: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2328: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2460,10 +2336,10 @@
 PERL=$ac_cv_path_PERL
 
 if test -n "$PERL"; then
-  echo "$as_me:2463: result: $PERL" >&5
+  echo "$as_me:2339: result: $PERL" >&5
 echo "${ECHO_T}$PERL" >&6
 else
-  echo "$as_me:2466: result: no" >&5
+  echo "$as_me:2342: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2472,7 +2348,7 @@
 
 # Extract the first word of "ent", so it can be a program name with args.
 set dummy ent; ac_word=$2
-echo "$as_me:2475: checking for $ac_word" >&5
+echo "$as_me:2351: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_ENT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2489,7 +2365,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_ENT="$ac_dir/$ac_word"
-   echo "$as_me:2492: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2368: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2500,10 +2376,10 @@
 ENT=$ac_cv_path_ENT
 
 if test -n "$ENT"; then
-  echo "$as_me:2503: result: $ENT" >&5
+  echo "$as_me:2379: result: $ENT" >&5
 echo "${ECHO_T}$ENT" >&6
 else
-  echo "$as_me:2506: result: no" >&5
+  echo "$as_me:2382: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2511,7 +2387,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:2514: checking for $ac_word" >&5
+echo "$as_me:2390: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_FILEPRIV+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2528,7 +2404,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_FILEPRIV="$ac_dir/$ac_word"
-   echo "$as_me:2531: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2407: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2539,10 +2415,10 @@
 FILEPRIV=$ac_cv_path_FILEPRIV
 
 if test -n "$FILEPRIV"; then
-  echo "$as_me:2542: result: $FILEPRIV" >&5
+  echo "$as_me:2418: result: $FILEPRIV" >&5
 echo "${ECHO_T}$FILEPRIV" >&6
 else
-  echo "$as_me:2545: result: no" >&5
+  echo "$as_me:2421: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2552,7 +2428,7 @@
 
 # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
-echo "$as_me:2555: checking for $ac_word" >&5
+echo "$as_me:2431: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2569,7 +2445,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word"
-   echo "$as_me:2572: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2448: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2580,16 +2456,16 @@
 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
 
 if test -n "$TEST_MINUS_S_SH"; then
-  echo "$as_me:2583: result: $TEST_MINUS_S_SH" >&5
+  echo "$as_me:2459: result: $TEST_MINUS_S_SH" >&5
 echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
 else
-  echo "$as_me:2586: result: no" >&5
+  echo "$as_me:2462: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 # Extract the first word of "ksh", so it can be a program name with args.
 set dummy ksh; ac_word=$2
-echo "$as_me:2592: checking for $ac_word" >&5
+echo "$as_me:2468: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2606,7 +2482,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word"
-   echo "$as_me:2609: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2485: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2617,16 +2493,16 @@
 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
 
 if test -n "$TEST_MINUS_S_SH"; then
-  echo "$as_me:2620: result: $TEST_MINUS_S_SH" >&5
+  echo "$as_me:2496: result: $TEST_MINUS_S_SH" >&5
 echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
 else
-  echo "$as_me:2623: result: no" >&5
+  echo "$as_me:2499: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 # Extract the first word of "sh", so it can be a program name with args.
 set dummy sh; ac_word=$2
-echo "$as_me:2629: checking for $ac_word" >&5
+echo "$as_me:2505: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2643,7 +2519,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word"
-   echo "$as_me:2646: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2522: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -2654,10 +2530,10 @@
 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
 
 if test -n "$TEST_MINUS_S_SH"; then
-  echo "$as_me:2657: result: $TEST_MINUS_S_SH" >&5
+  echo "$as_me:2533: result: $TEST_MINUS_S_SH" >&5
 echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
 else
-  echo "$as_me:2660: result: no" >&5
+  echo "$as_me:2536: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -2669,7 +2545,7 @@
 fi;
 if test "$enable_largefile" != no; then
 
-  echo "$as_me:2672: checking for special C compiler options needed for large files" >&5
+  echo "$as_me:2548: checking for special C compiler options needed for large files" >&5
 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_largefile_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2681,7 +2557,7 @@
      	 # IRIX 6.2 and later do not support large files by default,
      	 # so use the C compiler's -n32 option if that helps.
          cat >conftest.$ac_ext <<_ACEOF
-#line 2684 "configure"
+#line 2560 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -2692,12 +2568,6 @@
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -2707,16 +2577,16 @@
 }
 _ACEOF
      	 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2710: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2580: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2713: \$? = $ac_status" >&5
+  echo "$as_me:2583: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2716: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2586: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2719: \$? = $ac_status" >&5
+  echo "$as_me:2589: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -2726,16 +2596,16 @@
 rm -f conftest.$ac_objext
      	 CC="$CC -n32"
      	 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2729: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2599: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2732: \$? = $ac_status" >&5
+  echo "$as_me:2602: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2735: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2605: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2738: \$? = $ac_status" >&5
+  echo "$as_me:2608: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_largefile_CC=' -n32'; break
 else
@@ -2749,13 +2619,13 @@
        rm -f conftest.$ac_ext
     fi
 fi
-echo "$as_me:2752: result: $ac_cv_sys_largefile_CC" >&5
+echo "$as_me:2622: result: $ac_cv_sys_largefile_CC" >&5
 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
   if test "$ac_cv_sys_largefile_CC" != no; then
     CC=$CC$ac_cv_sys_largefile_CC
   fi
 
-  echo "$as_me:2758: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+  echo "$as_me:2628: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2763,7 +2633,7 @@
   while :; do
   ac_cv_sys_file_offset_bits=no
   cat >conftest.$ac_ext <<_ACEOF
-#line 2766 "configure"
+#line 2636 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -2774,12 +2644,6 @@
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -2789,16 +2653,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2792: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2656: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2795: \$? = $ac_status" >&5
+  echo "$as_me:2659: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2798: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2662: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2801: \$? = $ac_status" >&5
+  echo "$as_me:2665: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -2807,7 +2671,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 2810 "configure"
+#line 2674 "configure"
 #include "confdefs.h"
 #define _FILE_OFFSET_BITS 64
 #include <sys/types.h>
@@ -2819,12 +2683,6 @@
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -2834,16 +2692,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2837: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2695: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2840: \$? = $ac_status" >&5
+  echo "$as_me:2698: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2843: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2701: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2846: \$? = $ac_status" >&5
+  echo "$as_me:2704: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_file_offset_bits=64; break
 else
@@ -2854,17 +2712,17 @@
   break
 done
 fi
-echo "$as_me:2857: result: $ac_cv_sys_file_offset_bits" >&5
+echo "$as_me:2715: result: $ac_cv_sys_file_offset_bits" >&5
 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
 if test "$ac_cv_sys_file_offset_bits" != no; then
 
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
+EOF
 
 fi
 rm -f conftest*
-  echo "$as_me:2867: checking for _LARGE_FILES value needed for large files" >&5
+  echo "$as_me:2725: checking for _LARGE_FILES value needed for large files" >&5
 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_large_files+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2872,7 +2730,7 @@
   while :; do
   ac_cv_sys_large_files=no
   cat >conftest.$ac_ext <<_ACEOF
-#line 2875 "configure"
+#line 2733 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -2883,12 +2741,6 @@
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -2898,16 +2750,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2904: \$? = $ac_status" >&5
+  echo "$as_me:2756: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2907: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2759: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2910: \$? = $ac_status" >&5
+  echo "$as_me:2762: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -2916,7 +2768,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 2919 "configure"
+#line 2771 "configure"
 #include "confdefs.h"
 #define _LARGE_FILES 1
 #include <sys/types.h>
@@ -2928,12 +2780,6 @@
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -2943,16 +2789,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2946: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2792: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:2949: \$? = $ac_status" >&5
+  echo "$as_me:2795: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:2952: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2798: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:2955: \$? = $ac_status" >&5
+  echo "$as_me:2801: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_large_files=1; break
 else
@@ -2963,35 +2809,35 @@
   break
 done
 fi
-echo "$as_me:2966: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:2812: result: $ac_cv_sys_large_files" >&5
 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
 if test "$ac_cv_sys_large_files" != no; then
 
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
+EOF
 
 fi
 rm -f conftest*
 fi
 
 if test -z "$AR" ; then
-	{ { echo "$as_me:2979: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
+	{ { echo "$as_me:2825: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
 echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 # Use LOGIN_PROGRAM from environment if possible
 if test ! -z "$LOGIN_PROGRAM" ; then
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
-_ACEOF
+EOF
 
 else
 	# Search for login
 	# Extract the first word of "login", so it can be a program name with args.
 set dummy login; ac_word=$2
-echo "$as_me:2994: checking for $ac_word" >&5
+echo "$as_me:2840: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3008,7 +2854,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_LOGIN_PROGRAM_FALLBACK="$ac_dir/$ac_word"
-   echo "$as_me:3011: found $ac_dir/$ac_word" >&5
+   echo "$as_me:2857: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -3019,17 +2865,17 @@
 LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
 
 if test -n "$LOGIN_PROGRAM_FALLBACK"; then
-  echo "$as_me:3022: result: $LOGIN_PROGRAM_FALLBACK" >&5
+  echo "$as_me:2868: result: $LOGIN_PROGRAM_FALLBACK" >&5
 echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6
 else
-  echo "$as_me:3025: result: no" >&5
+  echo "$as_me:2871: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 	if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
-		cat >>confdefs.h <<_ACEOF
+		cat >>confdefs.h <<EOF
 #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
-_ACEOF
+EOF
 
 	fi
 fi
@@ -3038,7 +2884,7 @@
 	LD=$CC
 fi
 
-echo "$as_me:3041: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:2887: checking for $CC option to accept ANSI C" >&5
 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
 if test "${ac_cv_prog_cc_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3046,7 +2892,7 @@
   ac_cv_prog_cc_stdc=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
-#line 3049 "configure"
+#line 2895 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -3076,12 +2922,6 @@
 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
 int argc;
 char **argv;
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3101,16 +2941,16 @@
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3104: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2944: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3107: \$? = $ac_status" >&5
+  echo "$as_me:2947: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3110: \"$ac_try\"") >&5
+  { (eval echo "$as_me:2950: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3113: \$? = $ac_status" >&5
+  echo "$as_me:2953: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_prog_cc_stdc=$ac_arg
 break
@@ -3127,15 +2967,15 @@
 
 case "x$ac_cv_prog_cc_stdc" in
   x|xno)
-    echo "$as_me:3130: result: none needed" >&5
+    echo "$as_me:2970: result: none needed" >&5
 echo "${ECHO_T}none needed" >&6 ;;
   *)
-    echo "$as_me:3133: result: $ac_cv_prog_cc_stdc" >&5
+    echo "$as_me:2973: result: $ac_cv_prog_cc_stdc" >&5
 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
     CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
 
-echo "$as_me:3138: checking for inline" >&5
+echo "$as_me:2978: checking for inline" >&5
 echo $ECHO_N "checking for inline... $ECHO_C" >&6
 if test "${ac_cv_c_inline+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3143,7 +2983,7 @@
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat >conftest.$ac_ext <<_ACEOF
-#line 3146 "configure"
+#line 2986 "configure"
 #include "confdefs.h"
 #ifndef __cplusplus
 static $ac_kw int static_foo () {return 0; }
@@ -3152,16 +2992,16 @@
 
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3155: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2995: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:3158: \$? = $ac_status" >&5
+  echo "$as_me:2998: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:3161: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3001: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3164: \$? = $ac_status" >&5
+  echo "$as_me:3004: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_inline=$ac_kw; break
 else
@@ -3172,18 +3012,18 @@
 done
 
 fi
-echo "$as_me:3175: result: $ac_cv_c_inline" >&5
+echo "$as_me:3015: result: $ac_cv_c_inline" >&5
 echo "${ECHO_T}$ac_cv_c_inline" >&6
 case $ac_cv_c_inline in
   inline | yes) ;;
   no)
-cat >>confdefs.h <<\_ACEOF
+cat >>confdefs.h <<\EOF
 #define inline
-_ACEOF
+EOF
  ;;
-  *)  cat >>confdefs.h <<_ACEOF
+  *)  cat >>confdefs.h <<EOF
 #define inline $ac_cv_c_inline
-_ACEOF
+EOF
  ;;
 esac
 
@@ -3200,13 +3040,13 @@
 	if (test "$LD" != "gcc" && test -z "$blibpath"); then
 		blibpath="/usr/lib:/lib:/usr/local/lib"
 	fi
-	echo "$as_me:3203: checking for authenticate" >&5
+	echo "$as_me:3043: checking for authenticate" >&5
 echo $ECHO_N "checking for authenticate... $ECHO_C" >&6
 if test "${ac_cv_func_authenticate+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3209 "configure"
+#line 3049 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char authenticate (); below.  */
@@ -3220,12 +3060,6 @@
 char authenticate ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3243,16 +3077,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3246: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3080: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3249: \$? = $ac_status" >&5
+  echo "$as_me:3083: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3252: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3086: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3255: \$? = $ac_status" >&5
+  echo "$as_me:3089: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_authenticate=yes
 else
@@ -3262,61 +3096,61 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:3265: result: $ac_cv_func_authenticate" >&5
+echo "$as_me:3099: result: $ac_cv_func_authenticate" >&5
 echo "${ECHO_T}$ac_cv_func_authenticate" >&6
 if test $ac_cv_func_authenticate = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define WITH_AIXAUTHENTICATE 1
-_ACEOF
+EOF
 
 fi
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_GETADDRINFO 1
-_ACEOF
+EOF
 
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define DISABLE_LASTLOG 1
-_ACEOF
+EOF
 
 	;;
 *-*-cygwin*)
 	LIBS="$LIBS -lregex /usr/lib/textmode.o"
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_CYGWIN 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_SHADOW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define IPV4_DEFAULT 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define IP_TOS_IS_BROKEN 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define NO_X11_UNIX_SOCKETS 1
-_ACEOF
+EOF
 
 	;;
 *-*-dgux*)
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define IP_TOS_IS_BROKEN 1
-_ACEOF
+EOF
 
 	;;
 *-*-darwin*)
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_GETADDRINFO 1
-_ACEOF
+EOF
 
 	;;
 *-*-hpux10*)
@@ -3325,46 +3159,46 @@
 	fi
 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
 	IPADDR_IN_DISPLAY=yes
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_SHADOW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_UTMP 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define SPT_TYPE SPT_PSTAT
-_ACEOF
+EOF
 
 	LIBS="$LIBS -lxnet -lsec"
 	;;
 *-*-hpux11*)
 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
 	IPADDR_IN_DISPLAY=yes
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define PAM_SUN_CODEBASE 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_SHADOW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_UTMP 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define SPT_TYPE SPT_PSTAT
-_ACEOF
+EOF
 
 	LIBS="$LIBS -lxnet -lsec"
 	;;
@@ -3372,34 +3206,34 @@
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS"
 	PATH="$PATH:/usr/etc"
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_INET_NTOA 1
-_ACEOF
+EOF
 
 	;;
 *-*-irix6*)
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS"
 	PATH="$PATH:/usr/etc"
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define WITH_IRIX_ARRAY 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define WITH_IRIX_PROJECT 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define WITH_IRIX_AUDIT 1
-_ACEOF
+EOF
 
-	echo "$as_me:3396: checking for jlimit_startjob" >&5
+	echo "$as_me:3230: checking for jlimit_startjob" >&5
 echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6
 if test "${ac_cv_func_jlimit_startjob+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3402 "configure"
+#line 3236 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char jlimit_startjob (); below.  */
@@ -3413,12 +3247,6 @@
 char jlimit_startjob ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3436,16 +3264,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3439: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3267: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3442: \$? = $ac_status" >&5
+  echo "$as_me:3270: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3445: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3273: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3448: \$? = $ac_status" >&5
+  echo "$as_me:3276: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_jlimit_startjob=yes
 else
@@ -3455,40 +3283,40 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:3458: result: $ac_cv_func_jlimit_startjob" >&5
+echo "$as_me:3286: result: $ac_cv_func_jlimit_startjob" >&5
 echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6
 if test $ac_cv_func_jlimit_startjob = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define WITH_IRIX_JOBS 1
-_ACEOF
+EOF
 
 fi
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_INET_NTOA 1
-_ACEOF
+EOF
 
 	;;
 *-*-linux*)
 	no_dev_ptmx=1
 	check_for_libcrypt_later=1
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DONT_TRY_OTHER_AF 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define PAM_TTY_KLUDGE 1
-_ACEOF
+EOF
 
 	inet6_default_4in6=yes
 	;;
 mips-sony-bsd|mips-sony-newsos4)
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_NEWS4 1
-_ACEOF
+EOF
 
 	SONY=1
-	echo "$as_me:3491: checking for xatexit in -liberty" >&5
+	echo "$as_me:3319: checking for xatexit in -liberty" >&5
 echo $ECHO_N "checking for xatexit in -liberty... $ECHO_C" >&6
 if test "${ac_cv_lib_iberty_xatexit+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3496,7 +3324,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-liberty  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 3499 "configure"
+#line 3327 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -3506,12 +3334,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char xatexit ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3521,16 +3343,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3524: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3346: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3527: \$? = $ac_status" >&5
+  echo "$as_me:3349: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3530: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3352: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3533: \$? = $ac_status" >&5
+  echo "$as_me:3355: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_iberty_xatexit=yes
 else
@@ -3541,15 +3363,15 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:3544: result: $ac_cv_lib_iberty_xatexit" >&5
+echo "$as_me:3366: result: $ac_cv_lib_iberty_xatexit" >&5
 echo "${ECHO_T}$ac_cv_lib_iberty_xatexit" >&6
 if test $ac_cv_lib_iberty_xatexit = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_XATEXIT 1
-_ACEOF
+EOF
 
 else
-  { { echo "$as_me:3552: error: *** libiberty missing - please install first or check config.log ***" >&5
+  { { echo "$as_me:3374: error: *** libiberty missing - please install first or check config.log ***" >&5
 echo "$as_me: error: *** libiberty missing - please install first or check config.log ***" >&2;}
    { (exit 1); exit 1; }; }
 
@@ -3567,21 +3389,21 @@
 	conf_utmp_location=/etc/utmp
 	conf_wtmp_location=/usr/adm/wtmp
 	MAIL=/usr/spool/mail
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_NEXT 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_REALPATH 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_SAVED_UIDS 1
-_ACEOF
+EOF
 
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	CFLAGS="$CFLAGS"
@@ -3590,40 +3412,40 @@
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
 	need_dash_r=1
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define PAM_SUN_CODEBASE 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define LOGIN_NEEDS_UTMPX 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define LOGIN_NEEDS_TERM 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define PAM_TTY_KLUDGE 1
-_ACEOF
+EOF
 
 	# hardwire lastlog location (can't detect it on some versions)
 	conf_lastlog_location="/var/adm/lastlog"
-	echo "$as_me:3611: checking for obsolete utmp and wtmp in solaris2.x" >&5
+	echo "$as_me:3433: checking for obsolete utmp and wtmp in solaris2.x" >&5
 echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6
 	sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
 	if test "$sol2ver" -ge 8; then
-		echo "$as_me:3615: result: yes" >&5
+		echo "$as_me:3437: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define DISABLE_UTMP 1
-_ACEOF
+EOF
 
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define DISABLE_WTMP 1
-_ACEOF
+EOF
 
 	else
-		echo "$as_me:3626: result: no" >&5
+		echo "$as_me:3448: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 	;;
@@ -3633,13 +3455,13 @@
 for ac_func in getpwanam
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3636: checking for $ac_func" >&5
+echo "$as_me:3458: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3642 "configure"
+#line 3464 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -3653,12 +3475,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3676,16 +3492,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3679: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3495: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3682: \$? = $ac_status" >&5
+  echo "$as_me:3498: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3685: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3501: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3688: \$? = $ac_status" >&5
+  echo "$as_me:3504: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -3695,39 +3511,39 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:3698: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:3514: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define PAM_SUN_CODEBASE 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_BOGUS_SYS_QUEUE_H 1
-_ACEOF
+EOF
 
 	conf_utmp_location=/etc/utmp
 	conf_wtmp_location=/var/adm/wtmp
 	conf_lastlog_location=/var/adm/lastlog
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
 	;;
 *-ncr-sysv*)
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS -L/usr/local/lib"
 	LIBS="$LIBS -lc89"
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_BOGUS_SYS_QUEUE_H 1
-_ACEOF
+EOF
 
 	;;
 *-sni-sysv*)
@@ -3735,17 +3551,17 @@
 	# /usr/ucblib MUST NOT be searched on ReliantUNIX
 	LDFLAGS="$LDFLAGS -L/usr/local/lib"
 	IPADDR_IN_DISPLAY=yes
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define IP_TOS_IS_BROKEN 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_BOGUS_SYS_QUEUE_H 1
-_ACEOF
+EOF
 
 	# /usr/ucblib/libucb.a no longer needed on ReliantUNIX
 	# Attention: always take care to bind libsocket and libnsl before libc,
@@ -3755,18 +3571,18 @@
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS -L/usr/local/lib"
 #	enable_suid_ssh=no
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
 	;;
 *-*-sysv5*)
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS -L/usr/local/lib"
 #	enable_suid_ssh=no
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
 	;;
 *-*-sysv*)
@@ -3780,40 +3596,40 @@
 	rsh_path="/usr/bin/rcmd"
 	RANLIB=true
 	no_dev_ptmx=1
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_SYS_TERMIO_H 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SCO_PROTECTED_PW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_SHADOW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_BOGUS_SYS_QUEUE_H 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define BROKEN_SAVED_UIDS 1
-_ACEOF
+EOF
 
 for ac_func in getluid setluid
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3810: checking for $ac_func" >&5
+echo "$as_me:3626: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3816 "configure"
+#line 3632 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -3827,12 +3643,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3850,16 +3660,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3853: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3663: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3856: \$? = $ac_status" >&5
+  echo "$as_me:3666: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3859: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3669: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3862: \$? = $ac_status" >&5
+  echo "$as_me:3672: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -3869,12 +3679,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:3872: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:3682: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -3888,32 +3698,32 @@
 	LIBS="$LIBS -lprot -lx -ltinfo -lm"
 	no_dev_ptmx=1
 	rsh_path="/usr/bin/rcmd"
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SCO_PROTECTED_PW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define DISABLE_SHADOW 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_BOGUS_SYS_QUEUE_H 1
-_ACEOF
+EOF
 
 for ac_func in getluid setluid
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:3910: checking for $ac_func" >&5
+echo "$as_me:3720: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 3916 "configure"
+#line 3726 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -3927,12 +3737,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -3950,16 +3754,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3953: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3757: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:3956: \$? = $ac_status" >&5
+  echo "$as_me:3760: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:3959: \"$ac_try\"") >&5
+  { (eval echo "$as_me:3763: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:3962: \$? = $ac_status" >&5
+  echo "$as_me:3766: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -3969,12 +3773,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:3972: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:3776: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -3984,15 +3788,15 @@
 *-*-unicos*)
 	no_libsocket=1
 	no_libnsl=1
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
 	LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
 	LIBS="$LIBS -lgen -lrsc"
 	;;
 *-dec-osf*)
-	echo "$as_me:3995: checking for Digital Unix SIA" >&5
+	echo "$as_me:3799: checking for Digital Unix SIA" >&5
 echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6
 	no_osfsia=""
 
@@ -4001,7 +3805,7 @@
   withval="$with_osfsia"
 
 			if test "x$withval" = "xno" ; then
-				echo "$as_me:4004: result: disabled" >&5
+				echo "$as_me:3808: result: disabled" >&5
 echo "${ECHO_T}disabled" >&6
 				no_osfsia=1
 			fi
@@ -4009,44 +3813,44 @@
 fi;
 	if test -z "$no_osfsia" ; then
 		if test -f /etc/sia/matrix.conf; then
-			echo "$as_me:4012: result: yes" >&5
+			echo "$as_me:3816: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_OSF_SIA 1
-_ACEOF
+EOF
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define DISABLE_LOGIN 1
-_ACEOF
+EOF
 
 			LIBS="$LIBS -lsecurity -ldb -lm -laud"
 		else
-			echo "$as_me:4024: result: no" >&5
+			echo "$as_me:3828: result: no" >&5
 echo "${ECHO_T}no" >&6
 		fi
 	fi
 	;;
 
 *-*-nto-qnx)
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define USE_PIPES 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define NO_X11_UNIX_SOCKETS 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define MISSING_NFDBITS 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define MISSING_HOWMANY 1
-_ACEOF
+EOF
 
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define MISSING_FD_MASK 1
-_ACEOF
+EOF
 
 	;;
 esac
@@ -4093,27 +3897,51 @@
 
 fi;
 
-echo "$as_me:4096: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
+# Check whether --with-pcre or --without-pcre was given.
+if test "${with_pcre+set}" = set; then
+  withval="$with_pcre"
+
+		case "$withval" in
+		no) ;;
+		*)
+			if test "x$withval" != "xyes"; then
+				if test -d "$withval/lib"; then
+					if test -n "${need_dash_r}"; then
+						LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+					else
+						LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+					fi
+				else
+					if test -n "${need_dash_r}"; then
+						LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+					else
+						LDFLAGS="-L${withval} ${LDFLAGS}"
+					fi
+				fi
+				if test -d "$withval/include"; then
+					CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
+				else
+					CPPFLAGS="-I${withval} ${CPPFLAGS}"
+				fi
+			fi
+
+			echo "$as_me:3928: checking for pcreposix.h" >&5
+echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6
+if test "${ac_cv_header_pcreposix_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4102 "configure"
+#line 3934 "configure"
 #include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
+#include <pcreposix.h>
 _ACEOF
-if { (eval echo "$as_me:4110: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:3938: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:4116: \$? = $ac_status" >&5
+  echo "$as_me:3944: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4124,337 +3952,56 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_cv_header_stdc=yes
+  ac_cv_header_pcreposix_h=yes
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_cv_header_stdc=no
+  ac_cv_header_pcreposix_h=no
 fi
 rm -f conftest.err conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-#line 4138 "configure"
+fi
+echo "$as_me:3963: result: $ac_cv_header_pcreposix_h" >&5
+echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6
+if test $ac_cv_header_pcreposix_h = yes; then
+  echo "$as_me:3966: checking for pcre_info in -lpcre" >&5
+echo $ECHO_N "checking for pcre_info in -lpcre... $ECHO_C" >&6
+if test "${ac_cv_lib_pcre_pcre_info+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpcre  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3974 "configure"
 #include "confdefs.h"
-#include <string.h>
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pcre_info ();
+int
+main ()
+{
+pcre_info ();
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-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 <<_ACEOF
-#line 4156 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 4177 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
-                     || ('j' <= (c) && (c) <= 'r') \
-                     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-        || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4203: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:4206: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:4208: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:4211: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_header_stdc=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:4224: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:4240: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 4246 "configure"
-#include "confdefs.h"
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4253: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:4256: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4259: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:4262: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:4272: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-# Check whether --with-pcre or --without-pcre was given.
-if test "${with_pcre+set}" = set; then
-  withval="$with_pcre"
-
-		case "$withval" in
-		no) ;;
-		*)
-			if test "x$withval" != "xyes"; then
-				if test -d "$withval/lib"; then
-					if test -n "${need_dash_r}"; then
-						LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
-					else
-						LDFLAGS="-L${withval}/lib ${LDFLAGS}"
-					fi
-				else
-					if test -n "${need_dash_r}"; then
-						LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
-					else
-						LDFLAGS="-L${withval} ${LDFLAGS}"
-					fi
-				fi
-				if test -d "$withval/include"; then
-					CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
-				else
-					CPPFLAGS="-I${withval} ${CPPFLAGS}"
-				fi
-			fi
-
-			if test "${ac_cv_header_pcreposix_h+set}" = set; then
-  echo "$as_me:4312: checking for pcreposix.h" >&5
-echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6
-if test "${ac_cv_header_pcreposix_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:4317: result: $ac_cv_header_pcreposix_h" >&5
-echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:4321: checking pcreposix.h usability" >&5
-echo $ECHO_N "checking pcreposix.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 4324 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <pcreposix.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4330: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:4333: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:4336: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:4339: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:4348: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:4352: checking pcreposix.h presence" >&5
-echo $ECHO_N "checking pcreposix.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 4355 "configure"
-#include "confdefs.h"
-#include <pcreposix.h>
-_ACEOF
-if { (eval echo "$as_me:4359: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:4365: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:4383: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:4389: WARNING: pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: pcreposix.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:4391: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:4394: WARNING: pcreposix.h: present but cannot be compiled." >&5
-echo "$as_me: WARNING: pcreposix.h: present but cannot be compiled." >&2;}
-    { echo "$as_me:4396: WARNING: pcreposix.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: pcreposix.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:4398: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: pcreposix.h: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:4401: checking for pcreposix.h" >&5
-echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6
-if test "${ac_cv_header_pcreposix_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_pcreposix_h=$ac_header_preproc
-fi
-echo "$as_me:4408: result: $ac_cv_header_pcreposix_h" >&5
-echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6
-
-fi
-if test $ac_cv_header_pcreposix_h = yes; then
-  echo "$as_me:4413: checking for pcre_info in -lpcre" >&5
-echo $ECHO_N "checking for pcre_info in -lpcre... $ECHO_C" >&6
-if test "${ac_cv_lib_pcre_pcre_info+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpcre  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 4421 "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char pcre_info ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-pcre_info ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4446: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:4449: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4452: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:4455: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_pcre_pcre_info=yes
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3993: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:3996: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:3999: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:4002: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_pcre_pcre_info=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
@@ -4463,24 +4010,24 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4466: result: $ac_cv_lib_pcre_pcre_info" >&5
+echo "$as_me:4013: result: $ac_cv_lib_pcre_pcre_info" >&5
 echo "${ECHO_T}$ac_cv_lib_pcre_pcre_info" >&6
 if test $ac_cv_lib_pcre_pcre_info = yes; then
 
-					cat >>confdefs.h <<\_ACEOF
+					cat >>confdefs.h <<\EOF
 #define HAVE_LIBPCRE 1
-_ACEOF
+EOF
 
 					LIBS="$LIBS -lpcreposix -lpcre"
 					no_comp_check=yes
 else
-  { { echo "$as_me:4477: error: *** unable to locate pcre library ***" >&5
+  { { echo "$as_me:4024: error: *** unable to locate pcre library ***" >&5
 echo "$as_me: error: *** unable to locate pcre library ***" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 else
-  { { echo "$as_me:4483: error: *** unable to locate pcreposix.h include file ***" >&5
+  { { echo "$as_me:4030: error: *** unable to locate pcreposix.h include file ***" >&5
 echo "$as_me: error: *** unable to locate pcreposix.h include file ***" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -4491,13 +4038,13 @@
 fi;
 
 # Checks for libraries.
-echo "$as_me:4494: checking for yp_match" >&5
+echo "$as_me:4041: checking for yp_match" >&5
 echo $ECHO_N "checking for yp_match... $ECHO_C" >&6
 if test "${ac_cv_func_yp_match+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4500 "configure"
+#line 4047 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char yp_match (); below.  */
@@ -4511,12 +4058,6 @@
 char yp_match ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4534,16 +4075,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4537: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4078: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4540: \$? = $ac_status" >&5
+  echo "$as_me:4081: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4543: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4084: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4546: \$? = $ac_status" >&5
+  echo "$as_me:4087: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_yp_match=yes
 else
@@ -4553,13 +4094,13 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:4556: result: $ac_cv_func_yp_match" >&5
+echo "$as_me:4097: result: $ac_cv_func_yp_match" >&5
 echo "${ECHO_T}$ac_cv_func_yp_match" >&6
 if test $ac_cv_func_yp_match = yes; then
   :
 else
 
-echo "$as_me:4562: checking for yp_match in -lnsl" >&5
+echo "$as_me:4103: checking for yp_match in -lnsl" >&5
 echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6
 if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4567,7 +4108,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lnsl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4570 "configure"
+#line 4111 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4577,12 +4118,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char yp_match ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4592,16 +4127,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4595: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4130: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4598: \$? = $ac_status" >&5
+  echo "$as_me:4133: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4601: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4136: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4604: \$? = $ac_status" >&5
+  echo "$as_me:4139: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_nsl_yp_match=yes
 else
@@ -4612,12 +4147,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4615: result: $ac_cv_lib_nsl_yp_match" >&5
+echo "$as_me:4150: result: $ac_cv_lib_nsl_yp_match" >&5
 echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6
 if test $ac_cv_lib_nsl_yp_match = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBNSL 1
-_ACEOF
+EOF
 
   LIBS="-lnsl $LIBS"
 
@@ -4625,13 +4160,13 @@
 
 fi
 
-echo "$as_me:4628: checking for setsockopt" >&5
+echo "$as_me:4163: checking for setsockopt" >&5
 echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
 if test "${ac_cv_func_setsockopt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4634 "configure"
+#line 4169 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setsockopt (); below.  */
@@ -4645,12 +4180,6 @@
 char setsockopt ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4668,16 +4197,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4671: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4200: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4674: \$? = $ac_status" >&5
+  echo "$as_me:4203: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4677: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4206: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4680: \$? = $ac_status" >&5
+  echo "$as_me:4209: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_setsockopt=yes
 else
@@ -4687,13 +4216,13 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:4690: result: $ac_cv_func_setsockopt" >&5
+echo "$as_me:4219: result: $ac_cv_func_setsockopt" >&5
 echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
 if test $ac_cv_func_setsockopt = yes; then
   :
 else
 
-echo "$as_me:4696: checking for setsockopt in -lsocket" >&5
+echo "$as_me:4225: checking for setsockopt in -lsocket" >&5
 echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4701,7 +4230,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsocket  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4704 "configure"
+#line 4233 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4711,12 +4240,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char setsockopt ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4726,16 +4249,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4729: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4252: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4732: \$? = $ac_status" >&5
+  echo "$as_me:4255: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4735: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4258: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4738: \$? = $ac_status" >&5
+  echo "$as_me:4261: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_socket_setsockopt=yes
 else
@@ -4746,12 +4269,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4749: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "$as_me:4272: result: $ac_cv_lib_socket_setsockopt" >&5
 echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
 if test $ac_cv_lib_socket_setsockopt = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBSOCKET 1
-_ACEOF
+EOF
 
   LIBS="-lsocket $LIBS"
 
@@ -4761,7 +4284,7 @@
 
 if test "x$with_tcp_wrappers" != "xno" ; then
     if test "x$do_sco3_extra_lib_check" = "xyes" ; then
-	echo "$as_me:4764: checking for innetgr in -lrpc" >&5
+	echo "$as_me:4287: checking for innetgr in -lrpc" >&5
 echo $ECHO_N "checking for innetgr in -lrpc... $ECHO_C" >&6
 if test "${ac_cv_lib_rpc_innetgr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4769,7 +4292,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lrpc -lyp -lrpc $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4772 "configure"
+#line 4295 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4779,12 +4302,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char innetgr ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4794,16 +4311,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4797: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4314: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4800: \$? = $ac_status" >&5
+  echo "$as_me:4317: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4803: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4320: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4806: \$? = $ac_status" >&5
+  echo "$as_me:4323: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_rpc_innetgr=yes
 else
@@ -4814,7 +4331,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4817: result: $ac_cv_lib_rpc_innetgr" >&5
+echo "$as_me:4334: result: $ac_cv_lib_rpc_innetgr" >&5
 echo "${ECHO_T}$ac_cv_lib_rpc_innetgr" >&6
 if test $ac_cv_lib_rpc_innetgr = yes; then
   LIBS="-lrpc -lyp -lrpc $LIBS"
@@ -4823,13 +4340,13 @@
     fi
 fi
 
-echo "$as_me:4826: checking for getspnam" >&5
+echo "$as_me:4343: checking for getspnam" >&5
 echo $ECHO_N "checking for getspnam... $ECHO_C" >&6
 if test "${ac_cv_func_getspnam+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 4832 "configure"
+#line 4349 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getspnam (); below.  */
@@ -4843,12 +4360,6 @@
 char getspnam ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4866,16 +4377,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4869: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4380: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4872: \$? = $ac_status" >&5
+  echo "$as_me:4383: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4875: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4386: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4878: \$? = $ac_status" >&5
+  echo "$as_me:4389: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_getspnam=yes
 else
@@ -4885,12 +4396,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:4888: result: $ac_cv_func_getspnam" >&5
+echo "$as_me:4399: result: $ac_cv_func_getspnam" >&5
 echo "${ECHO_T}$ac_cv_func_getspnam" >&6
 if test $ac_cv_func_getspnam = yes; then
   :
 else
-  echo "$as_me:4893: checking for getspnam in -lgen" >&5
+  echo "$as_me:4404: checking for getspnam in -lgen" >&5
 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4898,7 +4409,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgen  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4901 "configure"
+#line 4412 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4908,12 +4419,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char getspnam ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -4923,16 +4428,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4926: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4431: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:4929: \$? = $ac_status" >&5
+  echo "$as_me:4434: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:4932: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4437: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:4935: \$? = $ac_status" >&5
+  echo "$as_me:4440: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gen_getspnam=yes
 else
@@ -4943,7 +4448,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:4946: result: $ac_cv_lib_gen_getspnam" >&5
+echo "$as_me:4451: result: $ac_cv_lib_gen_getspnam" >&5
 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
 if test $ac_cv_lib_gen_getspnam = yes; then
   LIBS="$LIBS -lgen"
@@ -4976,7 +4481,7 @@
 
 fi;
 
-echo "$as_me:4979: checking for deflate in -lz" >&5
+echo "$as_me:4484: checking for deflate in -lz" >&5
 echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
 if test "${ac_cv_lib_z_deflate+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4984,7 +4489,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lz  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 4987 "configure"
+#line 4492 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -4994,12 +4499,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char deflate ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5009,16 +4508,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5012: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4511: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5015: \$? = $ac_status" >&5
+  echo "$as_me:4514: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5018: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4517: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5021: \$? = $ac_status" >&5
+  echo "$as_me:4520: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_z_deflate=yes
 else
@@ -5029,30 +4528,30 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5032: result: $ac_cv_lib_z_deflate" >&5
+echo "$as_me:4531: result: $ac_cv_lib_z_deflate" >&5
 echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
 if test $ac_cv_lib_z_deflate = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBZ 1
-_ACEOF
+EOF
 
   LIBS="-lz $LIBS"
 
 else
-  { { echo "$as_me:5042: error: *** zlib missing - please install first or check config.log ***" >&5
+  { { echo "$as_me:4541: error: *** zlib missing - please install first or check config.log ***" >&5
 echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 # We don't want to check if we did an pcre override.
 if test -z "$no_comp_check" ; then
-	echo "$as_me:5049: checking for regcomp" >&5
+	echo "$as_me:4548: checking for regcomp" >&5
 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
 if test "${ac_cv_func_regcomp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5055 "configure"
+#line 4554 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char regcomp (); below.  */
@@ -5066,12 +4565,6 @@
 char regcomp ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5089,16 +4582,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5092: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4585: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5095: \$? = $ac_status" >&5
+  echo "$as_me:4588: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5098: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4591: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5101: \$? = $ac_status" >&5
+  echo "$as_me:4594: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_regcomp=yes
 else
@@ -5108,16 +4601,16 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5111: result: $ac_cv_func_regcomp" >&5
+echo "$as_me:4604: result: $ac_cv_func_regcomp" >&5
 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
 if test $ac_cv_func_regcomp = yes; then
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define HAVE_REGCOMP 1
-_ACEOF
+EOF
 
 else
 
-			echo "$as_me:5120: checking for pcre_info in -lpcre" >&5
+			echo "$as_me:4613: checking for pcre_info in -lpcre" >&5
 echo $ECHO_N "checking for pcre_info in -lpcre... $ECHO_C" >&6
 if test "${ac_cv_lib_pcre_pcre_info+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5125,7 +4618,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpcre  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5128 "configure"
+#line 4621 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5135,12 +4628,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char pcre_info ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5150,16 +4637,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5153: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4640: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5156: \$? = $ac_status" >&5
+  echo "$as_me:4643: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5159: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4646: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5162: \$? = $ac_status" >&5
+  echo "$as_me:4649: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_pcre_pcre_info=yes
 else
@@ -5170,19 +4657,19 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5173: result: $ac_cv_lib_pcre_pcre_info" >&5
+echo "$as_me:4660: result: $ac_cv_lib_pcre_pcre_info" >&5
 echo "${ECHO_T}$ac_cv_lib_pcre_pcre_info" >&6
 if test $ac_cv_lib_pcre_pcre_info = yes; then
 
-				cat >>confdefs.h <<\_ACEOF
+				cat >>confdefs.h <<\EOF
 #define HAVE_LIBPCRE 1
-_ACEOF
+EOF
 
 				LIBS="$LIBS -lpcreposix -lpcre"
 
 else
 
-				{ { echo "$as_me:5185: error: *** No regex library found." >&5
+				{ { echo "$as_me:4672: error: *** No regex library found." >&5
 echo "$as_me: error: *** No regex library found." >&2;}
    { (exit 1); exit 1; }; }
 
@@ -5192,13 +4679,13 @@
 
 fi
 
-echo "$as_me:5195: checking for strcasecmp" >&5
+echo "$as_me:4682: checking for strcasecmp" >&5
 echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
 if test "${ac_cv_func_strcasecmp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5201 "configure"
+#line 4688 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strcasecmp (); below.  */
@@ -5212,12 +4699,6 @@
 char strcasecmp ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5235,16 +4716,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5238: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4719: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5241: \$? = $ac_status" >&5
+  echo "$as_me:4722: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5244: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4725: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5247: \$? = $ac_status" >&5
+  echo "$as_me:4728: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_strcasecmp=yes
 else
@@ -5254,12 +4735,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5257: result: $ac_cv_func_strcasecmp" >&5
+echo "$as_me:4738: result: $ac_cv_func_strcasecmp" >&5
 echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
 if test $ac_cv_func_strcasecmp = yes; then
   :
 else
-   echo "$as_me:5262: checking for strcasecmp in -lresolv" >&5
+   echo "$as_me:4743: checking for strcasecmp in -lresolv" >&5
 echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
 if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5267,7 +4748,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lresolv  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5270 "configure"
+#line 4751 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5277,12 +4758,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char strcasecmp ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5292,16 +4767,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5295: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4770: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5298: \$? = $ac_status" >&5
+  echo "$as_me:4773: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5301: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4776: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5304: \$? = $ac_status" >&5
+  echo "$as_me:4779: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_resolv_strcasecmp=yes
 else
@@ -5312,7 +4787,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5315: result: $ac_cv_lib_resolv_strcasecmp" >&5
+echo "$as_me:4790: result: $ac_cv_lib_resolv_strcasecmp" >&5
 echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
 if test $ac_cv_lib_resolv_strcasecmp = yes; then
   LIBS="$LIBS -lresolv"
@@ -5320,13 +4795,13 @@
 
 fi
 
-echo "$as_me:5323: checking for utimes" >&5
+echo "$as_me:4798: checking for utimes" >&5
 echo $ECHO_N "checking for utimes... $ECHO_C" >&6
 if test "${ac_cv_func_utimes+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5329 "configure"
+#line 4804 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char utimes (); below.  */
@@ -5340,12 +4815,6 @@
 char utimes ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5363,16 +4832,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5366: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4835: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5369: \$? = $ac_status" >&5
+  echo "$as_me:4838: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5372: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4841: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5375: \$? = $ac_status" >&5
+  echo "$as_me:4844: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_utimes=yes
 else
@@ -5382,12 +4851,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5385: result: $ac_cv_func_utimes" >&5
+echo "$as_me:4854: result: $ac_cv_func_utimes" >&5
 echo "${ECHO_T}$ac_cv_func_utimes" >&6
 if test $ac_cv_func_utimes = yes; then
   :
 else
-   echo "$as_me:5390: checking for utimes in -lc89" >&5
+   echo "$as_me:4859: checking for utimes in -lc89" >&5
 echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6
 if test "${ac_cv_lib_c89_utimes+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5395,7 +4864,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lc89  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5398 "configure"
+#line 4867 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5405,12 +4874,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char utimes ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5420,16 +4883,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5423: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4886: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5426: \$? = $ac_status" >&5
+  echo "$as_me:4889: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5429: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4892: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5432: \$? = $ac_status" >&5
+  echo "$as_me:4895: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_c89_utimes=yes
 else
@@ -5440,7 +4903,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5443: result: $ac_cv_lib_c89_utimes" >&5
+echo "$as_me:4906: result: $ac_cv_lib_c89_utimes" >&5
 echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6
 if test $ac_cv_lib_c89_utimes = yes; then
   LIBS="$LIBS -lc89"
@@ -5451,61 +4914,23 @@
 for ac_header in libutil.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:5455: checking for $ac_header" >&5
+echo "$as_me:4917: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:5460: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:5464: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 5467 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:5476: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5479: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:5482: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:5491: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:5495: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 5498 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 4923 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:5502: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4927: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:5508: \$? = $ac_status" >&5
+  echo "$as_me:4933: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5516,52 +4941,25 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  eval "$as_ac_Header=no"
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:5526: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:5532: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:5534: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:5537: WARNING: $ac_header: present but cannot be compiled." >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
-    { echo "$as_me:5539: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:5541: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:5544: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:5551: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:4952: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
-
 done
 
-echo "$as_me:5564: checking for library containing login" >&5
+echo "$as_me:4962: checking for library containing login" >&5
 echo $ECHO_N "checking for library containing login... $ECHO_C" >&6
 if test "${ac_cv_search_login+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5569,7 +4967,7 @@
   ac_func_search_save_LIBS=$LIBS
 ac_cv_search_login=no
 cat >conftest.$ac_ext <<_ACEOF
-#line 5572 "configure"
+#line 4970 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5579,12 +4977,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char login ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5594,16 +4986,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5597: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4989: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5600: \$? = $ac_status" >&5
+  echo "$as_me:4992: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5603: \"$ac_try\"") >&5
+  { (eval echo "$as_me:4995: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5606: \$? = $ac_status" >&5
+  echo "$as_me:4998: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_search_login="none required"
 else
@@ -5615,7 +5007,7 @@
   for ac_lib in util bsd; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
     cat >conftest.$ac_ext <<_ACEOF
-#line 5618 "configure"
+#line 5010 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5625,12 +5017,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char login ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5640,16 +5026,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5643: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5029: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5646: \$? = $ac_status" >&5
+  echo "$as_me:5032: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5649: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5035: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5652: \$? = $ac_status" >&5
+  echo "$as_me:5038: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_search_login="-l$ac_lib"
 break
@@ -5662,26 +5048,26 @@
 fi
 LIBS=$ac_func_search_save_LIBS
 fi
-echo "$as_me:5665: result: $ac_cv_search_login" >&5
+echo "$as_me:5051: result: $ac_cv_search_login" >&5
 echo "${ECHO_T}$ac_cv_search_login" >&6
 if test "$ac_cv_search_login" != no; then
   test "$ac_cv_search_login" = "none required" || LIBS="$ac_cv_search_login $LIBS"
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_LOGIN 1
-_ACEOF
+EOF
 
 fi
 
 for ac_func in logout updwtmp logwtmp
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5678: checking for $ac_func" >&5
+echo "$as_me:5064: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5684 "configure"
+#line 5070 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -5695,12 +5081,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5718,16 +5098,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5721: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5101: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5724: \$? = $ac_status" >&5
+  echo "$as_me:5104: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5727: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5107: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5730: \$? = $ac_status" >&5
+  echo "$as_me:5110: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -5737,12 +5117,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5740: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5120: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -5750,13 +5130,13 @@
 for ac_func in strftime
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5753: checking for $ac_func" >&5
+echo "$as_me:5133: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 5759 "configure"
+#line 5139 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -5770,12 +5150,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5793,16 +5167,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5796: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5170: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5799: \$? = $ac_status" >&5
+  echo "$as_me:5173: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5802: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5176: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5805: \$? = $ac_status" >&5
+  echo "$as_me:5179: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -5812,16 +5186,16 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:5815: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5189: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 else
   # strftime is in -lintl on SCO UNIX.
-echo "$as_me:5824: checking for strftime in -lintl" >&5
+echo "$as_me:5198: checking for strftime in -lintl" >&5
 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
 if test "${ac_cv_lib_intl_strftime+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5829,7 +5203,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lintl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 5832 "configure"
+#line 5206 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -5839,12 +5213,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char strftime ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -5854,16 +5222,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5857: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5225: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:5860: \$? = $ac_status" >&5
+  echo "$as_me:5228: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:5863: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5231: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5866: \$? = $ac_status" >&5
+  echo "$as_me:5234: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_intl_strftime=yes
 else
@@ -5874,12 +5242,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:5877: result: $ac_cv_lib_intl_strftime" >&5
+echo "$as_me:5245: result: $ac_cv_lib_intl_strftime" >&5
 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
 if test $ac_cv_lib_intl_strftime = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_STRFTIME 1
-_ACEOF
+EOF
 
 LIBS="-lintl $LIBS"
 fi
@@ -5901,61 +5269,23 @@
 	util.h utime.h utmp.h utmpx.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:5905: checking for $ac_header" >&5
+echo "$as_me:5272: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:5910: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:5914: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 5917 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5923: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:5926: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5929: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:5932: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:5941: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:5945: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 5948 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 5278 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:5952: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5282: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:5958: \$? = $ac_status" >&5
+  echo "$as_me:5288: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5966,56 +5296,29 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  eval "$as_ac_Header=no"
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:5976: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:5982: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:5984: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:5987: WARNING: $ac_header: present but cannot be compiled." >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
-    { echo "$as_me:5989: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:5991: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:5994: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:6001: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5307: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
-
 done
 
 # Check for ALTDIRFUNC glob() extension
-echo "$as_me:6015: checking for GLOB_ALTDIRFUNC support" >&5
+echo "$as_me:5318: checking for GLOB_ALTDIRFUNC support" >&5
 echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 6018 "configure"
+#line 5321 "configure"
 #include "confdefs.h"
 
 		#include <glob.h>
@@ -6027,26 +5330,26 @@
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "FOUNDIT" >/dev/null 2>&1; then
 
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define GLOB_HAS_ALTDIRFUNC 1
-_ACEOF
+EOF
 
-		echo "$as_me:6034: result: yes" >&5
+		echo "$as_me:5337: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
 
-		echo "$as_me:6039: result: no" >&5
+		echo "$as_me:5342: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
 rm -f conftest*
 
 # Check for g.gl_matchc glob() extension
-echo "$as_me:6046: checking for gl_matchc field in glob_t" >&5
+echo "$as_me:5349: checking for gl_matchc field in glob_t" >&5
 echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 6049 "configure"
+#line 5352 "configure"
 #include "confdefs.h"
 
                 #include <glob.h>
@@ -6056,30 +5359,30 @@
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "FOUNDIT" >/dev/null 2>&1; then
 
-                cat >>confdefs.h <<\_ACEOF
+                cat >>confdefs.h <<\EOF
 #define GLOB_HAS_GL_MATCHC 1
-_ACEOF
+EOF
 
-                echo "$as_me:6063: result: yes" >&5
+                echo "$as_me:5366: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
 
-                echo "$as_me:6068: result: no" >&5
+                echo "$as_me:5371: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
 rm -f conftest*
 
-echo "$as_me:6074: checking whether struct dirent allocates space for d_name" >&5
+echo "$as_me:5377: checking whether struct dirent allocates space for d_name" >&5
 echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6
 if test "$cross_compiling" = yes; then
-  { { echo "$as_me:6077: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:5380: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6082 "configure"
+#line 5385 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -6088,28 +5391,28 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6091: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5394: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6094: \$? = $ac_status" >&5
+  echo "$as_me:5397: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:6096: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5399: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6099: \$? = $ac_status" >&5
+  echo "$as_me:5402: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:6101: result: yes" >&5
+  echo "$as_me:5404: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-		echo "$as_me:6108: result: no" >&5
+		echo "$as_me:5411: result: no" >&5
 echo "${ECHO_T}no" >&6
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
-_ACEOF
+EOF
 
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -6129,20 +5432,20 @@
 				LDFLAGS="$LDFLAGS -L${withval}/lib"
 			fi
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define SKEY 1
-_ACEOF
+EOF
 
 			LIBS="-lskey $LIBS"
 			SKEY_MSG="yes"
 
-			echo "$as_me:6139: checking for skey_keyinfo" >&5
+			echo "$as_me:5442: checking for skey_keyinfo" >&5
 echo $ECHO_N "checking for skey_keyinfo... $ECHO_C" >&6
 if test "${ac_cv_func_skey_keyinfo+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6145 "configure"
+#line 5448 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char skey_keyinfo (); below.  */
@@ -6156,12 +5459,6 @@
 char skey_keyinfo ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6179,16 +5476,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6182: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5479: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6185: \$? = $ac_status" >&5
+  echo "$as_me:5482: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6188: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5485: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6191: \$? = $ac_status" >&5
+  echo "$as_me:5488: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_skey_keyinfo=yes
 else
@@ -6198,13 +5495,13 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6201: result: $ac_cv_func_skey_keyinfo" >&5
+echo "$as_me:5498: result: $ac_cv_func_skey_keyinfo" >&5
 echo "${ECHO_T}$ac_cv_func_skey_keyinfo" >&6
 if test $ac_cv_func_skey_keyinfo = yes; then
   :
 else
 
-					{ { echo "$as_me:6207: error: ** Incomplete or missing s/key libraries." >&5
+					{ { echo "$as_me:5504: error: ** Incomplete or missing s/key libraries." >&5
 echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
    { (exit 1); exit 1; }; }
 
@@ -6246,21 +5543,15 @@
 				fi
 			fi
 			LIBS="-lwrap $LIBS"
-			echo "$as_me:6249: checking for libwrap" >&5
+			echo "$as_me:5546: checking for libwrap" >&5
 echo $ECHO_N "checking for libwrap... $ECHO_C" >&6
 			cat >conftest.$ac_ext <<_ACEOF
-#line 6252 "configure"
+#line 5549 "configure"
 #include "confdefs.h"
 
 #include <tcpd.h>
 					int deny_severity = 0, allow_severity = 0;
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6270,23 +5561,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6273: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5564: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6276: \$? = $ac_status" >&5
+  echo "$as_me:5567: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6279: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5570: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6282: \$? = $ac_status" >&5
+  echo "$as_me:5573: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-					echo "$as_me:6285: result: yes" >&5
+					echo "$as_me:5576: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-					cat >>confdefs.h <<\_ACEOF
+					cat >>confdefs.h <<\EOF
 #define LIBWRAP 1
-_ACEOF
+EOF
 
 					TCPW_MSG="yes"
 
@@ -6294,7 +5585,7 @@
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-					{ { echo "$as_me:6297: error: *** libwrap missing" >&5
+					{ { echo "$as_me:5588: error: *** libwrap missing" >&5
 echo "$as_me: error: *** libwrap missing" >&2;}
    { (exit 1); exit 1; }; }
 
@@ -6317,13 +5608,13 @@
 	vhangup vsnprintf waitpid __b64_ntop _getpty
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6320: checking for $ac_func" >&5
+echo "$as_me:5611: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6326 "configure"
+#line 5617 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -6337,12 +5628,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6360,16 +5645,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6363: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5648: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6366: \$? = $ac_status" >&5
+  echo "$as_me:5651: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6369: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5654: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6372: \$? = $ac_status" >&5
+  echo "$as_me:5657: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -6379,12 +5664,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6382: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5667: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -6392,13 +5677,13 @@
 for ac_func in dirname
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6395: checking for $ac_func" >&5
+echo "$as_me:5680: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6401 "configure"
+#line 5686 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -6412,12 +5697,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6435,16 +5714,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6438: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5717: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6441: \$? = $ac_status" >&5
+  echo "$as_me:5720: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6444: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5723: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6447: \$? = $ac_status" >&5
+  echo "$as_me:5726: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -6454,71 +5733,33 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6457: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:5736: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 for ac_header in libgen.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:6468: checking for $ac_header" >&5
+echo "$as_me:5746: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:6473: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:6477: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 6480 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6489: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6492: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6495: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:6504: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:6508: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 6511 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 5752 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:6515: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5756: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:6521: \$? = $ac_status" >&5
+  echo "$as_me:5762: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -6529,54 +5770,27 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  eval "$as_ac_Header=no"
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:6539: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:6545: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:6547: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:6550: WARNING: $ac_header: present but cannot be compiled." >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
-    { echo "$as_me:6552: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:6554: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:6557: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:6564: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5781: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
-
 done
 
 else
 
-	echo "$as_me:6579: checking for dirname in -lgen" >&5
+	echo "$as_me:5793: checking for dirname in -lgen" >&5
 echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6
 if test "${ac_cv_lib_gen_dirname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6584,7 +5798,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgen  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 6587 "configure"
+#line 5801 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -6594,12 +5808,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char dirname ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6609,16 +5817,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6612: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5820: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6615: \$? = $ac_status" >&5
+  echo "$as_me:5823: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6618: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5826: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6621: \$? = $ac_status" >&5
+  echo "$as_me:5829: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gen_dirname=yes
 else
@@ -6629,11 +5837,11 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:6632: result: $ac_cv_lib_gen_dirname" >&5
+echo "$as_me:5840: result: $ac_cv_lib_gen_dirname" >&5
 echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6
 if test $ac_cv_lib_gen_dirname = yes; then
 
-		echo "$as_me:6636: checking for broken dirname" >&5
+		echo "$as_me:5844: checking for broken dirname" >&5
 echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6
 if test "${ac_cv_have_broken_dirname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6642,12 +5850,12 @@
 			save_LIBS="$LIBS"
 			LIBS="$LIBS -lgen"
 			if test "$cross_compiling" = yes; then
-  { { echo "$as_me:6645: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:5853: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6650 "configure"
+#line 5858 "configure"
 #include "confdefs.h"
 
 #include <libgen.h>
@@ -6667,15 +5875,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6670: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5878: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6673: \$? = $ac_status" >&5
+  echo "$as_me:5881: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:6675: \"$ac_try\"") >&5
+  { (eval echo "$as_me:5883: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6678: \$? = $ac_status" >&5
+  echo "$as_me:5886: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_broken_dirname="no"
 else
@@ -6690,72 +5898,34 @@
 			LIBS="$save_LIBS"
 
 fi
-echo "$as_me:6693: result: $ac_cv_have_broken_dirname" >&5
+echo "$as_me:5901: result: $ac_cv_have_broken_dirname" >&5
 echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6
 		if test "x$ac_cv_have_broken_dirname" = "xno" ; then
 			LIBS="$LIBS -lgen"
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_DIRNAME 1
-_ACEOF
+EOF
 
 for ac_header in libgen.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:6705: checking for $ac_header" >&5
+echo "$as_me:5912: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:6710: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:6714: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 6717 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6723: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:6726: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:6729: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:6732: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:6741: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:6745: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 6748 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 5918 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:6752: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5922: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:6758: \$? = $ac_status" >&5
+  echo "$as_me:5928: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -6766,49 +5936,22 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  eval "$as_ac_Header=no"
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:6776: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:6782: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:6784: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:6787: WARNING: $ac_header: present but cannot be compiled." >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
-    { echo "$as_me:6789: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:6791: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:6794: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:6801: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5947: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
-
 done
 
 		fi
@@ -6821,13 +5964,13 @@
 for ac_func in gettimeofday time
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6824: checking for $ac_func" >&5
+echo "$as_me:5967: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6830 "configure"
+#line 5973 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -6841,12 +5984,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6864,16 +6001,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6867: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6004: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6870: \$? = $ac_status" >&5
+  echo "$as_me:6007: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6873: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6010: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6876: \$? = $ac_status" >&5
+  echo "$as_me:6013: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -6883,12 +6020,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6886: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6023: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -6896,13 +6033,13 @@
 for ac_func in endutent getutent getutid getutline pututline setutent
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6899: checking for $ac_func" >&5
+echo "$as_me:6036: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6905 "configure"
+#line 6042 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -6916,12 +6053,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -6939,16 +6070,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6942: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6073: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:6945: \$? = $ac_status" >&5
+  echo "$as_me:6076: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:6948: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6079: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:6951: \$? = $ac_status" >&5
+  echo "$as_me:6082: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -6958,12 +6089,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:6961: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6092: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -6971,13 +6102,13 @@
 for ac_func in utmpname
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6974: checking for $ac_func" >&5
+echo "$as_me:6105: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 6980 "configure"
+#line 6111 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -6991,12 +6122,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7014,16 +6139,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7017: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6142: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7020: \$? = $ac_status" >&5
+  echo "$as_me:6145: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7023: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6148: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7026: \$? = $ac_status" >&5
+  echo "$as_me:6151: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -7033,12 +6158,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7036: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6161: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -7046,13 +6171,13 @@
 for ac_func in endutxent getutxent getutxid getutxline pututxline
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7049: checking for $ac_func" >&5
+echo "$as_me:6174: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7055 "configure"
+#line 6180 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -7066,12 +6191,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7089,16 +6208,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7092: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6211: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7095: \$? = $ac_status" >&5
+  echo "$as_me:6214: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7098: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6217: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7101: \$? = $ac_status" >&5
+  echo "$as_me:6220: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -7108,12 +6227,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7111: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6230: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -7121,13 +6240,13 @@
 for ac_func in setutxent utmpxname
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7124: checking for $ac_func" >&5
+echo "$as_me:6243: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7130 "configure"
+#line 6249 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -7141,12 +6260,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7164,16 +6277,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7167: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6280: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7170: \$? = $ac_status" >&5
+  echo "$as_me:6283: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7173: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6286: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7176: \$? = $ac_status" >&5
+  echo "$as_me:6289: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -7183,23 +6296,23 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7186: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6299: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
 
-echo "$as_me:7196: checking for getuserattr" >&5
+echo "$as_me:6309: checking for getuserattr" >&5
 echo $ECHO_N "checking for getuserattr... $ECHO_C" >&6
 if test "${ac_cv_func_getuserattr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7202 "configure"
+#line 6315 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getuserattr (); below.  */
@@ -7213,12 +6326,6 @@
 char getuserattr ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7236,16 +6343,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7239: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6346: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7242: \$? = $ac_status" >&5
+  echo "$as_me:6349: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7245: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6352: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7248: \$? = $ac_status" >&5
+  echo "$as_me:6355: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_getuserattr=yes
 else
@@ -7255,15 +6362,15 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7258: result: $ac_cv_func_getuserattr" >&5
+echo "$as_me:6365: result: $ac_cv_func_getuserattr" >&5
 echo "${ECHO_T}$ac_cv_func_getuserattr" >&6
 if test $ac_cv_func_getuserattr = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_GETUSERATTR 1
-_ACEOF
+EOF
 
 else
-  echo "$as_me:7266: checking for getuserattr in -ls" >&5
+  echo "$as_me:6373: checking for getuserattr in -ls" >&5
 echo $ECHO_N "checking for getuserattr in -ls... $ECHO_C" >&6
 if test "${ac_cv_lib_s_getuserattr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7271,7 +6378,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ls  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7274 "configure"
+#line 6381 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7281,12 +6388,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char getuserattr ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7296,16 +6397,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7299: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6400: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7302: \$? = $ac_status" >&5
+  echo "$as_me:6403: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7305: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6406: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7308: \$? = $ac_status" >&5
+  echo "$as_me:6409: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_s_getuserattr=yes
 else
@@ -7316,24 +6417,24 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7319: result: $ac_cv_lib_s_getuserattr" >&5
+echo "$as_me:6420: result: $ac_cv_lib_s_getuserattr" >&5
 echo "${ECHO_T}$ac_cv_lib_s_getuserattr" >&6
 if test $ac_cv_lib_s_getuserattr = yes; then
-  LIBS="$LIBS -ls"; cat >>confdefs.h <<\_ACEOF
+  LIBS="$LIBS -ls"; cat >>confdefs.h <<\EOF
 #define HAVE_GETUSERATTR 1
-_ACEOF
+EOF
 
 fi
 
 fi
 
-echo "$as_me:7330: checking for daemon" >&5
+echo "$as_me:6431: checking for daemon" >&5
 echo $ECHO_N "checking for daemon... $ECHO_C" >&6
 if test "${ac_cv_func_daemon+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7336 "configure"
+#line 6437 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char daemon (); below.  */
@@ -7347,12 +6448,6 @@
 char daemon ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7370,16 +6465,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7373: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6468: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7376: \$? = $ac_status" >&5
+  echo "$as_me:6471: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7379: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6474: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7382: \$? = $ac_status" >&5
+  echo "$as_me:6477: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_daemon=yes
 else
@@ -7389,15 +6484,15 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7392: result: $ac_cv_func_daemon" >&5
+echo "$as_me:6487: result: $ac_cv_func_daemon" >&5
 echo "${ECHO_T}$ac_cv_func_daemon" >&6
 if test $ac_cv_func_daemon = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_DAEMON 1
-_ACEOF
+EOF
 
 else
-  echo "$as_me:7400: checking for daemon in -lbsd" >&5
+  echo "$as_me:6495: checking for daemon in -lbsd" >&5
 echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6
 if test "${ac_cv_lib_bsd_daemon+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7405,7 +6500,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbsd  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7408 "configure"
+#line 6503 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7415,12 +6510,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char daemon ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7430,16 +6519,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7433: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6522: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7436: \$? = $ac_status" >&5
+  echo "$as_me:6525: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7439: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6528: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7442: \$? = $ac_status" >&5
+  echo "$as_me:6531: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_bsd_daemon=yes
 else
@@ -7450,24 +6539,24 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7453: result: $ac_cv_lib_bsd_daemon" >&5
+echo "$as_me:6542: result: $ac_cv_lib_bsd_daemon" >&5
 echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6
 if test $ac_cv_lib_bsd_daemon = yes; then
-  LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
+  LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\EOF
 #define HAVE_DAEMON 1
-_ACEOF
+EOF
 
 fi
 
 fi
 
-echo "$as_me:7464: checking for getpagesize" >&5
+echo "$as_me:6553: checking for getpagesize" >&5
 echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
 if test "${ac_cv_func_getpagesize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7470 "configure"
+#line 6559 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getpagesize (); below.  */
@@ -7481,12 +6570,6 @@
 char getpagesize ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7504,16 +6587,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7507: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6590: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7510: \$? = $ac_status" >&5
+  echo "$as_me:6593: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7513: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6596: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7516: \$? = $ac_status" >&5
+  echo "$as_me:6599: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_getpagesize=yes
 else
@@ -7523,15 +6606,15 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:7526: result: $ac_cv_func_getpagesize" >&5
+echo "$as_me:6609: result: $ac_cv_func_getpagesize" >&5
 echo "${ECHO_T}$ac_cv_func_getpagesize" >&6
 if test $ac_cv_func_getpagesize = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >>confdefs.h <<\EOF
 #define HAVE_GETPAGESIZE 1
-_ACEOF
+EOF
 
 else
-  echo "$as_me:7534: checking for getpagesize in -lucb" >&5
+  echo "$as_me:6617: checking for getpagesize in -lucb" >&5
 echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6
 if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7539,7 +6622,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lucb  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7542 "configure"
+#line 6625 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7549,12 +6632,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char getpagesize ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7564,16 +6641,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7567: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6644: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7570: \$? = $ac_status" >&5
+  echo "$as_me:6647: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7573: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6650: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7576: \$? = $ac_status" >&5
+  echo "$as_me:6653: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_ucb_getpagesize=yes
 else
@@ -7584,12 +6661,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7587: result: $ac_cv_lib_ucb_getpagesize" >&5
+echo "$as_me:6664: result: $ac_cv_lib_ucb_getpagesize" >&5
 echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6
 if test $ac_cv_lib_ucb_getpagesize = yes; then
-  LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
+  LIBS="$LIBS -lucb"; cat >>confdefs.h <<\EOF
 #define HAVE_GETPAGESIZE 1
-_ACEOF
+EOF
 
 fi
 
@@ -7597,15 +6674,15 @@
 
 # Check for broken snprintf
 if test "x$ac_cv_func_snprintf" = "xyes" ; then
-	echo "$as_me:7600: checking whether snprintf correctly terminates long strings" >&5
+	echo "$as_me:6677: checking whether snprintf correctly terminates long strings" >&5
 echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6
 	if test "$cross_compiling" = yes; then
-  { { echo "$as_me:7603: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:6680: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7608 "configure"
+#line 6685 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -7613,30 +6690,30 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7616: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6693: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7619: \$? = $ac_status" >&5
+  echo "$as_me:6696: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:7621: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6698: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7624: \$? = $ac_status" >&5
+  echo "$as_me:6701: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:7626: result: yes" >&5
+  echo "$as_me:6703: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-			echo "$as_me:7633: result: no" >&5
+			echo "$as_me:6710: result: no" >&5
 echo "${ECHO_T}no" >&6
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define BROKEN_SNPRINTF 1
-_ACEOF
+EOF
 
-			{ echo "$as_me:7639: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
+			{ echo "$as_me:6716: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
 echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
 
 fi
@@ -7644,79 +6721,252 @@
 fi
 fi
 
-echo "$as_me:7647: checking whether getpgrp takes no argument" >&5
-echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6
-if test "${ac_cv_func_getpgrp_void+set}" = set; then
+echo "$as_me:6724: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Use it with a single arg.
-cat >conftest.$ac_ext <<_ACEOF
-#line 7654 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6730 "configure"
 #include "confdefs.h"
-$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-getpgrp (0);
-  ;
-  return 0;
-}
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7672: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:7675: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7678: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:6738: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
-  echo "$as_me:7681: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_func_getpgrp_1=yes
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:6744: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_func_getpgrp_1=no
+  cat conftest.$ac_ext >&5
+  ac_cv_header_stdc=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Use it with no arg.
-cat >conftest.$ac_ext <<_ACEOF
-#line 7692 "configure"
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6766 "configure"
 #include "confdefs.h"
-$ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-getpgrp ();
-  ;
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+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 <<_ACEOF
+#line 6784 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6805 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:6831: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:6834: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:6836: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6839: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:6852: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:6868: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6874 "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6880: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6883: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6886: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6889: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6899: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+echo "$as_me:6909: checking whether getpgrp takes no argument" >&5
+echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6
+if test "${ac_cv_func_getpgrp_void+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Use it with a single arg.
+cat >conftest.$ac_ext <<_ACEOF
+#line 6916 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+getpgrp (0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6928: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:6931: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6934: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6937: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_func_getpgrp_1=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_func_getpgrp_1=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Use it with no arg.
+cat >conftest.$ac_ext <<_ACEOF
+#line 6948 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+getpgrp ();
+  ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7710: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6960: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:7713: \$? = $ac_status" >&5
+  echo "$as_me:6963: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:7716: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6966: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7719: \$? = $ac_status" >&5
+  echo "$as_me:6969: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_func_getpgrp_0=yes
 else
@@ -7730,12 +6980,12 @@
   yes:no) ac_cv_func_getpgrp_void=yes;;
   no:yes) ac_cv_func_getpgrp_void=false;;
   *) if test "$cross_compiling" = yes; then
-  { { echo "$as_me:7733: error: cannot check getpgrp if cross compiling" >&5
+  { { echo "$as_me:6983: error: cannot check getpgrp if cross compiling" >&5
 echo "$as_me: error: cannot check getpgrp if cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7738 "configure"
+#line 6988 "configure"
 #include "confdefs.h"
 $ac_includes_default
 
@@ -7789,15 +7039,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:7792: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7042: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7795: \$? = $ac_status" >&5
+  echo "$as_me:7045: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:7797: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7047: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7800: \$? = $ac_status" >&5
+  echo "$as_me:7050: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_getpgrp_void=yes
 else
@@ -7811,13 +7061,13 @@
 esac # $ac_func_getpgrp_0:$ac_func_getpgrp_1
 
 fi
-echo "$as_me:7814: result: $ac_cv_func_getpgrp_void" >&5
+echo "$as_me:7064: result: $ac_cv_func_getpgrp_void" >&5
 echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
 if test $ac_cv_func_getpgrp_void = yes; then
 
-cat >>confdefs.h <<\_ACEOF
+cat >>confdefs.h <<\EOF
 #define GETPGRP_VOID 1
-_ACEOF
+EOF
 
 fi
 
@@ -7830,12 +7080,12 @@
 
 		if test "x$withval" != "xno" ; then
 			if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
-				{ { echo "$as_me:7833: error: PAM headers not found" >&5
+				{ { echo "$as_me:7083: error: PAM headers not found" >&5
 echo "$as_me: error: PAM headers not found" >&2;}
    { (exit 1); exit 1; }; }
 			fi
 
-echo "$as_me:7838: checking for dlopen in -ldl" >&5
+echo "$as_me:7088: checking for dlopen in -ldl" >&5
 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7843,7 +7093,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7846 "configure"
+#line 7096 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7853,12 +7103,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char dlopen ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7868,16 +7112,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7871: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7115: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7874: \$? = $ac_status" >&5
+  echo "$as_me:7118: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7877: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7121: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7880: \$? = $ac_status" >&5
+  echo "$as_me:7124: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dl_dlopen=yes
 else
@@ -7888,18 +7132,18 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7891: result: $ac_cv_lib_dl_dlopen" >&5
+echo "$as_me:7135: result: $ac_cv_lib_dl_dlopen" >&5
 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
 if test $ac_cv_lib_dl_dlopen = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBDL 1
-_ACEOF
+EOF
 
   LIBS="-ldl $LIBS"
 
 fi
 
-echo "$as_me:7902: checking for pam_set_item in -lpam" >&5
+echo "$as_me:7146: checking for pam_set_item in -lpam" >&5
 echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6
 if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7907,7 +7151,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpam  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 7910 "configure"
+#line 7154 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -7917,12 +7161,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char pam_set_item ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -7932,16 +7170,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7935: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7173: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:7938: \$? = $ac_status" >&5
+  echo "$as_me:7176: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:7941: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7179: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:7944: \$? = $ac_status" >&5
+  echo "$as_me:7182: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_pam_pam_set_item=yes
 else
@@ -7952,17 +7190,17 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:7955: result: $ac_cv_lib_pam_pam_set_item" >&5
+echo "$as_me:7193: result: $ac_cv_lib_pam_pam_set_item" >&5
 echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6
 if test $ac_cv_lib_pam_pam_set_item = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBPAM 1
-_ACEOF
+EOF
 
   LIBS="-lpam $LIBS"
 
 else
-  { { echo "$as_me:7965: error: *** libpam missing" >&5
+  { { echo "$as_me:7203: error: *** libpam missing" >&5
 echo "$as_me: error: *** libpam missing" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -7970,13 +7208,13 @@
 for ac_func in pam_getenvlist
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7973: checking for $ac_func" >&5
+echo "$as_me:7211: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 7979 "configure"
+#line 7217 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -7990,12 +7228,6 @@
 char $ac_func ();
 char (*f) ();
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8013,16 +7245,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8016: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7248: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8019: \$? = $ac_status" >&5
+  echo "$as_me:7251: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8022: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7254: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8025: \$? = $ac_status" >&5
+  echo "$as_me:7257: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -8032,12 +7264,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:8035: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:7267: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
 done
@@ -8045,9 +7277,9 @@
 			disable_shadow=yes
 			PAM_MSG="yes"
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define USE_PAM 1
-_ACEOF
+EOF
 
 		fi
 
@@ -8056,21 +7288,15 @@
 # Check for older PAM
 if test "x$PAM_MSG" = "xyes" ; then
 	# Check PAM strerror arguments (old PAM)
-	echo "$as_me:8059: checking whether pam_strerror takes only one argument" >&5
+	echo "$as_me:7291: checking whether pam_strerror takes only one argument" >&5
 echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 8062 "configure"
+#line 7294 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
 #include <security/pam_appl.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8080,28 +7306,28 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8083: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7309: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8086: \$? = $ac_status" >&5
+  echo "$as_me:7312: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8089: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7315: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8092: \$? = $ac_status" >&5
+  echo "$as_me:7318: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:8094: result: no" >&5
+  echo "$as_me:7320: result: no" >&5
 echo "${ECHO_T}no" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_OLD_PAM 1
-_ACEOF
+EOF
 
-			echo "$as_me:8104: result: yes" >&5
+			echo "$as_me:7330: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			PAM_MSG="yes (old library)"
 
@@ -8127,7 +7353,7 @@
 if test "x$prefix" != "xNONE" ; then
 	tryssldir="$tryssldir $prefix"
 fi
-echo "$as_me:8130: checking for OpenSSL directory" >&5
+echo "$as_me:7356: checking for OpenSSL directory" >&5
 echo $ECHO_N "checking for OpenSSL directory... $ECHO_C" >&6
 if test "${ac_cv_openssldir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8168,12 +7394,12 @@
 		# Basic test to check for compatible version and correct linking
 		# *does not* test for RSA - that comes later.
 		if test "$cross_compiling" = yes; then
-  { { echo "$as_me:8171: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:7397: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8176 "configure"
+#line 7402 "configure"
 #include "confdefs.h"
 
 #include <string.h>
@@ -8188,15 +7414,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8191: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7417: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8194: \$? = $ac_status" >&5
+  echo "$as_me:7420: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8196: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7422: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8199: \$? = $ac_status" >&5
+  echo "$as_me:7425: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 				found_crypto=1
@@ -8217,7 +7443,7 @@
 	done
 
 	if test -z "$found_crypto" ; then
-		{ { echo "$as_me:8220: error: Could not find working OpenSSL library, please install or check config.log" >&5
+		{ { echo "$as_me:7446: error: Could not find working OpenSSL library, please install or check config.log" >&5
 echo "$as_me: error: Could not find working OpenSSL library, please install or check config.log" >&2;}
    { (exit 1); exit 1; }; }
 	fi
@@ -8228,13 +7454,13 @@
 	ac_cv_openssldir=$ssldir
 
 fi
-echo "$as_me:8231: result: $ac_cv_openssldir" >&5
+echo "$as_me:7457: result: $ac_cv_openssldir" >&5
 echo "${ECHO_T}$ac_cv_openssldir" >&6
 
 if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_OPENSSL 1
-_ACEOF
+EOF
 
 		ssldir=$ac_cv_openssldir
 	if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
@@ -8264,7 +7490,7 @@
 
 # Now test RSA support
 saved_LIBS="$LIBS"
-echo "$as_me:8267: checking for RSA support" >&5
+echo "$as_me:7493: checking for RSA support" >&5
 echo $ECHO_N "checking for RSA support... $ECHO_C" >&6
 for WANTS_RSAREF in "" 1 ; do
 	if test -z "$WANTS_RSAREF" ; then
@@ -8273,12 +7499,12 @@
 		LIBS="$saved_LIBS -lRSAglue -lrsaref"
 	fi
 	if test "$cross_compiling" = yes; then
-  { { echo "$as_me:8276: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:7502: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8281 "configure"
+#line 7507 "configure"
 #include "confdefs.h"
 
 #include <string.h>
@@ -8298,15 +7524,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8301: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7527: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8304: \$? = $ac_status" >&5
+  echo "$as_me:7530: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8306: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7532: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8309: \$? = $ac_status" >&5
+  echo "$as_me:7535: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 		rsa_works=1
@@ -8323,22 +7549,22 @@
 LIBS="$saved_LIBS"
 
 if test ! -z "$no_rsa" ; then
-	echo "$as_me:8326: result: disabled" >&5
+	echo "$as_me:7552: result: disabled" >&5
 echo "${ECHO_T}disabled" >&6
 	RSA_MSG="disabled"
 else
 	if test -z "$rsa_works" ; then
-		{ echo "$as_me:8331: WARNING: *** No RSA support found *** " >&5
+		{ echo "$as_me:7557: WARNING: *** No RSA support found *** " >&5
 echo "$as_me: WARNING: *** No RSA support found *** " >&2;}
 		RSA_MSG="no"
 	else
 		if test -z "$WANTS_RSAREF" ; then
-			echo "$as_me:8336: result: yes" >&5
+			echo "$as_me:7562: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			RSA_MSG="yes"
 		else
 			RSA_MSG="yes (using RSAref)"
-			echo "$as_me:8341: result: using RSAref" >&5
+			echo "$as_me:7567: result: using RSAref" >&5
 echo "${ECHO_T}using RSAref" >&6
 			LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
 		fi
@@ -8348,7 +7574,7 @@
 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
 # version in OpenSSL. Skip this for PAM
 if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
-	echo "$as_me:8351: checking for crypt in -lcrypt" >&5
+	echo "$as_me:7577: checking for crypt in -lcrypt" >&5
 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8356,7 +7582,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcrypt  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 8359 "configure"
+#line 7585 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -8366,12 +7592,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char crypt ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8381,16 +7601,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8384: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7604: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8387: \$? = $ac_status" >&5
+  echo "$as_me:7607: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:8390: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7610: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8393: \$? = $ac_status" >&5
+  echo "$as_me:7613: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_crypt_crypt=yes
 else
@@ -8401,7 +7621,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:8404: result: $ac_cv_lib_crypt_crypt" >&5
+echo "$as_me:7624: result: $ac_cv_lib_crypt_crypt" >&5
 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
 if test $ac_cv_lib_crypt_crypt = yes; then
   LIBS="$LIBS -lcrypt"
@@ -8415,21 +7635,15 @@
 fi
 
 # Checks for data types
-echo "$as_me:8418: checking for char" >&5
+echo "$as_me:7638: checking for char" >&5
 echo $ECHO_N "checking for char... $ECHO_C" >&6
 if test "${ac_cv_type_char+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8424 "configure"
+#line 7644 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8442,16 +7656,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8445: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7659: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8448: \$? = $ac_status" >&5
+  echo "$as_me:7662: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8451: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7665: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8454: \$? = $ac_status" >&5
+  echo "$as_me:7668: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_char=yes
 else
@@ -8461,10 +7675,10 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:8464: result: $ac_cv_type_char" >&5
+echo "$as_me:7678: result: $ac_cv_type_char" >&5
 echo "${ECHO_T}$ac_cv_type_char" >&6
 
-echo "$as_me:8467: checking size of char" >&5
+echo "$as_me:7681: checking size of char" >&5
 echo $ECHO_N "checking size of char... $ECHO_C" >&6
 if test "${ac_cv_sizeof_char+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8473,15 +7687,9 @@
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
-#line 8476 "configure"
+#line 7690 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8491,29 +7699,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8494: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7702: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8497: \$? = $ac_status" >&5
+  echo "$as_me:7705: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8500: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7708: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8503: \$? = $ac_status" >&5
+  echo "$as_me:7711: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=0 ac_mid=0
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 8508 "configure"
+#line 7716 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8523,16 +7725,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8526: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7728: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8529: \$? = $ac_status" >&5
+  echo "$as_me:7731: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8532: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7734: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8535: \$? = $ac_status" >&5
+  echo "$as_me:7737: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid; break
 else
@@ -8548,15 +7750,9 @@
 ac_hi=-1 ac_mid=-1
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 8551 "configure"
+#line 7753 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8566,16 +7762,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8569: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7765: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8572: \$? = $ac_status" >&5
+  echo "$as_me:7768: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8575: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7771: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8578: \$? = $ac_status" >&5
+  echo "$as_me:7774: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=$ac_mid; break
 else
@@ -8591,15 +7787,9 @@
 while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
-#line 8594 "configure"
+#line 7790 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8609,16 +7799,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8612: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7802: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8615: \$? = $ac_status" >&5
+  echo "$as_me:7805: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8618: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7808: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8621: \$? = $ac_status" >&5
+  echo "$as_me:7811: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid
 else
@@ -8631,20 +7821,14 @@
 ac_cv_sizeof_char=$ac_lo
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:8634: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:7824: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8639 "configure"
+#line 7829 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8658,15 +7842,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8661: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7845: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8664: \$? = $ac_status" >&5
+  echo "$as_me:7848: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8666: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7850: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8669: \$? = $ac_status" >&5
+  echo "$as_me:7853: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_char=`cat conftest.val`
 else
@@ -8682,27 +7866,21 @@
   ac_cv_sizeof_char=0
 fi
 fi
-echo "$as_me:8685: result: $ac_cv_sizeof_char" >&5
+echo "$as_me:7869: result: $ac_cv_sizeof_char" >&5
 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define SIZEOF_CHAR $ac_cv_sizeof_char
-_ACEOF
+EOF
 
-echo "$as_me:8691: checking for short int" >&5
+echo "$as_me:7875: checking for short int" >&5
 echo $ECHO_N "checking for short int... $ECHO_C" >&6
 if test "${ac_cv_type_short_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8697 "configure"
+#line 7881 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8715,16 +7893,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8718: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7896: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8721: \$? = $ac_status" >&5
+  echo "$as_me:7899: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8724: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7902: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8727: \$? = $ac_status" >&5
+  echo "$as_me:7905: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_short_int=yes
 else
@@ -8734,10 +7912,10 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:8737: result: $ac_cv_type_short_int" >&5
+echo "$as_me:7915: result: $ac_cv_type_short_int" >&5
 echo "${ECHO_T}$ac_cv_type_short_int" >&6
 
-echo "$as_me:8740: checking size of short int" >&5
+echo "$as_me:7918: checking size of short int" >&5
 echo $ECHO_N "checking size of short int... $ECHO_C" >&6
 if test "${ac_cv_sizeof_short_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8746,15 +7924,9 @@
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
-#line 8749 "configure"
+#line 7927 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8764,29 +7936,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8767: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7939: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8770: \$? = $ac_status" >&5
+  echo "$as_me:7942: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8773: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7945: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8776: \$? = $ac_status" >&5
+  echo "$as_me:7948: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=0 ac_mid=0
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 8781 "configure"
+#line 7953 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8796,16 +7962,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8799: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7965: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8802: \$? = $ac_status" >&5
+  echo "$as_me:7968: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8805: \"$ac_try\"") >&5
+  { (eval echo "$as_me:7971: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8808: \$? = $ac_status" >&5
+  echo "$as_me:7974: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid; break
 else
@@ -8821,15 +7987,9 @@
 ac_hi=-1 ac_mid=-1
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 8824 "configure"
+#line 7990 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8839,16 +7999,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8842: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8002: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8845: \$? = $ac_status" >&5
+  echo "$as_me:8005: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8848: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8008: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8851: \$? = $ac_status" >&5
+  echo "$as_me:8011: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=$ac_mid; break
 else
@@ -8864,15 +8024,9 @@
 while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
-#line 8867 "configure"
+#line 8027 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8882,16 +8036,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8885: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8039: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8888: \$? = $ac_status" >&5
+  echo "$as_me:8042: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8891: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8045: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8894: \$? = $ac_status" >&5
+  echo "$as_me:8048: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid
 else
@@ -8904,20 +8058,14 @@
 ac_cv_sizeof_short_int=$ac_lo
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:8907: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:8061: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8912 "configure"
+#line 8066 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8931,15 +8079,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8934: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8082: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:8937: \$? = $ac_status" >&5
+  echo "$as_me:8085: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:8939: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8087: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:8942: \$? = $ac_status" >&5
+  echo "$as_me:8090: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_short_int=`cat conftest.val`
 else
@@ -8955,27 +8103,21 @@
   ac_cv_sizeof_short_int=0
 fi
 fi
-echo "$as_me:8958: result: $ac_cv_sizeof_short_int" >&5
+echo "$as_me:8106: result: $ac_cv_sizeof_short_int" >&5
 echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
-_ACEOF
+EOF
 
-echo "$as_me:8964: checking for int" >&5
+echo "$as_me:8112: checking for int" >&5
 echo $ECHO_N "checking for int... $ECHO_C" >&6
 if test "${ac_cv_type_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 8970 "configure"
+#line 8118 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -8988,16 +8130,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8991: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8133: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:8994: \$? = $ac_status" >&5
+  echo "$as_me:8136: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:8997: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8139: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9000: \$? = $ac_status" >&5
+  echo "$as_me:8142: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_int=yes
 else
@@ -9007,10 +8149,10 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:9010: result: $ac_cv_type_int" >&5
+echo "$as_me:8152: result: $ac_cv_type_int" >&5
 echo "${ECHO_T}$ac_cv_type_int" >&6
 
-echo "$as_me:9013: checking size of int" >&5
+echo "$as_me:8155: checking size of int" >&5
 echo $ECHO_N "checking size of int... $ECHO_C" >&6
 if test "${ac_cv_sizeof_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9019,15 +8161,9 @@
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
-#line 9022 "configure"
+#line 8164 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9037,29 +8173,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9040: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8176: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9043: \$? = $ac_status" >&5
+  echo "$as_me:8179: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9046: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8182: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9049: \$? = $ac_status" >&5
+  echo "$as_me:8185: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=0 ac_mid=0
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 9054 "configure"
+#line 8190 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9069,16 +8199,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9072: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8202: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9075: \$? = $ac_status" >&5
+  echo "$as_me:8205: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9078: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8208: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9081: \$? = $ac_status" >&5
+  echo "$as_me:8211: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid; break
 else
@@ -9094,15 +8224,9 @@
 ac_hi=-1 ac_mid=-1
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 9097 "configure"
+#line 8227 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9112,16 +8236,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9115: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8239: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9118: \$? = $ac_status" >&5
+  echo "$as_me:8242: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9121: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8245: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9124: \$? = $ac_status" >&5
+  echo "$as_me:8248: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=$ac_mid; break
 else
@@ -9137,15 +8261,9 @@
 while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
-#line 9140 "configure"
+#line 8264 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9155,16 +8273,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9158: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8276: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9161: \$? = $ac_status" >&5
+  echo "$as_me:8279: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9164: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8282: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9167: \$? = $ac_status" >&5
+  echo "$as_me:8285: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid
 else
@@ -9177,20 +8295,14 @@
 ac_cv_sizeof_int=$ac_lo
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:9180: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:8298: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9185 "configure"
+#line 8303 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9204,15 +8316,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9207: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8319: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9210: \$? = $ac_status" >&5
+  echo "$as_me:8322: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9212: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8324: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9215: \$? = $ac_status" >&5
+  echo "$as_me:8327: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_int=`cat conftest.val`
 else
@@ -9228,27 +8340,21 @@
   ac_cv_sizeof_int=0
 fi
 fi
-echo "$as_me:9231: result: $ac_cv_sizeof_int" >&5
+echo "$as_me:8343: result: $ac_cv_sizeof_int" >&5
 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+EOF
 
-echo "$as_me:9237: checking for long int" >&5
+echo "$as_me:8349: checking for long int" >&5
 echo $ECHO_N "checking for long int... $ECHO_C" >&6
 if test "${ac_cv_type_long_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9243 "configure"
+#line 8355 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9261,16 +8367,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9264: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8370: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9267: \$? = $ac_status" >&5
+  echo "$as_me:8373: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9270: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8376: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9273: \$? = $ac_status" >&5
+  echo "$as_me:8379: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_long_int=yes
 else
@@ -9280,10 +8386,10 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:9283: result: $ac_cv_type_long_int" >&5
+echo "$as_me:8389: result: $ac_cv_type_long_int" >&5
 echo "${ECHO_T}$ac_cv_type_long_int" >&6
 
-echo "$as_me:9286: checking size of long int" >&5
+echo "$as_me:8392: checking size of long int" >&5
 echo $ECHO_N "checking size of long int... $ECHO_C" >&6
 if test "${ac_cv_sizeof_long_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9292,15 +8398,9 @@
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
-#line 9295 "configure"
+#line 8401 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9310,29 +8410,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8413: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9316: \$? = $ac_status" >&5
+  echo "$as_me:8416: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9319: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8419: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9322: \$? = $ac_status" >&5
+  echo "$as_me:8422: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=0 ac_mid=0
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 9327 "configure"
+#line 8427 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9342,16 +8436,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9345: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8439: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9348: \$? = $ac_status" >&5
+  echo "$as_me:8442: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9351: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8445: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9354: \$? = $ac_status" >&5
+  echo "$as_me:8448: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid; break
 else
@@ -9367,15 +8461,9 @@
 ac_hi=-1 ac_mid=-1
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 9370 "configure"
+#line 8464 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9385,16 +8473,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9388: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8476: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9391: \$? = $ac_status" >&5
+  echo "$as_me:8479: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9394: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8482: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9397: \$? = $ac_status" >&5
+  echo "$as_me:8485: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=$ac_mid; break
 else
@@ -9410,15 +8498,9 @@
 while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
-#line 9413 "configure"
+#line 8501 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9428,16 +8510,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9431: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8513: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9434: \$? = $ac_status" >&5
+  echo "$as_me:8516: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9437: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8519: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9440: \$? = $ac_status" >&5
+  echo "$as_me:8522: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid
 else
@@ -9450,20 +8532,14 @@
 ac_cv_sizeof_long_int=$ac_lo
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:9453: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:8535: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9458 "configure"
+#line 8540 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9477,15 +8553,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9480: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8556: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9483: \$? = $ac_status" >&5
+  echo "$as_me:8559: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9485: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8561: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9488: \$? = $ac_status" >&5
+  echo "$as_me:8564: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_long_int=`cat conftest.val`
 else
@@ -9501,27 +8577,21 @@
   ac_cv_sizeof_long_int=0
 fi
 fi
-echo "$as_me:9504: result: $ac_cv_sizeof_long_int" >&5
+echo "$as_me:8580: result: $ac_cv_sizeof_long_int" >&5
 echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
-_ACEOF
+EOF
 
-echo "$as_me:9510: checking for long long int" >&5
+echo "$as_me:8586: checking for long long int" >&5
 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
 if test "${ac_cv_type_long_long_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9516 "configure"
+#line 8592 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9534,16 +8604,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9537: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8607: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9540: \$? = $ac_status" >&5
+  echo "$as_me:8610: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9543: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8613: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9546: \$? = $ac_status" >&5
+  echo "$as_me:8616: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_long_long_int=yes
 else
@@ -9553,10 +8623,10 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:9556: result: $ac_cv_type_long_long_int" >&5
+echo "$as_me:8626: result: $ac_cv_type_long_long_int" >&5
 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
 
-echo "$as_me:9559: checking size of long long int" >&5
+echo "$as_me:8629: checking size of long long int" >&5
 echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
 if test "${ac_cv_sizeof_long_long_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9565,15 +8635,9 @@
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
 cat >conftest.$ac_ext <<_ACEOF
-#line 9568 "configure"
+#line 8638 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9583,29 +8647,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9586: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8650: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9589: \$? = $ac_status" >&5
+  echo "$as_me:8653: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9592: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8656: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9595: \$? = $ac_status" >&5
+  echo "$as_me:8659: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=0 ac_mid=0
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 9600 "configure"
+#line 8664 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9615,16 +8673,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9618: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8676: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9621: \$? = $ac_status" >&5
+  echo "$as_me:8679: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9624: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8682: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9627: \$? = $ac_status" >&5
+  echo "$as_me:8685: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid; break
 else
@@ -9640,15 +8698,9 @@
 ac_hi=-1 ac_mid=-1
   while :; do
     cat >conftest.$ac_ext <<_ACEOF
-#line 9643 "configure"
+#line 8701 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9658,16 +8710,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9661: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9664: \$? = $ac_status" >&5
+  echo "$as_me:8716: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9667: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8719: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9670: \$? = $ac_status" >&5
+  echo "$as_me:8722: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_lo=$ac_mid; break
 else
@@ -9683,15 +8735,9 @@
 while test "x$ac_lo" != "x$ac_hi"; do
   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
-#line 9686 "configure"
+#line 8738 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9701,16 +8747,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9704: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8750: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9707: \$? = $ac_status" >&5
+  echo "$as_me:8753: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9710: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8756: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9713: \$? = $ac_status" >&5
+  echo "$as_me:8759: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_hi=$ac_mid
 else
@@ -9723,20 +8769,14 @@
 ac_cv_sizeof_long_long_int=$ac_lo
 else
   if test "$cross_compiling" = yes; then
-  { { echo "$as_me:9726: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:8772: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 9731 "configure"
+#line 8777 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9750,15 +8790,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9753: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:9756: \$? = $ac_status" >&5
+  echo "$as_me:8796: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:9758: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8798: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9761: \$? = $ac_status" >&5
+  echo "$as_me:8801: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_long_long_int=`cat conftest.val`
 else
@@ -9774,29 +8814,23 @@
   ac_cv_sizeof_long_long_int=0
 fi
 fi
-echo "$as_me:9777: result: $ac_cv_sizeof_long_long_int" >&5
+echo "$as_me:8817: result: $ac_cv_sizeof_long_long_int" >&5
 echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
-_ACEOF
+EOF
 
 # More checks for data types
-echo "$as_me:9784: checking for u_int type" >&5
+echo "$as_me:8824: checking for u_int type" >&5
 echo $ECHO_N "checking for u_int type... $ECHO_C" >&6
 if test "${ac_cv_have_u_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9791 "configure"
+#line 8831 "configure"
 #include "confdefs.h"
  #include <sys/types.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9806,16 +8840,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9809: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8843: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9812: \$? = $ac_status" >&5
+  echo "$as_me:8846: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9815: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8849: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9818: \$? = $ac_status" >&5
+  echo "$as_me:8852: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_u_int="yes"
 else
@@ -9827,32 +8861,26 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:9830: result: $ac_cv_have_u_int" >&5
+echo "$as_me:8864: result: $ac_cv_have_u_int" >&5
 echo "${ECHO_T}$ac_cv_have_u_int" >&6
 if test "x$ac_cv_have_u_int" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_U_INT 1
-_ACEOF
+EOF
 
 	have_u_int=1
 fi
 
-echo "$as_me:9840: checking for intXX_t types" >&5
+echo "$as_me:8874: checking for intXX_t types" >&5
 echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6
 if test "${ac_cv_have_intxx_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9847 "configure"
+#line 8881 "configure"
 #include "confdefs.h"
  #include <sys/types.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9862,16 +8890,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9865: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8893: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9868: \$? = $ac_status" >&5
+  echo "$as_me:8896: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9871: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8899: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9874: \$? = $ac_status" >&5
+  echo "$as_me:8902: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_intxx_t="yes"
 else
@@ -9883,12 +8911,12 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:9886: result: $ac_cv_have_intxx_t" >&5
+echo "$as_me:8914: result: $ac_cv_have_intxx_t" >&5
 echo "${ECHO_T}$ac_cv_have_intxx_t" >&6
 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_INTXX_T 1
-_ACEOF
+EOF
 
 	have_intxx_t=1
 fi
@@ -9896,18 +8924,12 @@
 if (test -z "$have_intxx_t" && \
            test "x$ac_cv_header_stdint_h" = "xyes")
 then
-    echo "$as_me:9899: checking for intXX_t types in stdint.h" >&5
+    echo "$as_me:8927: checking for intXX_t types in stdint.h" >&5
 echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9902 "configure"
+#line 8930 "configure"
 #include "confdefs.h"
  #include <stdint.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9917,51 +8939,45 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9920: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8942: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9923: \$? = $ac_status" >&5
+  echo "$as_me:8945: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9926: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8948: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9929: \$? = $ac_status" >&5
+  echo "$as_me:8951: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_INTXX_T 1
-_ACEOF
+EOF
 
-			echo "$as_me:9936: result: yes" >&5
+			echo "$as_me:8958: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:9942: result: no" >&5
+ echo "$as_me:8964: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:9949: checking for int64_t type" >&5
+echo "$as_me:8971: checking for int64_t type" >&5
 echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6
 if test "${ac_cv_have_int64_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 9956 "configure"
+#line 8978 "configure"
 #include "confdefs.h"
  #include <sys/types.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -9971,16 +8987,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9974: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8990: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:9977: \$? = $ac_status" >&5
+  echo "$as_me:8993: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:9980: \"$ac_try\"") >&5
+  { (eval echo "$as_me:8996: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:9983: \$? = $ac_status" >&5
+  echo "$as_me:8999: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_int64_t="yes"
 else
@@ -9992,29 +9008,23 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:9995: result: $ac_cv_have_int64_t" >&5
+echo "$as_me:9011: result: $ac_cv_have_int64_t" >&5
 echo "${ECHO_T}$ac_cv_have_int64_t" >&6
 if test "x$ac_cv_have_int64_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_INT64_T 1
-_ACEOF
+EOF
 
 	have_int64_t=1
 fi
 
 if test -z "$have_int64_t" ; then
-    echo "$as_me:10006: checking for int64_t type in sys/socket.h" >&5
+    echo "$as_me:9022: checking for int64_t type in sys/socket.h" >&5
 echo $ECHO_N "checking for int64_t type in sys/socket.h... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10009 "configure"
+#line 9025 "configure"
 #include "confdefs.h"
  #include <sys/socket.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10024,51 +9034,45 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10027: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9037: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10030: \$? = $ac_status" >&5
+  echo "$as_me:9040: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10033: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9043: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10036: \$? = $ac_status" >&5
+  echo "$as_me:9046: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_INT64_T 1
-_ACEOF
+EOF
 
-			echo "$as_me:10043: result: yes" >&5
+			echo "$as_me:9053: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:10049: result: no" >&5
+ echo "$as_me:9059: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:10056: checking for u_intXX_t types" >&5
+echo "$as_me:9066: checking for u_intXX_t types" >&5
 echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6
 if test "${ac_cv_have_u_intxx_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10063 "configure"
+#line 9073 "configure"
 #include "confdefs.h"
  #include <sys/types.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10078,16 +9082,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10081: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9085: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10084: \$? = $ac_status" >&5
+  echo "$as_me:9088: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10087: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9091: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10090: \$? = $ac_status" >&5
+  echo "$as_me:9094: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_u_intxx_t="yes"
 else
@@ -10099,29 +9103,23 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10102: result: $ac_cv_have_u_intxx_t" >&5
+echo "$as_me:9106: result: $ac_cv_have_u_intxx_t" >&5
 echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6
 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_U_INTXX_T 1
-_ACEOF
+EOF
 
 	have_u_intxx_t=1
 fi
 
 if test -z "$have_u_intxx_t" ; then
-    echo "$as_me:10113: checking for u_intXX_t types in sys/socket.h" >&5
+    echo "$as_me:9117: checking for u_intXX_t types in sys/socket.h" >&5
 echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10116 "configure"
+#line 9120 "configure"
 #include "confdefs.h"
  #include <sys/socket.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10131,51 +9129,45 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10134: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9132: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10137: \$? = $ac_status" >&5
+  echo "$as_me:9135: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10140: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9138: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10143: \$? = $ac_status" >&5
+  echo "$as_me:9141: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_U_INTXX_T 1
-_ACEOF
+EOF
 
-			echo "$as_me:10150: result: yes" >&5
+			echo "$as_me:9148: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:10156: result: no" >&5
+ echo "$as_me:9154: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:10163: checking for u_int64_t types" >&5
+echo "$as_me:9161: checking for u_int64_t types" >&5
 echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6
 if test "${ac_cv_have_u_int64_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10170 "configure"
+#line 9168 "configure"
 #include "confdefs.h"
  #include <sys/types.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10185,16 +9177,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10188: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9180: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10191: \$? = $ac_status" >&5
+  echo "$as_me:9183: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10194: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9186: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10197: \$? = $ac_status" >&5
+  echo "$as_me:9189: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_u_int64_t="yes"
 else
@@ -10206,35 +9198,29 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10209: result: $ac_cv_have_u_int64_t" >&5
+echo "$as_me:9201: result: $ac_cv_have_u_int64_t" >&5
 echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6
 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_U_INT64_T 1
-_ACEOF
+EOF
 
 	have_u_int64_t=1
 fi
 
 if test -z "$have_u_intxx_t" ; then
-	echo "$as_me:10220: checking for uintXX_t types" >&5
+	echo "$as_me:9212: checking for uintXX_t types" >&5
 echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6
 if test "${ac_cv_have_uintxx_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 10227 "configure"
+#line 9219 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10244,16 +9230,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10247: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9233: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10250: \$? = $ac_status" >&5
+  echo "$as_me:9236: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10253: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9239: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10256: \$? = $ac_status" >&5
+  echo "$as_me:9242: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_uintxx_t="yes"
 else
@@ -10265,29 +9251,23 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10268: result: $ac_cv_have_uintxx_t" >&5
+echo "$as_me:9254: result: $ac_cv_have_uintxx_t" >&5
 echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6
 	if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define HAVE_UINTXX_T 1
-_ACEOF
+EOF
 
 	fi
 fi
 
 if test -z "$have_uintxx_t" ; then
-    echo "$as_me:10279: checking for uintXX_t types in stdint.h" >&5
+    echo "$as_me:9265: checking for uintXX_t types in stdint.h" >&5
 echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10282 "configure"
+#line 9268 "configure"
 #include "confdefs.h"
  #include <stdint.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10297,29 +9277,29 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10300: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9280: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10303: \$? = $ac_status" >&5
+  echo "$as_me:9283: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10306: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9286: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10309: \$? = $ac_status" >&5
+  echo "$as_me:9289: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_UINTXX_T 1
-_ACEOF
+EOF
 
-			echo "$as_me:10316: result: yes" >&5
+			echo "$as_me:9296: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:10322: result: no" >&5
+ echo "$as_me:9302: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
@@ -10329,20 +9309,14 @@
 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
 then
-	echo "$as_me:10332: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
+	echo "$as_me:9312: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
 echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10335 "configure"
+#line 9315 "configure"
 #include "confdefs.h"
 
 #include <sys/bitypes.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10356,57 +9330,51 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10359: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9333: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10362: \$? = $ac_status" >&5
+  echo "$as_me:9336: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10365: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9339: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10368: \$? = $ac_status" >&5
+  echo "$as_me:9342: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_U_INTXX_T 1
-_ACEOF
+EOF
 
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_INTXX_T 1
-_ACEOF
+EOF
 
-			echo "$as_me:10379: result: yes" >&5
+			echo "$as_me:9353: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:10385: result: no" >&5
+echo "$as_me:9359: result: no" >&5
 echo "${ECHO_T}no" >&6
 
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:10392: checking for u_char" >&5
+echo "$as_me:9366: checking for u_char" >&5
 echo $ECHO_N "checking for u_char... $ECHO_C" >&6
 if test "${ac_cv_have_u_char+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10399 "configure"
+#line 9373 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10416,16 +9384,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9387: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10422: \$? = $ac_status" >&5
+  echo "$as_me:9390: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10425: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9393: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10428: \$? = $ac_status" >&5
+  echo "$as_me:9396: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_u_char="yes"
 else
@@ -10437,32 +9405,26 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10440: result: $ac_cv_have_u_char" >&5
+echo "$as_me:9408: result: $ac_cv_have_u_char" >&5
 echo "${ECHO_T}$ac_cv_have_u_char" >&6
 if test "x$ac_cv_have_u_char" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_U_CHAR 1
-_ACEOF
+EOF
 
 fi
 
-   echo "$as_me:10449: checking for socklen_t" >&5
+   echo "$as_me:9417: checking for socklen_t" >&5
 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
 if test "${ac_cv_type_socklen_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10455 "configure"
+#line 9423 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10475,16 +9437,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10478: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9440: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10481: \$? = $ac_status" >&5
+  echo "$as_me:9443: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10484: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9446: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10487: \$? = $ac_status" >&5
+  echo "$as_me:9449: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_type_socklen_t=yes
 else
@@ -10494,13 +9456,13 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:10497: result: $ac_cv_type_socklen_t" >&5
+echo "$as_me:9459: result: $ac_cv_type_socklen_t" >&5
 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
 if test $ac_cv_type_socklen_t = yes; then
   :
 else
 
-      echo "$as_me:10503: checking for socklen_t equivalent" >&5
+      echo "$as_me:9465: checking for socklen_t equivalent" >&5
 echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6
       if test "${curl_cv_socklen_t_equiv+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10512,7 +9474,7 @@
 	 for arg2 in "struct sockaddr" void; do
 	    for t in int size_t unsigned long "unsigned long"; do
 	       cat >conftest.$ac_ext <<_ACEOF
-#line 10515 "configure"
+#line 9477 "configure"
 #include "confdefs.h"
 
 		  #include <sys/types.h>
@@ -10520,12 +9482,6 @@
 
 		  int getpeername (int, $arg2 *, $t *);
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10538,16 +9494,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10541: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9497: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10544: \$? = $ac_status" >&5
+  echo "$as_me:9500: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10547: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9503: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10550: \$? = $ac_status" >&5
+  echo "$as_me:9506: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 		  curl_cv_socklen_t_equiv="$t"
@@ -10562,40 +9518,34 @@
 	 done
 
 	 if test "x$curl_cv_socklen_t_equiv" = x; then
-	    { { echo "$as_me:10565: error: Cannot find a type to use in place of socklen_t" >&5
+	    { { echo "$as_me:9521: error: Cannot find a type to use in place of socklen_t" >&5
 echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
    { (exit 1); exit 1; }; }
 	 fi
 
 fi
 
-      echo "$as_me:10572: result: $curl_cv_socklen_t_equiv" >&5
+      echo "$as_me:9528: result: $curl_cv_socklen_t_equiv" >&5
 echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6
 
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define socklen_t $curl_cv_socklen_t_equiv
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10581: checking for size_t" >&5
+echo "$as_me:9537: checking for size_t" >&5
 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
 if test "${ac_cv_have_size_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10588 "configure"
+#line 9544 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10605,16 +9555,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9558: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10611: \$? = $ac_status" >&5
+  echo "$as_me:9561: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10614: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9564: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10617: \$? = $ac_status" >&5
+  echo "$as_me:9567: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_size_t="yes"
 else
@@ -10626,33 +9576,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10629: result: $ac_cv_have_size_t" >&5
+echo "$as_me:9579: result: $ac_cv_have_size_t" >&5
 echo "${ECHO_T}$ac_cv_have_size_t" >&6
 if test "x$ac_cv_have_size_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SIZE_T 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10638: checking for ssize_t" >&5
+echo "$as_me:9588: checking for ssize_t" >&5
 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
 if test "${ac_cv_have_ssize_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10645 "configure"
+#line 9595 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10662,16 +9606,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10665: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9609: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10668: \$? = $ac_status" >&5
+  echo "$as_me:9612: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10671: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9615: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10674: \$? = $ac_status" >&5
+  echo "$as_me:9618: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_ssize_t="yes"
 else
@@ -10683,33 +9627,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10686: result: $ac_cv_have_ssize_t" >&5
+echo "$as_me:9630: result: $ac_cv_have_ssize_t" >&5
 echo "${ECHO_T}$ac_cv_have_ssize_t" >&6
 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SSIZE_T 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10695: checking for clock_t" >&5
+echo "$as_me:9639: checking for clock_t" >&5
 echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
 if test "${ac_cv_have_clock_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10702 "configure"
+#line 9646 "configure"
 #include "confdefs.h"
 
 #include <time.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10719,16 +9657,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10722: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9660: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10725: \$? = $ac_status" >&5
+  echo "$as_me:9663: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10728: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9666: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10731: \$? = $ac_status" >&5
+  echo "$as_me:9669: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_clock_t="yes"
 else
@@ -10740,34 +9678,28 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10743: result: $ac_cv_have_clock_t" >&5
+echo "$as_me:9681: result: $ac_cv_have_clock_t" >&5
 echo "${ECHO_T}$ac_cv_have_clock_t" >&6
 if test "x$ac_cv_have_clock_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_CLOCK_T 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10752: checking for sa_family_t" >&5
+echo "$as_me:9690: checking for sa_family_t" >&5
 echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6
 if test "${ac_cv_have_sa_family_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10759 "configure"
+#line 9697 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10777,35 +9709,29 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10780: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9712: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10783: \$? = $ac_status" >&5
+  echo "$as_me:9715: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10786: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9718: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10789: \$? = $ac_status" >&5
+  echo "$as_me:9721: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_sa_family_t="yes"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
  cat >conftest.$ac_ext <<_ACEOF
-#line 10796 "configure"
+#line 9728 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10815,16 +9741,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10818: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9744: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10821: \$? = $ac_status" >&5
+  echo "$as_me:9747: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10824: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9750: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10827: \$? = $ac_status" >&5
+  echo "$as_me:9753: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_sa_family_t="yes"
 else
@@ -10839,33 +9765,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10842: result: $ac_cv_have_sa_family_t" >&5
+echo "$as_me:9768: result: $ac_cv_have_sa_family_t" >&5
 echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6
 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SA_FAMILY_T 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10851: checking for pid_t" >&5
+echo "$as_me:9777: checking for pid_t" >&5
 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
 if test "${ac_cv_have_pid_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10858 "configure"
+#line 9784 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10875,16 +9795,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10878: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10881: \$? = $ac_status" >&5
+  echo "$as_me:9801: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10884: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9804: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10887: \$? = $ac_status" >&5
+  echo "$as_me:9807: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_pid_t="yes"
 else
@@ -10896,33 +9816,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10899: result: $ac_cv_have_pid_t" >&5
+echo "$as_me:9819: result: $ac_cv_have_pid_t" >&5
 echo "${ECHO_T}$ac_cv_have_pid_t" >&6
 if test "x$ac_cv_have_pid_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_PID_T 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10908: checking for mode_t" >&5
+echo "$as_me:9828: checking for mode_t" >&5
 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
 if test "${ac_cv_have_mode_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10915 "configure"
+#line 9835 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10932,16 +9846,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10935: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9849: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10938: \$? = $ac_status" >&5
+  echo "$as_me:9852: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10941: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9855: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10944: \$? = $ac_status" >&5
+  echo "$as_me:9858: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_mode_t="yes"
 else
@@ -10953,34 +9867,28 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:10956: result: $ac_cv_have_mode_t" >&5
+echo "$as_me:9870: result: $ac_cv_have_mode_t" >&5
 echo "${ECHO_T}$ac_cv_have_mode_t" >&6
 if test "x$ac_cv_have_mode_t" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_MODE_T 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:10965: checking for struct sockaddr_storage" >&5
+echo "$as_me:9879: checking for struct sockaddr_storage" >&5
 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
 if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 10972 "configure"
+#line 9886 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -10990,16 +9898,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10993: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10996: \$? = $ac_status" >&5
+  echo "$as_me:9904: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10999: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9907: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11002: \$? = $ac_status" >&5
+  echo "$as_me:9910: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_struct_sockaddr_storage="yes"
 else
@@ -11011,34 +9919,28 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:11014: result: $ac_cv_have_struct_sockaddr_storage" >&5
+echo "$as_me:9922: result: $ac_cv_have_struct_sockaddr_storage" >&5
 echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6
 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:11023: checking for struct sockaddr_in6" >&5
+echo "$as_me:9931: checking for struct sockaddr_in6" >&5
 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
 if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11030 "configure"
+#line 9938 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -11048,16 +9950,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11051: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9953: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11054: \$? = $ac_status" >&5
+  echo "$as_me:9956: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11057: \"$ac_try\"") >&5
+  { (eval echo "$as_me:9959: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11060: \$? = $ac_status" >&5
+  echo "$as_me:9962: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_struct_sockaddr_in6="yes"
 else
@@ -11069,34 +9971,28 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:11072: result: $ac_cv_have_struct_sockaddr_in6" >&5
+echo "$as_me:9974: result: $ac_cv_have_struct_sockaddr_in6" >&5
 echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6
 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_STRUCT_SOCKADDR_IN6 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:11081: checking for struct in6_addr" >&5
+echo "$as_me:9983: checking for struct in6_addr" >&5
 echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
 if test "${ac_cv_have_struct_in6_addr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11088 "configure"
+#line 9990 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -11106,16 +10002,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11109: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10005: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11112: \$? = $ac_status" >&5
+  echo "$as_me:10008: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11115: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10011: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11118: \$? = $ac_status" >&5
+  echo "$as_me:10014: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_struct_in6_addr="yes"
 else
@@ -11127,35 +10023,29 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:11130: result: $ac_cv_have_struct_in6_addr" >&5
+echo "$as_me:10026: result: $ac_cv_have_struct_in6_addr" >&5
 echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6
 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_STRUCT_IN6_ADDR 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:11139: checking for struct addrinfo" >&5
+echo "$as_me:10035: checking for struct addrinfo" >&5
 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
 if test "${ac_cv_have_struct_addrinfo+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11146 "configure"
+#line 10042 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -11165,16 +10055,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11168: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10058: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11171: \$? = $ac_status" >&5
+  echo "$as_me:10061: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11174: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10064: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11177: \$? = $ac_status" >&5
+  echo "$as_me:10067: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_struct_addrinfo="yes"
 else
@@ -11186,31 +10076,25 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:11189: result: $ac_cv_have_struct_addrinfo" >&5
+echo "$as_me:10079: result: $ac_cv_have_struct_addrinfo" >&5
 echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6
 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_STRUCT_ADDRINFO 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:11198: checking for struct timeval" >&5
+echo "$as_me:10088: checking for struct timeval" >&5
 echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
 if test "${ac_cv_have_struct_timeval+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11205 "configure"
+#line 10095 "configure"
 #include "confdefs.h"
  #include <sys/time.h>
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -11220,16 +10104,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11223: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10107: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11226: \$? = $ac_status" >&5
+  echo "$as_me:10110: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11229: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10113: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11232: \$? = $ac_status" >&5
+  echo "$as_me:10116: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_struct_timeval="yes"
 else
@@ -11241,12 +10125,12 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:11244: result: $ac_cv_have_struct_timeval" >&5
+echo "$as_me:10128: result: $ac_cv_have_struct_timeval" >&5
 echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6
 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_STRUCT_TIMEVAL 1
-_ACEOF
+EOF
 
 	have_struct_timeval=1
 fi
@@ -11259,12 +10143,12 @@
 	NO_SFTP='#'
 else
 	if test "$cross_compiling" = yes; then
-  { { echo "$as_me:11262: error: cannot run test program while cross compiling" >&5
+  { { echo "$as_me:10146: error: cannot run test program while cross compiling" >&5
 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11267 "configure"
+#line 10151 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -11292,24 +10176,24 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11295: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10179: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11298: \$? = $ac_status" >&5
+  echo "$as_me:10182: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:11300: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10184: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11303: \$? = $ac_status" >&5
+  echo "$as_me:10187: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    true
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- cat >>confdefs.h <<\_ACEOF
+ cat >>confdefs.h <<\EOF
 #define BROKEN_SNPRINTF 1
-_ACEOF
+EOF
 
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
@@ -11319,14 +10203,14 @@
 # look for field 'ut_host' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
-	echo "$as_me:11322: checking for ut_host field in utmp.h" >&5
+	echo "$as_me:10206: checking for ut_host field in utmp.h" >&5
 echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11329 "configure"
+#line 10213 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11343,30 +10227,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11346: result: $ossh_result" >&5
+		echo "$as_me:10230: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_HOST_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11355: result: no" >&5
+		echo "$as_me:10239: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_host' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
-	echo "$as_me:11362: checking for ut_host field in utmpx.h" >&5
+	echo "$as_me:10246: checking for ut_host field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11369 "configure"
+#line 10253 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11383,30 +10267,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11386: result: $ossh_result" >&5
+		echo "$as_me:10270: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_HOST_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11395: result: no" >&5
+		echo "$as_me:10279: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'syslen' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
-	echo "$as_me:11402: checking for syslen field in utmpx.h" >&5
+	echo "$as_me:10286: checking for syslen field in utmpx.h" >&5
 echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11409 "configure"
+#line 10293 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11423,30 +10307,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11426: result: $ossh_result" >&5
+		echo "$as_me:10310: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_SYSLEN_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11435: result: no" >&5
+		echo "$as_me:10319: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_pid' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
-	echo "$as_me:11442: checking for ut_pid field in utmp.h" >&5
+	echo "$as_me:10326: checking for ut_pid field in utmp.h" >&5
 echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11449 "configure"
+#line 10333 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11463,30 +10347,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11466: result: $ossh_result" >&5
+		echo "$as_me:10350: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_PID_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11475: result: no" >&5
+		echo "$as_me:10359: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_type' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
-	echo "$as_me:11482: checking for ut_type field in utmp.h" >&5
+	echo "$as_me:10366: checking for ut_type field in utmp.h" >&5
 echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11489 "configure"
+#line 10373 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11503,30 +10387,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11506: result: $ossh_result" >&5
+		echo "$as_me:10390: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_TYPE_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11515: result: no" >&5
+		echo "$as_me:10399: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_type' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
-	echo "$as_me:11522: checking for ut_type field in utmpx.h" >&5
+	echo "$as_me:10406: checking for ut_type field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11529 "configure"
+#line 10413 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11543,30 +10427,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11546: result: $ossh_result" >&5
+		echo "$as_me:10430: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_TYPE_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11555: result: no" >&5
+		echo "$as_me:10439: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_tv' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
-	echo "$as_me:11562: checking for ut_tv field in utmp.h" >&5
+	echo "$as_me:10446: checking for ut_tv field in utmp.h" >&5
 echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11569 "configure"
+#line 10453 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11583,30 +10467,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11586: result: $ossh_result" >&5
+		echo "$as_me:10470: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_TV_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11595: result: no" >&5
+		echo "$as_me:10479: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_id' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
-	echo "$as_me:11602: checking for ut_id field in utmp.h" >&5
+	echo "$as_me:10486: checking for ut_id field in utmp.h" >&5
 echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11609 "configure"
+#line 10493 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11623,30 +10507,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11626: result: $ossh_result" >&5
+		echo "$as_me:10510: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_ID_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11635: result: no" >&5
+		echo "$as_me:10519: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_id' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
-	echo "$as_me:11642: checking for ut_id field in utmpx.h" >&5
+	echo "$as_me:10526: checking for ut_id field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11649 "configure"
+#line 10533 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11663,30 +10547,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11666: result: $ossh_result" >&5
+		echo "$as_me:10550: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_ID_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11675: result: no" >&5
+		echo "$as_me:10559: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_addr' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
-	echo "$as_me:11682: checking for ut_addr field in utmp.h" >&5
+	echo "$as_me:10566: checking for ut_addr field in utmp.h" >&5
 echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11689 "configure"
+#line 10573 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11703,30 +10587,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11706: result: $ossh_result" >&5
+		echo "$as_me:10590: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_ADDR_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11715: result: no" >&5
+		echo "$as_me:10599: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_addr' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
-	echo "$as_me:11722: checking for ut_addr field in utmpx.h" >&5
+	echo "$as_me:10606: checking for ut_addr field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11729 "configure"
+#line 10613 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11743,30 +10627,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11746: result: $ossh_result" >&5
+		echo "$as_me:10630: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_ADDR_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11755: result: no" >&5
+		echo "$as_me:10639: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_addr_v6' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
-	echo "$as_me:11762: checking for ut_addr_v6 field in utmp.h" >&5
+	echo "$as_me:10646: checking for ut_addr_v6 field in utmp.h" >&5
 echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11769 "configure"
+#line 10653 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11783,30 +10667,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11786: result: $ossh_result" >&5
+		echo "$as_me:10670: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_ADDR_V6_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11795: result: no" >&5
+		echo "$as_me:10679: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_addr_v6' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
-	echo "$as_me:11802: checking for ut_addr_v6 field in utmpx.h" >&5
+	echo "$as_me:10686: checking for ut_addr_v6 field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11809 "configure"
+#line 10693 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11823,30 +10707,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11826: result: $ossh_result" >&5
+		echo "$as_me:10710: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_ADDR_V6_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11835: result: no" >&5
+		echo "$as_me:10719: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_exit' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
-	echo "$as_me:11842: checking for ut_exit field in utmp.h" >&5
+	echo "$as_me:10726: checking for ut_exit field in utmp.h" >&5
 echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11849 "configure"
+#line 10733 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11863,30 +10747,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11866: result: $ossh_result" >&5
+		echo "$as_me:10750: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_EXIT_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11875: result: no" >&5
+		echo "$as_me:10759: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_time' in header 'utmp.h'
 		ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
-	echo "$as_me:11882: checking for ut_time field in utmp.h" >&5
+	echo "$as_me:10766: checking for ut_time field in utmp.h" >&5
 echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11889 "configure"
+#line 10773 "configure"
 #include "confdefs.h"
 #include <utmp.h>
 
@@ -11903,30 +10787,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11906: result: $ossh_result" >&5
+		echo "$as_me:10790: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_TIME_IN_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11915: result: no" >&5
+		echo "$as_me:10799: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_time' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
-	echo "$as_me:11922: checking for ut_time field in utmpx.h" >&5
+	echo "$as_me:10806: checking for ut_time field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11929 "configure"
+#line 10813 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11943,30 +10827,30 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11946: result: $ossh_result" >&5
+		echo "$as_me:10830: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_TIME_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11955: result: no" >&5
+		echo "$as_me:10839: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
 # look for field 'ut_tv' in header 'utmpx.h'
 		ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
 		ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
-	echo "$as_me:11962: checking for ut_tv field in utmpx.h" >&5
+	echo "$as_me:10846: checking for ut_tv field in utmpx.h" >&5
 echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6
 	if eval "test \"\${$ossh_varname+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11969 "configure"
+#line 10853 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 
@@ -11983,34 +10867,28 @@
 
 	ossh_result=`eval 'echo $'"$ossh_varname"`
 	if test -n "`echo $ossh_varname`"; then
-		echo "$as_me:11986: result: $ossh_result" >&5
+		echo "$as_me:10870: result: $ossh_result" >&5
 echo "${ECHO_T}$ossh_result" >&6
 		if test "x$ossh_result" = "xyes"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_TV_IN_UTMPX 1
-_ACEOF
+EOF
 
 		fi
 	else
-		echo "$as_me:11995: result: no" >&5
+		echo "$as_me:10879: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 
-echo "$as_me:11999: checking for struct stat.st_blksize" >&5
+echo "$as_me:10883: checking for struct stat.st_blksize" >&5
 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 12005 "configure"
+#line 10889 "configure"
 #include "confdefs.h"
 $ac_includes_default
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12022,16 +10900,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12025: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10903: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12028: \$? = $ac_status" >&5
+  echo "$as_me:10906: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12031: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10909: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12034: \$? = $ac_status" >&5
+  echo "$as_me:10912: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_member_struct_stat_st_blksize=yes
 else
@@ -12041,35 +10919,29 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:12044: result: $ac_cv_member_struct_stat_st_blksize" >&5
+echo "$as_me:10922: result: $ac_cv_member_struct_stat_st_blksize" >&5
 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
 if test $ac_cv_member_struct_stat_st_blksize = yes; then
 
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12054: checking for ss_family field in struct sockaddr_storage" >&5
+echo "$as_me:10932: checking for ss_family field in struct sockaddr_storage" >&5
 echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6
 if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12061 "configure"
+#line 10939 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12079,16 +10951,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12082: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10954: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12085: \$? = $ac_status" >&5
+  echo "$as_me:10957: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12088: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10960: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12091: \$? = $ac_status" >&5
+  echo "$as_me:10963: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_ss_family_in_struct_ss="yes"
 else
@@ -12099,34 +10971,28 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12102: result: $ac_cv_have_ss_family_in_struct_ss" >&5
+echo "$as_me:10974: result: $ac_cv_have_ss_family_in_struct_ss" >&5
 echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6
 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SS_FAMILY_IN_SS 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12111: checking for __ss_family field in struct sockaddr_storage" >&5
+echo "$as_me:10983: checking for __ss_family field in struct sockaddr_storage" >&5
 echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6
 if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12118 "configure"
+#line 10990 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12136,16 +11002,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12139: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11005: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12142: \$? = $ac_status" >&5
+  echo "$as_me:11008: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12145: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11011: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12148: \$? = $ac_status" >&5
+  echo "$as_me:11014: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have___ss_family_in_struct_ss="yes"
 else
@@ -12157,33 +11023,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12160: result: $ac_cv_have___ss_family_in_struct_ss" >&5
+echo "$as_me:11026: result: $ac_cv_have___ss_family_in_struct_ss" >&5
 echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6
 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE___SS_FAMILY_IN_SS 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12169: checking for pw_class field in struct passwd" >&5
+echo "$as_me:11035: checking for pw_class field in struct passwd" >&5
 echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6
 if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12176 "configure"
+#line 11042 "configure"
 #include "confdefs.h"
 
 #include <pwd.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12193,16 +11053,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12196: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11056: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12199: \$? = $ac_status" >&5
+  echo "$as_me:11059: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12202: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11062: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12205: \$? = $ac_status" >&5
+  echo "$as_me:11065: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_pw_class_in_struct_passwd="yes"
 else
@@ -12214,33 +11074,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12217: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
+echo "$as_me:11077: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
 echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6
 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_PW_CLASS_IN_PASSWD 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12226: checking for pw_expire field in struct passwd" >&5
+echo "$as_me:11086: checking for pw_expire field in struct passwd" >&5
 echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6
 if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12233 "configure"
+#line 11093 "configure"
 #include "confdefs.h"
 
 #include <pwd.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12250,16 +11104,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12253: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11107: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12256: \$? = $ac_status" >&5
+  echo "$as_me:11110: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12259: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11113: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12262: \$? = $ac_status" >&5
+  echo "$as_me:11116: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_pw_expire_in_struct_passwd="yes"
 else
@@ -12271,33 +11125,27 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12274: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
+echo "$as_me:11128: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
 echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6
 if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_PW_EXPIRE_IN_PASSWD 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12283: checking for pw_change field in struct passwd" >&5
+echo "$as_me:11137: checking for pw_change field in struct passwd" >&5
 echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6
 if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12290 "configure"
+#line 11144 "configure"
 #include "confdefs.h"
 
 #include <pwd.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12307,16 +11155,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12310: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11158: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12313: \$? = $ac_status" >&5
+  echo "$as_me:11161: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12316: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11164: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12319: \$? = $ac_status" >&5
+  echo "$as_me:11167: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_pw_change_in_struct_passwd="yes"
 else
@@ -12328,31 +11176,25 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:12331: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
+echo "$as_me:11179: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
 echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6
 if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_PW_CHANGE_IN_PASSWD 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12340: checking if libc defines __progname" >&5
+echo "$as_me:11188: checking if libc defines __progname" >&5
 echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6
 if test "${ac_cv_libc_defines___progname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12347 "configure"
+#line 11195 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12362,16 +11204,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12365: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11207: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12368: \$? = $ac_status" >&5
+  echo "$as_me:11210: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12371: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11213: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12374: \$? = $ac_status" >&5
+  echo "$as_me:11216: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_libc_defines___progname="yes"
 else
@@ -12383,33 +11225,27 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:12386: result: $ac_cv_libc_defines___progname" >&5
+echo "$as_me:11228: result: $ac_cv_libc_defines___progname" >&5
 echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6
 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE___PROGNAME 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12395: checking whether getopt has optreset support" >&5
+echo "$as_me:11237: checking whether getopt has optreset support" >&5
 echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6
 if test "${ac_cv_have_getopt_optreset+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12402 "configure"
+#line 11244 "configure"
 #include "confdefs.h"
 
 #include <getopt.h>
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12419,16 +11255,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12422: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11258: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12425: \$? = $ac_status" >&5
+  echo "$as_me:11261: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12428: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11264: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12431: \$? = $ac_status" >&5
+  echo "$as_me:11267: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_have_getopt_optreset="yes"
 else
@@ -12440,31 +11276,25 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:12443: result: $ac_cv_have_getopt_optreset" >&5
+echo "$as_me:11279: result: $ac_cv_have_getopt_optreset" >&5
 echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6
 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_GETOPT_OPTRESET 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12452: checking if libc defines sys_errlist" >&5
+echo "$as_me:11288: checking if libc defines sys_errlist" >&5
 echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6
 if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12459 "configure"
+#line 11295 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12474,16 +11304,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12477: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11307: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12480: \$? = $ac_status" >&5
+  echo "$as_me:11310: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12483: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11313: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12486: \$? = $ac_status" >&5
+  echo "$as_me:11316: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_libc_defines_sys_errlist="yes"
 else
@@ -12495,31 +11325,25 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:12498: result: $ac_cv_libc_defines_sys_errlist" >&5
+echo "$as_me:11328: result: $ac_cv_libc_defines_sys_errlist" >&5
 echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6
 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SYS_ERRLIST 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:12507: checking if libc defines sys_nerr" >&5
+echo "$as_me:11337: checking if libc defines sys_nerr" >&5
 echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6
 if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12514 "configure"
+#line 11344 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12529,16 +11353,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12532: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11356: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12535: \$? = $ac_status" >&5
+  echo "$as_me:11359: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12538: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11362: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12541: \$? = $ac_status" >&5
+  echo "$as_me:11365: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    ac_cv_libc_defines_sys_nerr="yes"
 else
@@ -12550,12 +11374,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:12553: result: $ac_cv_libc_defines_sys_nerr" >&5
+echo "$as_me:11377: result: $ac_cv_libc_defines_sys_nerr" >&5
 echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6
 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define HAVE_SYS_NERR 1
-_ACEOF
+EOF
 
 fi
 
@@ -12581,61 +11405,390 @@
 for ac_header in sectok.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:12585: checking for $ac_header" >&5
+echo "$as_me:11408: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 11414 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:11418: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:11424: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
 fi
-echo "$as_me:12590: result: `eval echo '${'$as_ac_Header'}'`" >&5
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:11443: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+			if test "$ac_cv_header_sectok_h" != yes; then
+				{ { echo "$as_me:11454: error: Can't find sectok.h" >&5
+echo "$as_me: error: Can't find sectok.h" >&2;}
+   { (exit 1); exit 1; }; }
+			fi
+
+echo "$as_me:11459: checking for sectok_open in -lsectok" >&5
+echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6
+if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Is the header compilable?
-echo "$as_me:12594: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsectok  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12597 "configure"
+#line 11467 "configure"
 #include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sectok_open ();
+int
+main ()
+{
+sectok_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11486: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:11489: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:11492: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11495: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_sectok_sectok_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sectok_sectok_open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11506: result: $ac_cv_lib_sectok_sectok_open" >&5
+echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6
+if test $ac_cv_lib_sectok_sectok_open = yes; then
+  cat >>confdefs.h <<EOF
+#define HAVE_LIBSECTOK 1
+EOF
+
+  LIBS="-lsectok $LIBS"
+
+fi
+
+			if test "$ac_cv_lib_sectok_sectok_open" != yes; then
+				{ { echo "$as_me:11518: error: Can't find libsectok" >&5
+echo "$as_me: error: Can't find libsectok" >&2;}
+   { (exit 1); exit 1; }; }
+			fi
+			cat >>confdefs.h <<\EOF
+#define SMARTCARD 1
+EOF
+
+			SCARD_MSG="yes"
+		fi
+
+fi;
+
+# Check whether user wants Kerberos 5 support
+
+# Check whether --with-kerberos5 or --without-kerberos5 was given.
+if test "${with_kerberos5+set}" = set; then
+  withval="$with_kerberos5"
+
+                if test "x$withval" != "xno" ; then
+                        if test "x$withval" = "xyes" ; then
+                                KRB5ROOT="/usr/local"
+                        else
+                                KRB5ROOT=${withval}
+                        fi
+			CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
+                        LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
+                        cat >>confdefs.h <<\EOF
+#define KRB5 1
+EOF
+
+                        echo "$as_me:11549: checking whether we are using Heimdal" >&5
+echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6
+                        cat >conftest.$ac_ext <<_ACEOF
+#line 11552 "configure"
+#include "confdefs.h"
+ #include <krb5.h>
+int
+main ()
+{
+ char *tmp = heimdal_version;
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12603: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11564: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12606: \$? = $ac_status" >&5
+  echo "$as_me:11567: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12609: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11570: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12612: \$? = $ac_status" >&5
+  echo "$as_me:11573: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+   echo "$as_me:11575: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                                         cat >>confdefs.h <<\EOF
+#define HEIMDAL 1
+EOF
+
+                                         K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
+
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_header_compiler=no
+ echo "$as_me:11586: result: no" >&5
+echo "${ECHO_T}no" >&6
+                                         K5LIBS="-lkrb5 -lk5crypto -lcom_err"
+
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:12621: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+                        if test ! -z "$need_dash_r" ; then
+                                LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
+                        fi
+                        if test ! -z "$blibpath" ; then
+                                blibpath="$blibpath:${KRB5ROOT}/lib"
+                        fi
+
+echo "$as_me:11599: checking for dn_expand in -lresolv" >&5
+echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11607 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dn_expand ();
+int
+main ()
+{
+dn_expand ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11626: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:11629: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:11632: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11635: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_resolv_dn_expand=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_dn_expand=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11646: result: $ac_cv_lib_resolv_dn_expand" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
+if test $ac_cv_lib_resolv_dn_expand = yes; then
+  cat >>confdefs.h <<EOF
+#define HAVE_LIBRESOLV 1
+EOF
 
-# Is the header present?
-echo "$as_me:12625: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+  LIBS="-lresolv $LIBS"
+
+fi
+
+			echo "$as_me:11657: checking for gss_init_sec_context in -lgssapi" >&5
+echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi $K5LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12628 "configure"
+#line 11665 "configure"
 #include "confdefs.h"
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gss_init_sec_context ();
+int
+main ()
+{
+gss_init_sec_context ();
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:12632: \"$ac_cpp conftest.$ac_ext\"") >&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11684: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:11687: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:11690: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11693: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gssapi_gss_init_sec_context=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gssapi_gss_init_sec_context=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11704: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6
+if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then
+   cat >>confdefs.h <<\EOF
+#define GSSAPI 1
+EOF
+
+				  K5LIBS="-lgssapi $K5LIBS"
+else
+   echo "$as_me:11713: checking for gss_init_sec_context in -lgssapi_krb5" >&5
+echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6
+if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgssapi_krb5 $K5LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11721 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gss_init_sec_context ();
+int
+main ()
+{
+gss_init_sec_context ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11740: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:11743: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:11746: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:11749: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:11760: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
+echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6
+if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then
+   cat >>confdefs.h <<\EOF
+#define GSSAPI 1
+EOF
+
+				  	  K5LIBS="-lgssapi_krb5 $K5LIBS"
+else
+  { echo "$as_me:11769: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
+echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
+fi
+
+fi
+
+			echo "$as_me:11775: checking for gssapi.h" >&5
+echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 11781 "configure"
+#include "confdefs.h"
+#include <gssapi.h>
+_ACEOF
+if { (eval echo "$as_me:11785: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:12638: \$? = $ac_status" >&5
+  echo "$as_me:11791: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12646,136 +11799,126 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  ac_cv_header_gssapi_h=yes
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  ac_cv_header_gssapi_h=no
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:12656: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+fi
+echo "$as_me:11810: result: $ac_cv_header_gssapi_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
+if test $ac_cv_header_gssapi_h = yes; then
+  :
+else
+   unset ac_cv_header_gssapi_h
+				  CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:12662: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:12664: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:12667: WARNING: $ac_header: present but cannot be compiled." >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
-    { echo "$as_me:12669: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:12671: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:12674: checking for $ac_header" >&5
+for ac_header in gssapi.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:11821: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 11827 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:11831: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:11837: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
 fi
-echo "$as_me:12681: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
+if test -z "$ac_cpp_err"; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
 fi
+echo "$as_me:11856: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
-fi
+else
+  { echo "$as_me:11864: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
+echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
 
+fi
 done
 
-			if test "$ac_cv_header_sectok_h" != yes; then
-				{ { echo "$as_me:12695: error: Can't find sectok.h" >&5
-echo "$as_me: error: Can't find sectok.h" >&2;}
-   { (exit 1); exit 1; }; }
-			fi
+fi
 
-echo "$as_me:12700: checking for sectok_open in -lsectok" >&5
-echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6
-if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
+			oldCPP="$CPPFLAGS"
+			CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
+			echo "$as_me:11874: checking for gssapi_krb5.h" >&5
+echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6
+if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsectok  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 12708 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 11880 "configure"
 #include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char sectok_open ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-sectok_open ();
-  ;
-  return 0;
-}
+#include <gssapi_krb5.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12733: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:12736: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12739: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:11884: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
-  echo "$as_me:12742: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_sectok_sectok_open=yes
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:11890: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_gssapi_krb5_h=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_sectok_sectok_open=no
+  cat conftest.$ac_ext >&5
+  ac_cv_header_gssapi_krb5_h=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:12753: result: $ac_cv_lib_sectok_sectok_open" >&5
-echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6
-if test $ac_cv_lib_sectok_sectok_open = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSECTOK 1
-_ACEOF
-
-  LIBS="-lsectok $LIBS"
-
+echo "$as_me:11909: result: $ac_cv_header_gssapi_krb5_h" >&5
+echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6
+if test $ac_cv_header_gssapi_krb5_h = yes; then
+  :
+else
+   CPPFLAGS="$oldCPP"
 fi
 
-			if test "$ac_cv_lib_sectok_sectok_open" != yes; then
-				{ { echo "$as_me:12765: error: Can't find libsectok" >&5
-echo "$as_me: error: Can't find libsectok" >&2;}
-   { (exit 1); exit 1; }; }
-			fi
-			cat >>confdefs.h <<\_ACEOF
-#define SMARTCARD 1
-_ACEOF
-
-			SCARD_MSG="yes"
-		fi
+                        KRB5=yes
+                fi
 
 fi;
-
-# Check whether user wants Kerberos support
+# Check whether user wants Kerberos 4 support
 KRB4_MSG="no"
 
 # Check whether --with-kerberos4 or --without-kerberos4 was given.
@@ -12801,61 +11944,23 @@
 for ac_header in krb.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:12805: checking for $ac_header" >&5
+echo "$as_me:11947: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:12810: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:12814: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 12817 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12823: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:12826: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12829: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:12832: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:12841: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:12845: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 12848 "configure"
+  cat >conftest.$ac_ext <<_ACEOF
+#line 11953 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:12852: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11957: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:12858: \$? = $ac_status" >&5
+  echo "$as_me:11963: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12866,57 +11971,30 @@
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  eval "$as_ac_Header=no"
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:12876: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:12882: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:12884: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:12887: WARNING: $ac_header: present but cannot be compiled." >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;}
-    { echo "$as_me:12889: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:12891: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:12894: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:12901: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:11982: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+EOF
 
 fi
-
 done
 
 			if test "$ac_cv_header_krb_h" != yes; then
-				{ echo "$as_me:12915: WARNING: Cannot find krb.h, build may fail" >&5
+				{ echo "$as_me:11993: WARNING: Cannot find krb.h, build may fail" >&5
 echo "$as_me: WARNING: Cannot find krb.h, build may fail" >&2;}
 			fi
 
-echo "$as_me:12919: checking for main in -lkrb" >&5
+echo "$as_me:11997: checking for main in -lkrb" >&5
 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
 if test "${ac_cv_lib_krb_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12924,15 +12002,9 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lkrb  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12927 "configure"
+#line 12005 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -12942,16 +12014,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12945: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12017: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12948: \$? = $ac_status" >&5
+  echo "$as_me:12020: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12951: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12023: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12954: \$? = $ac_status" >&5
+  echo "$as_me:12026: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_krb_main=yes
 else
@@ -12962,12 +12034,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12965: result: $ac_cv_lib_krb_main" >&5
+echo "$as_me:12037: result: $ac_cv_lib_krb_main" >&5
 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
 if test $ac_cv_lib_krb_main = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBKRB 1
-_ACEOF
+EOF
 
   LIBS="-lkrb $LIBS"
 
@@ -12975,7 +12047,7 @@
 
 			if test "$ac_cv_lib_krb_main" != yes; then
 
-echo "$as_me:12978: checking for main in -lkrb4" >&5
+echo "$as_me:12050: checking for main in -lkrb4" >&5
 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
 if test "${ac_cv_lib_krb4_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12983,15 +12055,9 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lkrb4  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12986 "configure"
+#line 12058 "configure"
 #include "confdefs.h"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -13001,16 +12067,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13004: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12070: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13007: \$? = $ac_status" >&5
+  echo "$as_me:12073: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13010: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12076: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13013: \$? = $ac_status" >&5
+  echo "$as_me:12079: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_krb4_main=yes
 else
@@ -13021,19 +12087,19 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13024: result: $ac_cv_lib_krb4_main" >&5
+echo "$as_me:12090: result: $ac_cv_lib_krb4_main" >&5
 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
 if test $ac_cv_lib_krb4_main = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBKRB4 1
-_ACEOF
+EOF
 
   LIBS="-lkrb4 $LIBS"
 
 fi
 
 				if test "$ac_cv_lib_krb4_main" != yes; then
-					{ echo "$as_me:13036: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&5
+					{ echo "$as_me:12102: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&5
 echo "$as_me: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&2;}
 				else
 					KLIBS="-lkrb4"
@@ -13042,7 +12108,7 @@
 				KLIBS="-lkrb"
 			fi
 
-echo "$as_me:13045: checking for des_cbc_encrypt in -ldes" >&5
+echo "$as_me:12111: checking for des_cbc_encrypt in -ldes" >&5
 echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13050,7 +12116,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldes  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 13053 "configure"
+#line 12119 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -13060,12 +12126,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char des_cbc_encrypt ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -13075,16 +12135,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13078: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12138: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13081: \$? = $ac_status" >&5
+  echo "$as_me:12141: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13084: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12144: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13087: \$? = $ac_status" >&5
+  echo "$as_me:12147: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_des_des_cbc_encrypt=yes
 else
@@ -13095,12 +12155,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13098: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
+echo "$as_me:12158: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
 echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
 if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBDES 1
-_ACEOF
+EOF
 
   LIBS="-ldes $LIBS"
 
@@ -13108,7 +12168,7 @@
 
 			if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
 
-echo "$as_me:13111: checking for des_cbc_encrypt in -ldes425" >&5
+echo "$as_me:12171: checking for des_cbc_encrypt in -ldes425" >&5
 echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13116,7 +12176,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldes425  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 13119 "configure"
+#line 12179 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -13126,12 +12186,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char des_cbc_encrypt ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -13141,16 +12195,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13144: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12198: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13147: \$? = $ac_status" >&5
+  echo "$as_me:12201: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13150: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12204: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13153: \$? = $ac_status" >&5
+  echo "$as_me:12207: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_des425_des_cbc_encrypt=yes
 else
@@ -13161,19 +12215,19 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13164: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
+echo "$as_me:12218: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
 echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
 if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBDES425 1
-_ACEOF
+EOF
 
   LIBS="-ldes425 $LIBS"
 
 fi
 
 				if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
-					{ echo "$as_me:13176: WARNING: Cannot find libdes nor libdes425, build may fail" >&5
+					{ echo "$as_me:12230: WARNING: Cannot find libdes nor libdes425, build may fail" >&5
 echo "$as_me: WARNING: Cannot find libdes nor libdes425, build may fail" >&2;}
 				else
 					KLIBS="-ldes425"
@@ -13182,7 +12236,7 @@
 				KLIBS="-ldes"
 			fi
 
-echo "$as_me:13185: checking for dn_expand in -lresolv" >&5
+echo "$as_me:12239: checking for dn_expand in -lresolv" >&5
 echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
 if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13190,7 +12244,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lresolv  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 13193 "configure"
+#line 12247 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -13200,12 +12254,6 @@
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
 char dn_expand ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -13215,16 +12263,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13218: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12266: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13221: \$? = $ac_status" >&5
+  echo "$as_me:12269: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13224: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12272: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13227: \$? = $ac_status" >&5
+  echo "$as_me:12275: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_resolv_dn_expand=yes
 else
@@ -13235,12 +12283,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13238: result: $ac_cv_lib_resolv_dn_expand" >&5
+echo "$as_me:12286: result: $ac_cv_lib_resolv_dn_expand" >&5
 echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
 if test $ac_cv_lib_resolv_dn_expand = yes; then
-  cat >>confdefs.h <<_ACEOF
+  cat >>confdefs.h <<EOF
 #define HAVE_LIBRESOLV 1
-_ACEOF
+EOF
 
   LIBS="-lresolv $LIBS"
 
@@ -13248,14 +12296,120 @@
 
 			KRB4=yes
 			KRB4_MSG="yes"
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define KRB4 1
-_ACEOF
+EOF
 
 		fi
 
 fi;
 
+# Check whether the user wants GSI (Globus) support
+gsi_path="no"
+
+# Check whether --with-gsi or --without-gsi was given.
+if test "${with_gsi+set}" = set; then
+  withval="$with_gsi"
+
+		gsi_path="$withval"
+
+fi;
+
+# Check whether --with-globus or --without-globus was given.
+if test "${with_globus+set}" = set; then
+  withval="$with_globus"
+
+		gsi_path="$withval"
+
+fi;
+
+if test "x$gsi_path" != "xno" ; then
+	# Globus GSSAPI configuration
+	cat >>confdefs.h <<\EOF
+#define GSSAPI 1
+EOF
+
+	cat >>confdefs.h <<\EOF
+#define GSI 1
+EOF
+
+	# Find GLOBUS/GSI installation Directory
+	echo "$as_me:12337: checking for Globus/GSI installation directory" >&5
+echo $ECHO_N "checking for Globus/GSI installation directory... $ECHO_C" >&6
+
+	globus_install_dir=$gsi_path
+
+	if test "x$globus_install_dir" = "xyes" ; then
+		if test -n "$GLOBUS_INSTALL_PATH" ; then
+			globus_install_dir=$GLOBUS_INSTALL_PATH
+		elif test -n "$GSI_INSTALL_PATH" ; then
+			globus_install_dir=$GSI_INSTALL_PATH
+		elif test -d /usr/local/globus ; then
+			globus_install_dir="/usr/local/globus"
+		elif test -d /usr/local/gsi ; then
+			globus_install_dir="/usr/local/gsi"
+		else
+			{ { echo "$as_me:12352: error: Cannot find Globus/GSI installation directory" >&5
+echo "$as_me: error: Cannot find Globus/GSI installation directory" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+	echo "$as_me:12357: result: $globus_install_dir" >&5
+echo "${ECHO_T}$globus_install_dir" >&6
+
+	# Find GLOBUS/GSI development directory
+	echo "$as_me:12361: checking for Globus/GSI development directory" >&5
+echo $ECHO_N "checking for Globus/GSI development directory... $ECHO_C" >&6
+
+	if test -d ${globus_install_dir}/lib ; then
+		# Looks like a flat directory structure from configure/make
+		# and not globus-install or gsi-install
+		globus_dev_dir=$globus_install_dir
+
+	else
+		# Assume a true globus installation with architecture
+		# directories and run globus-development-path to find
+		# the development directory
+
+		# Set GLOBUS_INSTALL_PATH
+		GLOBUS_INSTALL_PATH=$globus_install_dir
+		export GLOBUS_INSTALL_PATH
+
+		dev_path_program=${globus_install_dir}/bin/globus-development-path
+
+		if test ! -x ${dev_path_program} ; then
+			{ { echo "$as_me:12381: error: Cannot find Globus/GSI installation directory: program ${dev_path_program} does not exist or is not executable" >&5
+echo "$as_me: error: Cannot find Globus/GSI installation directory: program ${dev_path_program} does not exist or is not executable" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+
+		globus_dev_dir=`${dev_path_program}`
+
+		if test -z "$globus_dev_dir" -o "X$globus_dev_dir" = "X<not found>" ; then
+				{ { echo "$as_me:12389: error: Cannot find Globus/GSI development directory" >&5
+echo "$as_me: error: Cannot find Globus/GSI development directory" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+
+		if test ! -d "$globus_dev_dir" ; then
+			{ { echo "$as_me:12395: error: Cannot find Globus/GSI development directory: $globus_dev_dir does not exist" >&5
+echo "$as_me: error: Cannot find Globus/GSI development directory: $globus_dev_dir does not exist" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+	echo "$as_me:12400: result: $globus_dev_dir" >&5
+echo "${ECHO_T}$globus_dev_dir" >&6
+
+	GSI_LIBS="-lglobus_gss_assist -lglobus_gss -lglobus_gaa -lssl -lcrypto"
+	GSI_LDFLAGS="-L${globus_dev_dir}/lib"
+	GSI_CFLAGS="-I${globus_dev_dir}/include"
+
+	LIBS="$LIBS $GSI_LIBS"
+	LDFLAGS="$LDFLAGS $GSI_LDFLAGS"
+	CFLAGS="$CFLAGS $GSI_CFLAGS"
+# End Globus/GSI section
+fi
+
 # Check whether user wants AFS support
 AFS_MSG="no"
 
@@ -13271,7 +12425,7 @@
 			fi
 
 			if test -z "$KRB4" ; then
-				{ echo "$as_me:13274: WARNING: AFS requires Kerberos IV support, build may fail" >&5
+				{ echo "$as_me:12428: WARNING: AFS requires Kerberos IV support, build may fail" >&5
 echo "$as_me: WARNING: AFS requires Kerberos IV support, build may fail" >&2;}
 			fi
 
@@ -13279,15 +12433,15 @@
 			if test ! -z "$AFS_LIBS" ; then
 				LIBS="$LIBS $AFS_LIBS"
 			fi
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define AFS 1
-_ACEOF
+EOF
 
 			AFS_MSG="yes"
 		fi
 
 fi;
-LIBS="$LIBS $KLIBS"
+LIBS="$LIBS $KLIBS $K5LIBS"
 
 # Looking for programs, paths and files
 
@@ -13303,7 +12457,7 @@
 
 		# Extract the first word of "rsh", so it can be a program name with args.
 set dummy rsh; ac_word=$2
-echo "$as_me:13306: checking for $ac_word" >&5
+echo "$as_me:12460: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_rsh_path+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13320,7 +12474,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_rsh_path="$ac_dir/$ac_word"
-   echo "$as_me:13323: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12477: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13331,10 +12485,10 @@
 rsh_path=$ac_cv_path_rsh_path
 
 if test -n "$rsh_path"; then
-  echo "$as_me:13334: result: $rsh_path" >&5
+  echo "$as_me:12488: result: $rsh_path" >&5
 echo "${ECHO_T}$rsh_path" >&6
 else
-  echo "$as_me:13337: result: no" >&5
+  echo "$as_me:12491: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13352,7 +12506,7 @@
 
 		# Extract the first word of "xauth", so it can be a program name with args.
 set dummy xauth; ac_word=$2
-echo "$as_me:13355: checking for $ac_word" >&5
+echo "$as_me:12509: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_xauth_path+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13369,7 +12523,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_xauth_path="$ac_dir/$ac_word"
-   echo "$as_me:13372: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12526: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13380,10 +12534,10 @@
 xauth_path=$ac_cv_path_xauth_path
 
 if test -n "$xauth_path"; then
-  echo "$as_me:13383: result: $xauth_path" >&5
+  echo "$as_me:12537: result: $xauth_path" >&5
 echo "${ECHO_T}$xauth_path" >&6
 else
-  echo "$as_me:13386: result: no" >&5
+  echo "$as_me:12540: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13397,37 +12551,37 @@
 	XAUTH_PATH="undefined"
 
 else
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define XAUTH_PATH "$xauth_path"
-_ACEOF
+EOF
 
 	XAUTH_PATH=$xauth_path
 
 fi
 if test ! -z "$rsh_path" ; then
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define RSH_PATH "$rsh_path"
-_ACEOF
+EOF
 
 fi
 
 # Check for mail directory (last resort if we cannot get it from headers)
 if test ! -z "$MAIL" ; then
 	maildir=`dirname $MAIL`
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define MAIL_DIRECTORY "$maildir"
-_ACEOF
+EOF
 
 fi
 
 if test -z "$no_dev_ptmx" ; then
-	echo "$as_me:13424: checking for \"/dev/ptmx\"" >&5
+	echo "$as_me:12578: checking for \"/dev/ptmx\"" >&5
 echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6
 if test "${ac_cv_file___dev_ptmx_+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   test "$cross_compiling" = yes &&
-  { { echo "$as_me:13430: error: cannot check for file existence when cross compiling" >&5
+  { { echo "$as_me:12584: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 if test -r ""/dev/ptmx""; then
@@ -13436,26 +12590,26 @@
   ac_cv_file___dev_ptmx_=no
 fi
 fi
-echo "$as_me:13439: result: $ac_cv_file___dev_ptmx_" >&5
+echo "$as_me:12593: result: $ac_cv_file___dev_ptmx_" >&5
 echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6
 if test $ac_cv_file___dev_ptmx_ = yes; then
 
-			cat >>confdefs.h <<_ACEOF
+			cat >>confdefs.h <<EOF
 #define HAVE_DEV_PTMX 1
-_ACEOF
+EOF
 
 			have_dev_ptmx=1
 
 fi
 
 fi
-echo "$as_me:13452: checking for \"/dev/ptc\"" >&5
+echo "$as_me:12606: checking for \"/dev/ptc\"" >&5
 echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6
 if test "${ac_cv_file___dev_ptc_+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   test "$cross_compiling" = yes &&
-  { { echo "$as_me:13458: error: cannot check for file existence when cross compiling" >&5
+  { { echo "$as_me:12612: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 if test -r ""/dev/ptc""; then
@@ -13464,13 +12618,13 @@
   ac_cv_file___dev_ptc_=no
 fi
 fi
-echo "$as_me:13467: result: $ac_cv_file___dev_ptc_" >&5
+echo "$as_me:12621: result: $ac_cv_file___dev_ptc_" >&5
 echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6
 if test $ac_cv_file___dev_ptc_ = yes; then
 
-		cat >>confdefs.h <<_ACEOF
+		cat >>confdefs.h <<EOF
 #define HAVE_DEV_PTS_AND_PTC 1
-_ACEOF
+EOF
 
 		have_dev_ptc=1
 
@@ -13486,22 +12640,22 @@
 
 		if test "x$withval" != "xno" ; then
 			RANDOM_POOL="$withval";
-			cat >>confdefs.h <<_ACEOF
+			cat >>confdefs.h <<EOF
 #define RANDOM_POOL "$RANDOM_POOL"
-_ACEOF
+EOF
 
 		fi
 
 else
 
 		# Check for random device
-		echo "$as_me:13498: checking for \"/dev/urandom\"" >&5
+		echo "$as_me:12652: checking for \"/dev/urandom\"" >&5
 echo $ECHO_N "checking for \"/dev/urandom\"... $ECHO_C" >&6
 if test "${ac_cv_file___dev_urandom_+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   test "$cross_compiling" = yes &&
-  { { echo "$as_me:13504: error: cannot check for file existence when cross compiling" >&5
+  { { echo "$as_me:12658: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
 if test -r ""/dev/urandom""; then
@@ -13510,15 +12664,15 @@
   ac_cv_file___dev_urandom_=no
 fi
 fi
-echo "$as_me:13513: result: $ac_cv_file___dev_urandom_" >&5
+echo "$as_me:12667: result: $ac_cv_file___dev_urandom_" >&5
 echo "${ECHO_T}$ac_cv_file___dev_urandom_" >&6
 if test $ac_cv_file___dev_urandom_ = yes; then
 
 				RANDOM_POOL="/dev/urandom";
 
-				cat >>confdefs.h <<_ACEOF
+				cat >>confdefs.h <<EOF
 #define RANDOM_POOL "$RANDOM_POOL"
-_ACEOF
+EOF
 
 fi
 
@@ -13532,9 +12686,9 @@
 
 		if test ! -z "$withval" -a "x$withval" != "xno" ; then
 			PRNGD_PORT="$withval"
-			cat >>confdefs.h <<_ACEOF
+			cat >>confdefs.h <<EOF
 #define PRNGD_PORT $PRNGD_PORT
-_ACEOF
+EOF
 
 		fi
 
@@ -13548,9 +12702,9 @@
 
 		if test "x$withval" != "xno" ; then
 			PRNGD_SOCKET="$withval"
-			cat >>confdefs.h <<_ACEOF
+			cat >>confdefs.h <<EOF
 #define PRNGD_SOCKET "$PRNGD_SOCKET"
-_ACEOF
+EOF
 
 		fi
 
@@ -13558,24 +12712,24 @@
 
 		# Check for existing socket only if we don't have a random device already
 		if test -z "$RANDOM_POOL" ; then
-			echo "$as_me:13561: checking for PRNGD/EGD socket" >&5
+			echo "$as_me:12715: checking for PRNGD/EGD socket" >&5
 echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6
 			# Insert other locations here
 			for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
 				if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
 					PRNGD_SOCKET="$sock"
-					cat >>confdefs.h <<_ACEOF
+					cat >>confdefs.h <<EOF
 #define PRNGD_SOCKET "$PRNGD_SOCKET"
-_ACEOF
+EOF
 
 					break;
 				fi
 			done
 			if test ! -z "$PRNGD_SOCKET" ; then
-				echo "$as_me:13575: result: $PRNGD_SOCKET" >&5
+				echo "$as_me:12729: result: $PRNGD_SOCKET" >&5
 echo "${ECHO_T}$PRNGD_SOCKET" >&6
 			else
-				echo "$as_me:13578: result: not found" >&5
+				echo "$as_me:12732: result: not found" >&5
 echo "${ECHO_T}not found" >&6
 			fi
 		fi
@@ -13590,7 +12744,7 @@
 
 	# Extract the first word of "ls", so it can be a program name with args.
 set dummy ls; ac_word=$2
-echo "$as_me:13593: checking for $ac_word" >&5
+echo "$as_me:12747: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_LS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13607,7 +12761,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_LS="$ac_dir/$ac_word"
-   echo "$as_me:13610: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12764: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13618,10 +12772,10 @@
 PROG_LS=$ac_cv_path_PROG_LS
 
 if test -n "$PROG_LS"; then
-  echo "$as_me:13621: result: $PROG_LS" >&5
+  echo "$as_me:12775: result: $PROG_LS" >&5
 echo "${ECHO_T}$PROG_LS" >&6
 else
-  echo "$as_me:13624: result: no" >&5
+  echo "$as_me:12778: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13631,7 +12785,7 @@
 
 	# Extract the first word of "netstat", so it can be a program name with args.
 set dummy netstat; ac_word=$2
-echo "$as_me:13634: checking for $ac_word" >&5
+echo "$as_me:12788: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13648,7 +12802,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_NETSTAT="$ac_dir/$ac_word"
-   echo "$as_me:13651: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12805: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13659,10 +12813,10 @@
 PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
 
 if test -n "$PROG_NETSTAT"; then
-  echo "$as_me:13662: result: $PROG_NETSTAT" >&5
+  echo "$as_me:12816: result: $PROG_NETSTAT" >&5
 echo "${ECHO_T}$PROG_NETSTAT" >&6
 else
-  echo "$as_me:13665: result: no" >&5
+  echo "$as_me:12819: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13672,7 +12826,7 @@
 
 	# Extract the first word of "arp", so it can be a program name with args.
 set dummy arp; ac_word=$2
-echo "$as_me:13675: checking for $ac_word" >&5
+echo "$as_me:12829: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_ARP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13689,7 +12843,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_ARP="$ac_dir/$ac_word"
-   echo "$as_me:13692: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12846: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13700,10 +12854,10 @@
 PROG_ARP=$ac_cv_path_PROG_ARP
 
 if test -n "$PROG_ARP"; then
-  echo "$as_me:13703: result: $PROG_ARP" >&5
+  echo "$as_me:12857: result: $PROG_ARP" >&5
 echo "${ECHO_T}$PROG_ARP" >&6
 else
-  echo "$as_me:13706: result: no" >&5
+  echo "$as_me:12860: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13713,7 +12867,7 @@
 
 	# Extract the first word of "ifconfig", so it can be a program name with args.
 set dummy ifconfig; ac_word=$2
-echo "$as_me:13716: checking for $ac_word" >&5
+echo "$as_me:12870: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13730,7 +12884,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_IFCONFIG="$ac_dir/$ac_word"
-   echo "$as_me:13733: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12887: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13741,10 +12895,10 @@
 PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
 
 if test -n "$PROG_IFCONFIG"; then
-  echo "$as_me:13744: result: $PROG_IFCONFIG" >&5
+  echo "$as_me:12898: result: $PROG_IFCONFIG" >&5
 echo "${ECHO_T}$PROG_IFCONFIG" >&6
 else
-  echo "$as_me:13747: result: no" >&5
+  echo "$as_me:12901: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13754,7 +12908,7 @@
 
 	# Extract the first word of "jstat", so it can be a program name with args.
 set dummy jstat; ac_word=$2
-echo "$as_me:13757: checking for $ac_word" >&5
+echo "$as_me:12911: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13771,7 +12925,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_JSTAT="$ac_dir/$ac_word"
-   echo "$as_me:13774: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12928: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13782,10 +12936,10 @@
 PROG_JSTAT=$ac_cv_path_PROG_JSTAT
 
 if test -n "$PROG_JSTAT"; then
-  echo "$as_me:13785: result: $PROG_JSTAT" >&5
+  echo "$as_me:12939: result: $PROG_JSTAT" >&5
 echo "${ECHO_T}$PROG_JSTAT" >&6
 else
-  echo "$as_me:13788: result: no" >&5
+  echo "$as_me:12942: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13795,7 +12949,7 @@
 
 	# Extract the first word of "ps", so it can be a program name with args.
 set dummy ps; ac_word=$2
-echo "$as_me:13798: checking for $ac_word" >&5
+echo "$as_me:12952: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_PS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13812,7 +12966,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_PS="$ac_dir/$ac_word"
-   echo "$as_me:13815: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12969: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13823,10 +12977,10 @@
 PROG_PS=$ac_cv_path_PROG_PS
 
 if test -n "$PROG_PS"; then
-  echo "$as_me:13826: result: $PROG_PS" >&5
+  echo "$as_me:12980: result: $PROG_PS" >&5
 echo "${ECHO_T}$PROG_PS" >&6
 else
-  echo "$as_me:13829: result: no" >&5
+  echo "$as_me:12983: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13836,7 +12990,7 @@
 
 	# Extract the first word of "sar", so it can be a program name with args.
 set dummy sar; ac_word=$2
-echo "$as_me:13839: checking for $ac_word" >&5
+echo "$as_me:12993: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_SAR+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13853,7 +13007,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_SAR="$ac_dir/$ac_word"
-   echo "$as_me:13856: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13010: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13864,10 +13018,10 @@
 PROG_SAR=$ac_cv_path_PROG_SAR
 
 if test -n "$PROG_SAR"; then
-  echo "$as_me:13867: result: $PROG_SAR" >&5
+  echo "$as_me:13021: result: $PROG_SAR" >&5
 echo "${ECHO_T}$PROG_SAR" >&6
 else
-  echo "$as_me:13870: result: no" >&5
+  echo "$as_me:13024: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13877,7 +13031,7 @@
 
 	# Extract the first word of "w", so it can be a program name with args.
 set dummy w; ac_word=$2
-echo "$as_me:13880: checking for $ac_word" >&5
+echo "$as_me:13034: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_W+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13894,7 +13048,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_W="$ac_dir/$ac_word"
-   echo "$as_me:13897: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13051: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13905,10 +13059,10 @@
 PROG_W=$ac_cv_path_PROG_W
 
 if test -n "$PROG_W"; then
-  echo "$as_me:13908: result: $PROG_W" >&5
+  echo "$as_me:13062: result: $PROG_W" >&5
 echo "${ECHO_T}$PROG_W" >&6
 else
-  echo "$as_me:13911: result: no" >&5
+  echo "$as_me:13065: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13918,7 +13072,7 @@
 
 	# Extract the first word of "who", so it can be a program name with args.
 set dummy who; ac_word=$2
-echo "$as_me:13921: checking for $ac_word" >&5
+echo "$as_me:13075: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_WHO+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13935,7 +13089,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_WHO="$ac_dir/$ac_word"
-   echo "$as_me:13938: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13092: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13946,10 +13100,10 @@
 PROG_WHO=$ac_cv_path_PROG_WHO
 
 if test -n "$PROG_WHO"; then
-  echo "$as_me:13949: result: $PROG_WHO" >&5
+  echo "$as_me:13103: result: $PROG_WHO" >&5
 echo "${ECHO_T}$PROG_WHO" >&6
 else
-  echo "$as_me:13952: result: no" >&5
+  echo "$as_me:13106: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13959,7 +13113,7 @@
 
 	# Extract the first word of "last", so it can be a program name with args.
 set dummy last; ac_word=$2
-echo "$as_me:13962: checking for $ac_word" >&5
+echo "$as_me:13116: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_LAST+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13976,7 +13130,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_LAST="$ac_dir/$ac_word"
-   echo "$as_me:13979: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13133: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13987,10 +13141,10 @@
 PROG_LAST=$ac_cv_path_PROG_LAST
 
 if test -n "$PROG_LAST"; then
-  echo "$as_me:13990: result: $PROG_LAST" >&5
+  echo "$as_me:13144: result: $PROG_LAST" >&5
 echo "${ECHO_T}$PROG_LAST" >&6
 else
-  echo "$as_me:13993: result: no" >&5
+  echo "$as_me:13147: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14000,7 +13154,7 @@
 
 	# Extract the first word of "lastlog", so it can be a program name with args.
 set dummy lastlog; ac_word=$2
-echo "$as_me:14003: checking for $ac_word" >&5
+echo "$as_me:13157: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14017,7 +13171,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_LASTLOG="$ac_dir/$ac_word"
-   echo "$as_me:14020: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13174: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14028,10 +13182,10 @@
 PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
 
 if test -n "$PROG_LASTLOG"; then
-  echo "$as_me:14031: result: $PROG_LASTLOG" >&5
+  echo "$as_me:13185: result: $PROG_LASTLOG" >&5
 echo "${ECHO_T}$PROG_LASTLOG" >&6
 else
-  echo "$as_me:14034: result: no" >&5
+  echo "$as_me:13188: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14041,7 +13195,7 @@
 
 	# Extract the first word of "df", so it can be a program name with args.
 set dummy df; ac_word=$2
-echo "$as_me:14044: checking for $ac_word" >&5
+echo "$as_me:13198: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_DF+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14058,7 +13212,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_DF="$ac_dir/$ac_word"
-   echo "$as_me:14061: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13215: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14069,10 +13223,10 @@
 PROG_DF=$ac_cv_path_PROG_DF
 
 if test -n "$PROG_DF"; then
-  echo "$as_me:14072: result: $PROG_DF" >&5
+  echo "$as_me:13226: result: $PROG_DF" >&5
 echo "${ECHO_T}$PROG_DF" >&6
 else
-  echo "$as_me:14075: result: no" >&5
+  echo "$as_me:13229: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14082,7 +13236,7 @@
 
 	# Extract the first word of "vmstat", so it can be a program name with args.
 set dummy vmstat; ac_word=$2
-echo "$as_me:14085: checking for $ac_word" >&5
+echo "$as_me:13239: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14099,7 +13253,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_VMSTAT="$ac_dir/$ac_word"
-   echo "$as_me:14102: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13256: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14110,10 +13264,10 @@
 PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
 
 if test -n "$PROG_VMSTAT"; then
-  echo "$as_me:14113: result: $PROG_VMSTAT" >&5
+  echo "$as_me:13267: result: $PROG_VMSTAT" >&5
 echo "${ECHO_T}$PROG_VMSTAT" >&6
 else
-  echo "$as_me:14116: result: no" >&5
+  echo "$as_me:13270: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14123,7 +13277,7 @@
 
 	# Extract the first word of "uptime", so it can be a program name with args.
 set dummy uptime; ac_word=$2
-echo "$as_me:14126: checking for $ac_word" >&5
+echo "$as_me:13280: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14140,7 +13294,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_UPTIME="$ac_dir/$ac_word"
-   echo "$as_me:14143: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13297: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14151,10 +13305,10 @@
 PROG_UPTIME=$ac_cv_path_PROG_UPTIME
 
 if test -n "$PROG_UPTIME"; then
-  echo "$as_me:14154: result: $PROG_UPTIME" >&5
+  echo "$as_me:13308: result: $PROG_UPTIME" >&5
 echo "${ECHO_T}$PROG_UPTIME" >&6
 else
-  echo "$as_me:14157: result: no" >&5
+  echo "$as_me:13311: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14164,7 +13318,7 @@
 
 	# Extract the first word of "ipcs", so it can be a program name with args.
 set dummy ipcs; ac_word=$2
-echo "$as_me:14167: checking for $ac_word" >&5
+echo "$as_me:13321: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_IPCS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14181,7 +13335,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_IPCS="$ac_dir/$ac_word"
-   echo "$as_me:14184: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13338: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14192,10 +13346,10 @@
 PROG_IPCS=$ac_cv_path_PROG_IPCS
 
 if test -n "$PROG_IPCS"; then
-  echo "$as_me:14195: result: $PROG_IPCS" >&5
+  echo "$as_me:13349: result: $PROG_IPCS" >&5
 echo "${ECHO_T}$PROG_IPCS" >&6
 else
-  echo "$as_me:14198: result: no" >&5
+  echo "$as_me:13352: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14205,7 +13359,7 @@
 
 	# Extract the first word of "tail", so it can be a program name with args.
 set dummy tail; ac_word=$2
-echo "$as_me:14208: checking for $ac_word" >&5
+echo "$as_me:13362: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_PROG_TAIL+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14222,7 +13376,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_PROG_TAIL="$ac_dir/$ac_word"
-   echo "$as_me:14225: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13379: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14233,10 +13387,10 @@
 PROG_TAIL=$ac_cv_path_PROG_TAIL
 
 if test -n "$PROG_TAIL"; then
-  echo "$as_me:14236: result: $PROG_TAIL" >&5
+  echo "$as_me:13390: result: $PROG_TAIL" >&5
 echo "${ECHO_T}$PROG_TAIL" >&6
 else
-  echo "$as_me:14239: result: no" >&5
+  echo "$as_me:13393: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14256,7 +13410,7 @@
 			MANTYPE=$withval
 			;;
 		*)
-			{ { echo "$as_me:14259: error: invalid man type: $withval" >&5
+			{ { echo "$as_me:13413: error: invalid man type: $withval" >&5
 echo "$as_me: error: invalid man type: $withval" >&2;}
    { (exit 1); exit 1; }; }
 			;;
@@ -14268,7 +13422,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:14271: checking for $ac_word" >&5
+echo "$as_me:13425: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_NROFF+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14285,7 +13439,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_NROFF="$ac_dir/$ac_word"
-   echo "$as_me:14288: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13442: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -14296,10 +13450,10 @@
 NROFF=$ac_cv_path_NROFF
 
 if test -n "$NROFF"; then
-  echo "$as_me:14299: result: $NROFF" >&5
+  echo "$as_me:13453: result: $NROFF" >&5
 echo "${ECHO_T}$NROFF" >&6
 else
-  echo "$as_me:14302: result: no" >&5
+  echo "$as_me:13456: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -14330,9 +13484,9 @@
   withval="$with_md5_passwords"
 
 		if test "x$withval" != "xno" ; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define HAVE_MD5_PASSWORDS 1
-_ACEOF
+EOF
 
 			MD5_MSG="yes"
 		fi
@@ -14346,9 +13500,9 @@
   withval="$with_shadow"
 
 		if test "x$withval" = "xno" ; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define DISABLE_SHADOW 1
-_ACEOF
+EOF
 
 			disable_shadow=yes
 		fi
@@ -14356,22 +13510,16 @@
 fi;
 
 if test -z "$disable_shadow" ; then
-	echo "$as_me:14359: checking if the systems has expire shadow information" >&5
+	echo "$as_me:13513: checking if the systems has expire shadow information" >&5
 echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 14362 "configure"
+#line 13516 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <shadow.h>
 	struct spwd sp;
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -14381,16 +13529,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14384: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13532: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14387: \$? = $ac_status" >&5
+  echo "$as_me:13535: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14390: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13538: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14393: \$? = $ac_status" >&5
+  echo "$as_me:13541: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    sp_expire_available=yes
 else
@@ -14401,14 +13549,14 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 	if test "x$sp_expire_available" = "xyes" ; then
-		echo "$as_me:14404: result: yes" >&5
+		echo "$as_me:13552: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define HAS_SHADOW_EXPIRE 1
-_ACEOF
+EOF
 
 	else
-		echo "$as_me:14411: result: no" >&5
+		echo "$as_me:13559: result: no" >&5
 echo "${ECHO_T}no" >&6
 	fi
 fi
@@ -14416,9 +13564,9 @@
 # Use ip address instead of hostname in $DISPLAY
 if test ! -z "$IPADDR_IN_DISPLAY" ; then
 	DISPLAY_HACK_MSG="yes"
-	cat >>confdefs.h <<\_ACEOF
+	cat >>confdefs.h <<\EOF
 #define IPADDR_IN_DISPLAY 1
-_ACEOF
+EOF
 
 else
 	DISPLAY_HACK_MSG="no"
@@ -14428,9 +13576,9 @@
   withval="$with_ipaddr_display"
 
 			if test "x$withval" != "xno" ; then
-				cat >>confdefs.h <<\_ACEOF
+				cat >>confdefs.h <<\EOF
 #define IPADDR_IN_DISPLAY 1
-_ACEOF
+EOF
 
 				DISPLAY_HACK_MSG="yes"
 			fi
@@ -14457,7 +13605,7 @@
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 14460 "configure"
+#line 13608 "configure"
 #include "confdefs.h"
 
 /* find out what STDPATH is */
@@ -14490,15 +13638,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14493: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13641: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14496: \$? = $ac_status" >&5
+  echo "$as_me:13644: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:14498: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13646: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14501: \$? = $ac_status" >&5
+  echo "$as_me:13649: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
    user_path=`cat conftest.stdpath`
 else
@@ -14522,15 +13670,15 @@
 			echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
 			if test $? -ne 0  ; then
 				user_path=$user_path:$t_bindir
-				echo "$as_me:14525: result: Adding $t_bindir to USER_PATH so scp will work" >&5
+				echo "$as_me:13673: result: Adding $t_bindir to USER_PATH so scp will work" >&5
 echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6
 			fi
 		fi
 
 fi;
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define USER_PATH "$user_path"
-_ACEOF
+EOF
 
 # Whether to force IPv4 by default (needed on broken glibc Linux)
 IPV4_HACK_MSG="no"
@@ -14540,16 +13688,16 @@
   withval="$with_ipv4_default"
 
 		if test "x$withval" != "xno" ; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define IPV4_DEFAULT 1
-_ACEOF
+EOF
 
 			IPV4_HACK_MSG="yes"
 		fi
 
 fi;
 
-echo "$as_me:14552: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
+echo "$as_me:13700: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
 echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6
 IPV4_IN6_HACK_MSG="no"
 
@@ -14558,30 +13706,30 @@
   withval="$with_4in6"
 
 		if test "x$withval" != "xno" ; then
-			echo "$as_me:14561: result: yes" >&5
+			echo "$as_me:13709: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define IPV4_IN_IPV6 1
-_ACEOF
+EOF
 
 			IPV4_IN6_HACK_MSG="yes"
 		else
-			echo "$as_me:14569: result: no" >&5
+			echo "$as_me:13717: result: no" >&5
 echo "${ECHO_T}no" >&6
 		fi
 
 else
 
 		if test "x$inet6_default_4in6" = "xyes"; then
-			echo "$as_me:14576: result: yes (default)" >&5
+			echo "$as_me:13724: result: yes (default)" >&5
 echo "${ECHO_T}yes (default)" >&6
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define IPV4_IN_IPV6 1
-_ACEOF
+EOF
 
 			IPV4_IN6_HACK_MSG="yes"
 		else
-			echo "$as_me:14584: result: no (default)" >&5
+			echo "$as_me:13732: result: no (default)" >&5
 echo "${ECHO_T}no (default)" >&6
 		fi
 
@@ -14594,33 +13742,33 @@
   withval="$with_bsd_auth"
 
 		if test "x$withval" != "xno" ; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define BSD_AUTH 1
-_ACEOF
+EOF
 
 			bsd_auth=yes
 		fi
 
 fi;
 
-echo "$as_me:14606: checking whether to install ssh as suid root" >&5
+echo "$as_me:13754: checking whether to install ssh as suid root" >&5
 echo $ECHO_N "checking whether to install ssh as suid root... $ECHO_C" >&6
 # Check whether --enable-suid-ssh or --disable-suid-ssh was given.
 if test "${enable_suid_ssh+set}" = set; then
   enableval="$enable_suid_ssh"
    case "$enableval" in
   no)
-       echo "$as_me:14613: result: no" >&5
+       echo "$as_me:13761: result: no" >&5
 echo "${ECHO_T}no" >&6
        SSHMODE=0711
        ;;
-  *)   echo "$as_me:14617: result: yes" >&5
+  *)   echo "$as_me:13765: result: yes" >&5
 echo "${ECHO_T}yes" >&6
        SSHMODE=4711
        ;;
   esac
 else
-  echo "$as_me:14623: result: yes" >&5
+  echo "$as_me:13771: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   SSHMODE=4711
 
@@ -14647,72 +13795,72 @@
 	esac
 fi
 
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define _PATH_SSH_PIDDIR "$piddir"
-_ACEOF
+EOF
 
 # Check whether --enable-lastlog or --disable-lastlog was given.
 if test "${enable_lastlog+set}" = set; then
   enableval="$enable_lastlog"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_LASTLOG 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-utmp or --disable-utmp was given.
 if test "${enable_utmp+set}" = set; then
   enableval="$enable_utmp"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_UTMP 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-utmpx or --disable-utmpx was given.
 if test "${enable_utmpx+set}" = set; then
   enableval="$enable_utmpx"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_UTMPX 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-wtmp or --disable-wtmp was given.
 if test "${enable_wtmp+set}" = set; then
   enableval="$enable_wtmp"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_WTMP 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-wtmpx or --disable-wtmpx was given.
 if test "${enable_wtmpx+set}" = set; then
   enableval="$enable_wtmpx"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_WTMPX 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-libutil or --disable-libutil was given.
 if test "${enable_libutil+set}" = set; then
   enableval="$enable_libutil"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_LOGIN 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-pututline or --disable-pututline was given.
 if test "${enable_pututline+set}" = set; then
   enableval="$enable_pututline"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_PUTUTLINE 1
-_ACEOF
+EOF
 
 fi;
 # Check whether --enable-pututxline or --disable-pututxline was given.
 if test "${enable_pututxline+set}" = set; then
   enableval="$enable_pututxline"
-   cat >>confdefs.h <<\_ACEOF
+   cat >>confdefs.h <<\EOF
 #define DISABLE_PUTUTXLINE 1
-_ACEOF
+EOF
 
 fi;
 
@@ -14721,9 +13869,9 @@
   withval="$with_lastlog"
 
 		if test "x$withval" = "xno" ; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define DISABLE_LASTLOG 1
-_ACEOF
+EOF
 
 		else
 			conf_lastlog_location=$withval
@@ -14731,10 +13879,10 @@
 
 fi;
 
-echo "$as_me:14734: checking if your system defines LASTLOG_FILE" >&5
+echo "$as_me:13882: checking if your system defines LASTLOG_FILE" >&5
 echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 14737 "configure"
+#line 13885 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -14749,12 +13897,6 @@
 # include <login.h>
 #endif
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -14764,29 +13906,29 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14767: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13909: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14770: \$? = $ac_status" >&5
+  echo "$as_me:13912: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14773: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13915: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14776: \$? = $ac_status" >&5
+  echo "$as_me:13918: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:14778: result: yes" >&5
+   echo "$as_me:13920: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-		echo "$as_me:14784: result: no" >&5
+		echo "$as_me:13926: result: no" >&5
 echo "${ECHO_T}no" >&6
-		echo "$as_me:14786: checking if your system defines _PATH_LASTLOG" >&5
+		echo "$as_me:13928: checking if your system defines _PATH_LASTLOG" >&5
 echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6
 		cat >conftest.$ac_ext <<_ACEOF
-#line 14789 "configure"
+#line 13931 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -14798,12 +13940,6 @@
 #  include <paths.h>
 #endif
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -14813,24 +13949,24 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14816: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13952: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14819: \$? = $ac_status" >&5
+  echo "$as_me:13955: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14822: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13958: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14825: \$? = $ac_status" >&5
+  echo "$as_me:13961: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:14827: result: yes" >&5
+   echo "$as_me:13963: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-			echo "$as_me:14833: result: no" >&5
+			echo "$as_me:13969: result: no" >&5
 echo "${ECHO_T}no" >&6
 			system_lastlog_path=no
 
@@ -14848,23 +13984,23 @@
 				fi
 		done
 		if test -z "$conf_lastlog_location"; then
-			{ echo "$as_me:14851: WARNING: ** Cannot find lastlog **" >&5
+			{ echo "$as_me:13987: WARNING: ** Cannot find lastlog **" >&5
 echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
 					fi
 	fi
 fi
 
 if test -n "$conf_lastlog_location"; then
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define CONF_LASTLOG_FILE "$conf_lastlog_location"
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:14864: checking if your system defines UTMP_FILE" >&5
+echo "$as_me:14000: checking if your system defines UTMP_FILE" >&5
 echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 14867 "configure"
+#line 14003 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -14873,12 +14009,6 @@
 #  include <paths.h>
 #endif
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -14888,23 +14018,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14891: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14021: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14894: \$? = $ac_status" >&5
+  echo "$as_me:14024: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14897: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14027: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14900: \$? = $ac_status" >&5
+  echo "$as_me:14030: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:14902: result: yes" >&5
+   echo "$as_me:14032: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:14907: result: no" >&5
+ echo "$as_me:14037: result: no" >&5
 echo "${ECHO_T}no" >&6
 	  system_utmp_path=no
 
@@ -14918,24 +14048,24 @@
 			fi
 		done
 		if test -z "$conf_utmp_location"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define DISABLE_UTMP 1
-_ACEOF
+EOF
 
 		fi
 	fi
 fi
 if test -n "$conf_utmp_location"; then
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define CONF_UTMP_FILE "$conf_utmp_location"
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:14935: checking if your system defines WTMP_FILE" >&5
+echo "$as_me:14065: checking if your system defines WTMP_FILE" >&5
 echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 14938 "configure"
+#line 14068 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -14944,12 +14074,6 @@
 #  include <paths.h>
 #endif
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -14959,23 +14083,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14962: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14086: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14965: \$? = $ac_status" >&5
+  echo "$as_me:14089: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14968: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14092: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14971: \$? = $ac_status" >&5
+  echo "$as_me:14095: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:14973: result: yes" >&5
+   echo "$as_me:14097: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:14978: result: no" >&5
+ echo "$as_me:14102: result: no" >&5
 echo "${ECHO_T}no" >&6
 	  system_wtmp_path=no
 
@@ -14989,24 +14113,24 @@
 			fi
 		done
 		if test -z "$conf_wtmp_location"; then
-			cat >>confdefs.h <<\_ACEOF
+			cat >>confdefs.h <<\EOF
 #define DISABLE_WTMP 1
-_ACEOF
+EOF
 
 		fi
 	fi
 fi
 if test -n "$conf_wtmp_location"; then
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define CONF_WTMP_FILE "$conf_wtmp_location"
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:15006: checking if your system defines UTMPX_FILE" >&5
+echo "$as_me:14130: checking if your system defines UTMPX_FILE" >&5
 echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 15009 "configure"
+#line 14133 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15018,12 +14142,6 @@
 #  include <paths.h>
 #endif
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -15033,23 +14151,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15036: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14154: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15039: \$? = $ac_status" >&5
+  echo "$as_me:14157: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15042: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14160: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15045: \$? = $ac_status" >&5
+  echo "$as_me:14163: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:15047: result: yes" >&5
+   echo "$as_me:14165: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:15052: result: no" >&5
+ echo "$as_me:14170: result: no" >&5
 echo "${ECHO_T}no" >&6
 	  system_utmpx_path=no
 
@@ -15057,22 +14175,22 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_utmpx_location"; then
 	if test x"$system_utmpx_path" = x"no" ; then
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define DISABLE_UTMPX 1
-_ACEOF
+EOF
 
 	fi
 else
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define CONF_UTMPX_FILE "$conf_utmpx_location"
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:15072: checking if your system defines WTMPX_FILE" >&5
+echo "$as_me:14190: checking if your system defines WTMPX_FILE" >&5
 echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 15075 "configure"
+#line 14193 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15084,12 +14202,6 @@
 #  include <paths.h>
 #endif
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
 int
 main ()
 {
@@ -15099,23 +14211,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15102: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14214: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15105: \$? = $ac_status" >&5
+  echo "$as_me:14217: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15108: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14220: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15111: \$? = $ac_status" >&5
+  echo "$as_me:14223: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:15113: result: yes" >&5
+   echo "$as_me:14225: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
- echo "$as_me:15118: result: no" >&5
+ echo "$as_me:14230: result: no" >&5
 echo "${ECHO_T}no" >&6
 	  system_wtmpx_path=no
 
@@ -15123,15 +14235,15 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_wtmpx_location"; then
 	if test x"$system_wtmpx_path" = x"no" ; then
-		cat >>confdefs.h <<\_ACEOF
+		cat >>confdefs.h <<\EOF
 #define DISABLE_WTMPX 1
-_ACEOF
+EOF
 
 	fi
 else
-	cat >>confdefs.h <<_ACEOF
+	cat >>confdefs.h <<EOF
 #define CONF_WTMPX_FILE "$conf_wtmpx_location"
-_ACEOF
+EOF
 
 fi
 
@@ -15147,13 +14259,13 @@
 		fi
 
 fi;
-cat >>confdefs.h <<_ACEOF
+cat >>confdefs.h <<EOF
 #define ENTROPY_TIMEOUT_MSEC $entropy_timeout
-_ACEOF
+EOF
 
 if test ! -z "$blibpath" ; then
 	LDFLAGS="$LDFLAGS -blibpath:$blibpath"
-	{ echo "$as_me:15156: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&5
+	{ echo "$as_me:14268: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&5
 echo "$as_me: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&2;}
 fi
 
@@ -15238,25 +14350,22 @@
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:15241: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:14353: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
-# Generated automatically by $as_me.
+# Generated automatically by configure.
 # Run this file to recreate the current configuration.
 # Compiler output produced by configure, useful for debugging
 # configure, is in config.log if it exists.
 
 debug=false
 SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
-
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
@@ -15322,30 +14431,6 @@
 
 exec 6>&1
 
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running \$as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.52d.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
 _ACEOF
 
 # Files that config.status was made for.
@@ -15365,7 +14450,7 @@
   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
 fi
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\EOF
 
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
@@ -15389,12 +14474,12 @@
 $config_headers
 
 Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+EOF
 
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<EOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.52d,
+configured by $0, generated by GNU Autoconf 2.52,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -15403,9 +14488,9 @@
 gives unlimited permission to copy, distribute and modify it."
 srcdir=$srcdir
 INSTALL="$INSTALL"
-_ACEOF
+EOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\EOF
 # If no file are specified by the user, then we need to provide default
 # value.  By we need to know if files were specified by the user.
 ac_need_defaults=:
@@ -15427,18 +14512,18 @@
 
   case $1 in
   # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+EOF
+cat >>$CONFIG_STATUS <<EOF
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+EOF
+cat >>$CONFIG_STATUS <<\EOF
   --version | --vers* | -V )
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:15441: error: ambiguous option: $1
+    { { echo "$as_me:14526: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -15457,7 +14542,7 @@
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:15460: error: unrecognized option: $1
+  -*) { { echo "$as_me:14545: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -15469,9 +14554,25 @@
   shift
 done
 
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status.  ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52, executed with
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
 _ACEOF
+EOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\EOF
 for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
@@ -15481,7 +14582,7 @@
   "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
   "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-  *) { { echo "$as_me:15484: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:14585: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -15518,9 +14619,9 @@
    { (exit 1); exit 1; }
 }
 
-_ACEOF
+EOF
 
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<EOF
 
 #
 # CONFIG_FILES section.
@@ -15620,9 +14721,9 @@
 s,@piddir@,$piddir,;t t
 CEOF
 
-_ACEOF
+EOF
 
-  cat >>$CONFIG_STATUS <<\_ACEOF
+  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_lines=48
@@ -15661,8 +14762,8 @@
   fi
 fi # test -n "$CONFIG_FILES"
 
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+EOF
+cat >>$CONFIG_STATUS <<\EOF
 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
@@ -15687,7 +14788,8 @@
   	  /^X\(\/\/\)$/{ s//\1/; q; }
   	  /^X\(\/\).*/{ s//\1/; q; }
   	  s/.*/./; q'`
-  { case "$ac_dir" in
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    { case "$ac_dir" in
   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
   *)                      as_incr_dir=.;;
 esac
@@ -15698,46 +14800,40 @@
     ?:) as_incr_dir=$as_mkdir_dir ;;
     *)
       as_incr_dir=$as_incr_dir/$as_mkdir_dir
-      test -d "$as_incr_dir" ||
-        mkdir "$as_incr_dir" ||
-	{ { echo "$as_me:15703: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
     ;;
   esac
 done; }
 
-  if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\./,,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
 
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
+  case $srcdir in
+  .)  ac_srcdir=.
+      if test -z "$ac_dots"; then
+         ac_top_srcdir=.
+      else
+         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+      fi ;;
+  [\\/]* | ?:[\\/]* )
+      ac_srcdir=$srcdir$ac_dir_suffix;
+      ac_top_srcdir=$srcdir ;;
   *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_dots$srcdir ;;
+  esac
 
   case $INSTALL in
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  *) ac_INSTALL=$ac_dots$INSTALL ;;
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:15740: creating $ac_file" >&5
+    { echo "$as_me:14836: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -15755,7 +14851,7 @@
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:15758: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:14854: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -15768,18 +14864,18 @@
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:15771: error: cannot find input file: $f" >&5
+           { { echo "$as_me:14867: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
       esac
     done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+EOF
+cat >>$CONFIG_STATUS <<EOF
   sed "$ac_vpsub
 $extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+EOF
+cat >>$CONFIG_STATUS <<\EOF
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
 s,@configure_input@,$configure_input,;t t
@@ -15796,8 +14892,8 @@
   fi
 
 done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+EOF
+cat >>$CONFIG_STATUS <<\EOF
 
 #
 # CONFIG_HEADER section.
@@ -15829,7 +14925,7 @@
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:15832: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:14928: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -15840,7 +14936,7 @@
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:15843: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:14939: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -15853,7 +14949,7 @@
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:15856: error: cannot find input file: $f" >&5
+           { { echo "$as_me:14952: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -15862,7 +14958,7 @@
   # Remove the trailing spaces.
   sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
 
-_ACEOF
+EOF
 
 # Transform confdefs.h into two sed scripts, `conftest.defines' and
 # `conftest.undefs', that substitutes the proper values into
@@ -15878,7 +14974,7 @@
 # `end' is used to avoid that the second main sed command (meant for
 # 0-ary CPP macros) applies to n-ary macro definitions.
 # See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
+cat >confdef2sed.sed <<\EOF
 s/[\\&,]/\\&/g
 s,[\\$`],\\&,g
 t clear
@@ -15887,7 +14983,7 @@
 t end
 s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
 : end
-_ACEOF
+EOF
 # If some macros were called several times there might be several times
 # the same #defines, which is useless.  Nevertheless, we may not want to
 # sort them, since we want the *last* AC-DEFINE to be honored.
@@ -15898,9 +14994,9 @@
 # This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
+cat >>conftest.undefs <<\EOF
 s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
+EOF
 
 # Break up conftest.defines because some shells have a limit on the size
 # of here documents, and old seds have small limits too (100 cmds).
@@ -15957,7 +15053,7 @@
 done
 rm -f conftest.undefs
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\EOF
   # Let's still pretend it is `configure' which instantiates (i.e., don't
   # use $as_me), people would be surprised to read:
   #    /* config.h.  Generated automatically by config.status.  */
@@ -15970,7 +15066,7 @@
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
-      { echo "$as_me:15973: $ac_file is unchanged" >&5
+      { echo "$as_me:15069: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -15984,7 +15080,8 @@
   	  /^X\(\/\/\)$/{ s//\1/; q; }
   	  /^X\(\/\).*/{ s//\1/; q; }
   	  s/.*/./; q'`
-      { case "$ac_dir" in
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+        { case "$ac_dir" in
   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
   *)                      as_incr_dir=.;;
 esac
@@ -15995,15 +15092,12 @@
     ?:) as_incr_dir=$as_mkdir_dir ;;
     *)
       as_incr_dir=$as_incr_dir/$as_mkdir_dir
-      test -d "$as_incr_dir" ||
-        mkdir "$as_incr_dir" ||
-	{ { echo "$as_me:16000: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }
+      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
     ;;
   esac
 done; }
 
+      fi
       rm -f $ac_file
       mv $tmp/config.h $ac_file
     fi
@@ -16012,12 +15106,12 @@
     rm -f $tmp/config.h
   fi
 done
-_ACEOF
+EOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\EOF
 
 { (exit 0); exit 0; }
-_ACEOF
+EOF
 chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
@@ -16120,3 +15214,4 @@
 	echo "64bit integers."
 	echo ""
 fi
+
diff -Naur openssh-3.0.2p1/configure.ac openssh-3.0.2p1-gssapi/configure.ac
--- openssh-3.0.2p1/configure.ac	Sat Nov  3 13:09:33 2001
+++ openssh-3.0.2p1-gssapi/configure.ac	Fri Jan 11 13:35:34 2002
@@ -1443,7 +1443,68 @@
 	]
 )
 
-# Check whether user wants Kerberos support
+# Check whether user wants Kerberos 5 support
+AC_ARG_WITH(kerberos5,
+        [  --with-kerberos5=PATH   Enable Kerberos 5 support],
+        [
+                if test "x$withval" != "xno" ; then
+                        if test "x$withval" = "xyes" ; then
+                                KRB5ROOT="/usr/local"
+                        else
+                                KRB5ROOT=${withval}
+                        fi
+			CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
+                        LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
+                        AC_DEFINE(KRB5)
+                        AC_MSG_CHECKING(whether we are using Heimdal)
+                        AC_TRY_COMPILE([ #include <krb5.h> ],
+                                       [ char *tmp = heimdal_version; ],
+                                       [ AC_MSG_RESULT(yes)
+                                         AC_DEFINE(HEIMDAL)
+                                         K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
+                                       ],
+                                       [ AC_MSG_RESULT(no)
+                                         K5LIBS="-lkrb5 -lk5crypto -lcom_err"
+                                       ]
+                        )
+                        if test ! -z "$need_dash_r" ; then
+                                LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
+                        fi
+                        if test ! -z "$blibpath" ; then
+                                blibpath="$blibpath:${KRB5ROOT}/lib"
+                        fi
+                        AC_CHECK_LIB(resolv, dn_expand, , )
+
+			AC_CHECK_LIB(gssapi,gss_init_sec_context,
+				[ AC_DEFINE(GSSAPI)
+				  K5LIBS="-lgssapi $K5LIBS" ],
+				[ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context,
+					[ AC_DEFINE(GSSAPI)
+				  	  K5LIBS="-lgssapi_krb5 $K5LIBS" ],
+					AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
+					$K5LIBS)
+				],
+				$K5LIBS)
+			
+			AC_CHECK_HEADER(gssapi.h, ,
+				[ unset ac_cv_header_gssapi_h
+				  CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 
+				  AC_CHECK_HEADERS(gssapi.h, ,
+					AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
+				  ) 
+				]
+			)
+
+			oldCPP="$CPPFLAGS"
+			CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
+			AC_CHECK_HEADER(gssapi_krb5.h, ,
+					[ CPPFLAGS="$oldCPP" ])
+
+                        KRB5=yes
+                fi
+        ]
+)
+# Check whether user wants Kerberos 4 support
 KRB4_MSG="no" 
 AC_ARG_WITH(kerberos4,
 	[  --with-kerberos4=PATH   Enable Kerberos 4 support],
@@ -1498,6 +1559,92 @@
 	]
 )
 
+# Check whether the user wants GSI (Globus) support
+gsi_path="no"
+AC_ARG_WITH(gsi,
+	[  --with-gsi=PATH         Enable GSI/Globus authentication support],
+	[
+		gsi_path="$withval"
+	]
+)
+
+AC_ARG_WITH(globus,
+	[  --with-globus=PATH      Enable GSI/Globus authentication support],
+	[
+		gsi_path="$withval"
+	]
+)
+
+if test "x$gsi_path" != "xno" ; then
+	# Globus GSSAPI configuration
+	AC_DEFINE(GSSAPI)
+	AC_DEFINE(GSI)
+
+	# Find GLOBUS/GSI installation Directory
+	AC_MSG_CHECKING(for Globus/GSI installation directory)
+
+	globus_install_dir=$gsi_path
+
+	if test "x$globus_install_dir" = "xyes" ; then
+		if test -n "$GLOBUS_INSTALL_PATH" ; then
+			globus_install_dir=$GLOBUS_INSTALL_PATH
+		elif test -n "$GSI_INSTALL_PATH" ; then
+			globus_install_dir=$GSI_INSTALL_PATH
+		elif test -d /usr/local/globus ; then
+			globus_install_dir="/usr/local/globus"
+		elif test -d /usr/local/gsi ; then
+			globus_install_dir="/usr/local/gsi"
+		else
+			AC_MSG_ERROR(Cannot find Globus/GSI installation directory)
+		fi	
+	fi
+	AC_MSG_RESULT($globus_install_dir)
+
+	# Find GLOBUS/GSI development directory
+	AC_MSG_CHECKING(for Globus/GSI development directory)
+
+	if test -d ${globus_install_dir}/lib ; then
+		# Looks like a flat directory structure from configure/make
+		# and not globus-install or gsi-install
+		globus_dev_dir=$globus_install_dir
+
+	else
+		# Assume a true globus installation with architecture
+		# directories and run globus-development-path to find
+		# the development directory
+
+		# Set GLOBUS_INSTALL_PATH
+		GLOBUS_INSTALL_PATH=$globus_install_dir
+		export GLOBUS_INSTALL_PATH
+
+		dev_path_program=${globus_install_dir}/bin/globus-development-path
+
+		if test ! -x ${dev_path_program} ; then
+			AC_MSG_ERROR(Cannot find Globus/GSI installation directory: program ${dev_path_program} does not exist or is not executable)
+		fi
+
+		globus_dev_dir=`${dev_path_program}`
+
+		if test -z "$globus_dev_dir" -o "X$globus_dev_dir" = "X<not found>" ; then
+				AC_MSG_ERROR(Cannot find Globus/GSI development directory)
+		fi
+
+		if test ! -d "$globus_dev_dir" ; then
+			AC_MSG_ERROR(Cannot find Globus/GSI development directory: $globus_dev_dir does not exist)
+		fi
+	fi
+	AC_MSG_RESULT($globus_dev_dir)
+
+	GSI_LIBS="-lglobus_gss_assist -lglobus_gss -lglobus_gaa -lssl -lcrypto"
+	GSI_LDFLAGS="-L${globus_dev_dir}/lib"
+	GSI_CFLAGS="-I${globus_dev_dir}/include"
+
+	LIBS="$LIBS $GSI_LIBS"
+	LDFLAGS="$LDFLAGS $GSI_LDFLAGS"
+	CFLAGS="$CFLAGS $GSI_CFLAGS"
+# End Globus/GSI section
+fi
+
 # Check whether user wants AFS support
 AFS_MSG="no" 
 AC_ARG_WITH(afs,
@@ -1523,7 +1670,7 @@
 		fi
 	]
 )
-LIBS="$LIBS $KLIBS"
+LIBS="$LIBS $KLIBS $K5LIBS"
 
 # Looking for programs, paths and files
 AC_ARG_WITH(rsh,
diff -Naur openssh-3.0.2p1/gss-genr.c openssh-3.0.2p1-gssapi/gss-genr.c
--- openssh-3.0.2p1/gss-genr.c	Wed Dec 31 18:00:00 1969
+++ openssh-3.0.2p1-gssapi/gss-genr.c	Fri Jan 11 13:34:40 2002
@@ -0,0 +1,491 @@
+/*
+ * Copyright (c) 2001 Simon Wilkinson. All rights reserved. *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+
+#ifdef GSSAPI
+
+#include "ssh.h"
+#include "ssh2.h"
+#include "xmalloc.h"
+#include "buffer.h"
+#include "bufaux.h"
+#include "packet.h"
+#include "compat.h"
+#include <openssl/evp.h>
+#include "cipher.h"
+#include "kex.h"
+#include "log.h"
+
+#include <netdb.h>
+
+#include "ssh-gss.h"
+
+/* Assorted globals for tracking the clients identity once they've
+ * authenticated */
+ 
+gss_buffer_desc gssapi_client_name = {0,NULL}; /* Name of our client */
+gss_cred_id_t   gssapi_client_creds = GSS_C_NO_CREDENTIAL; /* Their credentials */
+enum ssh_gss_id gssapi_client_type = GSS_LAST_ENTRY;
+
+/* The mechanism name used in the list below is defined in the internet
+ * draft as the Base 64 encoding of the MD5 hash of the ASN.1 DER encoding 
+ * of the underlying GSSAPI mechanism's OID.
+ *
+ * Also from the draft, before considering adding SPNEGO, bear in mind that
+ * "mechanisms ... MUST NOT use SPNEGO as the underlying GSSAPI mechanism"
+ */
+
+/* These must be in the same order as ssh_gss_id, in ssh-gss.h */
+
+ssh_gssapi_mech supported_mechs[]= {
+#ifdef KRB5
+ /* Official OID - 1.2.850.113554.1.2.2 */
+ {"Se3H81ismmOC3OE+FwYCiQ==","Kerberos",
+ 	{9, "\x2A\x86\x48\x86\xF7\x12\x01\x02\x02"}},
+#endif
+#ifdef GSI
+ /* gssapi_ssleay 1.3.6.1.4.1.3536.1.1 */
+ {"N3+k7/4wGxHyuP8Yxi4RhA==",
+  "GSI",
+  {9, "\x2B\x06\x01\x04\x01\x9B\x50\x01\x01"}
+ },
+#endif /* GSI */
+ {NULL,NULL,{0,0}}
+};
+
+char gssprefix[]=KEX_GSS_SHA1;
+
+/* Return a list of the gss-group1-sha1-x mechanisms supported by this
+ * program.
+ *
+ * We only support the mechanisms that we've indicated in the list above,
+ * but we check that they're supported by the GSSAPI mechanism on the 
+ * machine. We also check, before including them in the list, that
+ * we have the necesary information in order to carry out the key exchange
+ * (that is, that the user has credentials, the server's creds are accessible,
+ * etc)
+ *
+ * The way that this is done is fairly nasty, as we do a lot of work that
+ * is then thrown away. This should possibly be implemented with a cache
+ * that stores the results (in an expanded Gssctxt structure), which are
+ * then used by the first calls if that key exchange mechanism is chosen.
+ */
+ 
+char * 
+ssh_gssapi_mechanisms(int server,char *host) {
+	gss_OID_set 	supported;
+	OM_uint32	maj_status, min_status;
+	Buffer		buf;
+	int 		i = 0;
+	int		present;
+	char *		mechs;
+	Gssctxt		ctx;	
+	gss_buffer_desc	token;		
+
+
+	gss_indicate_mechs(&min_status, &supported);
+	
+	buffer_init(&buf);	
+
+	do {
+		if ((maj_status=gss_test_oid_set_member(&min_status,
+						   	&supported_mechs[i].oid,
+						   	supported,
+						   	&present))) {
+			present=0;
+		}
+		if (present) {
+			ssh_gssapi_build_ctx(&ctx);
+			ssh_gssapi_set_oid(&ctx,&supported_mechs[i].oid);
+			if (server) {
+		  		if (ssh_gssapi_acquire_cred(&ctx)) {
+		  			ssh_gssapi_delete_ctx(&ctx);
+					continue;
+				}
+			}
+			else { /* client */
+				if (ssh_gssapi_import_name(&ctx,host))
+					continue;
+				maj_status=ssh_gssapi_init_ctx(&ctx, 0, 
+							       GSS_C_NO_BUFFER,
+							       &token,
+							       NULL);
+				ssh_gssapi_delete_ctx(&ctx);
+				if (GSS_ERROR(maj_status)) {
+					continue;
+				}
+			}				 
+				
+			/* Append gss_group1_sha1_x to our list */
+			buffer_append(&buf, gssprefix,
+				      strlen(gssprefix));
+		        buffer_append(&buf, supported_mechs[i].enc_name,
+		        	      strlen(supported_mechs[i].enc_name));
+	 	}
+	} while (supported_mechs[++i].name != NULL);
+	
+	buffer_put_char(&buf,'\0');
+	
+	mechs=xmalloc(buffer_len(&buf));
+	buffer_get(&buf,mechs,buffer_len(&buf));
+	buffer_free(&buf);
+	if (strlen(mechs)==0)
+	   return(NULL);
+	else
+	   return(mechs);
+}
+
+void ssh_gssapi_supported_oids(gss_OID_set *oidset) {
+	enum ssh_gss_id i =0;
+	OM_uint32 maj_status,min_status;
+	int present;
+	gss_OID_set supported;
+	
+	gss_create_empty_oid_set(&min_status,oidset);
+	gss_indicate_mechs(&min_status, &supported);
+
+	while (supported_mechs[i].name!=NULL) {
+		if ((maj_status=gss_test_oid_set_member(&min_status,
+						       &supported_mechs[i].oid,
+						       supported,
+						       &present))) {
+			present=0;
+		}
+		if (present) {
+			gss_add_oid_set_member(&min_status,
+					       &supported_mechs[i].oid,
+				       	       oidset);	
+		}
+		i++;
+	}
+}	
+
+/* Set the contexts OID from a data stream */
+void ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len) { 
+  if (ctx->oid != GSS_C_NO_OID) {
+	xfree(ctx->oid->elements);
+   	xfree(ctx->oid);
+  }
+  ctx->oid=xmalloc(sizeof(gss_OID_desc));
+  ctx->oid->length=len;
+  ctx->oid->elements=xmalloc(len);
+  memcpy(ctx->oid->elements,data,len);
+}
+
+/* Set the contexts OID */
+void ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid) {  
+  ssh_gssapi_set_oid_data(ctx,oid->elements,oid->length);
+}
+
+/* Find out which GSS type (out of the list we define in ssh-gss.h) a
+ * particular connection is using 
+ */
+enum ssh_gss_id ssh_gssapi_get_ctype(Gssctxt *ctxt) {
+	enum ssh_gss_id i=0;
+	
+	while(supported_mechs[i].name!=NULL &&
+	      	supported_mechs[i].oid.length != ctxt->oid->length &&
+	      	(memcmp(supported_mechs[i].oid.elements,
+	      	       ctxt->oid->elements,ctxt->oid->length) !=0)) {
+	   i++;
+	}
+	return(i);
+}
+
+/* Set the GSS context's OID to the oid indicated by the given key exchange
+ * name. */
+int ssh_gssapi_id_kex(Gssctxt *ctx, char *name) {
+  enum ssh_gss_id i=0;
+  
+  if (strncmp(name, gssprefix, strlen(gssprefix)-1) !=0) {
+     return(1);
+  }
+  
+  name+=strlen(gssprefix); /* Move to the start of the MIME string */
+  
+  while (supported_mechs[i].name!=NULL &&
+  	 strcmp(name,supported_mechs[i].enc_name)!=0) {
+  	i++;
+  }
+
+  if (supported_mechs[i].name==NULL)
+     return (1);
+
+  ssh_gssapi_set_oid(ctx,&supported_mechs[i].oid);
+
+  return 0;
+}
+
+
+/* All this effort to report an error ... */
+void
+ssh_gssapi_error(OM_uint32 major_status,OM_uint32 minor_status) {
+	OM_uint32 lmaj, lmin;
+        gss_buffer_desc msg;
+        OM_uint32 ctx;
+        
+        ctx = 0;
+	/* The GSSAPI error */
+        do {
+        	lmaj = gss_display_status(&lmin, major_status,
+        				  GSS_C_GSS_CODE,
+        				  GSS_C_NULL_OID,
+        				  &ctx, &msg);
+        	if (lmaj == GSS_S_COMPLETE) {
+        	    	debug((char *)msg.value);
+        	    	(void) gss_release_buffer(&lmin, &msg);
+        	}
+        } while (ctx!=0);	   
+
+        /* The mechanism specific error */
+        do {
+        	lmaj = gss_display_status(&lmin, minor_status,
+        				  GSS_C_MECH_CODE,
+        				  GSS_C_NULL_OID,
+        				  &ctx, &msg);
+        	if (lmaj == GSS_S_COMPLETE) {
+        	    	debug((char *)msg.value);
+        	    	(void) gss_release_buffer(&lmin, &msg);
+        	}
+        } while (ctx!=0);
+}
+
+/* Initialise our GSSAPI context. We use this opaque structure to contain all
+ * of the data which both the client and server need to persist across
+ * {accept,init}_sec_context calls, so that when we do it from the userauth
+ * stuff life is a little easier
+ */
+void
+ssh_gssapi_build_ctx(Gssctxt *ctx)
+{
+	ctx->context=GSS_C_NO_CONTEXT;
+	ctx->name=GSS_C_NO_NAME;
+	ctx->oid=GSS_C_NO_OID;
+	ctx->creds=GSS_C_NO_CREDENTIAL;
+	ctx->client=GSS_C_NO_NAME;
+	ctx->client_creds=GSS_C_NO_CREDENTIAL;
+}
+
+/* Delete our context, providing it has been built correctly */
+void
+ssh_gssapi_delete_ctx(Gssctxt *ctx)
+{
+	OM_uint32 ms;
+	
+	if (ctx->context != GSS_C_NO_CONTEXT) 
+		gss_delete_sec_context(&ms,&ctx->context,GSS_C_NO_BUFFER);
+	if (ctx->name != GSS_C_NO_NAME)
+		gss_release_name(&ms,&ctx->name);
+	if (ctx->oid != GSS_C_NO_OID) {
+		xfree(ctx->oid->elements);
+		xfree(ctx->oid);
+		ctx->oid = GSS_C_NO_OID;
+	}
+	if (ctx->creds != GSS_C_NO_CREDENTIAL)
+		gss_release_cred(&ms,&ctx->creds);
+	if (ctx->client != GSS_C_NO_NAME)
+		gss_release_name(&ms,&ctx->client);	
+	if (ctx->client_creds != GSS_C_NO_CREDENTIAL)
+		gss_release_cred(&ms,&ctx->client_creds); 
+}
+
+/* Wrapper to init_sec_context 
+ * Requires that the context contains:
+ *	oid
+ * 	server name (from ssh_gssapi_import_name)
+ */
+OM_uint32 
+ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds, gss_buffer_desc *recv_tok,
+       	      	    gss_buffer_desc* send_tok, OM_uint32 *flags) 
+{
+      	OM_uint32 maj_status, min_status;
+	int deleg_flag = 0;
+	
+	if (deleg_creds) {
+		deleg_flag=GSS_C_DELEG_FLAG;
+		debug("Delegating credentials");
+	}
+	      	
+      	maj_status=gss_init_sec_context(&min_status,
+      					GSS_C_NO_CREDENTIAL, /* def. cred */
+      					&ctx->context,
+      					ctx->name,
+      					ctx->oid,
+      					GSS_C_MUTUAL_FLAG |
+      					GSS_C_INTEG_FLAG |
+      					deleg_flag,
+      					0, /* default lifetime */
+      					NULL, /* no channel bindings */
+      					recv_tok,
+      					NULL,
+      					send_tok,
+      					flags,
+      					NULL);
+	ctx->status=maj_status;
+      	if (GSS_ERROR(maj_status)) {
+      		ssh_gssapi_error(maj_status,min_status);
+      	}
+      	return(maj_status);
+}
+
+/* Wrapper arround accept_sec_context
+ * Requires that the context contains:
+ *    oid		
+ *    credentials	(from ssh_gssapi_acquire_cred)
+ */
+OM_uint32 ssh_gssapi_accept_ctx(Gssctxt *ctx,gss_buffer_desc *recv_tok,
+				gss_buffer_desc *send_tok, OM_uint32 *flags) 
+{
+	OM_uint32 maj_status, min_status;
+	gss_OID mech;
+	
+	maj_status=gss_accept_sec_context(&min_status,
+					  &ctx->context,
+					  ctx->creds,
+					  recv_tok,
+					  GSS_C_NO_CHANNEL_BINDINGS,
+					  &ctx->client,
+					  &mech,
+					  send_tok,
+					  flags,
+					  NULL,
+					  &ctx->client_creds);
+	if (GSS_ERROR(maj_status)) {
+		ssh_gssapi_error(maj_status,min_status);
+	}
+	
+	if (ctx->client_creds) {
+		debug("Received some client credentials");
+	} else {
+		debug("Got no client credentials");
+	}
+
+	/* FIXME: We should check that the mechanism thats being used is
+	 * the one that we asked for (in ctx->oid) */
+
+	ctx->status=maj_status;
+	
+	return(maj_status);
+}
+
+/* Create a service name for the given host */
+OM_uint32
+ssh_gssapi_import_name(Gssctxt *ctx,char *host) {
+	gss_buffer_desc gssbuf;
+	OM_uint32 maj_status, min_status;
+	struct hostent *hostinfo = NULL;
+	char *xhost;
+	
+	/* Make a copy of the host name, in case it was returned by a
+	 * previous call to gethostbyname(). */	
+	xhost = xstrdup(host);
+
+	/* Make sure we have the FQDN. Some GSSAPI implementations don't do
+	 * this for us themselves */
+	
+	hostinfo = gethostbyname(xhost);
+	
+	if ((hostinfo == NULL) || (hostinfo->h_name == NULL)) {
+		debug("Unable to get FQDN for \"%s\"", xhost);
+	} else {
+		host = hostinfo->h_name;
+	}
+	xfree(xhost);
+		
+        gssbuf.length = sizeof("host@")+strlen(host);
+
+        gssbuf.value = xmalloc(gssbuf.length);
+        if (gssbuf.value == NULL) {
+		return(-1);
+        }
+        snprintf(gssbuf.value,gssbuf.length,"host@%s",host);
+        if ((maj_status=gss_import_name(&min_status,
+                                   	&gssbuf,
+                                        GSS_C_NT_HOSTBASED_SERVICE,
+                                        &ctx->name))) {
+		ssh_gssapi_error(maj_status,min_status);
+	}
+	
+	xfree(gssbuf.value);
+	return(maj_status);
+}
+
+/* Acquire credentials for a server running on the current host.
+ * Requires that the context structure contains a valid OID
+ */      
+OM_uint32
+ssh_gssapi_acquire_cred(Gssctxt *ctx) {
+	OM_uint32 maj_status, min_status;
+	char lname[MAXHOSTNAMELEN];
+	gss_OID_set oidset;
+	
+	gss_create_empty_oid_set(&min_status,&oidset);
+	gss_add_oid_set_member(&min_status,ctx->oid,&oidset);
+	
+        if (gethostname(lname, MAXHOSTNAMELEN)) {
+                return(-1);
+        }
+
+	if ((maj_status=ssh_gssapi_import_name(ctx,lname))) {
+		return(maj_status);
+	}
+	if ((maj_status=gss_acquire_cred(&min_status,
+			 	    ctx->name,
+				    0,
+				    oidset,
+				    GSS_C_ACCEPT,
+				    &ctx->creds,
+				    NULL,
+				    NULL))) {
+		ssh_gssapi_error(maj_status,min_status);
+	}
+				
+	gss_release_oid_set(&min_status, &oidset);
+	return(maj_status);
+}
+
+/* Extract the client details from a given context. This can only reliably
+ * be called once for a context */
+
+OM_uint32 
+ssh_gssapi_getclient(Gssctxt *ctx, enum ssh_gss_id *type,
+		     gss_buffer_desc *name, gss_cred_id_t *creds) {
+
+	OM_uint32 maj_status,min_status;
+	
+	*type=ssh_gssapi_get_ctype(ctx);
+	if ((maj_status=gss_display_name(&min_status,ctx->client,name,NULL))) {
+		ssh_gssapi_error(maj_status,min_status);
+	}
+	
+	/* This is icky. There appears to be no way to copy this structure,
+	 * rather than the pointer to it, so we simply copy the pointer and
+	 * mark the originator as empty so we don't destroy it. 
+	 */
+	*creds=ctx->client_creds;
+	ctx->client_creds=GSS_C_NO_CREDENTIAL;
+	return(maj_status);
+}
+	
+#endif /* GSSAPI */
diff -Naur openssh-3.0.2p1/gss-serv.c openssh-3.0.2p1-gssapi/gss-serv.c
--- openssh-3.0.2p1/gss-serv.c	Wed Dec 31 18:00:00 1969
+++ openssh-3.0.2p1-gssapi/gss-serv.c	Fri Jan 11 13:34:40 2002
@@ -0,0 +1,586 @@
+/*
+ * Copyright (c) 2001 Simon Wilkinson. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+
+#ifdef GSSAPI
+
+#include "ssh.h"
+#include "ssh2.h"
+#include "xmalloc.h"
+#include "buffer.h"
+#include "bufaux.h"
+#include "packet.h"
+#include "compat.h"
+#include <openssl/evp.h>
+#include "cipher.h"
+#include "kex.h"
+#include "auth.h"
+#include "log.h"
+#include "session.h"
+#include "dispatch.h"
+#include "servconf.h"
+
+#include "ssh-gss.h"
+
+extern ServerOptions options;
+extern u_char *session_id2;
+extern int session_id2_len;
+
+
+typedef struct ssh_gssapi_cred_cache {
+	char *filename;
+	char *envvar;
+	char *envval;
+	void *data;
+} ssh_gssapi_cred_cache;
+
+static struct ssh_gssapi_cred_cache gssapi_cred_store = {NULL,NULL,NULL};
+
+#ifdef KRB5
+
+#ifdef HEIMDAL
+#include <krb5.h>
+#else
+#include <gssapi_krb5.h>
+#define krb5_get_err_text(context,code) error_message(code)
+#endif
+
+static krb5_context krb_context = NULL;
+
+/* Initialise the krb5 library, so we can use it for those bits that
+ * GSSAPI won't do */
+
+int ssh_gssapi_krb5_init() {
+	krb5_error_code problem;
+	
+	if (krb_context !=NULL)
+		return 1;
+		
+	problem = krb5_init_context(&krb_context);
+	if (problem) {
+		log("Cannot initialize krb5 context");
+		return 0;
+	}
+	krb5_init_ets(krb_context);
+
+	return 1;	
+}			
+
+/* Check if this user is OK to login. This only works with krb5 - other 
+ * GSSAPI mechanisms will need their own.
+ * Returns true if the user is OK to log in, otherwise returns 0
+ */
+
+int
+ssh_gssapi_krb5_userok(char *name) {
+	krb5_principal princ;
+	int retval;
+
+	if (ssh_gssapi_krb5_init() == 0)
+		return 0;
+		
+	if ((retval=krb5_parse_name(krb_context, gssapi_client_name.value, 
+				    &princ))) {
+		log("krb5_parse_name(): %.100s", 
+			krb5_get_err_text(krb_context,retval));
+		return 0;
+	}
+	if (krb5_kuserok(krb_context, princ, name)) {
+		retval = 1;
+		log("Authorized to %s, krb5 principal %s (krb5_kuserok)",name,
+		    (char *)gssapi_client_name.value);
+	}
+	else
+		retval = 0;
+	
+	krb5_free_principal(krb_context, princ);
+	return retval;
+}
+	
+/* Make sure that this is called _after_ we've setuid to the user */
+
+/* This writes out any forwarded credentials. Its specific to the Kerberos
+ * GSSAPI mechanism
+ *
+ * We assume that our caller has made sure that the user has selected
+ * delegated credentials, and that the client_creds structure is correctly
+ * populated.
+ */
+
+void
+ssh_gssapi_krb5_storecreds() {
+	krb5_ccache ccache;
+	krb5_error_code problem;
+	krb5_principal princ;
+	char ccname[35];
+	static char name[40];
+	int tmpfd;
+	OM_uint32 maj_status,min_status;
+
+
+	if (gssapi_client_creds==NULL) {
+		debug("No credentials stored"); 
+		return;
+	}
+		
+	if (ssh_gssapi_krb5_init() == 0)
+		return;
+
+	if (options.gss_use_session_ccache) {
+        	snprintf(ccname,sizeof(ccname),"/tmp/krb5cc_%d_XXXXXX",geteuid());
+       
+        	if ((tmpfd = mkstemp(ccname))==-1) {
+                	log("mkstemp(): %.100s", strerror(errno));
+                	return;
+        	}
+	        if (fchmod(tmpfd, S_IRUSR | S_IWUSR) == -1) {
+	               	log("fchmod(): %.100s", strerror(errno));
+	               	close(tmpfd);
+	               	return;
+	        }
+        } else {
+        	snprintf(ccname,sizeof(ccname),"/tmp/krb5cc_%d",geteuid());
+        	tmpfd = open(ccname, O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR);
+        	if (tmpfd == -1) {
+        		log("open(): %.100s", strerror(errno));
+        		return;
+        	}
+        }
+
+       	close(tmpfd);
+        snprintf(name, sizeof(name), "FILE:%s",ccname);
+ 
+        if ((problem = krb5_cc_resolve(krb_context, name, &ccache))) {
+                log("krb5_cc_default(): %.100s", 
+                	krb5_get_err_text(krb_context,problem));
+                return;
+        }
+
+	if ((problem = krb5_parse_name(krb_context, gssapi_client_name.value, 
+				       &princ))) {
+		log("krb5_parse_name(): %.100s", 
+			krb5_get_err_text(krb_context,problem));
+		krb5_cc_destroy(krb_context,ccache);
+		return;
+	}
+	
+	if ((problem = krb5_cc_initialize(krb_context, ccache, princ))) {
+		log("krb5_cc_initialize(): %.100s", 
+			krb5_get_err_text(krb_context,problem));
+		krb5_free_principal(krb_context,princ);
+		krb5_cc_destroy(krb_context,ccache);
+		return;
+	}
+	
+	krb5_free_principal(krb_context,princ);
+
+	#ifdef HEIMDAL
+	if ((problem = krb5_cc_copy_cache(krb_context, 
+					   gssapi_client_creds->ccache,
+					   ccache))) {
+		log("krb5_cc_copy_cache(): %.100s", 
+			krb5_get_err_text(krb_context,problem));
+		krb5_cc_destroy(krb_context,ccache);
+		return;
+	}
+	#else
+	if ((maj_status = gss_krb5_copy_ccache(&min_status, 
+					       gssapi_client_creds, 
+					       ccache))) {
+		log("gss_krb5_copy_ccache() failed");
+		ssh_gssapi_error(maj_status,min_status);
+		krb5_cc_destroy(krb_context,ccache);
+		return;
+	}
+	#endif
+	
+	krb5_cc_close(krb_context,ccache);
+
+
+#ifdef USE_PAM
+	do_pam_putenv("KRB5CCNAME",name);
+#endif
+
+	gssapi_cred_store.filename=strdup(ccname);
+	gssapi_cred_store.envvar="KRB5CCNAME";
+	gssapi_cred_store.envval=strdup(name);
+
+	return;
+}
+
+#endif /* KRB5 */
+
+#ifdef GSI
+#include <globus_gss_assist.h>
+
+/*
+ * Check if this user is OK to login under GSI. User has been authenticated
+ * as identity in global 'client_name.value' and is trying to log in as passed
+ * username in 'name'.
+ *
+ * Returns non-zero if user is authorized, 0 otherwise.
+ */
+int
+ssh_gssapi_gsi_userok(char *name)
+{
+    int authorized = 0;
+    
+    /* This returns 0 on success */
+    authorized = (globus_gss_assist_userok(gssapi_client_name.value,
+					   name) == 0);
+    
+    debug("GSI user %s is%s authorized as target user %s",
+	  (char *) gssapi_client_name.value,
+	  (authorized ? "" : " not"),
+	  name);
+    
+    return authorized;
+}
+
+/*
+ * Handle setting up child environment for GSI.
+ *
+ * Make sure that this is called _after_ we've setuid to the user.
+ */
+void
+ssh_gssapi_gsi_storecreds()
+{
+	OM_uint32	major_status;
+	OM_uint32	minor_status;
+	
+	
+	if (gssapi_client_creds != NULL)
+	{
+		char *creds_env = NULL;
+
+		/*
+ 		 * This is the current hack with the GSI gssapi library to
+		 * export credentials to disk.
+		 */
+
+		debug("Exporting delegated credentials");
+		
+		minor_status = 0xdee0;	/* Magic value */
+		major_status =
+			gss_inquire_cred(&minor_status,
+					 gssapi_client_creds,
+					 (gss_name_t *) &creds_env,
+					 NULL,
+					 NULL,
+					 NULL);
+
+		if ((major_status == GSS_S_COMPLETE) &&
+		    (minor_status == 0xdee1) &&
+		    (creds_env != NULL))
+		{
+			char		*value;
+				
+			/*
+			 * String is of the form:
+			 * X509_USER_DELEG_PROXY=filename
+			 * so we parse out the filename
+			 * and then set X509_USER_PROXY
+			 * to point at it.
+			 */
+			value = strchr(creds_env, '=');
+			
+			if (value != NULL)
+			{
+				*value = '\0';
+				value++;
+#ifdef USE_PAM
+				do_pam_putenv("X509_USER_PROXY",value);
+#endif
+			 	gssapi_cred_store.filename=NULL;
+				gssapi_cred_store.envvar="X509_USER_PROXY";
+				gssapi_cred_store.envval=strdup(value);
+
+				return;
+			}
+			else
+			{
+				log("Failed to parse delegated credentials string '%s'",
+				    creds_env);
+			}
+		}
+		else
+		{
+			log("Failed to export delegated credentials (error %ld)",
+			    major_status);
+		}
+	}	
+}
+
+#endif /* GSI */
+
+void
+ssh_gssapi_cleanup_creds(void *ignored)
+{
+	if (gssapi_cred_store.filename!=NULL) {
+		/* Unlink probably isn't sufficient */
+		debug("removing gssapi cred file\"%s\"",gssapi_cred_store.filename);
+		unlink(gssapi_cred_store.filename);
+	}
+}
+
+void 
+ssh_gssapi_storecreds()
+{
+	switch (gssapi_client_type) {
+#ifdef KRB5
+	case GSS_KERBEROS:
+		ssh_gssapi_krb5_storecreds();
+		break;
+#endif
+#ifdef GSI
+	case GSS_GSI:
+		ssh_gssapi_gsi_storecreds();
+		break;
+#endif /* GSI */
+	case GSS_LAST_ENTRY:
+		/* GSSAPI not used in this authentication */
+		debug("No GSSAPI credentials stored");
+		break;
+	default:
+		log("ssh_gssapi_do_child: Unknown mechanism");
+	
+	}
+	
+	if (options.gss_cleanup_creds) {
+		fatal_add_cleanup(ssh_gssapi_cleanup_creds, NULL);
+	}
+
+}
+
+/* This allows GSSAPI methods to do things to the childs environment based
+ * on the passed authentication process and credentials.
+ *
+ * Question: If we didn't use userauth_external for some reason, should we
+ * still delegate credentials?
+ */
+void 
+ssh_gssapi_do_child(char ***envp, u_int *envsizep) 
+{
+
+	if (gssapi_cred_store.envvar!=NULL && 
+	    gssapi_cred_store.envval!=NULL) {
+	    
+		debug("Setting %s to %s", gssapi_cred_store.envvar,
+					  gssapi_cred_store.envval);				  
+		child_set_env(envp, envsizep, gssapi_cred_store.envvar, 
+					      gssapi_cred_store.envval);
+	}
+
+	switch(gssapi_client_type) {
+#ifdef KRB5
+	case GSS_KERBEROS: break;
+#endif
+#ifdef GSI
+	case GSS_GSI: break;
+#endif
+	case GSS_LAST_ENTRY:
+		debug("No GSSAPI credentials stored");
+		
+	default:
+		log("ssh_gssapi_do_child: Unknown mechanism");
+	}
+}
+
+int
+ssh_gssapi_userok(char *user)
+{
+	if (gssapi_client_name.length==0 || 
+	    gssapi_client_name.value==NULL) {
+		debug("No suitable client data");
+		return 0;
+	}
+	switch (gssapi_client_type) {
+#ifdef KRB5
+	case GSS_KERBEROS:
+		return(ssh_gssapi_krb5_userok(user));
+		break; /* Not reached */
+#endif
+#ifdef GSI
+	case GSS_GSI:
+		return(ssh_gssapi_gsi_userok(user));
+		break; /* Not reached */
+#endif /* GSI */
+	case GSS_LAST_ENTRY:
+		debug("Client not GSSAPI");
+		break;
+	default:
+		debug("Unknown client authentication type");
+	}
+	return(0);
+}
+
+int
+userauth_external(Authctxt *authctxt)
+{
+	packet_done();
+
+	return(ssh_gssapi_userok(authctxt->user));
+}
+
+void input_gssapi_token(int type, int plen, void *ctxt);
+void input_gssapi_exchange_complete(int type, int plen, void *ctxt);
+
+/* We only support those mechanisms that we know about (ie ones that we know
+ * how to check local user kuserok and the like
+ */
+int
+userauth_gssapi(Authctxt *authctxt)
+{
+	gss_OID_desc	oid= {0,NULL};
+	Gssctxt		*ctxt;
+	int		mechs;
+	gss_OID_set	supported;
+	int		present;
+	OM_uint32	ms;
+	
+	if (!authctxt->valid || authctxt->user == NULL)
+		return 0;
+	mechs=packet_get_int();
+	if (mechs==0) {
+		debug("Mechanism negotiation is not supported");
+		return 0;
+	}
+
+	ssh_gssapi_supported_oids(&supported);
+	do {
+		if (oid.elements)
+			xfree(oid.elements);
+		oid.elements = packet_get_string(&oid.length);
+		gss_test_oid_set_member(&ms, &oid, supported, &present);
+		mechs--;
+	} while (mechs>0 && !present);
+	
+	if (!present) {
+		xfree(oid.elements);
+		return(0);
+	}
+	
+	ctxt=xmalloc(sizeof(Gssctxt));
+	authctxt->methoddata=(void *)ctxt;
+	
+	ssh_gssapi_build_ctx(ctxt);
+	ssh_gssapi_set_oid(ctxt,&oid);
+
+	if (ssh_gssapi_acquire_cred(ctxt))
+		return 0;
+
+	/* Send SSH_MSG_USERAUTH_GSSAPI_RESPONSE */
+
+	packet_start(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE);
+	packet_put_string(oid.elements,oid.length);
+	packet_send();
+	packet_write_wait();
+	xfree(oid.elements);
+		
+	dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, 
+		     &input_gssapi_token);
+	authctxt->postponed = 1;
+	
+	return 0;
+}
+
+void
+input_gssapi_token(int type, int plen, void *ctxt)
+{
+	Authctxt *authctxt = ctxt;
+	Gssctxt *gssctxt;
+	gss_buffer_desc send_tok,recv_tok;
+	OM_uint32 maj_status, min_status;
+	
+	if (authctxt == NULL || authctxt->methoddata == NULL)
+		fatal("No authentication or GSSAPI context");
+		
+	gssctxt=authctxt->methoddata;
+
+	recv_tok.value=packet_get_string(&recv_tok.length);
+	
+	maj_status=ssh_gssapi_accept_ctx(gssctxt, &recv_tok, &send_tok, NULL);
+	packet_done();
+	
+	if (GSS_ERROR(maj_status)) {
+		/* Failure <sniff> */
+		authctxt->postponed = 0;
+		dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
+		userauth_finish(authctxt, 0, "gssapi");
+	}
+			
+	if (send_tok.length != 0) {
+		/* Send a packet back to the client */
+	        packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
+                packet_put_string(send_tok.value,send_tok.length);
+                packet_send();
+                packet_write_wait();
+                gss_release_buffer(&min_status, &send_tok);                                     
+	}
+	
+	if (maj_status == GSS_S_COMPLETE) {
+		dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN,NULL);
+		dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
+			     &input_gssapi_exchange_complete);
+	}
+}
+
+/* This is called when the client thinks we've completed authentication.
+ * It should only be enabled in the dispatch handler by the function above,
+ * which only enables it once the GSSAPI exchange is complete.
+ */
+ 
+void
+input_gssapi_exchange_complete(int type, int plen, void *ctxt)
+{
+	Authctxt *authctxt = ctxt;
+	Gssctxt *gssctxt;
+	int authenticated;
+	
+	if (authctxt == NULL || authctxt->methoddata == NULL)
+		fatal("No authentication or GSSAPI context");
+		
+	gssctxt=authctxt->methoddata;
+
+	/* This should never happen, but better safe than sorry. */
+	if (gssctxt->status != GSS_S_COMPLETE) {
+		packet_disconnect("Context negotiation is not complete");
+	}
+
+	if (ssh_gssapi_getclient(gssctxt,&gssapi_client_type,
+				 &gssapi_client_name,
+				 &gssapi_client_creds)) {
+		fatal("Couldn't convert client name");
+	}
+				     		
+        authenticated = ssh_gssapi_userok(authctxt->user);
+
+	authctxt->postponed = 0;
+	dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
+	dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
+	userauth_finish(authctxt, authenticated, "gssapi");
+}
+
+#endif /* GSSAPI */
diff -Naur openssh-3.0.2p1/kex.c openssh-3.0.2p1-gssapi/kex.c
--- openssh-3.0.2p1/kex.c	Tue Jul  3 22:32:32 2001
+++ openssh-3.0.2p1-gssapi/kex.c	Fri Jan 11 13:34:40 2002
@@ -41,6 +41,10 @@
 #include "match.h"
 #include "dispatch.h"
 
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
+
 #define KEX_COOKIE_LEN	16
 
 /* prototype */
@@ -226,6 +230,11 @@
 	case DH_GEX_SHA1:
 		kexgex(kex);
 		break;
+#ifdef GSSAPI
+	case GSS_GRP1_SHA1:
+		kexgss(kex);
+		break;
+#endif
 	default:
 		fatal("Unsupported key exchange %d", kex->kex_type);
 	}
@@ -280,11 +289,15 @@
 {
 	k->name = match_list(client, server, NULL);
 	if (k->name == NULL)
-		fatal("no kex alg");
+		fatal("No key exchange algorithm");
 	if (strcmp(k->name, KEX_DH1) == 0) {
 		k->kex_type = DH_GRP1_SHA1;
 	} else if (strcmp(k->name, KEX_DHGEX) == 0) {
 		k->kex_type = DH_GEX_SHA1;
+#ifdef GSSAPI
+	} else if (strncmp(k->name, KEX_GSS_SHA1, sizeof(KEX_GSS_SHA1)-1) == 0) {
+		k->kex_type = GSS_GRP1_SHA1;
+#endif
 	} else
 		fatal("bad kex alg %s", k->name);
 }
diff -Naur openssh-3.0.2p1/kex.h openssh-3.0.2p1-gssapi/kex.h
--- openssh-3.0.2p1/kex.h	Tue Jul  3 23:46:57 2001
+++ openssh-3.0.2p1-gssapi/kex.h	Fri Jan 11 13:34:41 2002
@@ -56,7 +56,8 @@
 
 enum kex_exchange {
 	DH_GRP1_SHA1,
-	DH_GEX_SHA1
+	DH_GEX_SHA1,
+	GSS_GRP1_SHA1
 };
 
 #define KEX_INIT_SENT	0x0001
@@ -92,6 +93,11 @@
 	Mac	mac;
 	Comp	comp;
 };
+
+struct KexOptions {
+	int	gss_deleg_creds;
+};
+
 struct Kex {
 	u_char	*session_id;
 	int	session_id_len;
@@ -105,10 +111,12 @@
 	Buffer	peer;
 	int	done;
 	int	flags;
+	char	*host;
 	char	*client_version_string;
 	char	*server_version_string;
 	int	(*verify_host_key)(Key *);
 	Key	*(*load_host_key)(int);
+	struct  KexOptions options;
 };
 
 Kex	*kex_setup(char *[PROPOSAL_MAX]);
diff -Naur openssh-3.0.2p1/kexgss.c openssh-3.0.2p1-gssapi/kexgss.c
--- openssh-3.0.2p1/kexgss.c	Wed Dec 31 18:00:00 1969
+++ openssh-3.0.2p1-gssapi/kexgss.c	Fri Jan 11 13:34:41 2002
@@ -0,0 +1,450 @@
+/*
+ * Copyright (c) 2001 Simon Wilkinson. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+
+#ifdef GSSAPI
+
+#include <openssl/crypto.h>
+#include <openssl/bn.h>
+
+#include "xmalloc.h"
+#include "buffer.h"
+#include "bufaux.h"
+#include "kex.h"
+#include "log.h"
+#include "packet.h"
+#include "dh.h"
+#include "ssh2.h"
+#include "ssh-gss.h"
+
+/* This is now the same as the DH hash ... */
+
+u_char *
+kex_gssapi_hash(
+    char *client_version_string,
+    char *server_version_string,
+    char *ckexinit, int ckexinitlen,
+    char *skexinit, int skexinitlen,
+    u_char *serverhostkeyblob, int sbloblen,
+    BIGNUM *client_dh_pub,
+    BIGNUM *server_dh_pub,
+    BIGNUM *shared_secret)
+{
+	Buffer b;
+	static u_char digest[EVP_MAX_MD_SIZE];
+	EVP_MD *evp_md = EVP_sha1();
+	EVP_MD_CTX md;
+
+	buffer_init(&b);
+	buffer_put_string(&b, client_version_string, strlen(client_version_string));
+	buffer_put_string(&b, server_version_string, strlen(server_version_string));
+
+	/* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */
+	buffer_put_int(&b, ckexinitlen+1);
+	buffer_put_char(&b, SSH2_MSG_KEXINIT);
+	buffer_append(&b, ckexinit, ckexinitlen);
+	buffer_put_int(&b, skexinitlen+1);
+	buffer_put_char(&b, SSH2_MSG_KEXINIT);
+	buffer_append(&b, skexinit, skexinitlen);
+
+	buffer_put_string(&b, serverhostkeyblob, sbloblen);
+	buffer_put_bignum2(&b, client_dh_pub);
+	buffer_put_bignum2(&b, server_dh_pub);
+	buffer_put_bignum2(&b, shared_secret);
+
+#ifdef DEBUG_KEX
+	buffer_dump(&b);
+#endif
+	EVP_DigestInit(&md, evp_md);
+	EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b));
+	EVP_DigestFinal(&md, digest, NULL);
+
+	buffer_free(&b);
+
+#ifdef DEBUG_KEX
+	dump_digest("hash", digest, evp_md->md_size);
+#endif
+	return digest;
+}
+
+void
+kexgss_client(Kex *kex)
+{
+	gss_buffer_desc gssbuf,send_tok,recv_tok, msg_tok, *token_ptr;
+	Gssctxt ctxt;
+	OM_uint32 maj_status, min_status, ret_flags;
+	int plen,dlen;
+	unsigned int klen, kout;
+	DH *dh; 
+	BIGNUM *dh_server_pub = 0;
+	BIGNUM *shared_secret = 0;	
+	unsigned char *kbuf;
+	unsigned char *hash;
+	unsigned char *serverhostkey;
+	int type = 0;
+	int first = 1;
+	int slen = 0;
+	
+	/* Initialise our GSSAPI world */
+	ssh_gssapi_build_ctx(&ctxt);
+	if (ssh_gssapi_id_kex(&ctxt,kex->name)) {
+		fatal("Couldn't identify host exchange");
+	}
+	if (ssh_gssapi_import_name(&ctxt,kex->host)) {
+		fatal("Couldn't import hostname ");
+	}
+	
+	/* This code should match that in ssh_dh1_client */
+		
+	/* Step 1 - e is dh->pub_key */
+	dh = dh_new_group1();
+	dh_gen_key(dh, kex->we_need * 8);
+
+	/* This is f, we initialise it now to make life easier */
+    	dh_server_pub = BN_new();
+    	if (dh_server_pub == NULL) {
+    		fatal("dh_server_pub == NULL");
+    	}
+    		
+	token_ptr = GSS_C_NO_BUFFER;
+			 
+	do {
+		debug("Calling gss_init_sec_context");
+		
+		maj_status=ssh_gssapi_init_ctx(&ctxt,
+					       kex->options.gss_deleg_creds,
+					       token_ptr,&send_tok,
+					       &ret_flags);
+
+		if (GSS_ERROR(maj_status)) {
+			fatal("gss_init_context failed");
+		} 
+
+		/* If we've got an old receive buffer get rid of it */
+		if (token_ptr != GSS_C_NO_BUFFER)
+	  		(void) gss_release_buffer(&min_status, &recv_tok);
+ 	
+		
+		if (maj_status == GSS_S_COMPLETE) {
+			/* If mutual state flag is not true, kex fails */
+			if (!(ret_flags & GSS_C_MUTUAL_FLAG)) {
+				fatal("Mutual authentication failed");
+			}
+			/* If integ avail flag is not true kex fails */
+			if (!(ret_flags & GSS_C_INTEG_FLAG)) {
+				fatal("Integrity check failed");
+			}
+		}
+		
+		/* If we have data to send, then the last message that we
+		 * received cannot have been a 'complete'. */
+		if (send_tok.length !=0) {
+			if (first) {
+				packet_start(SSH2_MSG_KEXGSS_INIT);
+				packet_put_string(send_tok.value,
+					  	  send_tok.length);
+				packet_put_bignum2(dh->pub_key);
+				first=0;
+			} else {
+				packet_start(SSH2_MSG_KEXGSS_CONTINUE);
+				packet_put_string(send_tok.value,
+						  send_tok.length);
+			}
+			packet_send();
+			packet_write_wait();
+
+			
+			/* If we've sent them data, they'd better be polite
+			 * and reply. */
+		
+			type = packet_read(&plen);
+			switch (type) {
+			case SSH2_MSG_KEXGSS_HOSTKEY:
+				debug("Received KEXGSS_HOSTKEY");
+				serverhostkey=packet_get_string(&slen);
+				break;
+			case SSH2_MSG_KEXGSS_CONTINUE:
+				debug("Received GSSAPI_CONTINUE");
+				if (maj_status == GSS_S_COMPLETE) 
+					fatal("GSSAPI Continue received from server when complete");
+				recv_tok.value=packet_get_string(&recv_tok.length);
+				break;
+			case SSH2_MSG_KEXGSS_COMPLETE:
+				debug("Received GSSAPI_COMPLETE");
+			        packet_get_bignum2(dh_server_pub, &dlen);
+			    	msg_tok.value=
+			    	    packet_get_string(&msg_tok.length);
+
+				/* Is there a token included? */
+				if (packet_get_char()) {
+					recv_tok.value=
+					    packet_get_string(&recv_tok.length);
+					/* If we're already complete - protocol error */
+					if (maj_status == GSS_S_COMPLETE)
+						packet_disconnect("Protocol error: received token when complete");
+				} else {
+				   	/* No token included */
+				   	if (maj_status != GSS_S_COMPLETE)
+				   		packet_disconnect("Protocol error: did not receive final token");
+				}
+				break;
+			default:
+				packet_disconnect("Protocol error: didn't expect packet type %d",
+		    		type);
+			}
+			token_ptr=&recv_tok;
+		}
+
+    	} while (maj_status & GSS_S_CONTINUE_NEEDED);
+    	
+    	/* We _must_ have received a COMPLETE message in reply from the 
+    	 * server, which will have set dh_server_pub and msg_tok */
+    	 
+    	if (type!=SSH2_MSG_KEXGSS_COMPLETE)
+    	   fatal("Didn't receive a SSH2_MSG_KEXGSS_COMPLETE when I expected it");
+    	 	    	
+	/* Check f in range [1, p-1] */
+        if (!dh_pub_is_valid(dh, dh_server_pub))
+                        packet_disconnect("bad server public DH value");
+                        
+        /* compute K=f^x mod p */
+        klen = DH_size(dh);
+        kbuf = xmalloc(klen);
+        kout = DH_compute_key(kbuf, dh_server_pub, dh);
+        
+        shared_secret = BN_new();
+        BN_bin2bn(kbuf,kout, shared_secret);
+        memset(kbuf, 0, klen);
+        xfree(kbuf);
+        
+        hash = kex_gssapi_hash(
+ 	    kex->client_version_string,
+            kex->server_version_string,
+            buffer_ptr(&kex->my), buffer_len(&kex->my),
+            buffer_ptr(&kex->peer), buffer_len(&kex->peer),
+            serverhostkey, slen, /* server host key */
+            dh->pub_key,	/* e */
+            dh_server_pub,	/* f */
+            shared_secret	/* K */
+        );
+        
+        gssbuf.value=hash;
+        gssbuf.length=20;
+        
+        /* Verify that H matches the token we just got. */
+                if ((maj_status = gss_verify_mic(&min_status,
+        	       		         ctxt.context,
+        	                         &gssbuf,
+        	                         &msg_tok,
+        	                         NULL))) {
+
+		packet_disconnect("Hash's MIC didn't verify");
+      	}	
+        
+        DH_free(dh);
+       	ssh_gssapi_delete_ctx(&ctxt);
+        /* save session id */
+        if (kex->session_id == NULL) {
+        	kex->session_id_len = 20;
+        	kex->session_id = xmalloc(kex->session_id_len);
+        	memcpy(kex->session_id, hash, kex->session_id_len);
+        }
+        
+	kex_derive_keys(kex, hash, shared_secret);
+	BN_clear_free(shared_secret);
+        kex_finish(kex);
+}
+
+
+
+
+void
+kexgss_server(Kex *kex)
+{
+
+	OM_uint32 maj_status, min_status;
+	
+	/* Some GSSAPI implementations use the input value of ret_flags (an
+ 	 * output variable) as a means of triggering mechanism specific 
+ 	 * features. Initializing it to zero avoids inadvertently 
+ 	 * activating this non-standard behaviour.*/
+
+	OM_uint32 ret_flags = 0;
+	gss_buffer_desc gssbuf,send_tok,recv_tok,msg_tok;
+	Gssctxt ctxt;
+        int plen;
+        int dlen=0;
+        unsigned int klen, kout;
+        unsigned char *kbuf;
+        unsigned char *hash;
+        DH *dh;
+        BIGNUM *shared_secret = 0;
+        BIGNUM *dh_client_pub = 0;
+	int type =0;
+	
+	/* Initialise GSSAPI */
+
+	ssh_gssapi_build_ctx(&ctxt);
+        if (ssh_gssapi_id_kex(&ctxt,kex->name))
+		fatal("Unknown gssapi mechanism");
+        if (ssh_gssapi_acquire_cred(&ctxt))
+        	fatal("Unable to acquire credentials for the server");
+                                                                                                                                
+	/* Initialise some bignums */
+        dh_client_pub = BN_new();
+        if (dh_client_pub == NULL)
+        	fatal("dh_client_pub == NULL");
+
+	do {
+		debug("Wait SSH2_MSG_GSSAPI_INIT");
+		type = packet_read(&plen);
+		switch(type) {
+		case SSH2_MSG_KEXGSS_INIT:
+			if (dlen!=0) 
+				fatal("Received KEXGSS_INIT after initialising");
+			recv_tok.value=packet_get_string(&recv_tok.length);
+		  	packet_get_bignum2(dh_client_pub, &dlen);
+		  	/* Send SSH_MSG_KEXGSS_HOSTKEY here, if we want */
+			break;
+		case SSH2_MSG_KEXGSS_CONTINUE:
+			if (dlen==0)
+				fatal("Received KEXGSS_CONTINUE without initialising");
+			recv_tok.value=packet_get_string(&recv_tok.length);
+			break;
+		default:
+			packet_disconnect("Protocol error: didn't expect packet type %d",
+					   type);
+		}
+		maj_status=ssh_gssapi_accept_ctx(&ctxt,&recv_tok, &send_tok,
+						 &ret_flags);
+
+		gss_release_buffer(&min_status,&recv_tok);
+		
+		if (maj_status & GSS_S_CONTINUE_NEEDED) {
+			debug("Sending GSSAPI_CONTINUE");
+			packet_start(SSH2_MSG_KEXGSS_CONTINUE);
+			packet_put_string(send_tok.value,send_tok.length);
+			packet_send();
+			packet_write_wait();
+			gss_release_buffer(&min_status, &send_tok);
+		}
+	} while (maj_status & GSS_S_CONTINUE_NEEDED);
+
+	if (GSS_ERROR(maj_status))
+		fatal("gss_accept_context died");
+	
+	debug("gss_complete");
+	if (!(ret_flags & GSS_C_MUTUAL_FLAG))
+		fatal("mutual authentication flag wasn't set");
+		
+	if (!(ret_flags & GSS_C_INTEG_FLAG))
+		fatal("Integrity flag wasn't set");
+		
+	
+	dh = dh_new_group1();
+	dh_gen_key(dh, kex->we_need * 8);
+	
+        if (!dh_pub_is_valid(dh, dh_client_pub))
+                packet_disconnect("bad client public DH value");
+
+        klen = DH_size(dh);
+        kbuf = xmalloc(klen); 
+        kout = DH_compute_key(kbuf, dh_client_pub, dh);
+
+	shared_secret = BN_new();
+	BN_bin2bn(kbuf, kout, shared_secret);
+	memset(kbuf, 0, klen);
+	xfree(kbuf);
+	
+        hash = kex_gssapi_hash(
+            kex->client_version_string,
+            kex->server_version_string,
+            buffer_ptr(&kex->peer), buffer_len(&kex->peer),
+            buffer_ptr(&kex->my), buffer_len(&kex->my),
+            NULL, 0, /* Change this if we start sending host keys */
+            dh_client_pub,
+            dh->pub_key,
+            shared_secret
+	);
+	BN_free(dh_client_pub);
+		
+	if (kex->session_id == NULL) {
+		kex->session_id_len = 20;
+		kex->session_id = xmalloc(kex->session_id_len);
+		memcpy(kex->session_id, hash, kex->session_id_len);
+	}
+	                        
+	gssbuf.value = hash;
+	gssbuf.length = 20; /* Hashlen appears to always be 20 */
+	
+	if ((maj_status=gss_get_mic(&min_status,
+			       ctxt.context,
+			       GSS_C_QOP_DEFAULT,
+			       &gssbuf,
+			       &msg_tok))) {
+		ssh_gssapi_error(maj_status,min_status);
+		fatal("Couldn't get MIC");
+	}	
+			      
+	packet_start(SSH2_MSG_KEXGSS_COMPLETE);
+	packet_put_bignum2(dh->pub_key);
+	packet_put_string((char *)msg_tok.value,msg_tok.length);
+
+	if (send_tok.length!=0) {
+		packet_put_char(1); /* true */
+		packet_put_string((char *)send_tok.value,send_tok.length);
+	} else {
+		packet_put_char(0); /* false */
+	}
+ 	packet_send();
+	packet_write_wait();
+
+	/* Store the client name, and the delegated credentials for later
+	 * use */
+	if (ssh_gssapi_getclient(&ctxt,&gssapi_client_type, 
+				       &gssapi_client_name, 
+				       &gssapi_client_creds)) {
+		fatal("Couldn't convert client name");
+	}
+	
+	gss_release_buffer(&min_status, &send_tok);	
+	ssh_gssapi_delete_ctx(&ctxt);
+	DH_free(dh);
+
+	kex_derive_keys(kex, hash, shared_secret);
+	BN_clear_free(shared_secret);
+	kex_finish(kex);
+}
+
+void 
+kexgss(Kex *kex)
+{
+	if (kex->server)
+		kexgss_server(kex);
+	else
+		kexgss_client(kex);
+}
+
+#endif /* GSSAPI */
diff -Naur openssh-3.0.2p1/key.c openssh-3.0.2p1-gssapi/key.c
--- openssh-3.0.2p1/key.c	Wed Oct 10 00:00:50 2001
+++ openssh-3.0.2p1-gssapi/key.c	Fri Jan 11 13:34:41 2002
@@ -625,6 +625,8 @@
 		return KEY_RSA;
 	} else if (strcmp(name, "ssh-dss") == 0){
 		return KEY_DSA;
+	} else if (strcmp(name, "null") == 0){
+		return KEY_NULL;
 	}
 	debug2("key_type_from_name: unknown key type '%s'", name);
 	return KEY_UNSPEC;
diff -Naur openssh-3.0.2p1/key.h openssh-3.0.2p1-gssapi/key.h
--- openssh-3.0.2p1/key.h	Tue Sep 18 00:41:20 2001
+++ openssh-3.0.2p1-gssapi/key.h	Fri Jan 11 13:34:41 2002
@@ -34,6 +34,7 @@
 	KEY_RSA1,
 	KEY_RSA,
 	KEY_DSA,
+	KEY_NULL,
 	KEY_UNSPEC
 };
 enum fp_type {
diff -Naur openssh-3.0.2p1/makegssname.pl openssh-3.0.2p1-gssapi/makegssname.pl
--- openssh-3.0.2p1/makegssname.pl	Wed Dec 31 18:00:00 1969
+++ openssh-3.0.2p1-gssapi/makegssname.pl	Fri Jan 11 13:34:41 2002
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+use Convert::ASN1 qw(:tag);
+use Digest::MD5 qw(md5);
+use MIME::Base64;
+ 
+$oid=shift;
+$encoded=encode_object_id($oid);
+
+@entries=unpack("C*",$encoded);
+shift @entries; # Get rid of the NULL
+
+print "DER representation: ";
+foreach $entry (@entries) {
+  print "\\x";
+  printf "%02X",$entry;
+}
+print "\n";
+
+$digest = md5($encoded);
+# We only want the first 10 characters;
+# Conversations with the authors suggest that we want to use all of the
+# characters of the digest.
+#$digest = substr($digest,0,10);
+print "gsskeyex representation: ",encode_base64($digest),"\n";
+
+sub encode_object_id {
+  $string="";
+
+  my @data = ($_[0] =~ /(\d+)/g);
+
+  if(@data < 2) {
+      @data = (0);
+  }
+  else {
+      my $first = $data[1] + ($data[0] * 40);
+      splice(@data,0,2,$first);
+  }
+
+#  my $l = length $string;
+  $string .= pack("cw*", 0, @data);
+#  substr($string,$l,1) = asn_encode_length(length($string) - $l - 1);
+  return $string;
+}
+
+
diff -Naur openssh-3.0.2p1/readconf.c openssh-3.0.2p1-gssapi/readconf.c
--- openssh-3.0.2p1/readconf.c	Wed Oct  3 12:39:39 2001
+++ openssh-3.0.2p1-gssapi/readconf.c	Fri Jan 11 13:34:41 2002
@@ -99,6 +99,12 @@
 #if defined(KRB4) || defined(KRB5)
 	oKerberosAuthentication,
 #endif
+#ifdef GSSAPI
+	oGssAuthentication, oGssDelegateCreds,
+#ifdef GSI
+	oGssGlobusDelegateLimitedCreds,
+#endif /* GSI */
+#endif /* GSSAPI */
 #if defined(AFS) || defined(KRB5)
 	oKerberosTgtPassing,
 #endif
@@ -144,6 +150,15 @@
 #if defined(KRB4) || defined(KRB5)
 	{ "kerberosauthentication", oKerberosAuthentication },
 #endif
+#ifdef GSSAPI
+	{ "gssapiauthentication", oGssAuthentication },
+	{ "gssapidelegatecredentials", oGssDelegateCreds },
+#ifdef GSI
+	/* For backwards compatability with old 1.2.27 client code */
+	{ "forwardgssapiglobusproxy", oGssDelegateCreds }, /* alias */
+	{ "forwardgssapiglobuslimitedproxy", oGssGlobusDelegateLimitedCreds },
+#endif /* GSI */
+#endif /* GSSAPI */
 #if defined(AFS) || defined(KRB5)
 	{ "kerberostgtpassing", oKerberosTgtPassing },
 #endif
@@ -363,6 +378,23 @@
 		intptr = &options->kerberos_authentication;
 		goto parse_flag;
 #endif
+#ifdef GSSAPI
+	case oGssAuthentication:
+		intptr = &options->gss_authentication;
+		goto parse_flag;
+      
+	case oGssDelegateCreds:
+		intptr = &options->gss_deleg_creds;
+		goto parse_flag;
+ 
+#ifdef GSI
+	case oGssGlobusDelegateLimitedCreds:
+		intptr = &options->gss_globus_deleg_limited_proxy;
+		goto parse_flag;
+#endif /* GSI */
+
+#endif /* GSSAPI */
+
 #if defined(AFS) || defined(KRB5)
 	case oKerberosTgtPassing:
 		intptr = &options->kerberos_tgt_passing;
@@ -751,6 +783,14 @@
 	options->rsa_authentication = -1;
 	options->pubkey_authentication = -1;
 	options->challenge_response_authentication = -1;
+#ifdef GSSAPI
+        options->gss_authentication = -1;
+        options->gss_deleg_creds = -1;
+#ifdef GSI
+        options->gss_globus_deleg_limited_proxy = -1;
+#endif /* GSI */
+#endif /* GSSAPI */
+
 #if defined(KRB4) || defined(KRB5)
 	options->kerberos_authentication = -1;
 #endif
@@ -831,6 +871,16 @@
 		options->pubkey_authentication = 1;
 	if (options->challenge_response_authentication == -1)
 		options->challenge_response_authentication = 1;
+#ifdef GSSAPI
+	if (options->gss_authentication == -1)
+		options->gss_authentication = 1;
+	if (options->gss_deleg_creds == -1)
+		options->gss_deleg_creds = 1;
+#ifdef GSI
+	if (options->gss_globus_deleg_limited_proxy == -1)
+		options->gss_globus_deleg_limited_proxy = 0;
+#endif /* GSI */
+#endif /* GSSAPI */
 #if defined(KRB4) || defined(KRB5)
 	if (options->kerberos_authentication == -1)
 		options->kerberos_authentication = 1;
diff -Naur openssh-3.0.2p1/readconf.h openssh-3.0.2p1-gssapi/readconf.h
--- openssh-3.0.2p1/readconf.h	Wed Oct  3 12:39:39 2001
+++ openssh-3.0.2p1-gssapi/readconf.h	Fri Jan 11 13:34:41 2002
@@ -47,6 +47,15 @@
 #if defined(AFS) || defined(KRB5)
 	int     kerberos_tgt_passing;	/* Try Kerberos TGT passing. */
 #endif
+
+#ifdef GSSAPI
+	int 	gss_authentication;
+	int	gss_deleg_creds;
+#ifdef GSI
+	int	gss_globus_deleg_limited_proxy;
+#endif /* GSI */
+#endif /* GSSAPI */
+
 #ifdef AFS
 	int     afs_token_passing;	/* Try AFS token passing. */
 #endif
diff -Naur openssh-3.0.2p1/servconf.c openssh-3.0.2p1-gssapi/servconf.c
--- openssh-3.0.2p1/servconf.c	Tue Nov 13 07:03:15 2001
+++ openssh-3.0.2p1-gssapi/servconf.c	Fri Jan 11 13:34:41 2002
@@ -12,8 +12,17 @@
 #include "includes.h"
 RCSID("$OpenBSD: servconf.c,v 1.91 2001/11/12 18:17:07 markus Exp $");
 
-#if defined(KRB4) || defined(KRB5)
+#if defined(KRB4)
+#include <krb.h>
+#endif
+#if defined(KRB5)
+#ifdef HEIMDAL
 #include <krb.h>
+#else
+/* Bodge - but then, so is using the kerberos IV KEYFILE to get a Kerberos V
+ * keytab */
+#define KEYFILE "/etc/krb5.keytab"
+#endif
 #endif
 #ifdef AFS
 #include <kafs.h>
@@ -74,6 +83,12 @@
 	options->hostbased_uses_name_from_packet_only = -1;
 	options->rsa_authentication = -1;
 	options->pubkey_authentication = -1;
+#ifdef GSSAPI
+	options->gss_authentication=-1;
+	options->gss_keyex=-1;
+	options->gss_use_session_ccache = -1;
+	options->gss_cleanup_creds = -1;
+#endif
 #if defined(KRB4) || defined(KRB5)
 	options->kerberos_authentication = -1;
 	options->kerberos_or_local_passwd = -1;
@@ -178,6 +193,16 @@
 		options->rsa_authentication = 1;
 	if (options->pubkey_authentication == -1)
 		options->pubkey_authentication = 1;
+#ifdef GSSAPI
+	if (options->gss_authentication == -1)
+		options->gss_authentication = 1;
+	if (options->gss_keyex == -1)
+		options->gss_keyex =1;
+	if (options->gss_use_session_ccache == -1)
+		options->gss_use_session_ccache = 1;
+	if (options->gss_cleanup_creds == -1)
+		options->gss_cleanup_creds = 1;
+#endif
 #if defined(KRB4) || defined(KRB5)
 	if (options->kerberos_authentication == -1)
 		options->kerberos_authentication = (access(KEYFILE, R_OK) == 0);
@@ -240,6 +265,9 @@
 	sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime,
 	sPermitRootLogin, sLogFacility, sLogLevel,
 	sRhostsAuthentication, sRhostsRSAAuthentication, sRSAAuthentication,
+#ifdef GSSAPI
+	sGssAuthentication, sGssKeyEx, sGssUseSessionCredCache, sGssCleanupCreds,
+#endif
 #if defined(KRB4) || defined(KRB5)
 	sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup,
 #endif
@@ -289,6 +317,13 @@
 	{ "rsaauthentication", sRSAAuthentication },
 	{ "pubkeyauthentication", sPubkeyAuthentication },
 	{ "dsaauthentication", sPubkeyAuthentication },			/* alias */
+#ifdef GSSAPI
+	{ "gssapiauthentication", sGssAuthentication },
+	{ "gssapikeyexchange", sGssKeyEx },
+	{ "gssusesessionccache", sGssUseSessionCredCache },
+	{ "gssapiusesessioncredcache", sGssUseSessionCredCache },
+	{ "gssapicleanupcreds", sGssCleanupCreds },
+#endif
 #if defined(KRB4) || defined(KRB5)
 	{ "kerberosauthentication", sKerberosAuthentication },
 	{ "kerberosorlocalpasswd", sKerberosOrLocalPasswd },
@@ -614,6 +649,20 @@
 		case sPubkeyAuthentication:
 			intptr = &options->pubkey_authentication;
 			goto parse_flag;
+#ifdef GSSAPI
+		case sGssAuthentication:
+			intptr = &options->gss_authentication;
+			goto parse_flag;
+		case sGssKeyEx:
+			intptr = &options->gss_keyex;
+			goto parse_flag;
+		case sGssUseSessionCredCache:
+			intptr = &options->gss_use_session_ccache;
+			goto parse_flag;
+		case sGssCleanupCreds:
+			intptr = &options->gss_cleanup_creds;
+			goto parse_flag;
+#endif
 #if defined(KRB4) || defined(KRB5)
 		case sKerberosAuthentication:
 			intptr = &options->kerberos_authentication;
diff -Naur openssh-3.0.2p1/servconf.h openssh-3.0.2p1-gssapi/servconf.h
--- openssh-3.0.2p1/servconf.h	Wed Sep 12 11:40:06 2001
+++ openssh-3.0.2p1-gssapi/servconf.h	Fri Jan 11 13:34:41 2002
@@ -72,6 +72,13 @@
 	int     hostbased_uses_name_from_packet_only; /* experimental */
 	int     rsa_authentication;	/* If true, permit RSA authentication. */
 	int     pubkey_authentication;	/* If true, permit ssh2 pubkey authentication. */
+	#ifdef GSSAPI
+	int     gss_authentication;
+	int     gss_keyex;
+	int     gss_use_session_ccache;        /* If true, delegated credentials are
+	                                        * stored in a session specific cache */
+	int 	gss_cleanup_creds;	       /* If true, destroy cred cache on logout */
+#endif	
 #if defined(KRB4) || defined(KRB5)
 	int     kerberos_authentication;	/* If true, permit Kerberos
 						 * authentication. */
diff -Naur openssh-3.0.2p1/session.c openssh-3.0.2p1-gssapi/session.c
--- openssh-3.0.2p1/session.c	Sat Dec  1 17:37:08 2001
+++ openssh-3.0.2p1-gssapi/session.c	Fri Jan 11 13:34:41 2002
@@ -57,6 +57,10 @@
 #include "canohost.h"
 #include "session.h"
 
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
+
 #ifdef WITH_IRIX_PROJECT
 #include <proj.h>
 #endif /* WITH_IRIX_PROJECT */
@@ -436,6 +440,12 @@
 
 	session_proctitle(s);
 
+#if defined(GSSAPI)
+	temporarily_use_uid(s->pw);
+	ssh_gssapi_storecreds();
+	restore_uid();
+#endif
+
 #if defined(USE_PAM)
 	do_pam_session(s->pw->pw_name, NULL);
 	do_pam_setcred(1);
@@ -554,6 +564,12 @@
 	ptyfd = s->ptyfd;
 	ttyfd = s->ttyfd;
 
+#if defined(GSSAPI)
+	temporarily_use_uid(s->pw);
+	ssh_gssapi_storecreds();
+	restore_uid();
+#endif
+
 #if defined(USE_PAM)
 	do_pam_session(s->pw->pw_name, s->tty);
 	do_pam_setcred(1);
@@ -807,7 +823,7 @@
  * Sets the value of the given variable in the environment.  If the variable
  * already exists, its value is overriden.
  */
-static void
+void
 child_set_env(char ***envp, u_int *envsizep, const char *name,
 	      const char *value)
 {
@@ -1121,6 +1137,7 @@
 				exit(1);
 			}
 			endgrent();
+
 #  ifdef USE_PAM
 			/*
 			 * PAM credentials may take the form of 
@@ -1216,6 +1233,13 @@
 	copy_environment(&env, &envsize);
 #endif
 
+#ifdef GSSAPI
+	/* Allow any GSSAPI methods that we've used to alter 
+	 * the childs environment as they see fit
+	 */
+	ssh_gssapi_do_child(&env,&envsize);
+#endif
+
 	if (!options.use_login) {
 		/* Set basic environment. */
 		child_set_env(&env, &envsize, "USER", pw->pw_name);
@@ -2074,4 +2098,7 @@
 do_authenticated2(Authctxt *authctxt)
 {
 	server_loop2(authctxt);
+#if defined(GSSAPI)
+	ssh_gssapi_cleanup_creds(NULL);
+#endif
 }
diff -Naur openssh-3.0.2p1/session.h openssh-3.0.2p1-gssapi/session.h
--- openssh-3.0.2p1/session.h	Thu Oct 11 20:35:06 2001
+++ openssh-3.0.2p1-gssapi/session.h	Fri Jan 11 13:34:41 2002
@@ -33,5 +33,6 @@
 void	 session_close_by_pid(pid_t, int);
 void	 session_close_by_channel(int, void *);
 void	 session_destroy_all(void);
-
+void	 child_set_env(char ***envp, u_int *envsizep, const char *name,
+		       const char *value);
 #endif
diff -Naur openssh-3.0.2p1/ssh-gss.h openssh-3.0.2p1-gssapi/ssh-gss.h
--- openssh-3.0.2p1/ssh-gss.h	Wed Dec 31 18:00:00 1969
+++ openssh-3.0.2p1-gssapi/ssh-gss.h	Fri Jan 11 13:34:41 2002
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2001 Simon Wilkinson. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef GSSAPI
+
+#include "kex.h"
+#include "buffer.h"
+
+#include <gssapi.h>
+
+#ifdef KRB5
+#ifndef HEIMDAL
+#include <gssapi_generic.h>
+
+/* MIT Kerberos doesn't seem to define GSS_NT_HOSTBASED_SERVICE */
+
+#ifndef GSS_C_NT_HOSTBASED_SERVICE
+#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#endif /* GSS_C_NT_... */
+#endif /* !HEIMDAL */
+#endif /* KRB5 */
+
+/* draft-ietf-secsh-gsskeyex-01 */
+#define SSH2_MSG_KEXGSS_INIT		30
+#define SSH2_MSG_KEXGSS_CONTINUE 	31
+#define SSH2_MSG_KEXGSS_COMPLETE 	32
+#define SSH2_MSG_KEXGSS_HOSTKEY		33
+#define KEX_GSS_SHA1			"gss-group1-sha1-"
+
+/* draft-galb-secsh-gssapi-01 */
+#define SSH2_MSG_USERAUTH_GSSAPI_RESPONSE     60
+#define SSH2_MSG_USERAUTH_GSSAPI_TOKEN        61
+#define SSH2_MSG_USERAUTH_GSSAPI_HASH         62
+#define SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE	63    
+
+enum ssh_gss_id {
+#ifdef KRB5
+	GSS_KERBEROS,
+#endif
+#ifdef GSI
+	GSS_GSI,
+#endif /* GSI */
+	GSS_LAST_ENTRY
+};
+
+typedef struct ssh_gss_mech_struct {
+        char *enc_name;
+        char *name;
+        gss_OID_desc oid;
+} ssh_gssapi_mech;
+
+typedef struct {
+	OM_uint32	status; /* both */
+	gss_ctx_id_t	context; /* both */
+	gss_name_t	name; /* both */
+	gss_OID		oid; /* client */
+	gss_cred_id_t	creds; /* server */
+	gss_name_t	client; /* server */
+	gss_cred_id_t	client_creds; /* server */
+} Gssctxt;
+
+extern ssh_gssapi_mech supported_mechs[];
+extern gss_buffer_desc gssapi_client_name;
+extern gss_cred_id_t   gssapi_client_creds;
+extern enum ssh_gss_id gssapi_client_type;
+
+char *ssh_gssapi_mechanisms(int server, char *host);
+int ssh_gssapi_id_kex(Gssctxt *ctx, char *name);
+void ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len);
+void ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid);
+void ssh_gssapi_supported_oids(gss_OID_set *oidset);
+enum ssh_gss_id ssh_gssapi_get_ctype(Gssctxt *ctxt);
+
+OM_uint32 ssh_gssapi_import_name(Gssctxt *ctx, char *host);
+OM_uint32 ssh_gssapi_acquire_cred(Gssctxt *ctx);
+OM_uint32 ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds,
+			      gss_buffer_desc *recv_tok, 
+			      gss_buffer_desc *send_tok, OM_uint32 *flags);
+OM_uint32 ssh_gssapi_accept_ctx(Gssctxt *ctx,
+				gss_buffer_desc *recv_tok,
+				gss_buffer_desc *send_tok,
+				OM_uint32 *flags);
+OM_uint32 ssh_gssapi_getclient(Gssctxt *ctx,
+				enum ssh_gss_id *type,
+				gss_buffer_desc *name,
+				gss_cred_id_t *creds);
+void ssh_gssapi_error(OM_uint32 major_status,OM_uint32 minor_status);
+void ssh_gssapi_build_ctx(Gssctxt *ctx);
+void ssh_gssapi_delete_ctx(Gssctxt *ctx);
+
+/* In the client */
+void ssh_gssapi_client(Kex *kex, char *host, struct sockaddr *hostaddr,
+                       Buffer *client_kexinit, Buffer *server_kexinit);
+
+/* In the server */
+void ssh_gssapi_server(Kex *kex, Buffer *client_kexinit, 
+		       Buffer *server_kexinit);
+void ssh_gssapi_do_child(char ***envp, u_int *envsizep);                 
+void ssh_gssapi_cleanup_creds(void *ignored);
+void ssh_gssapi_storecreds();
+#endif /* GSSAPI */
diff -Naur openssh-3.0.2p1/sshconnect1.c openssh-3.0.2p1-gssapi/sshconnect1.c
--- openssh-3.0.2p1/sshconnect1.c	Wed Oct 10 00:03:12 2001
+++ openssh-3.0.2p1-gssapi/sshconnect1.c	Fri Jan 11 13:34:32 2002
@@ -23,6 +23,9 @@
 #endif
 #ifdef KRB5
 #include <krb5.h>
+#ifndef HEIMDAL
+#define krb5_get_err_text(context,code) error_message(code)
+#endif /* !HEIMDAL */
 #endif
 #ifdef AFS
 #include <kafs.h>
@@ -523,6 +526,23 @@
 		goto out;
 	}
 	
+	problem = krb5_auth_con_init(*context, auth_context);
+	if (problem) {
+		debug("Kerberos v5: krb5_auth_con_init failed");
+		ret = 0;
+		goto out;
+	}
+
+#ifndef HEIMDAL	
+	problem = krb5_auth_con_setflags(*context, *auth_context,
+					 KRB5_AUTH_CONTEXT_RET_TIME);
+	if (problem) {
+		debug("Kerberos v5: krb5_auth_con_setflags failed");
+		ret = 0;
+		goto out;
+	}				 
+#endif
+
 	tkfile = krb5_cc_default_name(*context);
 	if (strncmp(tkfile, "FILE:", 5) == 0)
 		tkfile += 5;
@@ -599,7 +619,11 @@
 	if (reply != NULL)
 		krb5_free_ap_rep_enc_part(*context, reply);
 	if (ap.length > 0)
+#ifdef HEIMDAL
 		krb5_data_free(&ap);
+#else
+		xfree(ap.data);
+#endif	
 	
 	return (ret);
 }
@@ -612,7 +636,11 @@
 	krb5_data outbuf;
 	krb5_ccache ccache = NULL;
 	krb5_creds creds;
+#ifdef HEIMDAL
 	krb5_kdc_flags flags;
+#else
+	int forwardable;
+#endif
 	const char *remotehost;
 	
 	memset(&creds, 0, sizeof(creds));
@@ -620,9 +648,19 @@
 	
 	fd = packet_get_connection_in();
 	
+#ifdef HEIMDAL	
 	problem = krb5_auth_con_setaddrs_from_fd(context, auth_context, &fd);
 	if (problem)
 		goto out;
+#else
+        problem = krb5_auth_con_genaddrs(context, auth_context, fd,
+			KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
+			KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
+	if (problem) {
+		debug("krb5_auth_con_genaddrs: %.100s", error_message(problem));
+                goto out;
+        }
+#endif
 	
 	problem = krb5_cc_default(context, &ccache);
 	if (problem)
@@ -632,14 +670,22 @@
 	if (problem)
 		goto out;
 	
+#ifdef HEIMDAL
 	problem = krb5_build_principal(context, &creds.server,
 	    strlen(creds.client->realm), creds.client->realm,
 	    "krbtgt", creds.client->realm, NULL);
+#else
+	problem = krb5_build_principal(context, &creds.server,
+	    creds.client->realm.length, creds.client->realm.data,
+	    "krbtgt", creds.client->realm.data, NULL);
+#endif
+
 	if (problem)
 		goto out;
 	
 	creds.times.endtime = 0;
 	
+#ifdef HEIMDAL	
 	flags.i = 0;
 	flags.b.forwarded = 1;
 	flags.b.forwardable = krb5_config_get_bool(context,  NULL,
@@ -651,6 +697,17 @@
 	    ccache, flags.i, remotehost, &creds, &outbuf);
 	if (problem)
 		goto out;
+#else
+	forwardable = 1;
+
+	remotehost = get_canonical_hostname(1);
+
+        problem = krb5_fwd_tgt_creds (context, auth_context, 
+            remotehost, creds.client, creds.server, ccache, forwardable,
+            &outbuf);
+        if (problem)
+        	goto out;
+#endif
 	
 	packet_start(SSH_CMSG_HAVE_KERBEROS_TGT);
 	packet_put_string((char *)outbuf.data, outbuf.length);
diff -Naur openssh-3.0.2p1/sshconnect2.c openssh-3.0.2p1-gssapi/sshconnect2.c
--- openssh-3.0.2p1/sshconnect2.c	Sun Nov 11 18:02:52 2001
+++ openssh-3.0.2p1-gssapi/sshconnect2.c	Fri Jan 11 13:34:41 2002
@@ -54,6 +54,10 @@
 #include "dispatch.h"
 #include "canohost.h"
 
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
+
 /* import */
 extern char *client_version_string;
 extern char *server_version_string;
@@ -87,6 +91,30 @@
 	xxx_host = host;
 	xxx_hostaddr = hostaddr;
 
+#ifdef GSSAPI
+	/* This is a bit of a nasty kludge. This adds the GSSAPI included
+	 * key exchange methods to the top of the list, allowing the GSSAPI
+	 * code to decide whether each one should be included or not.
+	 */	
+	{
+		char *orig, *gss;
+		int len;
+		orig = myproposal[PROPOSAL_KEX_ALGS];
+		gss = ssh_gssapi_mechanisms(0,host);
+		if (gss) {
+		   len = strlen(orig)+strlen(gss)+2;
+		   myproposal[PROPOSAL_KEX_ALGS]=xmalloc(len);
+		   snprintf(myproposal[PROPOSAL_KEX_ALGS],len,"%s,%s",gss,orig);
+		   /* If we've got GSSAPI algorithms, then we also support the
+		    * 'null' hostkey, as a last resort */
+		   orig=myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS];
+		   len = strlen(orig)+sizeof(",null");
+		   myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]=xmalloc(len);
+		   snprintf(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS],len,"%s,null",orig);  
+		}
+	}
+#endif
+
 	if (options.ciphers == (char *)-1) {
 		log("No valid ciphers for protocol version 2 given, using defaults.");
 		options.ciphers = NULL;
@@ -119,6 +147,11 @@
 	kex->client_version_string=client_version_string;
 	kex->server_version_string=server_version_string;
 	kex->verify_host_key=&verify_host_key_callback;
+	kex->host=host;
+
+#ifdef GSSAPI
+	kex->options.gss_deleg_creds=options.gss_deleg_creds;
+#endif
 
 	xxx_kex = kex;
 
@@ -166,6 +199,8 @@
 	int nkeys;
 	/* kbd-interactive */
 	int info_req_seen;
+	/* generic */
+	void *methoddata;
 };
 struct Authmethod {
 	char	*name;		/* string to compare against server's list */
@@ -187,6 +222,16 @@
 int	userauth_kbdint(Authctxt *authctxt);
 int	userauth_hostbased(Authctxt *authctxt);
 
+#ifdef GSSAPI
+int     userauth_external(Authctxt *authctxt);
+int     userauth_gssapi(Authctxt *authctxt);
+void    input_gssapi_response(int type, int plen, void *ctxt);
+void    input_gssapi_token(int type, int plen, void *ctxt);
+void    input_gssapi_hash(int type, int plen, void *ctxt);
+
+int     gss_host_key_ok=0;
+#endif
+
 void	userauth(Authctxt *authctxt, char *authlist);
 
 static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *);
@@ -197,6 +242,16 @@
 static char *authmethods_get(void);
 
 Authmethod authmethods[] = {
+#ifdef GSSAPI
+	{"external-keyx",
+		userauth_external,
+		&options.gss_authentication,
+		NULL},
+	{"gssapi",
+		userauth_gssapi,
+		&options.gss_authentication,
+		NULL},
+#endif
 	{"hostbased",
 		userauth_hostbased,
 		&options.hostbased_authentication,
@@ -263,6 +318,7 @@
 	authctxt.success = 0;
 	authctxt.method = authmethod_lookup("none");
 	authctxt.authlist = NULL;
+	authctxt.methoddata = NULL;
 	authctxt.keys = keys;
 	authctxt.nkeys = nkeys;
 	authctxt.info_req_seen = 0;
@@ -286,6 +342,11 @@
 void
 userauth(Authctxt *authctxt, char *authlist)
 {
+	if (authctxt->methoddata!=NULL) {
+		xfree(authctxt->methoddata);
+		authctxt->methoddata=NULL;
+	}
+           
 	if (authlist == NULL) {
 		authlist = authctxt->authlist;
 	} else {
@@ -332,6 +393,8 @@
 		fatal("input_userauth_success: no authentication context");
 	if (authctxt->authlist)
 		xfree(authctxt->authlist);
+	if (authctxt->methoddata)
+		xfree(authctxt->methoddata);
 	clear_auth_state(authctxt);
 	authctxt->success = 1;			/* break out */
 }
@@ -424,6 +487,151 @@
 
 }
 
+#ifdef GSSAPI
+int 
+userauth_gssapi(Authctxt *authctxt)
+{
+	int i;
+	Gssctxt *gssctxt;
+	static int tries=0;
+
+	/* For now, we only make one attempt at this. We could try offering
+	 * the server different GSSAPI OIDs until we get bored, I suppose.
+	 */	
+	if (tries++>0) return 0;
+
+        gssctxt=xmalloc(sizeof(Gssctxt));
+
+	/* Initialise as much of our context as we can, so failures can be
+	 * trapped before sending any packets.
+	 */
+	ssh_gssapi_build_ctx(gssctxt);
+	if (ssh_gssapi_import_name(gssctxt,authctxt->host)) {
+		return(0);
+	}
+	authctxt->methoddata=(void *)gssctxt;
+		
+	packet_start(SSH2_MSG_USERAUTH_REQUEST);
+	packet_put_cstring(authctxt->server_user);
+	packet_put_cstring(authctxt->service);
+        packet_put_cstring(authctxt->method->name);
+
+	/* FIXME: This assumes that our current GSSAPI implementation
+	 * supports all of the mechanisms listed in supported_mechs.
+	 * This may not be the case - we should use something along
+	 * the lines of the code in gss_genr to remove the ones that
+	 * aren't supported */
+	packet_put_int(GSS_LAST_ENTRY);
+	for (i=0;i<GSS_LAST_ENTRY;i++) {
+		packet_put_string(supported_mechs[i].oid.elements,
+			  	  supported_mechs[i].oid.length);
+	}
+        packet_send();
+        packet_write_wait();
+
+        dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE,&input_gssapi_response);
+        dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN,&input_gssapi_token);
+	
+        return 1;
+}
+
+void
+input_gssapi_response(int type, int plen, void *ctxt) 
+{
+	Authctxt *authctxt = ctxt;
+	Gssctxt *gssctxt;
+	OM_uint32 status,ms;
+	int oidlen;
+	char *oidv;
+	gss_buffer_desc send_tok;
+	
+	if (authctxt == NULL)
+		fatal("input_gssapi_response: no authentication context");
+	gssctxt = authctxt->methoddata;
+	
+	/* Setup our OID */
+	oidv=packet_get_string(&oidlen);
+	ssh_gssapi_set_oid_data(gssctxt,oidv,oidlen);
+	
+	packet_done();
+	
+	status = ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds,
+				     GSS_C_NO_BUFFER, &send_tok, 
+				     NULL);
+	if (GSS_ERROR(status)) {
+		/* Start again with next method on list */
+		debug("Trying to start again");
+		userauth(authctxt,NULL);
+		return;
+	}
+
+	/* We must have data to send */					
+	packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
+	packet_put_string(send_tok.value,send_tok.length);
+	packet_send();
+	packet_write_wait();
+	gss_release_buffer(&ms, &send_tok);
+}
+
+void
+input_gssapi_token(int type, int plen, void *ctxt)
+{
+	Authctxt *authctxt = ctxt;
+	Gssctxt *gssctxt;
+	gss_buffer_desc send_tok,recv_tok;
+	OM_uint32 status;
+	
+	if (authctxt == NULL)
+		fatal("input_gssapi_response: no authentication context");
+	gssctxt = authctxt->methoddata;
+	
+	recv_tok.value=packet_get_string(&recv_tok.length);
+
+	status=ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds,
+				   &recv_tok, &send_tok, NULL);
+
+	packet_done();
+	
+	if (GSS_ERROR(status)) {
+		/* Start again with the next method in the list */
+		userauth(authctxt,NULL);
+		return;
+	}
+	
+	if (send_tok.length>0) {
+		packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
+		packet_put_string(send_tok.value,send_tok.length);
+		packet_send();
+		packet_write_wait();
+	}
+	
+	if (status == GSS_S_COMPLETE) {
+		/* If that succeeded, send a exchange complete message */
+		packet_start(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE);
+		packet_send();
+		packet_write_wait();
+	}
+}
+
+int
+userauth_external(Authctxt *authctxt)
+{
+        static int attempt =0;
+        
+        if (attempt++ >= 1)
+        	return 0;
+                                
+        debug2("userauth_external");
+        packet_start(SSH2_MSG_USERAUTH_REQUEST);
+        packet_put_cstring(authctxt->server_user);
+        packet_put_cstring(authctxt->service);
+        packet_put_cstring(authctxt->method->name);
+        packet_send();
+        packet_write_wait();
+        return 1;
+}                                                                                                
+#endif /* GSSAPI */
+
 int
 userauth_none(Authctxt *authctxt)
 {
@@ -434,6 +642,7 @@
 	packet_put_cstring(authctxt->method->name);
 	packet_send();
 	return 1;
+
 }
 
 int
diff -Naur openssh-3.0.2p1/sshd.8 openssh-3.0.2p1-gssapi/sshd.8
--- openssh-3.0.2p1/sshd.8	Sat Dec  1 17:37:08 2001
+++ openssh-3.0.2p1-gssapi/sshd.8	Fri Jan 11 13:34:41 2002
@@ -466,6 +466,25 @@
 and applies to protocol version 2 only.
 The default is
 .Dq no .
+.It Cm GssapiAuthentication
+Specifies whether authentication based on GSSAPI may be used, either using
+the result of a successful key exchange, or using GSSAPI user
+authentication.
+The default is 
+.Dq yes .
+Note that this option applies to protocol version 2 only.
+.It Cm GssapiKeyExchange
+Specifies whether key exchange based on GSSAPI may be used. When using
+GSSAPI key exchange the server need not have a host key.
+The default is
+.Dq yes .
+Note that this option applies to protocol version 2 only.
+.It Cm GssapiUseSessionCredCache
+Specifies whether a unique credentials cache name should be generated per
+session for storing delegated credentials.
+The default is
+.Dq yes .
+Note that this option applies to protocol version 2 only.
 .It Cm HostKey
 Specifies the file containing the private host keys (default
 .Pa /etc/ssh_host_key )
diff -Naur openssh-3.0.2p1/sshd.c openssh-3.0.2p1-gssapi/sshd.c
--- openssh-3.0.2p1/sshd.c	Sun Nov 11 18:07:12 2001
+++ openssh-3.0.2p1-gssapi/sshd.c	Fri Jan 11 13:34:41 2002
@@ -73,6 +73,10 @@
 #include "dispatch.h"
 #include "channels.h"
 
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
+
 #ifdef LIBWRAP
 #include <tcpd.h>
 #include <syslog.h>
@@ -739,10 +743,13 @@
 		log("Disabling protocol version 1. Could not load host key");
 		options.protocol &= ~SSH_PROTO_1;
 	}
+#ifndef GSSAPI
+	/* The GSSAPI key exchange can run without a host key */
 	if ((options.protocol & SSH_PROTO_2) && !sensitive_data.have_ssh2_key) {
 		log("Disabling protocol version 2. Could not load host key");
 		options.protocol &= ~SSH_PROTO_2;
 	}
+#endif
 	if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) {
 		log("sshd: no hostkeys available -- exiting.");
 		exit(1);
@@ -1462,6 +1469,45 @@
 		myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
 	}
 	myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
+
+#ifdef GSSAPI
+	{ 
+	char *orig;
+	char *gss = NULL;
+	char *newstr = NULL;
+       	orig = myproposal[PROPOSAL_KEX_ALGS];
+
+	/* If we don't have a host key, then all of the algorithms
+	 * currently in myproposal are useless */
+	if (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS])==0)
+		orig= NULL;
+		
+        if (options.gss_keyex)
+        	gss = ssh_gssapi_mechanisms(1,NULL);
+        else
+        	gss = NULL;
+        
+	if (gss && orig) {
+		int len = strlen(orig) + strlen(gss) +2;
+		newstr=xmalloc(len);
+		snprintf(newstr,len,"%s,%s",gss,orig);
+	} else if (gss) {
+		newstr=gss;
+	} else if (orig) {
+		newstr=orig;
+	}
+        /* If we've got GSSAPI mechanisms, then we've also got the 'null'
+	   host key algorithm, but we're not allowed to advertise it, unless
+	   its the only host key algorithm we're supporting */
+	if (gss && (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS])) == 0) {
+	  	myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]="null";
+	}
+	if (newstr)
+		myproposal[PROPOSAL_KEX_ALGS]=newstr;
+	else
+		fatal("No supported key exchange algorithms");
+        }
+#endif
 
 	/* start key exchange */
 	kex = kex_setup(myproposal);
