p-011012

ldmud-3.2.9/src/bugs/p-011012 · 206.4 KB

From the archive ldmud-329.tar.gz

Download the archive   « Back to the archive contents

Short: MCCP patch :)
From:   "Bastian Hoyer" <dafire@dafire.de>
Date:   Thu Oct 11 21:02:00 2001
Type: Patch
State: New
See also: p-020810-1

----------
From: "Bastian Hoyer" <dafire@dafire.de>
Subject: mccp patch fuer 3-3.168
Date: Sat, 16 Feb 2002 17:19:44 +0100

hier mal eine neue version von meinem mccp patch :)

Gruss 
  Bastian

Neue Files:

Du koenntest mal ueber die files gucken und vielleicht bischen
korrigieren wenn dir was auffaellt.. mein englisch ist nicht mehr so gut
glaub ich :)

doc/concepts/mccp
doc/efun/end_mccp_compress
doc/efun/query_mccp
doc/efun/query_mccp_stats
doc/efun/start_mccp_compress

Veraenderte Files:

doc/driver/predefined

src/autoconf/configure.in  
  - mccp ein und ausschalten und ggf. zlib ... man koennte vielleicht
noch aendern 
    das -lz nicht zweimal in LIBS steht wenn auch mysql definiert ist.. 
    aber eigentlich egal :)
src/comm.c
  - extra funktion fuer die negotiation von mccp 
  - binary_message benutzt nicht write wenn die verbindung comprimiert
ist.. 
    das wuerde den zlib stream zerstoeren
  - 4 neue efuns ( start_mccp_compress end_mccp_compress query_mccp
query_mccp_stats )
  - add_message komprimiert ggf. den auszugebenen text in den zlib
buffer und verwendet den 
    dann zum senden uebers netzwerk (vielleicht kann man das sauberer
machen ? )
  - beim erschaffen und zerstoeren eines interactives werden die zlib
variablen ordentlich
    initialisiert und auch alles an speicher wieder freigegeben :)
src/comm.h
  - zlib.h included und interactive_t mit dem zlib buffer versorgt :)
src/config.h.in
  - den USE_MCCP schalter eingebaut
src/configure
    hmm.. das sieht bei mir bischen anders aus als bei dir.. vielleicht
solltest du da dein
    autoconf mal drueberlaufen lassen.. startest du das mit
irgendwelchen parametern ?:)
src/func_spec
  - die neuen efuns eingetragen
src/lex.c
  - das __MCCP__ define 
src/main.c
  - anzeige ob MCCP drin ist bei -options :)

Gruss
 Bastian

------=_NextPart_000_0008_01C1B70E.211D0660

diff --new-file -c5 -r 3-3.orig/doc/concepts/mccp 3-3.export/doc/concepts/mccp
*** 3-3.orig/doc/concepts/mccp	Thu Jan  1 01:00:00 1970
--- 3-3.export/doc/concepts/mccp	Fri Feb 15 15:35:23 2002
***************
*** 0 ****
--- 1,93 ----
+ CONCEPT
+            mccp - The Mud Client Compression Protocol
+ 
+ DESCRIPTION
+ 
+         Informations and code taken from the MCCP Homepage
+         http://www.randomly.org/projects/MCCP/
+ 
+ 	MCCP is implemented as a Telnet option [RFC854, RFC855]. The server
+         and client negotiate the use of MCCP as they would any other telnet
+         option. Once agreement has been reached on the use of the option,
+         option subnegotiation is used to determine acceptable compression
+         methods to use, and to indicate the start of a compressed data stream. 
+ 
+         If the driver is compiled with MCCP Support there is a
+         define __MCCP__.
+ 
+ 	The driver currently supports both versions of mccp. If your mud
+         has a H_NOECHO hook you have to find out if the client supports
+         mccp. Without this hook you still have to start neogotiation.
+ 
+         All sub-negotiation is done by the efuns start_mccp_compress() and
+         end_mccp_compress() whether you have this hook or not.
+ 
+ 	Notice: when the client uses compressions all binary_message calls
+                 are executed with flag=3. This is because writing to the
+                 socket would disturb zlib stream.
+ 	
+         mccp-efuns:
+         start_mysql_compress(int telopt) (only needed with H_NOECHO)
+         end_mysql_compress(int telopt)   (only needed with H_NOECHO)
+         query_mccp(object player)
+ 	query_mccp_stats(object player)
+ 
+      Initiating MCCP without H_NOECHO-Hook:
+         just do:
+         if(!query_mccp()){
+           binary_message(({ IAC, WILL, TELOPT_COMPRESS2 }),1)
+           binary_message(({ IAC, WILL, TELOPT_COMPRESS }),1)
+         }
+ 	the driver will parse the clients answers and start compression.
+ 	(The connection might already be compressed, because although the
+          documentation says clients should not negotiate from themselfes,
+          zmud e.g. does.)
+ 
+ 	You can start and stop compression manually by efuns
+         when you are sure client supports compression :)
+ 
+ 
+      Initiating mccp compression ( the H_NOECHO way )
+ 
+         If your mudlib uses the H_NOECHO driver-hook you decided to do
+         all the negotiation by yourself:
+ 
+         Server Commands
+         IAC WILL COMPRESS indicates the sender supports version 1 of the
+                           protocol, and is willing to compress data it sends. 
+ 
+         IAC WILL COMPRESS2 indicates the sender supports version 2, and is
+                            willing to compress data it sends. 
+ 
+         IAC WONT COMPRESS indicates the sender refuses to compress data using
+                           version 1. 
+ 
+         IAC WONT COMPRESS2 indicates the sender refuses to compress data
+                            using version 2. 
+ 
+         Client Commands
+         IAC DO COMPRESS indicates the sender supports version 1 of the
+                         protocol, and is willing to decompress data received. 
+ 
+         IAC DO COMPRESS2 indicates the sender supports version 2 or above,
+                          and is willing to decompress data received. 
+ 
+         IAC DONT COMPRESS indicates the sender refuses to support version 1.
+                           If compression was previously negotiated and is
+                           currently being used, the server should terminate
+                           compression. 
+ 
+         IAC DONT COMPRESS2 indicates the sender refuses to support version 2.
+                            If compression was previously negotiated and is
+                            currently being used, the server should terminate
+                            compression
+ 
+         After you found out whether the client supports mccp or not you can
+         start compression with start_mccp_compress(TELOPT_COMPRESS2) or
+         start_mccp_compress(TELOPT_COMPRESS). ( you could start it without
+         checking but some players would protest :) )
+ 
+ AUTHOR
+         Bastian Hoyer (dafire@ff.mud.de) (some text taken from project page)
+ 
+ HISTORY
diff --new-file -c5 -r 3-3.orig/doc/driver/predefined 3-3.export/doc/driver/predefined
*** 3-3.orig/doc/driver/predefined	Sun Feb 10 10:11:19 2002
--- 3-3.export/doc/driver/predefined	Thu Feb 14 23:34:48 2002
***************
*** 57,66 ****
--- 57,67 ----
      The following macros are defined if their associated package
      has been compiled into the driver:
        
        __IPV6__ :      support for IP v 6
        __MYSQL__ :     support for mySQL
+       __MCCP__:       support for MCCP http://www.randomly.org/projects/MCCP
        __ALISTS__:     support for alists
        __PCRE__:       support for PCRE instead of traditional regexps.
        __DEPRECATED__: support for obsolete and deprecated efuns.
  
  
diff --new-file -c5 -r 3-3.orig/doc/efun/end_mccp_compress 3-3.export/doc/efun/end_mccp_compress
*** 3-3.orig/doc/efun/end_mccp_compress	Thu Jan  1 01:00:00 1970
--- 3-3.export/doc/efun/end_mccp_compress	Thu Feb 14 23:32:04 2002
***************
*** 0 ****
--- 1,9 ----
+ SYNOPSIS
+         int end_mccp_compress()
+ 
+ DESCRIPTION
+         This efun must be called inside an interactive player and stops
+         compression of the driver -> client traffic immediatly.
+ 
+ SEE ALSO
+         start_mccp_compress(E), query_mccp(E), query_mccp_stats(E), mccp(C)
\ No newline at end of file
diff --new-file -c5 -r 3-3.orig/doc/efun/query_mccp 3-3.export/doc/efun/query_mccp
*** 3-3.orig/doc/efun/query_mccp	Thu Jan  1 01:00:00 1970
--- 3-3.export/doc/efun/query_mccp	Thu Feb 14 23:32:04 2002
***************
*** 0 ****
--- 1,13 ----
+ SYNOPSIS
+         int query_mccp()
+         int query_mccp(object player)
+ 
+ DESCRIPTION
+         This efun returns current wheter the client uses compression
+         or not. ( default this_player() )
+ 	You will get either TELOPT_COMPRESS, TELOPT_COMPRESS2 or 0 if the
+ 	connection is uncompressed.
+ 
+ SEE ALSO
+         end_mccp_compress(E), start_mccp_compress(E), query_mccp_stats(E),
+         mccp(C)
\ No newline at end of file
diff --new-file -c5 -r 3-3.orig/doc/efun/query_mccp_stats 3-3.export/doc/efun/query_mccp_stats
*** 3-3.orig/doc/efun/query_mccp_stats	Thu Jan  1 01:00:00 1970
--- 3-3.export/doc/efun/query_mccp_stats	Thu Feb 14 23:32:04 2002
***************
*** 0 ****
--- 1,13 ----
+ SYNOPSIS
+         int *query_mccp_stats()
+         int *query_mccp_stats(object player)
+ 
+ DESCRIPTION
+         This efun gives you statistics about current compression
+         of the player. ( default this_player() )
+         You get an array with ({ uncompressed bytes , compressed bytes }).
+         If the connection is not compressed it returns 0.
+         It raises an error on not-interactive objects.
+ 
+ SEE ALSO
+         end_mccp_compress(E), start_mccp_compress(E), query_mccp(E), mccp(C)
\ No newline at end of file
diff --new-file -c5 -r 3-3.orig/doc/efun/start_mccp_compress 3-3.export/doc/efun/start_mccp_compress
*** 3-3.orig/doc/efun/start_mccp_compress	Thu Jan  1 01:00:00 1970
--- 3-3.export/doc/efun/start_mccp_compress	Thu Feb 14 23:32:04 2002
***************
*** 0 ****
--- 1,11 ----
+ SYNOPSIS
+         int start_mccp_compress(int telopt)
+ 
+ DESCRIPTION
+         This efun must be called inside an interactive player and starts
+         compression of the driver -> client traffic immediatly.
+ 	telopt must be either TELOPT_COMPRESS2 or TELOPT_COMRESS from
+ 	sys/telnet.h.
+ 
+ SEE ALSO
+         end_mccp_compress(E), query_mccp(E), query_mccp_stats(E), mccp(C)
\ No newline at end of file
diff --new-file -c5 -r 3-3.orig/src/autoconf/configure.in 3-3.export/src/autoconf/configure.in
*** 3-3.orig/src/autoconf/configure.in	Sun Feb 10 10:11:19 2002
--- 3-3.export/src/autoconf/configure.in	Thu Feb 14 11:58:33 2002
***************
*** 92,101 ****
--- 92,102 ----
  AC_MY_ARG_ENABLE(use-system-crypt,yes,,)
  AC_MY_ARG_ENABLE(udp-send,yes,,)
  AC_MY_ARG_ENABLE(use-ipv6,no,,[Enables support for IPv6])
  AC_MY_ARG_ENABLE(use-alists,no,,[Enables alist support])
  AC_MY_ARG_ENABLE(use-mysql,no,,[Enables mySQL support])
+ AC_MY_ARG_ENABLE(use-mccp,no,,[Enables MCCP support])
  AC_MY_ARG_ENABLE(use-pcre,no,,[Enables PCRE instead of traditional regexps])
  AC_MY_ARG_ENABLE(use-deprecated,yes,,[Enables obsolete and deprecated efuns])
  AC_MY_ARG_ENABLE(comm-stat,yes,,)
  AC_MY_ARG_ENABLE(apply-cache_stat,yes,,)
  AC_MY_ARG_ENABLE(malloc-trace,no,,)
***************
*** 214,223 ****
--- 215,225 ----
  AC_CDEF_FROM_ENABLE(strict_euids)
  AC_CDEF_FROM_ENABLE(supply_parse_command)
  AC_CDEF_FROM_ENABLE(initialization_by___init)
  AC_CDEF_FROM_ENABLE(use_system_crypt)
  AC_CDEF_FROM_ENABLE(use_alists)
+ AC_CDEF_FROM_ENABLE(use_mccp)
  AC_CDEF_FROM_ENABLE(use_pcre)
  AC_CDEF_FROM_ENABLE(use_ipv6)
  AC_CDEF_FROM_ENABLE(use_deprecated)
  AC_CDEF_FROM_ENABLE(comm_stat)
  AC_CDEF_FROM_ENABLE(apply_cache_stat)
***************
*** 456,465 ****
--- 458,471 ----
  
  AC_CHECK_LIB(m,main)
  AC_CHECK_LIB(socket,main)
  AC_CHECK_LIB(ucb,main, LIBS="$LIBS -lc -lucb")
  AC_CHECK_LIB(crypt,main, LIBS="$LIBS -lcrypt")
+ if test $enable_use_mccp = yes; then
+   AC_CHECK_LIB(z,main, LIBS="$LIBS -lz")
+ fi
+ 
  if test $ac_cv_lib_socket_main = "yes" || test $ac_cv_lib_ucb_main = "yes"; then
        AC_CHECK_LIB(nsl,main)
  fi
  AC_FUNC_ALLOCA
  AC_CHECK_FUNCS(fchmod getrusage bzero memset memcpy memmem strdup strcspn crypt _crypt)
***************
*** 1548,1557 ****
--- 1554,1564 ----
  AC_SUBST(cdef_initialization_by___init)
  AC_SUBST(cdef_use_system_crypt)
  AC_SUBST(cdef_use_ipv6)
  AC_SUBST(cdef_use_mysql)
  AC_SUBST(cdef_use_alists)
+ AC_SUBST(cdef_use_mccp)
  AC_SUBST(cdef_use_pcre)
  AC_SUBST(cdef_use_deprecated)
  AC_SUBST(cdef_comm_stat)
  AC_SUBST(cdef_apply_cache_stat)
  AC_SUBST(cdef_malloc_trace)
diff --new-file -c5 -r 3-3.orig/src/comm.c 3-3.export/src/comm.c
*** 3-3.orig/src/comm.c	Thu Feb 14 12:16:54 2002
--- 3-3.export/src/comm.c	Sat Feb 16 16:19:49 2002
***************
*** 409,418 ****
--- 409,424 ----
  
  /*-------------------------------------------------------------------------*/
  
  /* Forward declarations */
  
+ #ifdef USE_MCCP
+ static int start_compress(interactive_t *,unsigned char telopt);
+ static int end_compress(interactive_t *);
+ #endif
+ static void mccp_telnet_neg(int);
+ 
  static void free_input_to(input_to_t *);
  static void telnet_neg(interactive_t *);
  static void send_will(int);
  static void send_wont(int);
  static void send_do(int);
***************
*** 1467,1490 ****
  
          /* Check how much data there is in .message_buf[].
           * If it is enough, send it, else terminate the outer loop
           * (because *source must be exhausted for this to happen).
           */
          chunk = dest - ip->message_buf;
          if (chunk < min_length)
          {
              break;
          }
! 
!         /* Write .message_buf[] to the network. */
! 
          for (retries = 6;;) {
! 
!             if ((n = (int)socket_write(ip->socket, ip->message_buf, (size_t)chunk)) != -1)
!             {
                  break;
!             }
              switch (errno) {
                case EINTR:
                  if (--retries)
                      continue;
                  ip->msg_discarded = MY_TRUE;
--- 1473,1537 ----
  
          /* Check how much data there is in .message_buf[].
           * If it is enough, send it, else terminate the outer loop
           * (because *source must be exhausted for this to happen).
           */
+ 
          chunk = dest - ip->message_buf;
          if (chunk < min_length)
          {
              break;
          }
!         
! #ifdef USE_MCCP        
!         if (ip->out_compress)
!         {
!            
!            ip->out_compress->next_in = (unsigned char *) ip->message_buf;
!            ip->out_compress->avail_in = chunk;
!            
!            ip->out_compress->avail_out = COMPRESS_BUF_SIZE -
!                                          (ip->out_compress->next_out -
!                                           ip->out_compress_buf);
!            
!            {
!               int status = deflate(ip->out_compress, Z_SYNC_FLUSH);
!               
!               if (status != Z_OK)
!                  return;
!            }
! 
!            /* ok.. perhaps i should take care that all data in message_buf
!               is compressed, but i guess there is no chance that 1024 byte compressed
!               won't fit into the 8192 byte buffer */
!            
!            length = ip->out_compress->next_out - ip->out_compress_buf;
!         }
! #endif
!         /* now sending the buffer... */
!         
          for (retries = 6;;) {
!            
! #ifdef USE_MCCP
!            if (!ip->out_compress) /* here we choose the correct buffer */
!            {
! #endif
!               if ((n = (int)socket_write(ip->socket, ip->message_buf, (size_t)chunk)) != -1)
!               {
                  break;
!               }
! #ifdef USE_MCCP
!            }
!            else
!            {
!               if ((n = (int)socket_write(ip->socket, ip->out_compress_buf, (size_t)length)) != -1)
!               {
!                  break;
!               }
!            }
! #endif
!            
              switch (errno) {
                case EINTR:
                  if (--retries)
                      continue;
                  ip->msg_discarded = MY_TRUE;
***************
*** 1540,1552 ****
  
  #ifdef COMM_STAT
          inet_packets++;
          inet_volume += n;
  #endif
!         if (n != chunk)
!             fprintf(stderr, "%s write socket: wrote %ld, should be %ld.\n"
!                           , time_stamp(), (long)n, (long)chunk);
  
          /* Continue with the processing of source */
          dest = &ip->message_buf[0];
      } while (srclen != 0);
  
--- 1587,1612 ----
  
  #ifdef COMM_STAT
          inet_packets++;
          inet_volume += n;
  #endif
! 
! #ifdef USE_MCCP
!          if (ip->out_compress)
!          {
!             /* we update the compressed buffer here */
!             ip->out_compress->next_out = ip->out_compress_buf + length - n;
!            if (n != length)
!                fprintf(stderr, "%s write socket (compressed): wrote %ld, should be %ld.\n"
!                        , time_stamp(), (long)n, (long)chunk);
!          }
!          else
! #endif
!             if (n != chunk)
!                fprintf(stderr, "%s write socket: wrote %ld, should be %ld.\n"
!                        , time_stamp(), (long)n, (long)chunk);
!          
  
          /* Continue with the processing of source */
          dest = &ip->message_buf[0];
      } while (srclen != 0);
  
***************
*** 2650,2659 ****
--- 2710,2725 ----
          {
              /* Say goodbye to the user. */
              trace_level |= interactive->trace_level;
              add_message(message_flush);
          }
+ 
+ #ifdef USE_MCCP
+         if (interactive->out_compress)
+            end_compress(interactive);
+ #endif
+         
          shutdown(interactive->socket, 2);
          socket_close(interactive->socket);
      } /* if (erq or user) */
  
  #if defined(ACCESS_CONTROL)
***************
*** 2676,2685 ****
--- 2742,2758 ----
      if (interactive->modify_command)
      {
          free_object(interactive->modify_command, "remove_interactive");
      }
  
+ #ifdef USE_MCCP
+     if (interactive->out_compress_buf)
+        free(interactive->out_compress_buf);
+     if (interactive->out_compress)
+        free(interactive->out_compress);
+ #endif
+     
      free_svalue(&interactive->prompt);
  
      if (interactive->trace_prefix)
          free_mstring(interactive->trace_prefix);
  
***************
*** 2877,2886 ****
--- 2950,2965 ----
      master_ob->flags |= O_ONCE_INTERACTIVE;
      new_interactive->ob = master_ob;
  
      /* Initialize the rest of the interactive structure */
  
+ #ifdef USE_MCCP
+     new_interactive->compressing = 0;
+     new_interactive->out_compress = NULL;
+     new_interactive->out_compress_buf=NULL;
+ #endif
+     
      new_interactive->input_to = NULL;
      put_number(&new_interactive->prompt, 0);
      new_interactive->modify_command = NULL;
      new_interactive->msg_discarded = MY_FALSE;
      new_interactive->set_input_to = MY_FALSE;
***************
*** 3940,3950 ****
              break;
          }
      }
  } /* reply_h_telnet_neg() */
  
! /*-------------------------------------------------------------------------*/
  void
  init_telopts (void)
  
  /* Initialise the telopts_xxx[] tables.
   * The default setting is such that requests are ignored or rejected.
--- 4019,4031 ----
              break;
          }
      }
  } /* reply_h_telnet_neg() */
  
! /*-
! 
!   -----------------------------------------------------------------------*/
  void
  init_telopts (void)
  
  /* Initialise the telopts_xxx[] tables.
   * The default setting is such that requests are ignored or rejected.
***************
*** 4029,4047 ****
      telopts_do[TELOPT_SGA] = reply_to_do_sga;
      telopts_dont[TELOPT_SGA] = reply_to_dont_sga;
  
      /* Mud specific protocols */
  
!     telopts_do[TELOPT_COMPRESS] = reply_h_telnet_neg;
!     telopts_dont[TELOPT_COMPRESS] = reply_h_telnet_neg;
!     telopts_will[TELOPT_COMPRESS] = reply_h_telnet_neg;
!     telopts_wont[TELOPT_COMPRESS] = reply_h_telnet_neg;
! 
!     telopts_do[TELOPT_COMPRESS2] = reply_h_telnet_neg;
!     telopts_dont[TELOPT_COMPRESS2] = reply_h_telnet_neg;
!     telopts_will[TELOPT_COMPRESS2] = reply_h_telnet_neg;
!     telopts_wont[TELOPT_COMPRESS2] = reply_h_telnet_neg;
  
      telopts_do[TELOPT_MSP] = reply_h_telnet_neg;
      telopts_dont[TELOPT_MSP] = reply_h_telnet_neg;
      telopts_will[TELOPT_MSP] = reply_h_telnet_neg;
      telopts_wont[TELOPT_MSP] = reply_h_telnet_neg;
--- 4110,4128 ----
      telopts_do[TELOPT_SGA] = reply_to_do_sga;
      telopts_dont[TELOPT_SGA] = reply_to_dont_sga;
  
      /* Mud specific protocols */
  
!     telopts_do[TELOPT_COMPRESS] = mccp_telnet_neg;
!     telopts_dont[TELOPT_COMPRESS] = mccp_telnet_neg;
!     telopts_will[TELOPT_COMPRESS] = mccp_telnet_neg;
!     telopts_wont[TELOPT_COMPRESS] = mccp_telnet_neg;
! 
!     telopts_do[TELOPT_COMPRESS2] = mccp_telnet_neg;
!     telopts_dont[TELOPT_COMPRESS2] = mccp_telnet_neg;
!     telopts_will[TELOPT_COMPRESS2] = mccp_telnet_neg;
!     telopts_wont[TELOPT_COMPRESS2] = mccp_telnet_neg;
  
      telopts_do[TELOPT_MSP] = reply_h_telnet_neg;
      telopts_dont[TELOPT_MSP] = reply_h_telnet_neg;
      telopts_will[TELOPT_MSP] = reply_h_telnet_neg;
      telopts_wont[TELOPT_MSP] = reply_h_telnet_neg;
***************
*** 5781,5790 ****
--- 5862,5875 ----
   *
   * The idea behind the flag settings is that sending command
   * codes for colours and other things needs to bypass the allowed
   * charset filters, but isn't important enough to waste bandwith
   * on a synchronous transmission.
+  *
+  * If the client uses MCCP compression add_message ist always used
+  * with flushing buffer _after_ the Message.
+  *
   */
  
  {
      string_t *msg;
      mp_int wrote = 0, i;
***************
*** 5827,5849 ****
      if (O_SET_INTERACTIVE(ip, current_object)
       && !ip->do_close)
      {
          save_command_giver = command_giver;
          command_giver = current_object;
! 
          if (sp->u.number & 1)
          {
              /* Write before flush... */
  
              sending_telnet_command = MY_TRUE; /* turn of IAC quoting */
  
              add_message(FMT_STRING, msg);
  
              sending_telnet_command = MY_FALSE;
  
              if (sp->u.number & 2)
!                 add_message(message_flush);
              wrote = 0;
          }
          else
          {
              /* Flush, then write. */
--- 5912,5942 ----
      if (O_SET_INTERACTIVE(ip, current_object)
       && !ip->do_close)
      {
          save_command_giver = command_giver;
          command_giver = current_object;
! #ifdef USE_MCCP
!         if ((sp->u.number & 1)||ip->out_compress)
! #else
          if (sp->u.number & 1)
+ #endif
+           
          {
              /* Write before flush... */
  
              sending_telnet_command = MY_TRUE; /* turn of IAC quoting */
  
              add_message(FMT_STRING, msg);
  
              sending_telnet_command = MY_FALSE;
  
+ #ifdef USE_MCCP
+             if ((sp->u.number & 2)||ip->out_compress)
+ #else
              if (sp->u.number & 2)
! #endif
!                add_message(message_flush);
              wrote = 0;
          }
          else
          {
              /* Flush, then write. */
***************
*** 6791,6795 ****
--- 6884,7204 ----
      return sp;
  } /* f_query_udp_port() */
  
  /***************************************************************************/
  
+ static void
+ mccp_telnet_neg (int option)
+ {
+    interactive_t *ip = O_GET_INTERACTIVE (command_giver);
+    
+    switch (ip->tn_state)
+    {
+     case TS_WILL:
+       DTF(("MCCP NEG (%d) STATE (WILL)\n", option));
+       break;
+     case TS_WONT:
+       DTF(("MCCP NEG (%d) STATE (WONT)\n", option));
+       break;
+     case TS_DO:
+       DTF(("MCCP NEG (%d) STATE (DO)\n", option));
+ #ifdef USE_MCCP
+       if (!ip->compressing)
+          start_compress(ip, option);
+ #endif
+       break;
+     case TS_DONT:
+       DTF(("MCCP NEG (%d) STATE (DONT)\n", option));
+ #ifdef USE_MCCP
+       if(ip->compressing==option)
+          end_compress(ip);
+ #endif
+       break;
+     default:
+       DTF(("MCCP NEG (%d) STATE (%d)\n", option, ip->tn_state));
+    }
+ }
+ 
+ #ifdef USE_MCCP
+ 
+ svalue_t *
+ f_start_mccp_compress (svalue_t * sp)
+ {
+     interactive_t *ip;
+     int mccpver;
+     int retval;
+     
+     mccpver=sp->u.number;
+ 
+     if ((mccpver!=TELOPT_COMPRESS)&&
+         (mccpver!=TELOPT_COMPRESS2))
+     {
+        error("arg 1 should be TELOPT_COMPRESS or TELOPT_COMPRESS2.\n");
+        return sp;
+     }
+     
+     if (!O_SET_INTERACTIVE(ip, current_object))
+     {
+        error("start_mccp_compress() must be called inside the interactive\n");
+        return sp;
+     }
+ 
+     free_svalue(sp);
+     retval=start_compress(ip,mccpver);
+     put_number(sp,retval);
+     
+     return sp;
+ }
+ svalue_t *
+ 
+ f_end_mccp_compress (svalue_t * sp)
+ {
+    interactive_t *ip;
+    int retval;
+    
+    if (!O_SET_INTERACTIVE(ip, current_object))
+    {
+       error("end_mccp_compress() must be called inside the interactive\n");
+       return sp;
+    }
+ 
+    retval=end_compress(ip);
+    sp++;
+    put_number(sp,retval);
+    
+    return sp;
+ }
+ 
+ 
+ svalue_t *
+ f_query_mccp (svalue_t * sp)
+ /* EFUN query_mccp()
+  *
+  * int query_mccp(object ob)
+  *
+  * this efun returns 0 if no mccp is used for interactive ob.
+  * if ob|this_player uses mccp it returns TELOPT_COMPRESS or
+  * TELOPT_COMPRESS2
+  */
+ {
+   interactive_t *ip;
+ 
+   /* Make sure the object is interactive */
+   if (!(O_SET_INTERACTIVE (ip, sp->u.ob)) || ip->closing)
+     {
+       error ("Bad arg 1 to query_mccp(): object not interactive.\n");
+       return sp;
+     }
+ 
+   free_svalue (sp);
+   put_number (sp, ip->compressing);
+ 
+   return sp;
+ }				/* query_mccp() */
+ 
+ svalue_t *
+ f_query_mccp_stats (svalue_t * sp)
+ /* EFUN query_mccp_stats()
+  *
+  * int *query_mccp_stats(object ob)
+  *
+  * if the connection of interactive ob ( or this_object() if ob==0 )
+  * is compressed it returns an array with zlib statistics
+  * ({ total_in, total_out }) ( uncompressed/compressed)
+  *
+  */
+ {
+   interactive_t *ip;
+   vector_t *mccp_stats;
+ 
+   /* Make sure the object is interactive */
+   if (!(O_SET_INTERACTIVE (ip, sp->u.ob)) || ip->closing)
+     {
+       error ("Bad arg 1 to query_mccp_stats(): object not interactive.\n");
+       return sp;
+     }
+ 
+   free_svalue (sp);
+ 
+   if (ip->compressing > 0)
+     {
+       mccp_stats = allocate_uninit_array (2);
+       put_number (mccp_stats->item, ip->out_compress->total_in);
+       put_number (mccp_stats->item + 1, ip->out_compress->total_out);
+       put_array (sp, mccp_stats);
+     }
+   else
+     {
+       put_number (sp, 0);
+     }
+ 
+ 
+   return sp;
+ }				/* query_mccp_stats() */
+ 
+ 
+ 
+ /*
+  * the rest of the file is sligthly modified taken from the mccp-site so
+  * the header of the original file remains here:
+  */
+ 
+ /*
+  * mccp.c - support functions for the Mud Client Compression Protocol
+  *
+  * see http://www.randomly.org/projects/MCCP/
+  *
+  * Copyright (c) 1999, Oliver Jowett <oliver@randomly.org>
+  *
+  * This code may be freely distributed and used if this copyright
+  * notice is retained intact.
+  */
+ 
+ void *
+ zlib_alloc (void *opaque, unsigned int items, unsigned int size)
+ {
+   return calloc (items, size);
+ }
+ 
+ void
+ zlib_free (void *opaque, void *address)
+ {
+   free (address);
+ }
+ 
+ 
+ static int
+ start_compress (interactive_t * ip, unsigned char telopt)
+ {
+   z_stream *s;
+ 
+   /* already compressing */
+   if (ip->out_compress)
+     return 1;
+ 
+   /* allocate and init stream, buffer */
+   s = (z_stream *) malloc (sizeof (*s));
+   ip->out_compress_buf = (unsigned char *) malloc (COMPRESS_BUF_SIZE);
+ 
+   s->next_in = NULL;
+   s->avail_in = 0;
+   s->next_out = ip->out_compress_buf;
+   s->avail_out = COMPRESS_BUF_SIZE;
+   s->zalloc = zlib_alloc;
+   s->zfree = zlib_free;
+   s->opaque = NULL;
+ 
+   if (deflateInit (s, 9) != Z_OK)
+     {
+       free (ip->out_compress_buf);
+       free (s);
+       return 0;
+     }
+ 
+   /* version 1 or 2 support */
+   if (telopt == TELOPT_COMPRESS)
+     {
+       DTF (("%s TDEBUG: send IAC SB %02x WILL SE\n", time_stamp (), telopt));
+       SEND_TELNET_COMMAND (add_message ("%c", IAC);
+ 			   add_message ("%c%c%c%c", SB, telopt, WILL, SE);
+ 			   add_message (message_flush););
+     }
+   else if (telopt == TELOPT_COMPRESS2)
+     {
+       DTF (("%s TDEBUG: send IAC SB %02x WILL SE\n", time_stamp (), telopt));
+       SEND_TELNET_COMMAND (add_message ("%c", IAC);
+ 			   add_message ("%c%c%c%c", SB, telopt, IAC, SE);
+ 			   add_message (message_flush););
+     }
+   else
+     {
+       printf ("Bad teleoption %d passed", telopt);
+       free (ip->out_compress_buf);
+       free (s);
+       return 0;
+     }
+ 
+   ip->compressing = telopt;
+   ip->out_compress = s;
+ 
+   printf("%s MCCP-DEBUG: '%s' mccp started (%d)\n", time_stamp(), get_txt(ip->ob->name),telopt);
+   
+   /* success */
+   return 1;
+ }
+ 
+ /* Try to send any pending compressed-but-not-sent data in `desc' */
+ int
+ process_compressed (interactive_t * ip)
+ {
+   int iStart, nBlock, nWrite, len;
+ 
+   if (!ip->out_compress)
+     return 1;
+ 
+   len = ip->out_compress->next_out - ip->out_compress_buf;
+   if (len > 0)
+     {
+       for (iStart = 0; iStart < len; iStart += nWrite)
+ 	{
+ 	  nBlock = UMIN (len - iStart, 4096);
+ 	  if ((nWrite =
+ 	       write (ip->socket, ip->out_compress_buf + iStart, nBlock)) < 0)
+ 	    {
+ 	      if (errno == EAGAIN || errno == ENOSR)
+ 		break;
+ 
+ 	      /* write error */
+ 	      return 0;
+ 	    }
+ 	  if (nWrite <= 0)
+ 	    break;
+ 	}
+ 
+       if (iStart)
+ 	{
+ 	  if (iStart < len)
+ 	    memmove (ip->out_compress_buf, ip->out_compress_buf + iStart,
+ 		     len - iStart);
+ 
+ 	  ip->out_compress->next_out = ip->out_compress_buf + len - iStart;
+ 	}
+     }
+ 
+   /* success */
+   return 1;
+ }
+ 
+  /* Cleanly shut down compression on `desc' */
+ static int
+ end_compress (interactive_t * ip)
+ {
+   unsigned char dummy[1];
+ 
+   if (!ip->out_compress)
+     return 1;
+ 
+   ip->out_compress->avail_in = 0;
+   ip->out_compress->next_in = dummy;
+ 
+   /* No terminating signature is needed - receiver will get Z_STREAM_END */
+   if (deflate (ip->out_compress, Z_FINISH) != Z_STREAM_END)
+     return 0;
+ 
+   /* try to send any residual data */
+   if (!process_compressed (ip))
+     return 0;
+ 
+   /* reset compression values */
+   deflateEnd (ip->out_compress);
+   free (ip->out_compress_buf);
+   free (ip->out_compress);
+   ip->compressing = 0;
+   ip->out_compress = NULL;
+   ip->out_compress_buf = NULL;
+ 
+   printf("%s MCCP-DEBUG: '%s' mccp ended\n", time_stamp(), get_txt(ip->ob->name));
+ 
+   /* success */
+   return 1;
+ }
+ #endif
diff --new-file -c5 -r 3-3.orig/src/comm.h 3-3.export/src/comm.h
*** 3-3.orig/src/comm.h	Fri Feb  8 07:03:48 2002
--- 3-3.export/src/comm.h	Sat Feb 16 16:52:55 2002
***************
*** 3,12 ****
--- 3,16 ----
  
  #include "driver.h"
  #include "typedefs.h"
  #include <sys/types.h>
  
+ #ifdef USE_MCCP
+ # include <zlib.h>
+ #endif
+ 
  #include "simulate.h"   /* callback_t for input_to_t */
  #include "svalue.h"
  
  /* TODO: Make the following a separate "my-socket.h" include, also
   * TODO:: to be used in access_check.h instead of comm.h.
***************
*** 165,174 ****
--- 169,185 ----
         * and a terminating '\0'.
         */
  
      char message_buf[MAX_SOCKET_PACKET_SIZE];
        /* The send buffer. */
+ 
+ #ifdef USE_MCCP
+    unsigned char   compressing;                 /* MCCP support */
+    z_stream      * out_compress;                /* MCCP support */
+    unsigned char * out_compress_buf;            /* MCCP support */
+ #endif   
+    
  };
  
  /* --- Bitflags and masks for interactive.noecho ---
   *
   * 'noecho' is a historical misnomer as it actually represents several
***************
*** 310,316 ****
--- 321,330 ----
  extern svalue_t *f_users(svalue_t *sp);
  
  #if defined(ACCESS_CONTROL)
  extern void refresh_access_data(void (*add_entry)(struct sockaddr_in *, int, long*) );
  #endif /* ACCESS_CONTROL */
+ 
+ #define COMPRESS_BUF_SIZE 8192
+ #define UMIN(a,b) ((a) < (b) ? (a) : (b))
  
  #endif /* COMM_H__ */
diff --new-file -c5 -r 3-3.orig/src/config.h.in 3-3.export/src/config.h.in
*** 3-3.orig/src/config.h.in	Sun Feb 10 10:11:19 2002
--- 3-3.export/src/config.h.in	Thu Feb 14 11:58:33 2002
***************
*** 305,314 ****
--- 305,319 ----
  /* Define this if you want mySQL support (assuming that your host
   * actually offers this.
   */
  @cdef_use_mysql@ USE_MYSQL
  
+ /* Define this if you want MCCP (Mud Control Compression Protocol).
+  */
+ 
+ @cdef_use_mccp@ USE_MCCP
+ 
  /* Define this if you want PCRE instead of traditional regexps.
   */
  
  @cdef_use_pcre@ USE_PCRE
  
diff --new-file -c5 -r 3-3.orig/src/configure 3-3.export/src/configure
*** 3-3.orig/src/configure	Sun Feb 10 10:11:19 2002
--- 3-3.export/src/configure	Thu Feb 14 11:58:33 2002
***************
*** 54,63 ****
--- 54,66 ----
          Enables alist support"
  ac_help="$ac_help
    --enable-use-mysql                  default=disabled
          Enables mySQL support"
  ac_help="$ac_help
+   --enable-use-mccp                   default=disabled
+         Enables MCCP support"
+ ac_help="$ac_help
    --enable-use-pcre                   default=disabled
          Enables PCRE instead of traditional regexps"
  ac_help="$ac_help
    --enable-use-deprecated             default=enabled
          Enables obsolete and deprecated efuns"
***************
*** 211,224 ****
  localstatedir='${prefix}/var'
  libdir='${exec_prefix}/lib'
  includedir='${prefix}/include'
  oldincludedir='/usr/include'
  infodir='${prefix}/info'
- guidedir='${prefix}/guide'
- htmldir='${prefix}/html'
- psdir='${prefix}/ps'
- dvidir='${prefix}/dvi'
  mandir='${prefix}/man'
  
  # Initialize some other variables.
  subdirs=
  MFLAGS= MAKEFLAGS=
--- 214,223 ----
***************
*** 332,345 ****
    --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
    --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
    --includedir=DIR        C header files in DIR [PREFIX/include]
    --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
    --infodir=DIR           info documentation in DIR [PREFIX/info]
-   --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
-   --htmldir=DIR           HTML documentation in DIR [PREFIX/html]
-   --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
-   --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
    --mandir=DIR            man documentation in DIR [PREFIX/man]
    --srcdir=DIR            find the sources in DIR [configure dir or ..]
    --program-prefix=PREFIX prepend PREFIX to installed program names
    --program-suffix=SUFFIX append SUFFIX to installed program names
    --program-transform-name=PROGRAM
--- 331,340 ----
***************
*** 378,403 ****
    -infodir | --infodir | --infodi | --infod | --info | --inf)
      ac_prev=infodir ;;
    -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
      infodir="$ac_optarg" ;;
  
-  -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
-    ac_prev=guidedir ;;
-  -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
- 
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* |--htm=*)+    htmldir="$ac_optarg" ;;
- 
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
- 
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
- 
    -libdir | --libdir | --libdi | --libd)
      ac_prev=libdir ;;
    -libdir=* | --libdir=* | --libdi=* | --libd=*)
      libdir="$ac_optarg" ;;
  
--- 373,382 ----
***************
*** 820,829 ****
--- 799,816 ----
    enableval="$enable_use_mysql"
    :
  fi
  
  
+ DEFAULTenable_use_mccp=no
+ # Check whether --enable-use-mccp or --disable-use-mccp was given.
+ if test "${enable_use_mccp+set}" = set; then
+   enableval="$enable_use_mccp"
+   :
+ fi
+ 
+ 
  DEFAULTenable_use_pcre=no
  # Check whether --enable-use-pcre or --disable-use-pcre was given.
  if test "${enable_use_pcre+set}" = set; then
    enableval="$enable_use_pcre"
    :
***************
*** 1420,1429 ****
--- 1407,1426 ----
    cdef_use_alists="#define"
  else
    cdef_use_alists="#undef"
  fi
  
+ if test "x$enable_use_mccp" = "x" && test "x$DEFAULTenable_use_mccp" != "x"; then
+   enable_use_mccp=$DEFAULTenable_use_mccp
+ fi
+ 
+ if test "x$enable_use_mccp" = "xyes"; then
+   cdef_use_mccp="#define"
+ else
+   cdef_use_mccp="#undef"
+ fi
+ 
  if test "x$enable_use_pcre" = "x" && test "x$DEFAULTenable_use_pcre" != "x"; then
    enable_use_pcre=$DEFAULTenable_use_pcre
  fi
  
  if test "x$enable_use_pcre" = "xyes"; then
***************
*** 2004,2014 ****
  
  
  # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2010: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
--- 2001,2011 ----
  
  
  # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2007: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
***************
*** 2031,2139 ****
  else
    echo "$ac_t""no" 1>&6
  fi
  
  if test -z "$CC"; then
-   # Extract the first word of "bcc", so it can be a program name with args.
- set dummy bcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:2040: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test -n "$CC"; then
-   ac_cv_prog_CC="$CC" # Let the user override the test.
- else
-   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-   ac_dummy="$PATH"
-   for ac_dir in $ac_dummy; do
-     test -z "$ac_dir" && ac_dir=.
-     if test -f $ac_dir/$ac_word; then
-       ac_cv_prog_CC="bcc"
-       break
-     fi
-   done
-   IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
-   echo "$ac_t""$CC" 1>&6
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
- fi
- if test -z "$CC"; then
-   machine=`(uname -m 2>/dev/null)` || machine=unknown
-   case "$machine" in
-     BePC) # Extract the first word of "mwccx86", so it can be a program name with args.
- set dummy mwccx86; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:2073: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test -n "$CC"; then
-   ac_cv_prog_CC="$CC" # Let the user override the test.
- else
-   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-   ac_dummy="$PATH"
-   for ac_dir in $ac_dummy; do
-     test -z "$ac_dir" && ac_dir=.
-     if test -f $ac_dir/$ac_word; then
-       ac_cv_prog_CC="mwccx86"
-       break
-     fi
-   done
-   IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
-   echo "$ac_t""$CC" 1>&6
- else
-   echo "$ac_t""no" 1>&6
- fi
-  ;;
-     BeBox | BeMac ) # Extract the first word of "mwcc", so it can be a program name with args.
- set dummy mwcc; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
- echo "configure:2102: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   if test -n "$CC"; then
-   ac_cv_prog_CC="$CC" # Let the user override the test.
- else
-   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-   ac_dummy="$PATH"
-   for ac_dir in $ac_dummy; do
-     test -z "$ac_dir" && ac_dir=.
-     if test -f $ac_dir/$ac_word; then
-       ac_cv_prog_CC="mwcc"
-       break
-     fi
-   done
-   IFS="$ac_save_ifs"
- fi
- fi
- CC="$ac_cv_prog_CC"
- if test -n "$CC"; then
-   echo "$ac_t""$CC" 1>&6
- else
-   echo "$ac_t""no" 1>&6
- fi
-  ;;
-     *) ;;
-   esac
- fi
- 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2135: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
--- 2028,2041 ----
  else
    echo "$ac_t""no" 1>&6
  fi
  
  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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2037: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
***************
*** 2174,2191 ****
    echo "$ac_t""$CC" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  
! fi
! if test -z "$CC"; then
!   case "`uname -s`" in
!   *win32* | *WIN32*)
!     # Extract the first word of "cl", so it can be a program name with args.
  set dummy cl; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2187: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
--- 2076,2092 ----
    echo "$ac_t""$CC" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  
!   if test -z "$CC"; then
!     case "`uname -s`" in
!     *win32* | *WIN32*)
!       # Extract the first word of "cl", so it can be a program name with args.
  set dummy cl; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2088: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$CC"; then
    ac_cv_prog_CC="$CC" # Let the user override the test.
***************
*** 2207,2238 ****
    echo "$ac_t""$CC" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
   ;;
!   esac
  fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:2218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  cross_compiling=$ac_cv_prog_cc_cross
  
  cat > conftest.$ac_ext << EOF
  
! #line 2229 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ac_cv_prog_cc_works=yes
    # If we can't run a trivial program, we are probably using a cross compiler.
    if (./conftest; exit) 2>/dev/null; then
      ac_cv_prog_cc_cross=no
    else
--- 2108,2140 ----
    echo "$ac_t""$CC" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
   ;;
!     esac
!   fi
!   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:2120: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  cross_compiling=$ac_cv_prog_cc_cross
  
  cat > conftest.$ac_ext << EOF
  
! #line 2131 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ac_cv_prog_cc_works=yes
    # If we can't run a trivial program, we are probably using a cross compiler.
    if (./conftest; exit) 2>/dev/null; then
      ac_cv_prog_cc_cross=no
    else
***************
*** 2254,2278 ****
  echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  if test $ac_cv_prog_cc_works = no; then
    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:2265: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.c <<EOF
  #ifdef __GNUC__
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
  fi
  fi
--- 2156,2180 ----
  echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  if test $ac_cv_prog_cc_works = no; then
    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:2162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:2167: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.c <<EOF
  #ifdef __GNUC__
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
  fi
  fi
***************
*** 2287,2297 ****
  
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:2293: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.c
  if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
--- 2189,2199 ----
  
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:2195: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    echo 'void f(){}' > conftest.c
  if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
***************
*** 2317,2366 ****
      CFLAGS="-O2"
    else
      CFLAGS=
    fi
  fi
- case "$CC" in
-   bcc )
-     AR=${AR-mwld}
-     LD=${LD-mwld}
-     RANLIB=${RANLIB-true};;
-   mwcc )
-     CC="mwcc -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib -nodup"
-     AR=${AR-mwld}
-     LD=${LD-mwld}
-     RANLIB=${RANLIB-true};;
-   mwccx86 )
-     CC="mwccx86 -I- -I. -I/boot/apps/GeekGadgets/include -L/boot/apps/GeekGadgets/lib"
-     AR=${AR-mwldx86}
-     LD=${LD-mwldx86}
-     RANLIB=${RANLIB-true};;
-   ${host_alias}-gcc)
-     ;;
-   *)
-     AR=${AR-ar}
-     LD=${LD-ld}
-     RANLIB=${RANLIB-ranlib};;
- esac
  
-  
  
  # The newer versions of gcc/egcs running on SunOS fall into catatonia when
  # asked to compile this test with any optimisation. To be able to run
  # configure at all, we fudge the CFLAGS a bit.
  
  save_cflags=$CFLAGS
  echo "For this test, I use '-g' instead of '$CFLAGS' as compiler flags."
  CFLAGS="-g"
  
  echo $ac_n "checking gcc/assembler float/branch incompatibility, e.g. on AIX""... $ac_c" 1>&6
! echo "configure:2357: checking gcc/assembler float/branch incompatibility, e.g. on AIX" >&5
  if eval "test \"`echo '$''{'lp_cv_sys_float_branch_incompatible'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2362 "configure"
  #include "confdefs.h"
  int foo(), bar(), foobar();
  #define x1 foobar();
  #define x4 x1 x1 x1 x1
  #define x10 x4 x4 x4 x4
--- 2219,2245 ----
      CFLAGS="-O2"
    else
      CFLAGS=
    fi
  fi
  
  
  # The newer versions of gcc/egcs running on SunOS fall into catatonia when
  # asked to compile this test with any optimisation. To be able to run
  # configure at all, we fudge the CFLAGS a bit.
  
  save_cflags=$CFLAGS
  echo "For this test, I use '-g' instead of '$CFLAGS' as compiler flags."
  CFLAGS="-g"
  
  echo $ac_n "checking gcc/assembler float/branch incompatibility, e.g. on AIX""... $ac_c" 1>&6
! echo "configure:2236: checking gcc/assembler float/branch incompatibility, e.g. on AIX" >&5
  if eval "test \"`echo '$''{'lp_cv_sys_float_branch_incompatible'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2241 "configure"
  #include "confdefs.h"
  int foo(), bar(), foobar();
  #define x1 foobar();
  #define x4 x1 x1 x1 x1
  #define x10 x4 x4 x4 x4
***************
*** 2382,2392 ****
  double d = 4.5;
  int main() {
  double e = 1.3; e/= 0.2;
  ; return 0; }
  EOF
! if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    lp_cv_sys_float_branch_incompatible=no
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2261,2271 ----
  double d = 4.5;
  int main() {
  double e = 1.3; e/= 0.2;
  ; return 0; }
  EOF
! if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    lp_cv_sys_float_branch_incompatible=no
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 2406,2416 ****
  
  # Restore the CFLAGS
  CFLAGS=$save_cflags
  
  cat > conftest.$ac_ext <<EOF
! #line 2412 "configure"
  #include "confdefs.h"
  
  #ifndef __STDC__
  #error need STDC
  guarantee an compiling error here...
--- 2285,2295 ----
  
  # Restore the CFLAGS
  CFLAGS=$save_cflags
  
  cat > conftest.$ac_ext <<EOF
! #line 2291 "configure"
  #include "confdefs.h"
  
  #ifndef __STDC__
  #error need STDC
  guarantee an compiling error here...
***************
*** 2418,2428 ****
  
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:2424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    :
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2297,2307 ----
  
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:2303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    :
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 2458,2483 ****
  # incompatible versions:
  # SysV /etc/install, /usr/sbin/install
  # SunOS /usr/etc/install
  # IRIX /sbin/install
  # AIX /bin/install
- # AmigaOS /c/install
  # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  # 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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:2470: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
      IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
    for ac_dir in $PATH; do
      # Account for people who put trailing slashes in PATH elements.
      case "$ac_dir/" in
!     /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
      *)
        # OSF1 and SCO ODT 3.0 have their own names for install.
        # Don't use installbsd from OSF since it installs stuff as root
        # by default.
        for ac_prog in ginstall scoinst install; do
--- 2337,2361 ----
  # incompatible versions:
  # SysV /etc/install, /usr/sbin/install
  # SunOS /usr/etc/install
  # IRIX /sbin/install
  # AIX /bin/install
  # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  # 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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:2348: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
      IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
    for ac_dir in $PATH; do
      # Account for people who put trailing slashes in PATH elements.
      case "$ac_dir/" in
!     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
      *)
        # OSF1 and SCO ODT 3.0 have their own names for install.
        # Don't use installbsd from OSF since it installs stuff as root
        # by default.
        for ac_prog in ginstall scoinst install; do
***************
*** 2522,2532 ****
  for ac_prog in byacc
  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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2528: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$YACC"; then
    ac_cv_prog_YACC="$YACC" # Let the user override the test.
--- 2400,2410 ----
  for ac_prog in byacc
  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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:2406: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test -n "$YACC"; then
    ac_cv_prog_YACC="$YACC" # Let the user override the test.
***************
*** 2553,2563 ****
  test -n "$YACC" && break
  done
  test -n "$YACC" || YACC="yacc"
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:2559: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
  fi
  if test -z "$CPP"; then
--- 2431,2441 ----
  test -n "$YACC" && break
  done
  test -n "$YACC" || YACC="yacc"
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:2437: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
  fi
  if test -z "$CPP"; then
***************
*** 2568,2618 ****
    # substituted into the Makefile and "${CC-cc}" will confuse make.
    CPP="${CC-cc} -E"
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 2574 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 2591 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 2608 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
--- 2446,2496 ----
    # substituted into the Makefile and "${CC-cc}" will confuse make.
    CPP="${CC-cc} -E"
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 2452 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 2469 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 2486 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
  else
    echo "$ac_err" >&5
***************
*** 2635,2645 ****
  echo "$ac_t""$CPP" 1>&6
  
  
  
  cat > conftest.$ac_ext <<EOF
! #line 2641 "configure"
  #include "confdefs.h"
  
  #if defined(__EMX__)
  yes
  #endif
--- 2513,2523 ----
  echo "$ac_t""$CPP" 1>&6
  
  
  
  cat > conftest.$ac_ext <<EOF
! #line 2519 "configure"
  #include "confdefs.h"
  
  #if defined(__EMX__)
  yes
  #endif
***************
*** 2652,2662 ****
  fi
  rm -f conftest*
  
  
  cat > conftest.$ac_ext <<EOF
! #line 2658 "configure"
  #include "confdefs.h"
  
  #if defined(__CYGWIN32__) || defined(__CYGWIN__)
  yes
  #endif
--- 2530,2540 ----
  fi
  rm -f conftest*
  
  
  cat > conftest.$ac_ext <<EOF
! #line 2536 "configure"
  #include "confdefs.h"
  
  #if defined(__CYGWIN32__) || defined(__CYGWIN__)
  yes
  #endif
***************
*** 2673,2693 ****
  
  for ac_hdr in sys/rusage.h sys/time.h unistd.h stdlib.h libc.h memory.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2679: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2684 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
--- 2551,2571 ----
  
  for ac_hdr in sys/rusage.h sys/time.h unistd.h stdlib.h libc.h memory.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2557: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2562 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
***************
*** 2713,2733 ****
  
  for ac_hdr in values.h string.h bstring.h netdb.h crypt.h sys/param.h sys/termios.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2719: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2724 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
--- 2591,2611 ----
  
  for ac_hdr in values.h string.h bstring.h netdb.h crypt.h sys/param.h sys/termios.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2597: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2602 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
***************
*** 2750,2773 ****
    echo "$ac_t""no" 1>&6
  fi
  done
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:2756: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2761 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
  #include <string.h>
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    ac_cv_header_stdc=yes
  else
--- 2628,2651 ----
    echo "$ac_t""no" 1>&6
  fi
  done
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:2634: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2639 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
  #include <string.h>
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    ac_cv_header_stdc=yes
  else
***************
*** 2780,2790 ****
  rm -f conftest*
  
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2786 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    egrep "memchr" >/dev/null 2>&1; then
--- 2658,2668 ----
  rm -f conftest*
  
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 2664 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    egrep "memchr" >/dev/null 2>&1; then
***************
*** 2798,2808 ****
  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 <<EOF
! #line 2804 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    egrep "free" >/dev/null 2>&1; then
--- 2676,2686 ----
  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 <<EOF
! #line 2682 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    egrep "free" >/dev/null 2>&1; then
***************
*** 2819,2840 ****
    # /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 <<EOF
! #line 2825 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  #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); }
  
  EOF
! if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2697,2718 ----
    # /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 <<EOF
! #line 2703 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  #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); }
  
  EOF
! if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 2857,2877 ****
  
  for ac_hdr in limits.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2863: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2868 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
--- 2735,2755 ----
  
  for ac_hdr in limits.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2741: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2746 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
    eval "ac_cv_header_$ac_safe=yes"
  else
***************
*** 2898,2921 ****
  ac_header_dirent=no
  for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:2904: checking for $ac_hdr that defines DIR" >&5
  if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2909 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_hdr>
  int main() {
  DIR *dirp = 0;
  ; return 0; }
  EOF
! if { (eval echo configure:2917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_header_dirent_$ac_safe=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2776,2799 ----
  ac_header_dirent=no
  for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
! echo "configure:2782: checking for $ac_hdr that defines DIR" >&5
  if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2787 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <$ac_hdr>
  int main() {
  DIR *dirp = 0;
  ; return 0; }
  EOF
! if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_header_dirent_$ac_safe=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 2936,2965 ****
  fi
  done
  # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  if test $ac_header_dirent = dirent.h; then
  echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:2942: checking for opendir in -ldir" >&5
  ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldir  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2950 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
  int main() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2814,2843 ----
  fi
  done
  # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  if test $ac_header_dirent = dirent.h; then
  echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
! echo "configure:2820: checking for opendir in -ldir" >&5
  ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-ldir  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2828 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
  int main() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 2977,3006 ****
    echo "$ac_t""no" 1>&6
  fi
  
  else
  echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:2983: checking for opendir in -lx" >&5
  ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lx  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2991 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
  int main() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2855,2884 ----
    echo "$ac_t""no" 1>&6
  fi
  
  else
  echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
! echo "configure:2861: checking for opendir in -lx" >&5
  ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lx  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2869 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char opendir();
  
  int main() {
  opendir()
  ; return 0; }
  EOF
! if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3020,3049 ****
  
  fi
  
  
  echo $ac_n "checking size of char *""... $ac_c" 1>&6
! echo "configure:3026: checking size of char *" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3034 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(char *));
    exit(0);
  }
  EOF
! if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_char_p=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2898,2928 ----
  
  fi
  
  
  echo $ac_n "checking size of char *""... $ac_c" 1>&6
! echo "configure:2904: checking size of char *" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2912 "configure"
  #include "confdefs.h"
  #include <stdio.h>
+ #include <sys/types.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(char *));
    exit(0);
  }
  EOF
! if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_char_p=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3059,3088 ****
  #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
  EOF
  
  
  echo $ac_n "checking size of int""... $ac_c" 1>&6
! echo "configure:3065: checking size of int" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3073 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(int));
    exit(0);
  }
  EOF
! if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_int=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2938,2968 ----
  #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
  EOF
  
  
  echo $ac_n "checking size of int""... $ac_c" 1>&6
! echo "configure:2944: checking size of int" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2952 "configure"
  #include "confdefs.h"
  #include <stdio.h>
+ #include <sys/types.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(int));
    exit(0);
  }
  EOF
! if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_int=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3098,3127 ****
  #define SIZEOF_INT $ac_cv_sizeof_int
  EOF
  
  
  echo $ac_n "checking size of short""... $ac_c" 1>&6
! echo "configure:3104: checking size of short" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3112 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(short));
    exit(0);
  }
  EOF
! if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_short=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 2978,3008 ----
  #define SIZEOF_INT $ac_cv_sizeof_int
  EOF
  
  
  echo $ac_n "checking size of short""... $ac_c" 1>&6
! echo "configure:2984: checking size of short" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2992 "configure"
  #include "confdefs.h"
  #include <stdio.h>
+ #include <sys/types.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(short));
    exit(0);
  }
  EOF
! if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_short=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3137,3166 ****
  #define SIZEOF_SHORT $ac_cv_sizeof_short
  EOF
  
  
  echo $ac_n "checking size of long""... $ac_c" 1>&6
! echo "configure:3143: checking size of long" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3151 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(long));
    exit(0);
  }
  EOF
! if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_long=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3018,3048 ----
  #define SIZEOF_SHORT $ac_cv_sizeof_short
  EOF
  
  
  echo $ac_n "checking size of long""... $ac_c" 1>&6
! echo "configure:3024: checking size of long" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3032 "configure"
  #include "confdefs.h"
  #include <stdio.h>
+ #include <sys/types.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(long));
    exit(0);
  }
  EOF
! if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_long=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3177,3201 ****
  EOF
  
  
  
  echo $ac_n "checking for needed malloc() alignment""... $ac_c" 1>&6
! echo "configure:3183: checking for needed malloc() alignment" >&5
  if eval "test \"`echo '$''{'lp_cv_sys_malloc_align'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3188 "configure"
  #include "confdefs.h"
  struct ts {double d; char *p; double e;};
  int i = 96/(sizeof(struct ts)-20);
  
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_sys_malloc_align=8
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3059,3083 ----
  EOF
  
  
  
  echo $ac_n "checking for needed malloc() alignment""... $ac_c" 1>&6
! echo "configure:3065: checking for needed malloc() alignment" >&5
  if eval "test \"`echo '$''{'lp_cv_sys_malloc_align'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3070 "configure"
  #include "confdefs.h"
  struct ts {double d; char *p; double e;};
  int i = 96/(sizeof(struct ts)-20);
  
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_sys_malloc_align=8
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3210,3233 ****
  #define MALLOC_ALIGN $lp_cv_sys_malloc_align
  EOF
  
  
  echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
! echo "configure:3216: checking for ssize_t" >&5
  if eval "test \"`echo '$''{'lp_cv_type_ssize_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3221 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  ssize_t i;
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_type_ssize_t=yes
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3092,3115 ----
  #define MALLOC_ALIGN $lp_cv_sys_malloc_align
  EOF
  
  
  echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
! echo "configure:3098: checking for ssize_t" >&5
  if eval "test \"`echo '$''{'lp_cv_type_ssize_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3103 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  ssize_t i;
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_type_ssize_t=yes
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3244,3266 ****
  EOF
  
  fi
  
  echo $ac_n "checking for long long""... $ac_c" 1>&6
! echo "configure:3250: checking for long long" >&5
  if eval "test \"`echo '$''{'lp_cv_type_long_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3255 "configure"
  #include "confdefs.h"
  long long i;
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_type_long_long=yes
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3126,3148 ----
  EOF
  
  fi
  
  echo $ac_n "checking for long long""... $ac_c" 1>&6
! echo "configure:3132: checking for long long" >&5
  if eval "test \"`echo '$''{'lp_cv_type_long_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3137 "configure"
  #include "confdefs.h"
  long long i;
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_type_long_long=yes
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3275,3304 ****
    cat >> confdefs.h <<\EOF
  #define HAVE_LONG_LONG 1
  EOF
  
    echo $ac_n "checking size of long long""... $ac_c" 1>&6
! echo "configure:3281: checking size of long long" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3289 "configure"
  #include "confdefs.h"
  #include <stdio.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(long long));
    exit(0);
  }
  EOF
! if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_long_long=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3157,3187 ----
    cat >> confdefs.h <<\EOF
  #define HAVE_LONG_LONG 1
  EOF
  
    echo $ac_n "checking size of long long""... $ac_c" 1>&6
! echo "configure:3163: checking size of long long" >&5
  if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 3171 "configure"
  #include "confdefs.h"
  #include <stdio.h>
+ #include <sys/types.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(long long));
    exit(0);
  }
  EOF
! if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_sizeof_long_long=`cat conftestval`
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3316,3338 ****
  
  
  fi
  
  echo $ac_n "checking for bool""... $ac_c" 1>&6
! echo "configure:3322: checking for bool" >&5
  if eval "test \"`echo '$''{'lp_cv_type_bool'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3327 "configure"
  #include "confdefs.h"
  bool b;
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_type_bool=yes
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3199,3221 ----
  
  
  fi
  
  echo $ac_n "checking for bool""... $ac_c" 1>&6
! echo "configure:3205: checking for bool" >&5
  if eval "test \"`echo '$''{'lp_cv_type_bool'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3210 "configure"
  #include "confdefs.h"
  bool b;
  int main() {
  
  ; return 0; }
  EOF
! if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    lp_cv_type_bool=yes
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3349,3373 ****
  EOF
  
  fi
  
  echo $ac_n "checking for inline""... $ac_c" 1>&6
! echo "configure:3355: checking for inline" >&5
  if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_inline=no
  for ac_kw in inline __inline__ __inline; do
    cat > conftest.$ac_ext <<EOF
! #line 3362 "configure"
  #include "confdefs.h"
  
  int main() {
  } $ac_kw foo() {
  ; return 0; }
  EOF
! if { (eval echo configure:3369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_inline=$ac_kw; break
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3232,3256 ----
  EOF
  
  fi
  
  echo $ac_n "checking for inline""... $ac_c" 1>&6
! echo "configure:3238: checking for inline" >&5
  if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_inline=no
  for ac_kw in inline __inline__ __inline; do
    cat > conftest.$ac_ext <<EOF
! #line 3245 "configure"
  #include "confdefs.h"
  
  int main() {
  } $ac_kw foo() {
  ; return 0; }
  EOF
! if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_inline=$ac_kw; break
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3396,3411 ****
  EOF
  
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:3402: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3407 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #include <stddef.h>
--- 3279,3294 ----
  EOF
  
  fi
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:3285: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3290 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #include <stddef.h>
***************
*** 3429,3444 ****
  EOF
  
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:3435: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3440 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #include <stddef.h>
--- 3312,3327 ----
  EOF
  
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:3318: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3323 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
  #include <stdlib.h>
  #include <stddef.h>
***************
*** 3462,3477 ****
  EOF
  
  fi
  
  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:3468: checking return type of signal handlers" >&5
  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3473 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
  #ifdef signal
  #undef signal
--- 3345,3360 ----
  EOF
  
  fi
  
  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:3351: checking return type of signal handlers" >&5
  if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3356 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <signal.h>
  #ifdef signal
  #undef signal
***************
*** 3484,3494 ****
  
  int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:3490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_type_signal=void
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3367,3377 ----
  
  int main() {
  int i;
  ; return 0; }
  EOF
! if { (eval echo configure:3373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_type_signal=void
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3510,3535 ****
  #define RETSIGTYPE_VOID 1
  EOF
  fi
  
  echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
! echo "configure:3516: checking for main in -lm" >&5
  ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3524 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3393,3418 ----
  #define RETSIGTYPE_VOID 1
  EOF
  fi
  
  echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
! echo "configure:3399: checking for main in -lm" >&5
  ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3407 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3553,3578 ****
  else
    echo "$ac_t""no" 1>&6
  fi
  
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:3559: checking for main in -lsocket" >&5
  ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3567 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3436,3461 ----
  else
    echo "$ac_t""no" 1>&6
  fi
  
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:3442: checking for main in -lsocket" >&5
  ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3450 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3596,3621 ****
  else
    echo "$ac_t""no" 1>&6
  fi
  
  echo $ac_n "checking for main in -lucb""... $ac_c" 1>&6
! echo "configure:3602: checking for main in -lucb" >&5
  ac_lib_var=`echo ucb'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lucb  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3610 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3479,3504 ----
  else
    echo "$ac_t""no" 1>&6
  fi
  
  echo $ac_n "checking for main in -lucb""... $ac_c" 1>&6
! echo "configure:3485: checking for main in -lucb" >&5
  ac_lib_var=`echo ucb'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lucb  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3493 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3632,3657 ****
  else
    echo "$ac_t""no" 1>&6
  fi
  
  echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
! echo "configure:3638: checking for main in -lcrypt" >&5
  ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypt  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3646 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3515,3540 ----
  else
    echo "$ac_t""no" 1>&6
  fi
  
  echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
! echo "configure:3521: checking for main in -lcrypt" >&5
  ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lcrypt  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3529 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
***************
*** 3667,3694 ****
    LIBS="$LIBS -lcrypt"
  else
    echo "$ac_t""no" 1>&6
  fi
  
  if test $ac_cv_lib_socket_main = "yes" || test $ac_cv_lib_ucb_main = "yes"; then
        echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:3675: checking for main in -lnsl" >&5
  ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3683 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
--- 3550,3616 ----
    LIBS="$LIBS -lcrypt"
  else
    echo "$ac_t""no" 1>&6
  fi
  
+ if test $enable_use_mccp = yes; then
+   echo $ac_n "checking for main in -lz""... $ac_c" 1>&6
+ echo "configure:3558: checking for main in -lz" >&5
+ ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_

Showing the first 100 KB of 206.4 KB. Download the archive for the full file.

Site Stats

Snippets: 1791
Codebases: 571