]> git.pld-linux.org Git - packages/eggdrop.git/blob - eggdrop-ssl.patch
- refresh config.sub
[packages/eggdrop.git] / eggdrop-ssl.patch
1 diff -burN eggdrop1.6.15/acconfig.h eggdrop1.6.15-ssl/acconfig.h
2 --- eggdrop1.6.15/acconfig.h    2003-05-05 00:05:32.000000000 +0200
3 +++ eggdrop1.6.15-ssl/acconfig.h        2003-05-19 16:41:56.000000000 +0200
4 @@ -56,6 +56,9 @@
5  /* Defines extension of Eggdrop modules.  */
6  #undef EGG_MOD_EXT
7  
8 +/* Defines ssl mode  */
9 +#undef EGG_SSL_EXT
10 +
11  @BOTTOM@
12  
13  #endif /* !_EGG_CONFIG_H */
14 diff -burN eggdrop1.6.15/aclocal.m4 eggdrop1.6.15-ssl/aclocal.m4
15 --- eggdrop1.6.15/aclocal.m4    2003-05-05 00:09:24.000000000 +0200
16 +++ eggdrop1.6.15-ssl/aclocal.m4        2003-05-19 16:41:56.000000000 +0200
17 @@ -15,6 +15,62 @@
18  AC_MSG_RESULT()
19  ])dnl
20  
21 +dnl  EGG_SSL_CRAP()
22 +dnl
23 +AC_DEFUN(EGG_SSL_CRAP, [dnl
24 +#ssl checks - hoe
25 +AC_MSG_CHECKING(whether to include SSL support)
26 +AC_ARG_WITH(ssl,
27 +[  --with-ssl[=PATH]         Include SSL support (DIR is OpenSSL's install dir).],
28 +[
29 +  case "$withval" in
30 +    no)
31 +      AC_MSG_RESULT(no) ;;
32 +    yes)
33 +      AC_MSG_RESULT(yes)
34 +      AC_CHECK_LIB(ssl,SSL_accept,[AC_DEFINE(EGG_SSL_EXT)
35 +      SSL_LIBS="-lssl -lcrypto"],[AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])],-lcrypto)
36 +      ;;
37 +    *)
38 +dnl A whole whack of possible places where this might be
39 +      test -f $withval/openssl/ssl.h && SSL_INCLUDE="$withval"
40 +      test -f $withval/include/openssl/ssl.h && SSL_INCLUDE="$withval/include"
41 +
42 +      test -f $withval/lib/libssl.a && SSL_LIB="$withval/lib"
43 +      test -f $withval/lib/ssl/libssl.a && SSL_LIB="$withval/lib/ssl"
44 +      test -f $withval/lib/openssl/libssl.a && SSL_LIB="$withval/lib/openssl/ssl"
45 +      test -f $withval/libssl.a && SSL_LIB="$withval"
46 +      test -f $withval/ssl/libssl.a && SSL_LIB="$withval/ssl"
47 +      test -f $withval/openssl/libssl.a && SSL_LIB="$withval/openssl"
48 +
49 +      test -f $withval/lib/libcrypto.a && CRYPTO_LIB="$withval/lib"
50 +      test -f $withval/lib/ssl/libcrypto.a && CRYPTO_LIB="$withval/lib/ssl"
51 +      test -f $withval/lib/openssl/libcrypto.a && CRYPTO_LIB="$withval/lib/openssl/ssl"
52 +      test -f $withval/libcrypto.a && CRYPTO_LIB="$withval"
53 +      test -f $withval/ssl/libcrypto.a && CRYPTO_LIB="$withval/ssl"
54 +      test -f $withval/openssl/libcrypto.a && CRYPTO_LIB="$withval/openssl"
55 +
56 +      if test -n "$SSL_INCLUDE" && test -n "$SSL_LIB" && test -n "$CRYPTO_LIB"; then
57 +        SSL_LIBS="-lssl -lcrypto -L$SSL_LIB -L$CRYPTO_LIB";
58 +        AC_DEFINE(EGG_SSL_EXT)
59 +        AC_MSG_RESULT(yes)
60 +      else
61 +        AC_MSG_RESULT(no)
62 +        AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])
63 +      fi ;;
64 +  esac
65 +],[
66 +    AC_MSG_RESULT(will try to find)
67 +    AC_CHECK_LIB(ssl,SSL_accept,[AC_DEFINE(EGG_SSL_EXT)
68 +     SSL_LIBS="-lssl -lcrypto"],[AC_MSG_ERROR([OpenSSL was not found. Please supply a pathname to OpenSSL])],-lcrypto)
69 +    AC_CHECK_HEADERS("openssl/ssl.h",,[AC_MSG_ERROR([OpenSSL was not found. Please supply a pathname to OpenSSL])],)
70 +
71 +    AC_SUBST(SSL_LIBS)dnl
72 +    AC_SUBST(SSL_INCLUDE)dnl
73 +])
74 +
75 +#end of ssl checks - hoe
76 +])dnl
77  
78  dnl  EGG_MSG_CONFIGURE_END()
79  dnl
80 diff -burN eggdrop1.6.15/config.h.in eggdrop1.6.15-ssl/config.h.in
81 --- eggdrop1.6.15/config.h.in   2003-05-05 00:05:32.000000000 +0200
82 +++ eggdrop1.6.15-ssl/config.h.in       2003-05-19 16:41:57.000000000 +0200
83 @@ -60,6 +60,9 @@
84  /* Define to 1 if you have the `clock' function. */
85  #undef HAVE_CLOCK
86  
87 +/* Defines ssl mode  */
88 +#undef EGG_SSL_EXT 
89 +
90  /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
91     */
92  #undef HAVE_DIRENT_H
93 diff -burN eggdrop1.6.15/configure eggdrop1.6.15-ssl/configure
94 --- eggdrop1.6.15/configure     2003-05-05 00:08:25.000000000 +0200
95 +++ eggdrop1.6.15-ssl/configure 2003-05-19 16:41:57.000000000 +0200
96 @@ -1,6 +1,6 @@
97  #! /bin/sh
98  # Guess values for system-dependent variables and create Makefiles.
99 -# Generated by GNU Autoconf 2.54.
100 +# Generated by GNU Autoconf 2.57.
101  #
102  # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
103  # Free Software Foundation, Inc.
104 @@ -36,7 +36,10 @@
105  PS4='+ '
106  
107  # NLS nuisances.
108 -for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
109 +for as_var in \
110 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
111 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
112 +  LC_TELEPHONE LC_TIME
113  do
114    if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
115      eval $as_var=C; export $as_var
116 @@ -82,15 +85,15 @@
117  
118  # The user is always right.
119  if test "${PATH_SEPARATOR+set}" != set; then
120 -  echo "#! /bin/sh" >conftest.sh
121 -  echo  "exit 0"   >>conftest.sh
122 -  chmod +x conftest.sh
123 -  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
124 +  echo "#! /bin/sh" >conf$$.sh
125 +  echo  "exit 0"   >>conf$$.sh
126 +  chmod +x conf$$.sh
127 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
128      PATH_SEPARATOR=';'
129    else
130      PATH_SEPARATOR=:
131    fi
132 -  rm -f conftest.sh
133 +  rm -f conf$$.sh
134  fi
135  
136  
137 @@ -306,7 +309,7 @@
138  # include <unistd.h>
139  #endif"
140  
141 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS egg_ac_parameters CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S STRIP AWK BASENAME UNAME MOD_LD MOD_CC MOD_STRIP SHLIB_LD SHLIB_CC SHLIB_STRIP DEFAULT_MAKE MOD_EXT ENABLEIPV6 EGGEXEC TCLLIB TCLLIBFN TCLINC TCLINCFN TCL_REQS TCL_LIBS EGGVERSION DEST MOD_UPDIR LIBOBJS LTLIBOBJS'
142 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS egg_ac_parameters CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S STRIP AWK BASENAME UNAME MOD_LD MOD_CC MOD_STRIP SHLIB_LD SHLIB_CC SHLIB_STRIP DEFAULT_MAKE MOD_EXT ENABLEIPV6 EGGEXEC TCLLIB TCLLIBFN TCLINC TCLINCFN TCL_REQS TCL_LIBS SSL_LIBS SSL_INCLUDE EGGVERSION DEST MOD_UPDIR LIBOBJS LTLIBOBJS'
143  ac_subst_files=''
144  
145  # Initialize some variables set by options.
146 @@ -839,14 +842,14 @@
147    --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
148    --disable-cc-optimization  disable -O2 cflag
149    --enable-ipv6           enable IPv6 support
150 -  --disable-tcl-threads   Disable threaded Tcl support if detected. (Ignore this
151 -                          option unless you know what you are doing)
152 +  --disable-tcl-threads   disable threaded Tcl support if detected
153  
154  Optional Packages:
155    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
156    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
157    --with-tcllib=PATH      full path to Tcl library
158    --with-tclinc=PATH      full path to Tcl header
159 +  --with-ssl=PATH         Include SSL support (DIR is OpenSSL's install dir).
160  
161  Some influential environment variables:
162    CC          C compiler command
163 @@ -936,7 +939,7 @@
164  running configure, to aid debugging if configure makes a mistake.
165  
166  It was created by $as_me, which was
167 -generated by GNU Autoconf 2.54.  Invocation command line was
168 +generated by GNU Autoconf 2.57.  Invocation command line was
169  
170    $ $0 $@
171  
172 @@ -988,24 +991,54 @@
173  
174  # Keep a trace of the command line.
175  # Strip out --no-create and --no-recursion so they do not pile up.
176 +# Strip out --silent because we don't want to record it for future runs.
177  # Also quote any args containing shell meta-characters.
178 +# Make two passes to allow for proper duplicate-argument suppression.
179  ac_configure_args=
180 +ac_configure_args0=
181 +ac_configure_args1=
182  ac_sep=
183 -for ac_arg
184 +ac_must_keep_next=false
185 +for ac_pass in 1 2
186  do
187 +  for ac_arg
188 +  do
189    case $ac_arg in
190 -  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
191 -  | --no-cr | --no-c | -n ) continue ;;
192 -  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
193 -  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
194 +    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
195 +    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
196 +    | -silent | --silent | --silen | --sile | --sil)
197      continue ;;
198    *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
199      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
200    esac
201 +    case $ac_pass in
202 +    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
203 +    2)
204 +      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
205 +      if test $ac_must_keep_next = true; then
206 +        ac_must_keep_next=false # Got value, back to normal.
207 +      else
208 +        case $ac_arg in
209 +          *=* | --config-cache | -C | -disable-* | --disable-* \
210 +          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
211 +          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
212 +          | -with-* | --with-* | -without-* | --without-* | --x)
213 +            case "$ac_configure_args0 " in
214 +              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
215 +            esac
216 +            ;;
217 +          -* ) ac_must_keep_next=true ;;
218 +        esac
219 +      fi
220    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
221    # Get rid of the leading space.
222    ac_sep=" "
223 +      ;;
224 +    esac
225 +  done
226  done
227 +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
228 +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
229  
230  # When interrupted or exit'd, cleanup temporary files, and complete
231  # config.log.  We remove comments because anyway the quotes in there
232 @@ -1611,8 +1644,10 @@
233  fi
234  
235  
236 -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
237 -echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
238 +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
239 +See \`config.log' for more details." >&5
240 +echo "$as_me: error: no acceptable C compiler found in \$PATH
241 +See \`config.log' for more details." >&2;}
242     { (exit 1); exit 1; }; }
243  
244  # Provide some information about the compiler.
245 @@ -1637,7 +1672,11 @@
246  
247  cat >conftest.$ac_ext <<_ACEOF
248  #line $LINENO "configure"
249 -#include "confdefs.h"
250 +/* confdefs.h.  */
251 +_ACEOF
252 +cat confdefs.h >>conftest.$ac_ext
253 +cat >>conftest.$ac_ext <<_ACEOF
254 +/* end confdefs.h.  */
255  
256  int
257  main ()
258 @@ -1648,7 +1687,7 @@
259  }
260  _ACEOF
261  ac_clean_files_save=$ac_clean_files
262 -ac_clean_files="$ac_clean_files a.out a.exe"
263 +ac_clean_files="$ac_clean_files a.out a.exe b.out"
264  # Try to create an executable without -o first, disregard a.out.
265  # It will help us diagnose broken compilers, and finding out an intuition
266  # of exeext.
267 @@ -1667,27 +1706,39 @@
268  # Be careful to initialize this variable, since it used to be cached.
269  # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
270  ac_cv_exeext=
271 -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
272 +# b.out is created by i960 compilers.
273 +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
274 +do
275    test -f "$ac_file" || continue
276    case $ac_file in
277 -    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
278 -    a.out ) # We found the default executable, but exeext='' is most
279 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
280 +        ;;
281 +    conftest.$ac_ext )
282 +        # This is the source file.
283 +        ;;
284 +    [ab].out )
285 +        # We found the default executable, but exeext='' is most
286              # certainly right.
287              break;;
288 -    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
289 -          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
290 +    *.* )
291 +        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
292 +        # FIXME: I believe we export ac_cv_exeext for Libtool,
293 +        # but it would be cool to find out if it's true.  Does anybody
294 +        # maintain Libtool? --akim.
295            export ac_cv_exeext
296            break;;
297 -    * ) break;;
298 +    * )
299 +        break;;
300    esac
301  done
302  else
303    echo "$as_me: failed program was:" >&5
304 -cat conftest.$ac_ext >&5
305 +sed 's/^/| /' conftest.$ac_ext >&5
306 +
307  { { echo "$as_me:$LINENO: error: C compiler cannot create executables
308 -check \`config.log' for details." >&5
309 +See \`config.log' for more details." >&5
310  echo "$as_me: error: C compiler cannot create executables
311 -check \`config.log' for details." >&2;}
312 +See \`config.log' for more details." >&2;}
313     { (exit 77); exit 77; }; }
314  fi
315  
316 @@ -1714,9 +1765,11 @@
317         cross_compiling=yes
318      else
319         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
320 -If you meant to cross compile, use \`--host'." >&5
321 +If you meant to cross compile, use \`--host'.
322 +See \`config.log' for more details." >&5
323  echo "$as_me: error: cannot run C compiled programs.
324 -If you meant to cross compile, use \`--host'." >&2;}
325 +If you meant to cross compile, use \`--host'.
326 +See \`config.log' for more details." >&2;}
327     { (exit 1); exit 1; }; }
328      fi
329    fi
330 @@ -1724,7 +1777,7 @@
331  echo "$as_me:$LINENO: result: yes" >&5
332  echo "${ECHO_T}yes" >&6
333  
334 -rm -f a.out a.exe conftest$ac_cv_exeext
335 +rm -f a.out a.exe conftest$ac_cv_exeext b.out
336  ac_clean_files=$ac_clean_files_save
337  # Check the compiler produces executables we can run.  If not, either
338  # the compiler is broken, or we cross compile.
339 @@ -1755,8 +1808,10 @@
340    esac
341  done
342  else
343 -  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
344 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
345 +  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
346 +See \`config.log' for more details." >&5
347 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
348 +See \`config.log' for more details." >&2;}
349     { (exit 1); exit 1; }; }
350  fi
351  
352 @@ -1774,7 +1829,11 @@
353  else
354    cat >conftest.$ac_ext <<_ACEOF
355  #line $LINENO "configure"
356 -#include "confdefs.h"
357 +/* confdefs.h.  */
358 +_ACEOF
359 +cat confdefs.h >>conftest.$ac_ext
360 +cat >>conftest.$ac_ext <<_ACEOF
361 +/* end confdefs.h.  */
362  
363  int
364  main ()
365 @@ -1799,9 +1858,12 @@
366  done
367  else
368    echo "$as_me: failed program was:" >&5
369 -cat conftest.$ac_ext >&5
370 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
371 -echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
372 +sed 's/^/| /' conftest.$ac_ext >&5
373 +
374 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
375 +See \`config.log' for more details." >&5
376 +echo "$as_me: error: cannot compute suffix of object files: cannot compile
377 +See \`config.log' for more details." >&2;}
378     { (exit 1); exit 1; }; }
379  fi
380  
381 @@ -1818,7 +1880,11 @@
382  else
383    cat >conftest.$ac_ext <<_ACEOF
384  #line $LINENO "configure"
385 -#include "confdefs.h"
386 +/* confdefs.h.  */
387 +_ACEOF
388 +cat confdefs.h >>conftest.$ac_ext
389 +cat >>conftest.$ac_ext <<_ACEOF
390 +/* end confdefs.h.  */
391  
392  int
393  main ()
394 @@ -1846,7 +1912,8 @@
395    ac_compiler_gnu=yes
396  else
397    echo "$as_me: failed program was:" >&5
398 -cat conftest.$ac_ext >&5
399 +sed 's/^/| /' conftest.$ac_ext >&5
400 +
401  ac_compiler_gnu=no
402  fi
403  rm -f conftest.$ac_objext conftest.$ac_ext
404 @@ -1866,7 +1933,11 @@
405  else
406    cat >conftest.$ac_ext <<_ACEOF
407  #line $LINENO "configure"
408 -#include "confdefs.h"
409 +/* confdefs.h.  */
410 +_ACEOF
411 +cat confdefs.h >>conftest.$ac_ext
412 +cat >>conftest.$ac_ext <<_ACEOF
413 +/* end confdefs.h.  */
414  
415  int
416  main ()
417 @@ -1891,7 +1962,8 @@
418    ac_cv_prog_cc_g=yes
419  else
420    echo "$as_me: failed program was:" >&5
421 -cat conftest.$ac_ext >&5
422 +sed 's/^/| /' conftest.$ac_ext >&5
423 +
424  ac_cv_prog_cc_g=no
425  fi
426  rm -f conftest.$ac_objext conftest.$ac_ext
427 @@ -1922,7 +1994,11 @@
428  ac_save_CC=$CC
429  cat >conftest.$ac_ext <<_ACEOF
430  #line $LINENO "configure"
431 -#include "confdefs.h"
432 +/* confdefs.h.  */
433 +_ACEOF
434 +cat confdefs.h >>conftest.$ac_ext
435 +cat >>conftest.$ac_ext <<_ACEOF
436 +/* end confdefs.h.  */
437  #include <stdarg.h>
438  #include <stdio.h>
439  #include <sys/types.h>
440 @@ -1985,7 +2061,8 @@
441  break
442  else
443    echo "$as_me: failed program was:" >&5
444 -cat conftest.$ac_ext >&5
445 +sed 's/^/| /' conftest.$ac_ext >&5
446 +
447  fi
448  rm -f conftest.$ac_objext
449  done
450 @@ -2036,7 +2113,11 @@
451  do
452    cat >conftest.$ac_ext <<_ACEOF
453  #line $LINENO "configure"
454 -#include "confdefs.h"
455 +/* confdefs.h.  */
456 +_ACEOF
457 +cat confdefs.h >>conftest.$ac_ext
458 +cat >>conftest.$ac_ext <<_ACEOF
459 +/* end confdefs.h.  */
460  #include <stdlib.h>
461  $ac_declaration
462  int
463 @@ -2062,13 +2143,18 @@
464    :
465  else
466    echo "$as_me: failed program was:" >&5
467 -cat conftest.$ac_ext >&5
468 +sed 's/^/| /' conftest.$ac_ext >&5
469 +
470  continue
471  fi
472  rm -f conftest.$ac_objext conftest.$ac_ext
473    cat >conftest.$ac_ext <<_ACEOF
474  #line $LINENO "configure"
475 -#include "confdefs.h"
476 +/* confdefs.h.  */
477 +_ACEOF
478 +cat confdefs.h >>conftest.$ac_ext
479 +cat >>conftest.$ac_ext <<_ACEOF
480 +/* end confdefs.h.  */
481  $ac_declaration
482  int
483  main ()
484 @@ -2093,7 +2179,8 @@
485    break
486  else
487    echo "$as_me: failed program was:" >&5
488 -cat conftest.$ac_ext >&5
489 +sed 's/^/| /' conftest.$ac_ext >&5
490 +
491  fi
492  rm -f conftest.$ac_objext conftest.$ac_ext
493  done
494 @@ -2106,7 +2193,8 @@
495  
496  else
497    echo "$as_me: failed program was:" >&5
498 -cat conftest.$ac_ext >&5
499 +sed 's/^/| /' conftest.$ac_ext >&5
500 +
501  fi
502  rm -f conftest.$ac_objext conftest.$ac_ext
503  ac_ext=c
504 @@ -2153,12 +2241,22 @@
505  do
506    # Use a header file that comes with gcc, so configuring glibc
507    # with a fresh cross-compiler works.
508 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
509 +  # <limits.h> exists even on freestanding compilers.
510    # On the NeXT, cc -E runs the code through the compiler's parser,
511    # not just through cpp. "Syntax error" is here to catch this case.
512    cat >conftest.$ac_ext <<_ACEOF
513  #line $LINENO "configure"
514 -#include "confdefs.h"
515 -#include <assert.h>
516 +/* confdefs.h.  */
517 +_ACEOF
518 +cat confdefs.h >>conftest.$ac_ext
519 +cat >>conftest.$ac_ext <<_ACEOF
520 +/* end confdefs.h.  */
521 +#ifdef __STDC__
522 +# include <limits.h>
523 +#else
524 +# include <assert.h>
525 +#endif
526                       Syntax error
527  _ACEOF
528  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
529 @@ -2181,7 +2279,8 @@
530    :
531  else
532    echo "$as_me: failed program was:" >&5
533 -  cat conftest.$ac_ext >&5
534 +sed 's/^/| /' conftest.$ac_ext >&5
535 +
536    # Broken: fails on valid input.
537  continue
538  fi
539 @@ -2191,7 +2290,11 @@
540    # can be detected and how.
541    cat >conftest.$ac_ext <<_ACEOF
542  #line $LINENO "configure"
543 -#include "confdefs.h"
544 +/* confdefs.h.  */
545 +_ACEOF
546 +cat confdefs.h >>conftest.$ac_ext
547 +cat >>conftest.$ac_ext <<_ACEOF
548 +/* end confdefs.h.  */
549  #include <ac_nonexistent.h>
550  _ACEOF
551  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
552 @@ -2215,7 +2318,8 @@
553  continue
554  else
555    echo "$as_me: failed program was:" >&5
556 -  cat conftest.$ac_ext >&5
557 +sed 's/^/| /' conftest.$ac_ext >&5
558 +
559    # Passes both tests.
560  ac_preproc_ok=:
561  break
562 @@ -2244,12 +2348,22 @@
563  do
564    # Use a header file that comes with gcc, so configuring glibc
565    # with a fresh cross-compiler works.
566 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
567 +  # <limits.h> exists even on freestanding compilers.
568    # On the NeXT, cc -E runs the code through the compiler's parser,
569    # not just through cpp. "Syntax error" is here to catch this case.
570    cat >conftest.$ac_ext <<_ACEOF
571  #line $LINENO "configure"
572 -#include "confdefs.h"
573 -#include <assert.h>
574 +/* confdefs.h.  */
575 +_ACEOF
576 +cat confdefs.h >>conftest.$ac_ext
577 +cat >>conftest.$ac_ext <<_ACEOF
578 +/* end confdefs.h.  */
579 +#ifdef __STDC__
580 +# include <limits.h>
581 +#else
582 +# include <assert.h>
583 +#endif
584                       Syntax error
585  _ACEOF
586  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
587 @@ -2272,7 +2386,8 @@
588    :
589  else
590    echo "$as_me: failed program was:" >&5
591 -  cat conftest.$ac_ext >&5
592 +sed 's/^/| /' conftest.$ac_ext >&5
593 +
594    # Broken: fails on valid input.
595  continue
596  fi
597 @@ -2282,7 +2397,11 @@
598    # can be detected and how.
599    cat >conftest.$ac_ext <<_ACEOF
600  #line $LINENO "configure"
601 -#include "confdefs.h"
602 +/* confdefs.h.  */
603 +_ACEOF
604 +cat confdefs.h >>conftest.$ac_ext
605 +cat >>conftest.$ac_ext <<_ACEOF
606 +/* end confdefs.h.  */
607  #include <ac_nonexistent.h>
608  _ACEOF
609  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
610 @@ -2306,7 +2425,8 @@
611  continue
612  else
613    echo "$as_me: failed program was:" >&5
614 -  cat conftest.$ac_ext >&5
615 +sed 's/^/| /' conftest.$ac_ext >&5
616 +
617    # Passes both tests.
618  ac_preproc_ok=:
619  break
620 @@ -2319,8 +2439,10 @@
621  if $ac_preproc_ok; then
622    :
623  else
624 -  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
625 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
626 +  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
627 +See \`config.log' for more details." >&5
628 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
629 +See \`config.log' for more details." >&2;}
630     { (exit 1); exit 1; }; }
631  fi
632  
633 @@ -2351,7 +2473,11 @@
634  echo $ECHO_N "checking for AIX... $ECHO_C" >&6
635  cat >conftest.$ac_ext <<_ACEOF
636  #line $LINENO "configure"
637 -#include "confdefs.h"
638 +/* confdefs.h.  */
639 +_ACEOF
640 +cat confdefs.h >>conftest.$ac_ext
641 +cat >>conftest.$ac_ext <<_ACEOF
642 +/* end confdefs.h.  */
643  #ifdef _AIX
644    yes
645  #endif
646 @@ -2381,7 +2507,11 @@
647  ac_cv_search_strerror=no
648  cat >conftest.$ac_ext <<_ACEOF
649  #line $LINENO "configure"
650 -#include "confdefs.h"
651 +/* confdefs.h.  */
652 +_ACEOF
653 +cat confdefs.h >>conftest.$ac_ext
654 +cat >>conftest.$ac_ext <<_ACEOF
655 +/* end confdefs.h.  */
656  
657  /* Override any gcc2 internal prototype to avoid an error.  */
658  #ifdef __cplusplus
659 @@ -2413,7 +2543,8 @@
660    ac_cv_search_strerror="none required"
661  else
662    echo "$as_me: failed program was:" >&5
663 -cat conftest.$ac_ext >&5
664 +sed 's/^/| /' conftest.$ac_ext >&5
665 +
666  fi
667  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
668  if test "$ac_cv_search_strerror" = no; then
669 @@ -2421,7 +2552,11 @@
670      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
671      cat >conftest.$ac_ext <<_ACEOF
672  #line $LINENO "configure"
673 -#include "confdefs.h"
674 +/* confdefs.h.  */
675 +_ACEOF
676 +cat confdefs.h >>conftest.$ac_ext
677 +cat >>conftest.$ac_ext <<_ACEOF
678 +/* end confdefs.h.  */
679  
680  /* Override any gcc2 internal prototype to avoid an error.  */
681  #ifdef __cplusplus
682 @@ -2454,7 +2589,8 @@
683  break
684  else
685    echo "$as_me: failed program was:" >&5
686 -cat conftest.$ac_ext >&5
687 +sed 's/^/| /' conftest.$ac_ext >&5
688 +
689  fi
690  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
691    done
692 @@ -2475,43 +2611,54 @@
693  else
694    cat >conftest.$ac_ext <<_ACEOF
695  #line $LINENO "configure"
696 -#include "confdefs.h"
697 +/* confdefs.h.  */
698 +_ACEOF
699 +cat confdefs.h >>conftest.$ac_ext
700 +cat >>conftest.$ac_ext <<_ACEOF
701 +/* end confdefs.h.  */
702  #include <stdlib.h>
703  #include <stdarg.h>
704  #include <string.h>
705  #include <float.h>
706  
707 +int
708 +main ()
709 +{
710 +
711 +  ;
712 +  return 0;
713 +}
714  _ACEOF
715 -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
716 -  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
717 +rm -f conftest.$ac_objext
718 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
719 +  (eval $ac_compile) 2>&5
720    ac_status=$?
721 -  grep -v '^ *+' conftest.er1 >conftest.err
722 -  rm -f conftest.er1
723 -  cat conftest.err >&5
724    echo "$as_me:$LINENO: \$? = $ac_status" >&5
725 -  (exit $ac_status); } >/dev/null; then
726 -  if test -s conftest.err; then
727 -    ac_cpp_err=$ac_c_preproc_warn_flag
728 -  else
729 -    ac_cpp_err=
730 -  fi
731 -else
732 -  ac_cpp_err=yes
733 -fi
734 -if test -z "$ac_cpp_err"; then
735 +  (exit $ac_status); } &&
736 +         { ac_try='test -s conftest.$ac_objext'
737 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
738 +  (eval $ac_try) 2>&5
739 +  ac_status=$?
740 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
741 +  (exit $ac_status); }; }; then
742    ac_cv_header_stdc=yes
743  else
744    echo "$as_me: failed program was:" >&5
745 -  cat conftest.$ac_ext >&5
746 -  ac_cv_header_stdc=no
747 +sed 's/^/| /' conftest.$ac_ext >&5
748 +
749 +ac_cv_header_stdc=no
750  fi
751 -rm -f conftest.err conftest.$ac_ext
752 +rm -f conftest.$ac_objext conftest.$ac_ext
753  
754  if test $ac_cv_header_stdc = yes; then
755    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
756    cat >conftest.$ac_ext <<_ACEOF
757  #line $LINENO "configure"
758 -#include "confdefs.h"
759 +/* confdefs.h.  */
760 +_ACEOF
761 +cat confdefs.h >>conftest.$ac_ext
762 +cat >>conftest.$ac_ext <<_ACEOF
763 +/* end confdefs.h.  */
764  #include <string.h>
765  
766  _ACEOF
767 @@ -2529,7 +2676,11 @@
768    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
769    cat >conftest.$ac_ext <<_ACEOF
770  #line $LINENO "configure"
771 -#include "confdefs.h"
772 +/* confdefs.h.  */
773 +_ACEOF
774 +cat confdefs.h >>conftest.$ac_ext
775 +cat >>conftest.$ac_ext <<_ACEOF
776 +/* end confdefs.h.  */
777  #include <stdlib.h>
778  
779  _ACEOF
780 @@ -2550,13 +2701,18 @@
781  else
782    cat >conftest.$ac_ext <<_ACEOF
783  #line $LINENO "configure"
784 -#include "confdefs.h"
785 +/* confdefs.h.  */
786 +_ACEOF
787 +cat confdefs.h >>conftest.$ac_ext
788 +cat >>conftest.$ac_ext <<_ACEOF
789 +/* end confdefs.h.  */
790  #include <ctype.h>
791  #if ((' ' & 0x0FF) == 0x020)
792  # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
793  # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
794  #else
795 -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
796 +# define ISLOWER(c) \
797 +                   (('a' <= (c) && (c) <= 'i') \
798                       || ('j' <= (c) && (c) <= 'r') \
799                       || ('s' <= (c) && (c) <= 'z'))
800  # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
801 @@ -2589,7 +2745,8 @@
802  else
803    echo "$as_me: program exited with status $ac_status" >&5
804  echo "$as_me: failed program was:" >&5
805 -cat conftest.$ac_ext >&5
806 +sed 's/^/| /' conftest.$ac_ext >&5
807 +
808  ( exit $ac_status )
809  ac_cv_header_stdc=no
810  fi
811 @@ -2628,7 +2785,11 @@
812  else
813    cat >conftest.$ac_ext <<_ACEOF
814  #line $LINENO "configure"
815 -#include "confdefs.h"
816 +/* confdefs.h.  */
817 +_ACEOF
818 +cat confdefs.h >>conftest.$ac_ext
819 +cat >>conftest.$ac_ext <<_ACEOF
820 +/* end confdefs.h.  */
821  $ac_includes_default
822  
823  #include <$ac_header>
824 @@ -2648,7 +2809,8 @@
825    eval "$as_ac_Header=yes"
826  else
827    echo "$as_me: failed program was:" >&5
828 -cat conftest.$ac_ext >&5
829 +sed 's/^/| /' conftest.$ac_ext >&5
830 +
831  eval "$as_ac_Header=no"
832  fi
833  rm -f conftest.$ac_objext conftest.$ac_ext
834 @@ -2679,7 +2841,11 @@
835  echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
836  cat >conftest.$ac_ext <<_ACEOF
837  #line $LINENO "configure"
838 -#include "confdefs.h"
839 +/* confdefs.h.  */
840 +_ACEOF
841 +cat confdefs.h >>conftest.$ac_ext
842 +cat >>conftest.$ac_ext <<_ACEOF
843 +/* end confdefs.h.  */
844  $ac_includes_default
845  #include <minix/config.h>
846  _ACEOF
847 @@ -2698,7 +2864,8 @@
848    ac_header_compiler=yes
849  else
850    echo "$as_me: failed program was:" >&5
851 -cat conftest.$ac_ext >&5
852 +sed 's/^/| /' conftest.$ac_ext >&5
853 +
854  ac_header_compiler=no
855  fi
856  rm -f conftest.$ac_objext conftest.$ac_ext
857 @@ -2710,7 +2877,11 @@
858  echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
859  cat >conftest.$ac_ext <<_ACEOF
860  #line $LINENO "configure"
861 -#include "confdefs.h"
862 +/* confdefs.h.  */
863 +_ACEOF
864 +cat confdefs.h >>conftest.$ac_ext
865 +cat >>conftest.$ac_ext <<_ACEOF
866 +/* end confdefs.h.  */
867  #include <minix/config.h>
868  _ACEOF
869  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
870 @@ -2733,7 +2904,8 @@
871    ac_header_preproc=yes
872  else
873    echo "$as_me: failed program was:" >&5
874 -  cat conftest.$ac_ext >&5
875 +sed 's/^/| /' conftest.$ac_ext >&5
876 +
877    ac_header_preproc=no
878  fi
879  rm -f conftest.err conftest.$ac_ext
880 @@ -2746,14 +2918,32 @@
881      { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
882  echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
883      { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
884 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
885 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
886 +    (
887 +      cat <<\_ASBOX
888 +## ------------------------------------ ##
889 +## Report this to bug-autoconf@gnu.org. ##
890 +## ------------------------------------ ##
891 +_ASBOX
892 +    ) |
893 +      sed "s/^/$as_me: WARNING:     /" >&2
894 +    ;;
895    no:yes )
896      { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
897  echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
898      { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
899  echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
900      { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
901 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
902 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
903 +    (
904 +      cat <<\_ASBOX
905 +## ------------------------------------ ##
906 +## Report this to bug-autoconf@gnu.org. ##
907 +## ------------------------------------ ##
908 +_ASBOX
909 +    ) |
910 +      sed "s/^/$as_me: WARNING:     /" >&2
911 +    ;;
912  esac
913  echo "$as_me:$LINENO: checking for minix/config.h" >&5
914  echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
915 @@ -2806,7 +2996,11 @@
916        CC="$CC -pipe"
917        cat >conftest.$ac_ext <<_ACEOF
918  #line $LINENO "configure"
919 -#include "confdefs.h"
920 +/* confdefs.h.  */
921 +_ACEOF
922 +cat confdefs.h >>conftest.$ac_ext
923 +cat >>conftest.$ac_ext <<_ACEOF
924 +/* end confdefs.h.  */
925  
926  int
927  main ()
928 @@ -2831,7 +3025,8 @@
929    egg_cv_var_ccpipe="yes"
930  else
931    echo "$as_me: failed program was:" >&5
932 -cat conftest.$ac_ext >&5
933 +sed 's/^/| /' conftest.$ac_ext >&5
934 +
935  egg_cv_var_ccpipe="no"
936  fi
937  rm -f conftest.$ac_objext conftest.$ac_ext
938 @@ -2849,15 +3044,15 @@
939  
940  
941  # Checks for programs
942 -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
943 -echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
944 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
945 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
946  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
947  if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
948    echo $ECHO_N "(cached) $ECHO_C" >&6
949  else
950    cat >conftest.make <<\_ACEOF
951  all:
952 -       @echo 'ac_maketemp="${MAKE}"'
953 +       @echo 'ac_maketemp="$(MAKE)"'
954  _ACEOF
955  # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
956  eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
957 @@ -3306,7 +3501,11 @@
958  WIN32FLAGS=
959  cat >conftest.$ac_ext <<_ACEOF
960  #line $LINENO "configure"
961 -#include "confdefs.h"
962 +/* confdefs.h.  */
963 +_ACEOF
964 +cat confdefs.h >>conftest.$ac_ext
965 +cat >>conftest.$ac_ext <<_ACEOF
966 +/* end confdefs.h.  */
967  
968  int
969  main ()
970 @@ -3339,7 +3538,8 @@
971  
972  else
973    echo "$as_me: failed program was:" >&5
974 -cat conftest.$ac_ext >&5
975 +sed 's/^/| /' conftest.$ac_ext >&5
976 +
977  
978  ac_compile_save="$ac_compile"
979  save_CC="$CC"
980 @@ -3347,7 +3547,11 @@
981  CC="$CC -mwin32"
982  cat >conftest.$ac_ext <<_ACEOF
983  #line $LINENO "configure"
984 -#include "confdefs.h"
985 +/* confdefs.h.  */
986 +_ACEOF
987 +cat confdefs.h >>conftest.$ac_ext
988 +cat >>conftest.$ac_ext <<_ACEOF
989 +/* end confdefs.h.  */
990  
991  int
992  main ()
993 @@ -3383,7 +3587,8 @@
994  
995  else
996    echo "$as_me: failed program was:" >&5
997 -cat conftest.$ac_ext >&5
998 +sed 's/^/| /' conftest.$ac_ext >&5
999 +
1000  
1001  ac_compile="$ac_compile_save"
1002  CC="$save_CC"
1003 @@ -3643,7 +3848,11 @@
1004  LIBS="-lsocket  $LIBS"
1005  cat >conftest.$ac_ext <<_ACEOF
1006  #line $LINENO "configure"
1007 -#include "confdefs.h"
1008 +/* confdefs.h.  */
1009 +_ACEOF
1010 +cat confdefs.h >>conftest.$ac_ext
1011 +cat >>conftest.$ac_ext <<_ACEOF
1012 +/* end confdefs.h.  */
1013  
1014  /* Override any gcc2 internal prototype to avoid an error.  */
1015  #ifdef __cplusplus
1016 @@ -3675,7 +3884,8 @@
1017    ac_cv_lib_socket_socket=yes
1018  else
1019    echo "$as_me: failed program was:" >&5
1020 -cat conftest.$ac_ext >&5
1021 +sed 's/^/| /' conftest.$ac_ext >&5
1022 +
1023  ac_cv_lib_socket_socket=no
1024  fi
1025  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1026 @@ -3702,7 +3912,11 @@
1027  LIBS="-lnsl  $LIBS"
1028  cat >conftest.$ac_ext <<_ACEOF
1029  #line $LINENO "configure"
1030 -#include "confdefs.h"
1031 +/* confdefs.h.  */
1032 +_ACEOF
1033 +cat confdefs.h >>conftest.$ac_ext
1034 +cat >>conftest.$ac_ext <<_ACEOF
1035 +/* end confdefs.h.  */
1036  
1037  /* Override any gcc2 internal prototype to avoid an error.  */
1038  #ifdef __cplusplus
1039 @@ -3734,7 +3948,8 @@
1040    ac_cv_lib_nsl_connect=yes
1041  else
1042    echo "$as_me: failed program was:" >&5
1043 -cat conftest.$ac_ext >&5
1044 +sed 's/^/| /' conftest.$ac_ext >&5
1045 +
1046  ac_cv_lib_nsl_connect=no
1047  fi
1048  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1049 @@ -3761,7 +3976,11 @@
1050  LIBS="-ldns  $LIBS"
1051  cat >conftest.$ac_ext <<_ACEOF
1052  #line $LINENO "configure"
1053 -#include "confdefs.h"
1054 +/* confdefs.h.  */
1055 +_ACEOF
1056 +cat confdefs.h >>conftest.$ac_ext
1057 +cat >>conftest.$ac_ext <<_ACEOF
1058 +/* end confdefs.h.  */
1059  
1060  /* Override any gcc2 internal prototype to avoid an error.  */
1061  #ifdef __cplusplus
1062 @@ -3793,7 +4012,8 @@
1063    ac_cv_lib_dns_gethostbyname=yes
1064  else
1065    echo "$as_me: failed program was:" >&5
1066 -cat conftest.$ac_ext >&5
1067 +sed 's/^/| /' conftest.$ac_ext >&5
1068 +
1069  ac_cv_lib_dns_gethostbyname=no
1070  fi
1071  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1072 @@ -3820,7 +4040,11 @@
1073  LIBS="-ldl  $LIBS"
1074  cat >conftest.$ac_ext <<_ACEOF
1075  #line $LINENO "configure"
1076 -#include "confdefs.h"
1077 +/* confdefs.h.  */
1078 +_ACEOF
1079 +cat confdefs.h >>conftest.$ac_ext
1080 +cat >>conftest.$ac_ext <<_ACEOF
1081 +/* end confdefs.h.  */
1082  
1083  /* Override any gcc2 internal prototype to avoid an error.  */
1084  #ifdef __cplusplus
1085 @@ -3852,7 +4076,8 @@
1086    ac_cv_lib_dl_dlopen=yes
1087  else
1088    echo "$as_me: failed program was:" >&5
1089 -cat conftest.$ac_ext >&5
1090 +sed 's/^/| /' conftest.$ac_ext >&5
1091 +
1092  ac_cv_lib_dl_dlopen=no
1093  fi
1094  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1095 @@ -3878,7 +4103,11 @@
1096  LIBS="-lm  $LIBS"
1097  cat >conftest.$ac_ext <<_ACEOF
1098  #line $LINENO "configure"
1099 -#include "confdefs.h"
1100 +/* confdefs.h.  */
1101 +_ACEOF
1102 +cat confdefs.h >>conftest.$ac_ext
1103 +cat >>conftest.$ac_ext <<_ACEOF
1104 +/* end confdefs.h.  */
1105  
1106  /* Override any gcc2 internal prototype to avoid an error.  */
1107  #ifdef __cplusplus
1108 @@ -3910,7 +4139,8 @@
1109    ac_cv_lib_m_tan=yes
1110  else
1111    echo "$as_me: failed program was:" >&5
1112 -cat conftest.$ac_ext >&5
1113 +sed 's/^/| /' conftest.$ac_ext >&5
1114 +
1115  ac_cv_lib_m_tan=no
1116  fi
1117  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1118 @@ -3932,7 +4162,11 @@
1119  LIBS="-lpthread  $LIBS"
1120  cat >conftest.$ac_ext <<_ACEOF
1121  #line $LINENO "configure"
1122 -#include "confdefs.h"
1123 +/* confdefs.h.  */
1124 +_ACEOF
1125 +cat confdefs.h >>conftest.$ac_ext
1126 +cat >>conftest.$ac_ext <<_ACEOF
1127 +/* end confdefs.h.  */
1128  
1129  /* Override any gcc2 internal prototype to avoid an error.  */
1130  #ifdef __cplusplus
1131 @@ -3964,7 +4198,8 @@
1132    ac_cv_lib_pthread_pthread_mutex_init=yes
1133  else
1134    echo "$as_me: failed program was:" >&5
1135 -cat conftest.$ac_ext >&5
1136 +sed 's/^/| /' conftest.$ac_ext >&5
1137 +
1138  ac_cv_lib_pthread_pthread_mutex_init=no
1139  fi
1140  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1141 @@ -3985,7 +4220,11 @@
1142  LIBS="-lpthread  $LIBS"
1143  cat >conftest.$ac_ext <<_ACEOF
1144  #line $LINENO "configure"
1145 -#include "confdefs.h"
1146 +/* confdefs.h.  */
1147 +_ACEOF
1148 +cat confdefs.h >>conftest.$ac_ext
1149 +cat >>conftest.$ac_ext <<_ACEOF
1150 +/* end confdefs.h.  */
1151  
1152  /* Override any gcc2 internal prototype to avoid an error.  */
1153  #ifdef __cplusplus
1154 @@ -4017,7 +4256,8 @@
1155    ac_cv_lib_pthread___pthread_mutex_init=yes
1156  else
1157    echo "$as_me: failed program was:" >&5
1158 -cat conftest.$ac_ext >&5
1159 +sed 's/^/| /' conftest.$ac_ext >&5
1160 +
1161  ac_cv_lib_pthread___pthread_mutex_init=no
1162  fi
1163  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1164 @@ -4038,7 +4278,11 @@
1165  LIBS="-lpthreads  $LIBS"
1166  cat >conftest.$ac_ext <<_ACEOF
1167  #line $LINENO "configure"
1168 -#include "confdefs.h"
1169 +/* confdefs.h.  */
1170 +_ACEOF
1171 +cat confdefs.h >>conftest.$ac_ext
1172 +cat >>conftest.$ac_ext <<_ACEOF
1173 +/* end confdefs.h.  */
1174  
1175  /* Override any gcc2 internal prototype to avoid an error.  */
1176  #ifdef __cplusplus
1177 @@ -4070,7 +4314,8 @@
1178    ac_cv_lib_pthreads_pthread_mutex_init=yes
1179  else
1180    echo "$as_me: failed program was:" >&5
1181 -cat conftest.$ac_ext >&5
1182 +sed 's/^/| /' conftest.$ac_ext >&5
1183 +
1184  ac_cv_lib_pthreads_pthread_mutex_init=no
1185  fi
1186  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1187 @@ -4089,31 +4334,44 @@
1188  else
1189    cat >conftest.$ac_ext <<_ACEOF
1190  #line $LINENO "configure"
1191 -#include "confdefs.h"
1192 +/* confdefs.h.  */
1193 +_ACEOF
1194 +cat confdefs.h >>conftest.$ac_ext
1195 +cat >>conftest.$ac_ext <<_ACEOF
1196 +/* end confdefs.h.  */
1197  /* System header to define __stub macros and hopefully few prototypes,
1198 -    which can conflict with char pthread_mutex_init (); below.  */
1199 -#include <assert.h>
1200 +    which can conflict with char pthread_mutex_init (); below.
1201 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1202 +    <limits.h> exists even on freestanding compilers.  */
1203 +#ifdef __STDC__
1204 +# include <limits.h>
1205 +#else
1206 +# include <assert.h>
1207 +#endif
1208  /* Override any gcc2 internal prototype to avoid an error.  */
1209  #ifdef __cplusplus
1210  extern "C"
1211 +{
1212  #endif
1213  /* We use char because int might match the return type of a gcc2
1214     builtin and then its argument prototype would still apply.  */
1215  char pthread_mutex_init ();
1216 -char (*f) ();
1217 -
1218 -int
1219 -main ()
1220 -{
1221  /* The GNU C library defines this for functions which it implements
1222      to always fail with ENOSYS.  Some functions are actually named
1223      something starting with __ and the normal name is an alias.  */
1224  #if defined (__stub_pthread_mutex_init) || defined (__stub___pthread_mutex_init)
1225  choke me
1226  #else
1227 -f = pthread_mutex_init;
1228 +char (*f) () = pthread_mutex_init;
1229 +#endif
1230 +#ifdef __cplusplus
1231 +}
1232  #endif
1233  
1234 +int
1235 +main ()
1236 +{
1237 +return f != pthread_mutex_init;
1238    ;
1239    return 0;
1240  }
1241 @@ -4133,7 +4391,8 @@
1242    ac_cv_func_pthread_mutex_init=yes
1243  else
1244    echo "$as_me: failed program was:" >&5
1245 -cat conftest.$ac_ext >&5
1246 +sed 's/^/| /' conftest.$ac_ext >&5
1247 +
1248  ac_cv_func_pthread_mutex_init=no
1249  fi
1250  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1251 @@ -4166,7 +4425,11 @@
1252  LIBS="-ldl  $LIBS"
1253  cat >conftest.$ac_ext <<_ACEOF
1254  #line $LINENO "configure"
1255 -#include "confdefs.h"
1256 +/* confdefs.h.  */
1257 +_ACEOF
1258 +cat confdefs.h >>conftest.$ac_ext
1259 +cat >>conftest.$ac_ext <<_ACEOF
1260 +/* end confdefs.h.  */
1261  
1262  
1263  int
1264 @@ -4192,7 +4455,8 @@
1265    ac_cv_lib_dl_main=yes
1266  else
1267    echo "$as_me: failed program was:" >&5
1268 -cat conftest.$ac_ext >&5
1269 +sed 's/^/| /' conftest.$ac_ext >&5
1270 +
1271  ac_cv_lib_dl_main=no
1272  fi
1273  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1274 @@ -4222,7 +4486,11 @@
1275  LIBS="-ldld  $LIBS"
1276  cat >conftest.$ac_ext <<_ACEOF
1277  #line $LINENO "configure"
1278 -#include "confdefs.h"
1279 +/* confdefs.h.  */
1280 +_ACEOF
1281 +cat confdefs.h >>conftest.$ac_ext
1282 +cat >>conftest.$ac_ext <<_ACEOF
1283 +/* end confdefs.h.  */
1284  
1285  /* Override any gcc2 internal prototype to avoid an error.  */
1286  #ifdef __cplusplus
1287 @@ -4254,7 +4522,8 @@
1288    ac_cv_lib_dld_shl_load=yes
1289  else
1290    echo "$as_me: failed program was:" >&5
1291 -cat conftest.$ac_ext >&5
1292 +sed 's/^/| /' conftest.$ac_ext >&5
1293 +
1294  ac_cv_lib_dld_shl_load=no
1295  fi
1296  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1297 @@ -4292,7 +4561,11 @@
1298  else
1299    cat >conftest.$ac_ext <<_ACEOF
1300  #line $LINENO "configure"
1301 -#include "confdefs.h"
1302 +/* confdefs.h.  */
1303 +_ACEOF
1304 +cat confdefs.h >>conftest.$ac_ext
1305 +cat >>conftest.$ac_ext <<_ACEOF
1306 +/* end confdefs.h.  */
1307  #include <sys/types.h>
1308  #include <$ac_hdr>
1309  
1310 @@ -4320,7 +4593,8 @@
1311    eval "$as_ac_Header=yes"
1312  else
1313    echo "$as_me: failed program was:" >&5
1314 -cat conftest.$ac_ext >&5
1315 +sed 's/^/| /' conftest.$ac_ext >&5
1316 +
1317  eval "$as_ac_Header=no"
1318  fi
1319  rm -f conftest.$ac_objext conftest.$ac_ext
1320 @@ -4347,7 +4621,11 @@
1321  ac_cv_search_opendir=no
1322  cat >conftest.$ac_ext <<_ACEOF
1323  #line $LINENO "configure"
1324 -#include "confdefs.h"
1325 +/* confdefs.h.  */
1326 +_ACEOF
1327 +cat confdefs.h >>conftest.$ac_ext
1328 +cat >>conftest.$ac_ext <<_ACEOF
1329 +/* end confdefs.h.  */
1330  
1331  /* Override any gcc2 internal prototype to avoid an error.  */
1332  #ifdef __cplusplus
1333 @@ -4379,7 +4657,8 @@
1334    ac_cv_search_opendir="none required"
1335  else
1336    echo "$as_me: failed program was:" >&5
1337 -cat conftest.$ac_ext >&5
1338 +sed 's/^/| /' conftest.$ac_ext >&5
1339 +
1340  fi
1341  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1342  if test "$ac_cv_search_opendir" = no; then
1343 @@ -4387,7 +4666,11 @@
1344      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
1345      cat >conftest.$ac_ext <<_ACEOF
1346  #line $LINENO "configure"
1347 -#include "confdefs.h"
1348 +/* confdefs.h.  */
1349 +_ACEOF
1350 +cat confdefs.h >>conftest.$ac_ext
1351 +cat >>conftest.$ac_ext <<_ACEOF
1352 +/* end confdefs.h.  */
1353  
1354  /* Override any gcc2 internal prototype to avoid an error.  */
1355  #ifdef __cplusplus
1356 @@ -4420,7 +4703,8 @@
1357  break
1358  else
1359    echo "$as_me: failed program was:" >&5
1360 -cat conftest.$ac_ext >&5
1361 +sed 's/^/| /' conftest.$ac_ext >&5
1362 +
1363  fi
1364  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1365    done
1366 @@ -4444,7 +4728,11 @@
1367  ac_cv_search_opendir=no
1368  cat >conftest.$ac_ext <<_ACEOF
1369  #line $LINENO "configure"
1370 -#include "confdefs.h"
1371 +/* confdefs.h.  */
1372 +_ACEOF
1373 +cat confdefs.h >>conftest.$ac_ext
1374 +cat >>conftest.$ac_ext <<_ACEOF
1375 +/* end confdefs.h.  */
1376  
1377  /* Override any gcc2 internal prototype to avoid an error.  */
1378  #ifdef __cplusplus
1379 @@ -4476,7 +4764,8 @@
1380    ac_cv_search_opendir="none required"
1381  else
1382    echo "$as_me: failed program was:" >&5
1383 -cat conftest.$ac_ext >&5
1384 +sed 's/^/| /' conftest.$ac_ext >&5
1385 +
1386  fi
1387  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1388  if test "$ac_cv_search_opendir" = no; then
1389 @@ -4484,7 +4773,11 @@
1390      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
1391      cat >conftest.$ac_ext <<_ACEOF
1392  #line $LINENO "configure"
1393 -#include "confdefs.h"
1394 +/* confdefs.h.  */
1395 +_ACEOF
1396 +cat confdefs.h >>conftest.$ac_ext
1397 +cat >>conftest.$ac_ext <<_ACEOF
1398 +/* end confdefs.h.  */
1399  
1400  /* Override any gcc2 internal prototype to avoid an error.  */
1401  #ifdef __cplusplus
1402 @@ -4517,7 +4810,8 @@
1403  break
1404  else
1405    echo "$as_me: failed program was:" >&5
1406 -cat conftest.$ac_ext >&5
1407 +sed 's/^/| /' conftest.$ac_ext >&5
1408 +
1409  fi
1410  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1411    done
1412 @@ -4540,7 +4834,11 @@
1413  else
1414    cat >conftest.$ac_ext <<_ACEOF
1415  #line $LINENO "configure"
1416 -#include "confdefs.h"
1417 +/* confdefs.h.  */
1418 +_ACEOF
1419 +cat confdefs.h >>conftest.$ac_ext
1420 +cat >>conftest.$ac_ext <<_ACEOF
1421 +/* end confdefs.h.  */
1422  #include <sys/types.h>
1423  #include <sys/wait.h>
1424  #ifndef WEXITSTATUS
1425 @@ -4575,7 +4873,8 @@
1426    ac_cv_header_sys_wait_h=yes
1427  else
1428    echo "$as_me: failed program was:" >&5
1429 -cat conftest.$ac_ext >&5
1430 +sed 's/^/| /' conftest.$ac_ext >&5
1431 +
1432  ac_cv_header_sys_wait_h=no
1433  fi
1434  rm -f conftest.$ac_objext conftest.$ac_ext
1435 @@ -4608,7 +4907,11 @@
1436  echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
1437  cat >conftest.$ac_ext <<_ACEOF
1438  #line $LINENO "configure"
1439 -#include "confdefs.h"
1440 +/* confdefs.h.  */
1441 +_ACEOF
1442 +cat confdefs.h >>conftest.$ac_ext
1443 +cat >>conftest.$ac_ext <<_ACEOF
1444 +/* end confdefs.h.  */
1445  $ac_includes_default
1446  #include <$ac_header>
1447  _ACEOF
1448 @@ -4627,7 +4930,8 @@
1449    ac_header_compiler=yes
1450  else
1451    echo "$as_me: failed program was:" >&5
1452 -cat conftest.$ac_ext >&5
1453 +sed 's/^/| /' conftest.$ac_ext >&5
1454 +
1455  ac_header_compiler=no
1456  fi
1457  rm -f conftest.$ac_objext conftest.$ac_ext
1458 @@ -4639,7 +4943,11 @@
1459  echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
1460  cat >conftest.$ac_ext <<_ACEOF
1461  #line $LINENO "configure"
1462 -#include "confdefs.h"
1463 +/* confdefs.h.  */
1464 +_ACEOF
1465 +cat confdefs.h >>conftest.$ac_ext
1466 +cat >>conftest.$ac_ext <<_ACEOF
1467 +/* end confdefs.h.  */
1468  #include <$ac_header>
1469  _ACEOF
1470  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
1471 @@ -4662,7 +4970,8 @@
1472    ac_header_preproc=yes
1473  else
1474    echo "$as_me: failed program was:" >&5
1475 -  cat conftest.$ac_ext >&5
1476 +sed 's/^/| /' conftest.$ac_ext >&5
1477 +
1478    ac_header_preproc=no
1479  fi
1480  rm -f conftest.err conftest.$ac_ext
1481 @@ -4675,14 +4984,32 @@
1482      { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
1483  echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
1484      { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
1485 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
1486 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
1487 +    (
1488 +      cat <<\_ASBOX
1489 +## ------------------------------------ ##
1490 +## Report this to bug-autoconf@gnu.org. ##
1491 +## ------------------------------------ ##
1492 +_ASBOX
1493 +    ) |
1494 +      sed "s/^/$as_me: WARNING:     /" >&2
1495 +    ;;
1496    no:yes )
1497      { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
1498  echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
1499      { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
1500  echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
1501      { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
1502 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
1503 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
1504 +    (
1505 +      cat <<\_ASBOX
1506 +## ------------------------------------ ##
1507 +## Report this to bug-autoconf@gnu.org. ##
1508 +## ------------------------------------ ##
1509 +_ASBOX
1510 +    ) |
1511 +      sed "s/^/$as_me: WARNING:     /" >&2
1512 +    ;;
1513  esac
1514  echo "$as_me:$LINENO: checking for $ac_header" >&5
1515  echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
1516 @@ -4711,7 +5038,11 @@
1517  else
1518    cat >conftest.$ac_ext <<_ACEOF
1519  #line $LINENO "configure"
1520 -#include "confdefs.h"
1521 +/* confdefs.h.  */
1522 +_ACEOF
1523 +cat confdefs.h >>conftest.$ac_ext
1524 +cat >>conftest.$ac_ext <<_ACEOF
1525 +/* end confdefs.h.  */
1526  #include <sys/types.h>
1527  #include <sys/time.h>
1528  #include <time.h>
1529 @@ -4740,7 +5071,8 @@
1530    ac_cv_header_time=yes
1531  else
1532    echo "$as_me: failed program was:" >&5
1533 -cat conftest.$ac_ext >&5
1534 +sed 's/^/| /' conftest.$ac_ext >&5
1535 +
1536  ac_cv_header_time=no
1537  fi
1538  rm -f conftest.$ac_objext conftest.$ac_ext
1539 @@ -4779,7 +5111,11 @@
1540  echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
1541  cat >conftest.$ac_ext <<_ACEOF
1542  #line $LINENO "configure"
1543 -#include "confdefs.h"
1544 +/* confdefs.h.  */
1545 +_ACEOF
1546 +cat confdefs.h >>conftest.$ac_ext
1547 +cat >>conftest.$ac_ext <<_ACEOF
1548 +/* end confdefs.h.  */
1549  $ac_includes_default
1550  #include <$ac_header>
1551  _ACEOF
1552 @@ -4798,7 +5134,8 @@
1553    ac_header_compiler=yes
1554  else
1555    echo "$as_me: failed program was:" >&5
1556 -cat conftest.$ac_ext >&5
1557 +sed 's/^/| /' conftest.$ac_ext >&5
1558 +
1559  ac_header_compiler=no
1560  fi
1561  rm -f conftest.$ac_objext conftest.$ac_ext
1562 @@ -4810,7 +5147,11 @@
1563  echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
1564  cat >conftest.$ac_ext <<_ACEOF
1565  #line $LINENO "configure"
1566 -#include "confdefs.h"
1567 +/* confdefs.h.  */
1568 +_ACEOF
1569 +cat confdefs.h >>conftest.$ac_ext
1570 +cat >>conftest.$ac_ext <<_ACEOF
1571 +/* end confdefs.h.  */
1572  #include <$ac_header>
1573  _ACEOF
1574  if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
1575 @@ -4833,7 +5174,8 @@
1576    ac_header_preproc=yes
1577  else
1578    echo "$as_me: failed program was:" >&5
1579 -  cat conftest.$ac_ext >&5
1580 +sed 's/^/| /' conftest.$ac_ext >&5
1581 +
1582    ac_header_preproc=no
1583  fi
1584  rm -f conftest.err conftest.$ac_ext
1585 @@ -4846,14 +5188,32 @@
1586      { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
1587  echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
1588      { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
1589 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
1590 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
1591 +    (
1592 +      cat <<\_ASBOX
1593 +## ------------------------------------ ##
1594 +## Report this to bug-autoconf@gnu.org. ##
1595 +## ------------------------------------ ##
1596 +_ASBOX
1597 +    ) |
1598 +      sed "s/^/$as_me: WARNING:     /" >&2
1599 +    ;;
1600    no:yes )
1601      { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
1602  echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
1603      { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
1604  echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
1605      { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
1606 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
1607 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
1608 +    (
1609 +      cat <<\_ASBOX
1610 +## ------------------------------------ ##
1611 +## Report this to bug-autoconf@gnu.org. ##
1612 +## ------------------------------------ ##
1613 +_ASBOX
1614 +    ) |
1615 +      sed "s/^/$as_me: WARNING:     /" >&2
1616 +    ;;
1617  esac
1618  echo "$as_me:$LINENO: checking for $ac_header" >&5
1619  echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
1620 @@ -4884,7 +5244,11 @@
1621  else
1622    cat >conftest.$ac_ext <<_ACEOF
1623  #line $LINENO "configure"
1624 -#include "confdefs.h"
1625 +/* confdefs.h.  */
1626 +_ACEOF
1627 +cat confdefs.h >>conftest.$ac_ext
1628 +cat >>conftest.$ac_ext <<_ACEOF
1629 +/* end confdefs.h.  */
1630  $ac_includes_default
1631  int
1632  main ()
1633 @@ -4912,7 +5276,8 @@
1634    ac_cv_type_pid_t=yes
1635  else
1636    echo "$as_me: failed program was:" >&5
1637 -cat conftest.$ac_ext >&5
1638 +sed 's/^/| /' conftest.$ac_ext >&5
1639 +
1640  ac_cv_type_pid_t=no
1641  fi
1642  rm -f conftest.$ac_objext conftest.$ac_ext
1643 @@ -4936,7 +5301,11 @@
1644  else
1645    cat >conftest.$ac_ext <<_ACEOF
1646  #line $LINENO "configure"
1647 -#include "confdefs.h"
1648 +/* confdefs.h.  */
1649 +_ACEOF
1650 +cat confdefs.h >>conftest.$ac_ext
1651 +cat >>conftest.$ac_ext <<_ACEOF
1652 +/* end confdefs.h.  */
1653  $ac_includes_default
1654  int
1655  main ()
1656 @@ -4964,7 +5333,8 @@
1657    ac_cv_type_size_t=yes
1658  else
1659    echo "$as_me: failed program was:" >&5
1660 -cat conftest.$ac_ext >&5
1661 +sed 's/^/| /' conftest.$ac_ext >&5
1662 +
1663  ac_cv_type_size_t=no
1664  fi
1665  rm -f conftest.$ac_objext conftest.$ac_ext
1666 @@ -4988,7 +5358,11 @@
1667  else
1668    cat >conftest.$ac_ext <<_ACEOF
1669  #line $LINENO "configure"
1670 -#include "confdefs.h"
1671 +/* confdefs.h.  */
1672 +_ACEOF
1673 +cat confdefs.h >>conftest.$ac_ext
1674 +cat >>conftest.$ac_ext <<_ACEOF
1675 +/* end confdefs.h.  */
1676  
1677  int
1678  main ()
1679 @@ -5059,7 +5433,8 @@
1680    ac_cv_c_const=yes
1681  else
1682    echo "$as_me: failed program was:" >&5
1683 -cat conftest.$ac_ext >&5
1684 +sed 's/^/| /' conftest.$ac_ext >&5
1685 +
1686  ac_cv_c_const=no
1687  fi
1688  rm -f conftest.$ac_objext conftest.$ac_ext
1689 @@ -5082,7 +5457,11 @@
1690    # See if sys/param.h defines the BYTE_ORDER macro.
1691  cat >conftest.$ac_ext <<_ACEOF
1692  #line $LINENO "configure"
1693 -#include "confdefs.h"
1694 +/* confdefs.h.  */
1695 +_ACEOF
1696 +cat confdefs.h >>conftest.$ac_ext
1697 +cat >>conftest.$ac_ext <<_ACEOF
1698 +/* end confdefs.h.  */
1699  #include <sys/types.h>
1700  #include <sys/param.h>
1701  
1702 @@ -5112,7 +5491,11 @@
1703    # It does; now see whether it defined to BIG_ENDIAN or not.
1704  cat >conftest.$ac_ext <<_ACEOF
1705  #line $LINENO "configure"
1706 -#include "confdefs.h"
1707 +/* confdefs.h.  */
1708 +_ACEOF
1709 +cat confdefs.h >>conftest.$ac_ext
1710 +cat >>conftest.$ac_ext <<_ACEOF
1711 +/* end confdefs.h.  */
1712  #include <sys/types.h>
1713  #include <sys/param.h>
1714  
1715 @@ -5142,20 +5525,26 @@
1716    ac_cv_c_bigendian=yes
1717  else
1718    echo "$as_me: failed program was:" >&5
1719 -cat conftest.$ac_ext >&5
1720 +sed 's/^/| /' conftest.$ac_ext >&5
1721 +
1722  ac_cv_c_bigendian=no
1723  fi
1724  rm -f conftest.$ac_objext conftest.$ac_ext
1725  else
1726    echo "$as_me: failed program was:" >&5
1727 -cat conftest.$ac_ext >&5
1728 +sed 's/^/| /' conftest.$ac_ext >&5
1729 +
1730  # It does not; compile a test program.
1731  if test "$cross_compiling" = yes; then
1732    # try to guess the endianness by grepping values into an object file
1733    ac_cv_c_bigendian=unknown
1734    cat >conftest.$ac_ext <<_ACEOF
1735  #line $LINENO "configure"
1736 -#include "confdefs.h"
1737 +/* confdefs.h.  */
1738 +_ACEOF
1739 +cat confdefs.h >>conftest.$ac_ext
1740 +cat >>conftest.$ac_ext <<_ACEOF
1741 +/* end confdefs.h.  */
1742  short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
1743  short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
1744  void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
1745 @@ -5195,13 +5584,18 @@
1746  fi
1747  else
1748    echo "$as_me: failed program was:" >&5
1749 -cat conftest.$ac_ext >&5
1750 +sed 's/^/| /' conftest.$ac_ext >&5
1751 +
1752  fi
1753  rm -f conftest.$ac_objext conftest.$ac_ext
1754  else
1755    cat >conftest.$ac_ext <<_ACEOF
1756  #line $LINENO "configure"
1757 -#include "confdefs.h"
1758 +/* confdefs.h.  */
1759 +_ACEOF
1760 +cat confdefs.h >>conftest.$ac_ext
1761 +cat >>conftest.$ac_ext <<_ACEOF
1762 +/* end confdefs.h.  */
1763  int
1764  main ()
1765  {
1766 @@ -5230,7 +5624,8 @@
1767  else
1768    echo "$as_me: program exited with status $ac_status" >&5
1769  echo "$as_me: failed program was:" >&5
1770 -cat conftest.$ac_ext >&5
1771 +sed 's/^/| /' conftest.$ac_ext >&5
1772 +
1773  ( exit $ac_status )
1774  ac_cv_c_bigendian=yes
1775  fi
1776 @@ -5267,7 +5662,11 @@
1777  for ac_kw in inline __inline__ __inline; do
1778    cat >conftest.$ac_ext <<_ACEOF
1779  #line $LINENO "configure"
1780 -#include "confdefs.h"
1781 +/* confdefs.h.  */
1782 +_ACEOF
1783 +cat confdefs.h >>conftest.$ac_ext
1784 +cat >>conftest.$ac_ext <<_ACEOF
1785 +/* end confdefs.h.  */
1786  #ifndef __cplusplus
1787  typedef int foo_t;
1788  static $ac_kw foo_t static_foo () {return 0; }
1789 @@ -5290,7 +5689,8 @@
1790    ac_cv_c_inline=$ac_kw; break
1791  else
1792    echo "$as_me: failed program was:" >&5
1793 -cat conftest.$ac_ext >&5
1794 +sed 's/^/| /' conftest.$ac_ext >&5
1795 +
1796  fi
1797  rm -f conftest.$ac_objext conftest.$ac_ext
1798  done
1799 @@ -5318,7 +5718,11 @@
1800  else
1801    cat >conftest.$ac_ext <<_ACEOF
1802  #line $LINENO "configure"
1803 -#include "confdefs.h"
1804 +/* confdefs.h.  */
1805 +_ACEOF
1806 +cat confdefs.h >>conftest.$ac_ext
1807 +cat >>conftest.$ac_ext <<_ACEOF
1808 +/* end confdefs.h.  */
1809  $ac_includes_default
1810  int
1811  main ()
1812 @@ -5346,7 +5750,8 @@
1813    ac_cv_type_long=yes
1814  else
1815    echo "$as_me: failed program was:" >&5
1816 -cat conftest.$ac_ext >&5
1817 +sed 's/^/| /' conftest.$ac_ext >&5
1818 +
1819  ac_cv_type_long=no
1820  fi
1821  rm -f conftest.$ac_objext conftest.$ac_ext
1822 @@ -5368,7 +5773,11 @@
1823    # Depending upon the size, compute the lo and hi bounds.
1824  cat >conftest.$ac_ext <<_ACEOF
1825  #line $LINENO "configure"
1826 -#include "confdefs.h"
1827 +/* confdefs.h.  */
1828 +_ACEOF
1829 +cat confdefs.h >>conftest.$ac_ext
1830 +cat >>conftest.$ac_ext <<_ACEOF
1831 +/* end confdefs.h.  */
1832  $ac_includes_default
1833  int
1834  main ()
1835 @@ -5396,7 +5805,11 @@
1836    while :; do
1837      cat >conftest.$ac_ext <<_ACEOF
1838  #line $LINENO "configure"
1839 -#include "confdefs.h"
1840 +/* confdefs.h.  */
1841 +_ACEOF
1842 +cat confdefs.h >>conftest.$ac_ext
1843 +cat >>conftest.$ac_ext <<_ACEOF
1844 +/* end confdefs.h.  */
1845  $ac_includes_default
1846  int
1847  main ()
1848 @@ -5423,7 +5836,8 @@
1849    ac_hi=$ac_mid; break
1850  else
1851    echo "$as_me: failed program was:" >&5
1852 -cat conftest.$ac_ext >&5
1853 +sed 's/^/| /' conftest.$ac_ext >&5
1854 +
1855  ac_lo=`expr $ac_mid + 1`
1856                      if test $ac_lo -le $ac_mid; then
1857                        ac_lo= ac_hi=
1858 @@ -5435,10 +5849,15 @@
1859    done
1860  else
1861    echo "$as_me: failed program was:" >&5
1862 -cat conftest.$ac_ext >&5
1863 +sed 's/^/| /' conftest.$ac_ext >&5
1864 +
1865  cat >conftest.$ac_ext <<_ACEOF
1866  #line $LINENO "configure"
1867 -#include "confdefs.h"
1868 +/* confdefs.h.  */
1869 +_ACEOF
1870 +cat confdefs.h >>conftest.$ac_ext
1871 +cat >>conftest.$ac_ext <<_ACEOF
1872 +/* end confdefs.h.  */
1873  $ac_includes_default
1874  int
1875  main ()
1876 @@ -5466,7 +5885,11 @@
1877    while :; do
1878      cat >conftest.$ac_ext <<_ACEOF
1879  #line $LINENO "configure"
1880 -#include "confdefs.h"
1881 +/* confdefs.h.  */
1882 +_ACEOF
1883 +cat confdefs.h >>conftest.$ac_ext
1884 +cat >>conftest.$ac_ext <<_ACEOF
1885 +/* end confdefs.h.  */
1886  $ac_includes_default
1887  int
1888  main ()
1889 @@ -5493,7 +5916,8 @@
1890    ac_lo=$ac_mid; break
1891  else
1892    echo "$as_me: failed program was:" >&5
1893 -cat conftest.$ac_ext >&5
1894 +sed 's/^/| /' conftest.$ac_ext >&5
1895 +
1896  ac_hi=`expr '(' $ac_mid ')' - 1`
1897                         if test $ac_mid -le $ac_hi; then
1898                           ac_lo= ac_hi=
1899 @@ -5505,7 +5929,8 @@
1900    done
1901  else
1902    echo "$as_me: failed program was:" >&5
1903 -cat conftest.$ac_ext >&5
1904 +sed 's/^/| /' conftest.$ac_ext >&5
1905 +
1906  ac_lo= ac_hi=
1907  fi
1908  rm -f conftest.$ac_objext conftest.$ac_ext
1909 @@ -5516,7 +5941,11 @@
1910    ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
1911    cat >conftest.$ac_ext <<_ACEOF
1912  #line $LINENO "configure"
1913 -#include "confdefs.h"
1914 +/* confdefs.h.  */
1915 +_ACEOF
1916 +cat confdefs.h >>conftest.$ac_ext
1917 +cat >>conftest.$ac_ext <<_ACEOF
1918 +/* end confdefs.h.  */
1919  $ac_includes_default
1920  int
1921  main ()
1922 @@ -5543,26 +5972,35 @@
1923    ac_hi=$ac_mid
1924  else
1925    echo "$as_me: failed program was:" >&5
1926 -cat conftest.$ac_ext >&5
1927 +sed 's/^/| /' conftest.$ac_ext >&5
1928 +
1929  ac_lo=`expr '(' $ac_mid ')' + 1`
1930  fi
1931  rm -f conftest.$ac_objext conftest.$ac_ext
1932  done
1933  case $ac_lo in
1934  ?*) ac_cv_sizeof_long=$ac_lo;;
1935 -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
1936 -echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
1937 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
1938 +See \`config.log' for more details." >&5
1939 +echo "$as_me: error: cannot compute sizeof (long), 77
1940 +See \`config.log' for more details." >&2;}
1941     { (exit 1); exit 1; }; } ;;
1942  esac
1943  else
1944    if test "$cross_compiling" = yes; then
1945 -  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
1946 -echo "$as_me: error: cannot run test program while cross compiling" >&2;}
1947 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
1948 +See \`config.log' for more details." >&5
1949 +echo "$as_me: error: cannot run test program while cross compiling
1950 +See \`config.log' for more details." >&2;}
1951     { (exit 1); exit 1; }; }
1952  else
1953    cat >conftest.$ac_ext <<_ACEOF
1954  #line $LINENO "configure"
1955 -#include "confdefs.h"
1956 +/* confdefs.h.  */
1957 +_ACEOF
1958 +cat confdefs.h >>conftest.$ac_ext
1959 +cat >>conftest.$ac_ext <<_ACEOF
1960 +/* end confdefs.h.  */
1961  $ac_includes_default
1962  long longval () { return (long) (sizeof (long)); }
1963  unsigned long ulongval () { return (long) (sizeof (long)); }
1964 @@ -5610,10 +6048,13 @@
1965  else
1966    echo "$as_me: program exited with status $ac_status" >&5
1967  echo "$as_me: failed program was:" >&5
1968 -cat conftest.$ac_ext >&5
1969 +sed 's/^/| /' conftest.$ac_ext >&5
1970 +
1971  ( exit $ac_status )
1972 -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
1973 -echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
1974 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
1975 +See \`config.log' for more details." >&5
1976 +echo "$as_me: error: cannot compute sizeof (long), 77
1977 +See \`config.log' for more details." >&2;}
1978     { (exit 1); exit 1; }; }
1979  fi
1980  rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
1981 @@ -5638,7 +6079,11 @@
1982  else
1983    cat >conftest.$ac_ext <<_ACEOF
1984  #line $LINENO "configure"
1985 -#include "confdefs.h"
1986 +/* confdefs.h.  */
1987 +_ACEOF
1988 +cat confdefs.h >>conftest.$ac_ext
1989 +cat >>conftest.$ac_ext <<_ACEOF
1990 +/* end confdefs.h.  */
1991  $ac_includes_default
1992  int
1993  main ()
1994 @@ -5666,7 +6111,8 @@
1995    ac_cv_type_int=yes
1996  else
1997    echo "$as_me: failed program was:" >&5
1998 -cat conftest.$ac_ext >&5
1999 +sed 's/^/| /' conftest.$ac_ext >&5
2000 +
2001  ac_cv_type_int=no
2002  fi
2003  rm -f conftest.$ac_objext conftest.$ac_ext
2004 @@ -5688,7 +6134,11 @@
2005    # Depending upon the size, compute the lo and hi bounds.
2006  cat >conftest.$ac_ext <<_ACEOF
2007  #line $LINENO "configure"
2008 -#include "confdefs.h"
2009 +/* confdefs.h.  */
2010 +_ACEOF
2011 +cat confdefs.h >>conftest.$ac_ext
2012 +cat >>conftest.$ac_ext <<_ACEOF
2013 +/* end confdefs.h.  */
2014  $ac_includes_default
2015  int
2016  main ()
2017 @@ -5716,7 +6166,11 @@
2018    while :; do
2019      cat >conftest.$ac_ext <<_ACEOF
2020  #line $LINENO "configure"
2021 -#include "confdefs.h"
2022 +/* confdefs.h.  */
2023 +_ACEOF
2024 +cat confdefs.h >>conftest.$ac_ext
2025 +cat >>conftest.$ac_ext <<_ACEOF
2026 +/* end confdefs.h.  */
2027  $ac_includes_default
2028  int
2029  main ()
2030 @@ -5743,7 +6197,8 @@
2031    ac_hi=$ac_mid; break
2032  else
2033    echo "$as_me: failed program was:" >&5
2034 -cat conftest.$ac_ext >&5
2035 +sed 's/^/| /' conftest.$ac_ext >&5
2036 +
2037  ac_lo=`expr $ac_mid + 1`
2038                      if test $ac_lo -le $ac_mid; then
2039                        ac_lo= ac_hi=
2040 @@ -5755,10 +6210,15 @@
2041    done
2042  else
2043    echo "$as_me: failed program was:" >&5
2044 -cat conftest.$ac_ext >&5
2045 +sed 's/^/| /' conftest.$ac_ext >&5
2046 +
2047  cat >conftest.$ac_ext <<_ACEOF
2048  #line $LINENO "configure"
2049 -#include "confdefs.h"
2050 +/* confdefs.h.  */
2051 +_ACEOF
2052 +cat confdefs.h >>conftest.$ac_ext
2053 +cat >>conftest.$ac_ext <<_ACEOF
2054 +/* end confdefs.h.  */
2055  $ac_includes_default
2056  int
2057  main ()
2058 @@ -5786,7 +6246,11 @@
2059    while :; do
2060      cat >conftest.$ac_ext <<_ACEOF
2061  #line $LINENO "configure"
2062 -#include "confdefs.h"
2063 +/* confdefs.h.  */
2064 +_ACEOF
2065 +cat confdefs.h >>conftest.$ac_ext
2066 +cat >>conftest.$ac_ext <<_ACEOF
2067 +/* end confdefs.h.  */
2068  $ac_includes_default
2069  int
2070  main ()
2071 @@ -5813,7 +6277,8 @@
2072    ac_lo=$ac_mid; break
2073  else
2074    echo "$as_me: failed program was:" >&5
2075 -cat conftest.$ac_ext >&5
2076 +sed 's/^/| /' conftest.$ac_ext >&5
2077 +
2078  ac_hi=`expr '(' $ac_mid ')' - 1`
2079                         if test $ac_mid -le $ac_hi; then
2080                           ac_lo= ac_hi=
2081 @@ -5825,7 +6290,8 @@
2082    done
2083  else
2084    echo "$as_me: failed program was:" >&5
2085 -cat conftest.$ac_ext >&5
2086 +sed 's/^/| /' conftest.$ac_ext >&5
2087 +
2088  ac_lo= ac_hi=
2089  fi
2090  rm -f conftest.$ac_objext conftest.$ac_ext
2091 @@ -5836,7 +6302,11 @@
2092    ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2093    cat >conftest.$ac_ext <<_ACEOF
2094  #line $LINENO "configure"
2095 -#include "confdefs.h"
2096 +/* confdefs.h.  */
2097 +_ACEOF
2098 +cat confdefs.h >>conftest.$ac_ext
2099 +cat >>conftest.$ac_ext <<_ACEOF
2100 +/* end confdefs.h.  */
2101  $ac_includes_default
2102  int
2103  main ()
2104 @@ -5863,26 +6333,35 @@
2105    ac_hi=$ac_mid
2106  else
2107    echo "$as_me: failed program was:" >&5
2108 -cat conftest.$ac_ext >&5
2109 +sed 's/^/| /' conftest.$ac_ext >&5
2110 +
2111  ac_lo=`expr '(' $ac_mid ')' + 1`
2112  fi
2113  rm -f conftest.$ac_objext conftest.$ac_ext
2114  done
2115  case $ac_lo in
2116  ?*) ac_cv_sizeof_int=$ac_lo;;
2117 -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
2118 -echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
2119 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
2120 +See \`config.log' for more details." >&5
2121 +echo "$as_me: error: cannot compute sizeof (int), 77
2122 +See \`config.log' for more details." >&2;}
2123     { (exit 1); exit 1; }; } ;;
2124  esac
2125  else
2126    if test "$cross_compiling" = yes; then
2127 -  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
2128 -echo "$as_me: error: cannot run test program while cross compiling" >&2;}
2129 +  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
2130 +See \`config.log' for more details." >&5
2131 +echo "$as_me: error: cannot run test program while cross compiling
2132 +See \`config.log' for more details." >&2;}
2133     { (exit 1); exit 1; }; }
2134  else
2135    cat >conftest.$ac_ext <<_ACEOF
2136  #line $LINENO "configure"
2137 -#include "confdefs.h"
2138 +/* confdefs.h.  */
2139 +_ACEOF
2140 +cat confdefs.h >>conftest.$ac_ext
2141 +cat >>conftest.$ac_ext <<_ACEOF
2142 +/* end confdefs.h.  */
2143  $ac_includes_default
2144  long longval () { return (long) (sizeof (int)); }
2145  unsigned long ulongval () { return (long) (sizeof (int)); }
2146 @@ -5930,10 +6409,13 @@
2147  else
2148    echo "$as_me: program exited with status $ac_status" >&5
2149  echo "$as_me: failed program was:" >&5
2150 -cat conftest.$ac_ext >&5
2151 +sed 's/^/| /' conftest.$ac_ext >&5
2152 +
2153  ( exit $ac_status )
2154 -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
2155 -echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
2156 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
2157 +See \`config.log' for more details." >&5
2158 +echo "$as_me: error: cannot compute sizeof (int), 77
2159 +See \`config.log' for more details." >&2;}
2160     { (exit 1); exit 1; }; }
2161  fi
2162  rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2163 @@ -5964,7 +6446,11 @@
2164  else
2165    cat >conftest.$ac_ext <<_ACEOF
2166  #line $LINENO "configure"
2167 -#include "confdefs.h"
2168 +/* confdefs.h.  */
2169 +_ACEOF
2170 +cat confdefs.h >>conftest.$ac_ext
2171 +cat >>conftest.$ac_ext <<_ACEOF
2172 +/* end confdefs.h.  */
2173  
2174  #include <fcntl.h>
2175  #include <sys/socket.h>
2176 @@ -6000,7 +6486,8 @@
2177  else
2178    echo "$as_me: program exited with status $ac_status" >&5
2179  echo "$as_me: failed program was:" >&5
2180 -cat conftest.$ac_ext >&5
2181 +sed 's/^/| /' conftest.$ac_ext >&5
2182 +
2183  ( exit $ac_status )
2184  egg_cv_ipv6_supported=no
2185  fi
2186 @@ -6032,8 +6519,8 @@
2187  
2188  else
2189     ac_cv_ipv6="no"
2190 -  echo "$as_me:$LINENO: result: $ac_cv_ipv6" >&5
2191 -echo "${ECHO_T}$ac_cv_ipv6" >&6
2192 +  echo "$as_me:$LINENO: result: no" >&5
2193 +echo "${ECHO_T}no" >&6
2194  
2195  fi;
2196  if test "$ac_cv_ipv6" = "yes"
2197 @@ -6055,7 +6542,13 @@
2198  
2199  
2200  
2201 -for ac_func in clock getrusage setpgid uname sigaction sigemptyset rename
2202 +
2203 +
2204 +
2205 +
2206 +
2207 +
2208 +for ac_func in clock getrusage setpgid uname sigaction sigemptyset rename strcasecmp strncasecmp getdtablesize memset random srandom
2209  do
2210  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2211  echo "$as_me:$LINENO: checking for $ac_func" >&5
2212 @@ -6065,31 +6558,44 @@
2213  else
2214    cat >conftest.$ac_ext <<_ACEOF
2215  #line $LINENO "configure"
2216 -#include "confdefs.h"
2217 +/* confdefs.h.  */
2218 +_ACEOF
2219 +cat confdefs.h >>conftest.$ac_ext
2220 +cat >>conftest.$ac_ext <<_ACEOF
2221 +/* end confdefs.h.  */
2222  /* System header to define __stub macros and hopefully few prototypes,
2223 -    which can conflict with char $ac_func (); below.  */
2224 -#include <assert.h>
2225 +    which can conflict with char $ac_func (); below.
2226 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2227 +    <limits.h> exists even on freestanding compilers.  */
2228 +#ifdef __STDC__
2229 +# include <limits.h>
2230 +#else
2231 +# include <assert.h>
2232 +#endif
2233  /* Override any gcc2 internal prototype to avoid an error.  */
2234  #ifdef __cplusplus
2235  extern "C"
2236 +{
2237  #endif
2238  /* We use char because int might match the return type of a gcc2
2239     builtin and then its argument prototype would still apply.  */
2240  char $ac_func ();
2241 -char (*f) ();
2242 -
2243 -int
2244 -main ()
2245 -{
2246  /* The GNU C library defines this for functions which it implements
2247      to always fail with ENOSYS.  Some functions are actually named
2248      something starting with __ and the normal name is an alias.  */
2249  #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2250  choke me
2251  #else
2252 -f = $ac_func;
2253 +char (*f) () = $ac_func;
2254 +#endif
2255 +#ifdef __cplusplus
2256 +}
2257  #endif
2258  
2259 +int
2260 +main ()
2261 +{
2262 +return f != $ac_func;
2263    ;
2264    return 0;
2265  }
2266 @@ -6109,7 +6615,8 @@
2267    eval "$as_ac_var=yes"
2268  else
2269    echo "$as_me: failed program was:" >&5
2270 -cat conftest.$ac_ext >&5
2271 +sed 's/^/| /' conftest.$ac_ext >&5
2272 +
2273  eval "$as_ac_var=no"
2274  fi
2275  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2276 @@ -6130,83 +6637,13 @@
2277  
2278  
2279  
2280 -for ac_func in strcasecmp strncasecmp getdtablesize memset random srandom
2281 -do
2282 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2283 -echo "$as_me:$LINENO: checking for $ac_func" >&5
2284 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
2285 -if eval "test \"\${$as_ac_var+set}\" = set"; then
2286 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2287 -else
2288 -  cat >conftest.$ac_ext <<_ACEOF
2289 -#line $LINENO "configure"
2290 -#include "confdefs.h"
2291 -/* System header to define __stub macros and hopefully few prototypes,
2292 -    which can conflict with char $ac_func (); below.  */
2293 -#include <assert.h>
2294 -/* Override any gcc2 internal prototype to avoid an error.  */
2295 -#ifdef __cplusplus
2296 -extern "C"
2297 -#endif
2298 -/* We use char because int might match the return type of a gcc2
2299 -   builtin and then its argument prototype would still apply.  */
2300 -char $ac_func ();
2301 -char (*f) ();
2302  
2303 -int
2304 -main ()
2305 -{
2306 -/* The GNU C library defines this for functions which it implements
2307 -    to always fail with ENOSYS.  Some functions are actually named
2308 -    something starting with __ and the normal name is an alias.  */
2309 -#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2310 -choke me
2311 -#else
2312 -f = $ac_func;
2313 -#endif
2314 -
2315 -  ;
2316 -  return 0;
2317 -}
2318 -_ACEOF
2319 -rm -f conftest.$ac_objext conftest$ac_exeext
2320 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2321 -  (eval $ac_link) 2>&5
2322 -  ac_status=$?
2323 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2324 -  (exit $ac_status); } &&
2325 -         { ac_try='test -s conftest$ac_exeext'
2326 -  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2327 -  (eval $ac_try) 2>&5
2328 -  ac_status=$?
2329 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330 -  (exit $ac_status); }; }; then
2331 -  eval "$as_ac_var=yes"
2332 -else
2333 -  echo "$as_me: failed program was:" >&5
2334 -cat conftest.$ac_ext >&5
2335 -eval "$as_ac_var=no"
2336 -fi
2337 -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2338 -fi
2339 -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
2340 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
2341 -if test `eval echo '${'$as_ac_var'}'` = yes; then
2342 -  cat >>confdefs.h <<_ACEOF
2343 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
2344 -_ACEOF
2345 -
2346 -fi
2347 -done
2348  
2349  
2350  
2351  
2352  
2353 -
2354 -
2355 -
2356 -for ac_func in dlopen dprintf snprintf vsnprintf isascii inet_aton inet_ntop
2357 +for ac_func in dlopen dprintf snprintf vsnprintf isascii inet_aton inet_ntop memcpy strftime fsync gethostbyname2 getipnodebyname
2358  do
2359  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2360  echo "$as_me:$LINENO: checking for $ac_func" >&5
2361 @@ -6216,105 +6653,44 @@
2362  else
2363    cat >conftest.$ac_ext <<_ACEOF
2364  #line $LINENO "configure"
2365 -#include "confdefs.h"
2366 +/* confdefs.h.  */
2367 +_ACEOF
2368 +cat confdefs.h >>conftest.$ac_ext
2369 +cat >>conftest.$ac_ext <<_ACEOF
2370 +/* end confdefs.h.  */
2371  /* System header to define __stub macros and hopefully few prototypes,
2372 -    which can conflict with char $ac_func (); below.  */
2373 -#include <assert.h>
2374 +    which can conflict with char $ac_func (); below.
2375 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2376 +    <limits.h> exists even on freestanding compilers.  */
2377 +#ifdef __STDC__
2378 +# include <limits.h>
2379 +#else
2380 +# include <assert.h>
2381 +#endif
2382  /* Override any gcc2 internal prototype to avoid an error.  */
2383  #ifdef __cplusplus
2384  extern "C"
2385 +{
2386  #endif
2387  /* We use char because int might match the return type of a gcc2
2388     builtin and then its argument prototype would still apply.  */
2389  char $ac_func ();
2390 -char (*f) ();
2391 -
2392 -int
2393 -main ()
2394 -{
2395  /* The GNU C library defines this for functions which it implements
2396      to always fail with ENOSYS.  Some functions are actually named
2397      something starting with __ and the normal name is an alias.  */
2398  #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2399  choke me
2400  #else
2401 -f = $ac_func;
2402 +char (*f) () = $ac_func;
2403  #endif
2404 -
2405 -  ;
2406 -  return 0;
2407 -}
2408 -_ACEOF
2409 -rm -f conftest.$ac_objext conftest$ac_exeext
2410 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2411 -  (eval $ac_link) 2>&5
2412 -  ac_status=$?
2413 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2414 -  (exit $ac_status); } &&
2415 -         { ac_try='test -s conftest$ac_exeext'
2416 -  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2417 -  (eval $ac_try) 2>&5
2418 -  ac_status=$?
2419 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420 -  (exit $ac_status); }; }; then
2421 -  eval "$as_ac_var=yes"
2422 -else
2423 -  echo "$as_me: failed program was:" >&5
2424 -cat conftest.$ac_ext >&5
2425 -eval "$as_ac_var=no"
2426 -fi
2427 -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2428 -fi
2429 -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
2430 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
2431 -if test `eval echo '${'$as_ac_var'}'` = yes; then
2432 -  cat >>confdefs.h <<_ACEOF
2433 -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
2434 -_ACEOF
2435 -
2436 -fi
2437 -done
2438 -
2439 -
2440 -
2441 -
2442 -
2443 -
2444 -for ac_func in memcpy strftime fsync gethostbyname2 getipnodebyname
2445 -do
2446 -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2447 -echo "$as_me:$LINENO: checking for $ac_func" >&5
2448 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
2449 -if eval "test \"\${$as_ac_var+set}\" = set"; then
2450 -  echo $ECHO_N "(cached) $ECHO_C" >&6
2451 -else
2452 -  cat >conftest.$ac_ext <<_ACEOF
2453 -#line $LINENO "configure"
2454 -#include "confdefs.h"
2455 -/* System header to define __stub macros and hopefully few prototypes,
2456 -    which can conflict with char $ac_func (); below.  */
2457 -#include <assert.h>
2458 -/* Override any gcc2 internal prototype to avoid an error.  */
2459  #ifdef __cplusplus
2460 -extern "C"
2461 +}
2462  #endif
2463 -/* We use char because int might match the return type of a gcc2
2464 -   builtin and then its argument prototype would still apply.  */
2465 -char $ac_func ();
2466 -char (*f) ();
2467  
2468  int
2469  main ()
2470  {
2471 -/* The GNU C library defines this for functions which it implements
2472 -    to always fail with ENOSYS.  Some functions are actually named
2473 -    something starting with __ and the normal name is an alias.  */
2474 -#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2475 -choke me
2476 -#else
2477 -f = $ac_func;
2478 -#endif
2479 -
2480 +return f != $ac_func;
2481    ;
2482    return 0;
2483  }
2484 @@ -6334,7 +6710,8 @@
2485    eval "$as_ac_var=yes"
2486  else
2487    echo "$as_me: failed program was:" >&5
2488 -cat conftest.$ac_ext >&5
2489 +sed 's/^/| /' conftest.$ac_ext >&5
2490 +
2491  eval "$as_ac_var=no"
2492  fi
2493  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2494 @@ -6360,31 +6737,44 @@
2495  else
2496    cat >conftest.$ac_ext <<_ACEOF
2497  #line $LINENO "configure"
2498 -#include "confdefs.h"
2499 +/* confdefs.h.  */
2500 +_ACEOF
2501 +cat confdefs.h >>conftest.$ac_ext
2502 +cat >>conftest.$ac_ext <<_ACEOF
2503 +/* end confdefs.h.  */
2504  /* System header to define __stub macros and hopefully few prototypes,
2505 -    which can conflict with char $ac_func (); below.  */
2506 -#include <assert.h>
2507 +    which can conflict with char $ac_func (); below.
2508 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2509 +    <limits.h> exists even on freestanding compilers.  */
2510 +#ifdef __STDC__
2511 +# include <limits.h>
2512 +#else
2513 +# include <assert.h>
2514 +#endif
2515  /* Override any gcc2 internal prototype to avoid an error.  */
2516  #ifdef __cplusplus
2517  extern "C"
2518 +{
2519  #endif
2520  /* We use char because int might match the return type of a gcc2
2521     builtin and then its argument prototype would still apply.  */
2522  char $ac_func ();
2523 -char (*f) ();
2524 -
2525 -int
2526 -main ()
2527 -{
2528  /* The GNU C library defines this for functions which it implements
2529      to always fail with ENOSYS.  Some functions are actually named
2530      something starting with __ and the normal name is an alias.  */
2531  #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2532  choke me
2533  #else
2534 -f = $ac_func;
2535 +char (*f) () = $ac_func;
2536 +#endif
2537 +#ifdef __cplusplus
2538 +}
2539  #endif
2540  
2541 +int
2542 +main ()
2543 +{
2544 +return f != $ac_func;
2545    ;
2546    return 0;
2547  }
2548 @@ -6404,7 +6794,8 @@
2549    eval "$as_ac_var=yes"
2550  else
2551    echo "$as_me: failed program was:" >&5
2552 -cat conftest.$ac_ext >&5
2553 +sed 's/^/| /' conftest.$ac_ext >&5
2554 +
2555  eval "$as_ac_var=no"
2556  fi
2557  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2558 @@ -6457,7 +6848,11 @@
2559  else
2560    cat >conftest.$ac_ext <<_ACEOF
2561  #line $LINENO "configure"
2562 -#include "confdefs.h"
2563 +/* confdefs.h.  */
2564 +_ACEOF
2565 +cat confdefs.h >>conftest.$ac_ext
2566 +cat >>conftest.$ac_ext <<_ACEOF
2567 +/* end confdefs.h.  */
2568  
2569  #include <stdio.h>
2570  
2571 @@ -6488,7 +6883,8 @@
2572  else
2573    echo "$as_me: program exited with status $ac_status" >&5
2574  echo "$as_me: failed program was:" >&5
2575 -cat conftest.$ac_ext >&5
2576 +sed 's/^/| /' conftest.$ac_ext >&5
2577 +
2578  ( exit $ac_status )
2579  egg_cv_var_libsafe_sscanf="yes"
2580  fi
2581 @@ -6994,7 +7390,11 @@
2582  LIBS="-l$TCL_TEST_LIB $TCL_TEST_OTHERLIBS $LIBS"
2583  cat >conftest.$ac_ext <<_ACEOF
2584  #line $LINENO "configure"
2585 -#include "confdefs.h"
2586 +/* confdefs.h.  */
2587 +_ACEOF
2588 +cat confdefs.h >>conftest.$ac_ext
2589 +cat >>conftest.$ac_ext <<_ACEOF
2590 +/* end confdefs.h.  */
2591  
2592  /* Override any gcc2 internal prototype to avoid an error.  */
2593  #ifdef __cplusplus
2594 @@ -7026,7 +7426,8 @@
2595    eval "$as_ac_Lib=yes"
2596  else
2597    echo "$as_me: failed program was:" >&5
2598 -cat conftest.$ac_ext >&5
2599 +sed 's/^/| /' conftest.$ac_ext >&5
2600 +
2601  eval "$as_ac_Lib=no"
2602  fi
2603  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2604 @@ -7073,7 +7474,11 @@
2605  LIBS="-l$TCL_TEST_LIB $TCL_TEST_OTHERLIBS $LIBS"
2606  cat >conftest.$ac_ext <<_ACEOF
2607  #line $LINENO "configure"
2608 -#include "confdefs.h"
2609 +/* confdefs.h.  */
2610 +_ACEOF
2611 +cat confdefs.h >>conftest.$ac_ext
2612 +cat >>conftest.$ac_ext <<_ACEOF
2613 +/* end confdefs.h.  */
2614  
2615  /* Override any gcc2 internal prototype to avoid an error.  */
2616  #ifdef __cplusplus
2617 @@ -7105,7 +7510,8 @@
2618    eval "$as_ac_Lib=yes"
2619  else
2620    echo "$as_me: failed program was:" >&5
2621 -cat conftest.$ac_ext >&5
2622 +sed 's/^/| /' conftest.$ac_ext >&5
2623 +
2624  eval "$as_ac_Lib=no"
2625  fi
2626  rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2627 @@ -7201,6 +7607,346 @@
2628  
2629  # ---------- end of (what used to be) robey's Tcl thingies
2630  
2631 +#ssl checks - hoe
2632 +echo "$as_me:$LINENO: checking whether to include SSL support" >&5
2633 +echo $ECHO_N "checking whether to include SSL support... $ECHO_C" >&6
2634 +
2635 +# Check whether --with-ssl or --without-ssl was given.
2636 +if test "${with_ssl+set}" = set; then
2637 +  withval="$with_ssl"
2638 +
2639 +  case "$withval" in
2640 +    no)
2641 +      echo "$as_me:$LINENO: result: no" >&5
2642 +echo "${ECHO_T}no" >&6 ;;
2643 +    yes)
2644 +      echo "$as_me:$LINENO: result: yes" >&5
2645 +echo "${ECHO_T}yes" >&6
2646 +      echo "$as_me:$LINENO: checking for SSL_accept in -lssl" >&5
2647 +echo $ECHO_N "checking for SSL_accept in -lssl... $ECHO_C" >&6
2648 +if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then
2649 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2650 +else
2651 +  ac_check_lib_save_LIBS=$LIBS
2652 +LIBS="-lssl -lcrypto $LIBS"
2653 +cat >conftest.$ac_ext <<_ACEOF
2654 +#line $LINENO "configure"
2655 +/* confdefs.h.  */
2656 +_ACEOF
2657 +cat confdefs.h >>conftest.$ac_ext
2658 +cat >>conftest.$ac_ext <<_ACEOF
2659 +/* end confdefs.h.  */
2660 +
2661 +/* Override any gcc2 internal prototype to avoid an error.  */
2662 +#ifdef __cplusplus
2663 +extern "C"
2664 +#endif
2665 +/* We use char because int might match the return type of a gcc2
2666 +   builtin and then its argument prototype would still apply.  */
2667 +char SSL_accept ();
2668 +int
2669 +main ()
2670 +{
2671 +SSL_accept ();
2672 +  ;
2673 +  return 0;
2674 +}
2675 +_ACEOF
2676 +rm -f conftest.$ac_objext conftest$ac_exeext
2677 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2678 +  (eval $ac_link) 2>&5
2679 +  ac_status=$?
2680 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2681 +  (exit $ac_status); } &&
2682 +         { ac_try='test -s conftest$ac_exeext'
2683 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2684 +  (eval $ac_try) 2>&5
2685 +  ac_status=$?
2686 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2687 +  (exit $ac_status); }; }; then
2688 +  ac_cv_lib_ssl_SSL_accept=yes
2689 +else
2690 +  echo "$as_me: failed program was:" >&5
2691 +sed 's/^/| /' conftest.$ac_ext >&5
2692 +
2693 +ac_cv_lib_ssl_SSL_accept=no
2694 +fi
2695 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2696 +LIBS=$ac_check_lib_save_LIBS
2697 +fi
2698 +echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_accept" >&5
2699 +echo "${ECHO_T}$ac_cv_lib_ssl_SSL_accept" >&6
2700 +if test $ac_cv_lib_ssl_SSL_accept = yes; then
2701 +  cat >>confdefs.h <<\_ACEOF
2702 +#define EGG_SSL_EXT 1
2703 +_ACEOF
2704 +
2705 +      SSL_LIBS="-lssl -lcrypto"
2706 +else
2707 +  { { echo "$as_me:$LINENO: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
2708 +echo "$as_me: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
2709 +   { (exit 1); exit 1; }; }
2710 +fi
2711 +
2712 +      ;;
2713 +    *)
2714 +      test -f $withval/openssl/ssl.h && SSL_INCLUDE="$withval"
2715 +      test -f $withval/include/openssl/ssl.h && SSL_INCLUDE="$withval/include"
2716 +
2717 +      test -f $withval/lib/libssl.a && SSL_LIB="$withval/lib"
2718 +      test -f $withval/lib/ssl/libssl.a && SSL_LIB="$withval/lib/ssl"
2719 +      test -f $withval/lib/openssl/libssl.a && SSL_LIB="$withval/lib/openssl/ssl"
2720 +      test -f $withval/libssl.a && SSL_LIB="$withval"
2721 +      test -f $withval/ssl/libssl.a && SSL_LIB="$withval/ssl"
2722 +      test -f $withval/openssl/libssl.a && SSL_LIB="$withval/openssl"
2723 +
2724 +      test -f $withval/lib/libcrypto.a && CRYPTO_LIB="$withval/lib"
2725 +      test -f $withval/lib/ssl/libcrypto.a && CRYPTO_LIB="$withval/lib/ssl"
2726 +      test -f $withval/lib/openssl/libcrypto.a && CRYPTO_LIB="$withval/lib/openssl/ssl"
2727 +      test -f $withval/libcrypto.a && CRYPTO_LIB="$withval"
2728 +      test -f $withval/ssl/libcrypto.a && CRYPTO_LIB="$withval/ssl"
2729 +      test -f $withval/openssl/libcrypto.a && CRYPTO_LIB="$withval/openssl"
2730 +
2731 +      if test -n "$SSL_INCLUDE" && test -n "$SSL_LIB" && test -n "$CRYPTO_LIB"; then
2732 +        SSL_LIBS="-lssl -lcrypto -L$SSL_LIB -L$CRYPTO_LIB";
2733 +        cat >>confdefs.h <<\_ACEOF
2734 +#define EGG_SSL_EXT 1
2735 +_ACEOF
2736 +
2737 +        echo "$as_me:$LINENO: result: yes" >&5
2738 +echo "${ECHO_T}yes" >&6
2739 +      else
2740 +        echo "$as_me:$LINENO: result: no" >&5
2741 +echo "${ECHO_T}no" >&6
2742 +        { { echo "$as_me:$LINENO: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
2743 +echo "$as_me: error: You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
2744 +   { (exit 1); exit 1; }; }
2745 +      fi ;;
2746 +  esac
2747 +
2748 +else
2749 +
2750 +    echo "$as_me:$LINENO: result: will try to find" >&5
2751 +echo "${ECHO_T}will try to find" >&6
2752 +    echo "$as_me:$LINENO: checking for SSL_accept in -lssl" >&5
2753 +echo $ECHO_N "checking for SSL_accept in -lssl... $ECHO_C" >&6
2754 +if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then
2755 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2756 +else
2757 +  ac_check_lib_save_LIBS=$LIBS
2758 +LIBS="-lssl -lcrypto $LIBS"
2759 +cat >conftest.$ac_ext <<_ACEOF
2760 +#line $LINENO "configure"
2761 +/* confdefs.h.  */
2762 +_ACEOF
2763 +cat confdefs.h >>conftest.$ac_ext
2764 +cat >>conftest.$ac_ext <<_ACEOF
2765 +/* end confdefs.h.  */
2766 +
2767 +/* Override any gcc2 internal prototype to avoid an error.  */
2768 +#ifdef __cplusplus
2769 +extern "C"
2770 +#endif
2771 +/* We use char because int might match the return type of a gcc2
2772 +   builtin and then its argument prototype would still apply.  */
2773 +char SSL_accept ();
2774 +int
2775 +main ()
2776 +{
2777 +SSL_accept ();
2778 +  ;
2779 +  return 0;
2780 +}
2781 +_ACEOF
2782 +rm -f conftest.$ac_objext conftest$ac_exeext
2783 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2784 +  (eval $ac_link) 2>&5
2785 +  ac_status=$?
2786 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2787 +  (exit $ac_status); } &&
2788 +         { ac_try='test -s conftest$ac_exeext'
2789 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2790 +  (eval $ac_try) 2>&5
2791 +  ac_status=$?
2792 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 +  (exit $ac_status); }; }; then
2794 +  ac_cv_lib_ssl_SSL_accept=yes
2795 +else
2796 +  echo "$as_me: failed program was:" >&5
2797 +sed 's/^/| /' conftest.$ac_ext >&5
2798 +
2799 +ac_cv_lib_ssl_SSL_accept=no
2800 +fi
2801 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2802 +LIBS=$ac_check_lib_save_LIBS
2803 +fi
2804 +echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_accept" >&5
2805 +echo "${ECHO_T}$ac_cv_lib_ssl_SSL_accept" >&6
2806 +if test $ac_cv_lib_ssl_SSL_accept = yes; then
2807 +  cat >>confdefs.h <<\_ACEOF
2808 +#define EGG_SSL_EXT 1
2809 +_ACEOF
2810 +
2811 +     SSL_LIBS="-lssl -lcrypto"
2812 +else
2813 +  { { echo "$as_me:$LINENO: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
2814 +echo "$as_me: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
2815 +   { (exit 1); exit 1; }; }
2816 +fi
2817 +
2818 +
2819 +for ac_header in "openssl/ssl.h"
2820 +do
2821 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2822 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
2823 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
2824 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2825 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
2826 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2827 +fi
2828 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2829 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2830 +else
2831 +  # Is the header compilable?
2832 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
2833 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
2834 +cat >conftest.$ac_ext <<_ACEOF
2835 +#line $LINENO "configure"
2836 +/* confdefs.h.  */
2837 +_ACEOF
2838 +cat confdefs.h >>conftest.$ac_ext
2839 +cat >>conftest.$ac_ext <<_ACEOF
2840 +/* end confdefs.h.  */
2841 +$ac_includes_default
2842 +#include <$ac_header>
2843 +_ACEOF
2844 +rm -f conftest.$ac_objext
2845 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2846 +  (eval $ac_compile) 2>&5
2847 +  ac_status=$?
2848 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 +  (exit $ac_status); } &&
2850 +         { ac_try='test -s conftest.$ac_objext'
2851 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2852 +  (eval $ac_try) 2>&5
2853 +  ac_status=$?
2854 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2855 +  (exit $ac_status); }; }; then
2856 +  ac_header_compiler=yes
2857 +else
2858 +  echo "$as_me: failed program was:" >&5
2859 +sed 's/^/| /' conftest.$ac_ext >&5
2860 +
2861 +ac_header_compiler=no
2862 +fi
2863 +rm -f conftest.$ac_objext conftest.$ac_ext
2864 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2865 +echo "${ECHO_T}$ac_header_compiler" >&6
2866 +
2867 +# Is the header present?
2868 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
2869 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
2870 +cat >conftest.$ac_ext <<_ACEOF
2871 +#line $LINENO "configure"
2872 +/* confdefs.h.  */
2873 +_ACEOF
2874 +cat confdefs.h >>conftest.$ac_ext
2875 +cat >>conftest.$ac_ext <<_ACEOF
2876 +/* end confdefs.h.  */
2877 +#include <$ac_header>
2878 +_ACEOF
2879 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2880 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2881 +  ac_status=$?
2882 +  grep -v '^ *+' conftest.er1 >conftest.err
2883 +  rm -f conftest.er1
2884 +  cat conftest.err >&5
2885 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2886 +  (exit $ac_status); } >/dev/null; then
2887 +  if test -s conftest.err; then
2888 +    ac_cpp_err=$ac_c_preproc_warn_flag
2889 +  else
2890 +    ac_cpp_err=
2891 +  fi
2892 +else
2893 +  ac_cpp_err=yes
2894 +fi
2895 +if test -z "$ac_cpp_err"; then
2896 +  ac_header_preproc=yes
2897 +else
2898 +  echo "$as_me: failed program was:" >&5
2899 +sed 's/^/| /' conftest.$ac_ext >&5
2900 +
2901 +  ac_header_preproc=no
2902 +fi
2903 +rm -f conftest.err conftest.$ac_ext
2904 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2905 +echo "${ECHO_T}$ac_header_preproc" >&6
2906 +
2907 +# So?  What about this header?
2908 +case $ac_header_compiler:$ac_header_preproc in
2909 +  yes:no )
2910 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
2911 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
2912 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
2913 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
2914 +    (
2915 +      cat <<\_ASBOX
2916 +## ------------------------------------ ##
2917 +## Report this to bug-autoconf@gnu.org. ##
2918 +## ------------------------------------ ##
2919 +_ASBOX
2920 +    ) |
2921 +      sed "s/^/$as_me: WARNING:     /" >&2
2922 +    ;;
2923 +  no:yes )
2924 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
2925 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
2926 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
2927 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
2928 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
2929 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
2930 +    (
2931 +      cat <<\_ASBOX
2932 +## ------------------------------------ ##
2933 +## Report this to bug-autoconf@gnu.org. ##
2934 +## ------------------------------------ ##
2935 +_ASBOX
2936 +    ) |
2937 +      sed "s/^/$as_me: WARNING:     /" >&2
2938 +    ;;
2939 +esac
2940 +echo "$as_me:$LINENO: checking for $ac_header" >&5
2941 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2942 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
2943 +  echo $ECHO_N "(cached) $ECHO_C" >&6
2944 +else
2945 +  eval "$as_ac_Header=$ac_header_preproc"
2946 +fi
2947 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2948 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2949 +
2950 +fi
2951 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
2952 +  cat >>confdefs.h <<_ACEOF
2953 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2954 +_ACEOF
2955 +
2956 +else
2957 +  { { echo "$as_me:$LINENO: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&5
2958 +echo "$as_me: error: OpenSSL was not found. Please supply a pathname to OpenSSL" >&2;}
2959 +   { (exit 1); exit 1; }; }
2960 +fi
2961 +
2962 +done
2963 +
2964 +
2965 +
2966 +fi;
2967 +
2968 +#end of ssl checks - hoe
2969 +
2970 +
2971  if test "$NEED_DL" = 1 && test "$ac_cv_func_dlopen" = "no"
2972  then
2973    if test "$LINUX" = "yes"
2974 @@ -7320,7 +8066,7 @@
2975       t end
2976       /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2977       : end' >>confcache
2978 -if cmp -s $cache_file confcache; then :; else
2979 +if diff $cache_file confcache >/dev/null 2>&1; then :; else
2980    if test -w $cache_file; then
2981      test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
2982      cat confcache >$cache_file
2983 @@ -7380,6 +8126,8 @@
2984  # configure, is in config.log if it exists.
2985  
2986  debug=false
2987 +ac_cs_recheck=false
2988 +ac_cs_silent=false
2989  SHELL=\${CONFIG_SHELL-$SHELL}
2990  _ACEOF
2991  
2992 @@ -7414,7 +8162,10 @@
2993  PS4='+ '
2994  
2995  # NLS nuisances.
2996 -for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
2997 +for as_var in \
2998 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
2999 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
3000 +  LC_TELEPHONE LC_TIME
3001  do
3002    if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
3003      eval $as_var=C; export $as_var
3004 @@ -7460,15 +8211,15 @@
3005  
3006  # The user is always right.
3007  if test "${PATH_SEPARATOR+set}" != set; then
3008 -  echo "#! /bin/sh" >conftest.sh
3009 -  echo  "exit 0"   >>conftest.sh
3010 -  chmod +x conftest.sh
3011 -  if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
3012 +  echo "#! /bin/sh" >conf$$.sh
3013 +  echo  "exit 0"   >>conf$$.sh
3014 +  chmod +x conf$$.sh
3015 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
3016      PATH_SEPARATOR=';'
3017    else
3018      PATH_SEPARATOR=:
3019    fi
3020 -  rm -f conftest.sh
3021 +  rm -f conf$$.sh
3022  fi
3023  
3024  
3025 @@ -7631,7 +8382,7 @@
3026  cat >&5 <<_CSEOF
3027  
3028  This file was extended by $as_me, which was
3029 -generated by GNU Autoconf 2.54.  Invocation command line was
3030 +generated by GNU Autoconf 2.57.  Invocation command line was
3031  
3032    CONFIG_FILES    = $CONFIG_FILES
3033    CONFIG_HEADERS  = $CONFIG_HEADERS
3034 @@ -7671,6 +8422,7 @@
3035  
3036    -h, --help       print this help, then exit
3037    -V, --version    print version number, then exit
3038 +  -q, --quiet      do not print progress messages
3039    -d, --debug      don't remove temporary files
3040        --recheck    update $as_me by reconfiguring in the same conditions
3041    --file=FILE[:TEMPLATE]
3042 @@ -7693,7 +8445,7 @@
3043  cat >>$CONFIG_STATUS <<_ACEOF
3044  ac_cs_version="\\
3045  config.status
3046 -configured by $0, generated by GNU Autoconf 2.54,
3047 +configured by $0, generated by GNU Autoconf 2.57,
3048    with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
3049  
3050  Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
3051 @@ -7730,12 +8482,9 @@
3052    case $ac_option in
3053    # Handling of the options.
3054  _ACEOF
3055 -cat >>$CONFIG_STATUS <<_ACEOF
3056 -  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3057 -    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
3058 -    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
3059 -_ACEOF
3060  cat >>$CONFIG_STATUS <<\_ACEOF
3061 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3062 +    ac_cs_recheck=: ;;
3063    --version | --vers* | -V )
3064      echo "$ac_cs_version"; exit 0 ;;
3065    --he | --h)
3066 @@ -7757,6 +8506,9 @@
3067      $ac_shift
3068      CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
3069      ac_need_defaults=false;;
3070 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3071 +  | -silent | --silent | --silen | --sile | --sil | --si | --s)
3072 +    ac_cs_silent=: ;;
3073  
3074    # This is an error.
3075    -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
3076 @@ -7771,6 +8523,20 @@
3077    shift
3078  done
3079  
3080 +ac_configure_extra_args=
3081 +
3082 +if $ac_cs_silent; then
3083 +  exec 6>/dev/null
3084 +  ac_configure_extra_args="$ac_configure_extra_args --silent"
3085 +fi
3086 +
3087 +_ACEOF
3088 +cat >>$CONFIG_STATUS <<_ACEOF
3089 +if \$ac_cs_recheck; then
3090 +  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
3091 +  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
3092 +fi
3093 +
3094  _ACEOF
3095  
3096  cat >>$CONFIG_STATUS <<_ACEOF
3097 @@ -7818,6 +8584,9 @@
3098    test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
3099  fi
3100  
3101 +# Have a temporary directory for convenience.  Make it in the build tree
3102 +# simply because there is no reason to put it here, and in addition,
3103 +# creating and moving files from /tmp can sometimes cause problems.
3104  # Create a temporary directory, and hook for its removal unless debugging.
3105  $debug ||
3106  {
3107 @@ -7826,17 +8595,17 @@
3108  }
3109  
3110  # Create a (secure) tmp directory for tmp files.
3111 -: ${TMPDIR=/tmp}
3112 +
3113  {
3114 -  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
3115 +  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
3116    test -n "$tmp" && test -d "$tmp"
3117  }  ||
3118  {
3119 -  tmp=$TMPDIR/cs$$-$RANDOM
3120 +  tmp=./confstat$$-$RANDOM
3121    (umask 077 && mkdir $tmp)
3122  } ||
3123  {
3124 -   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3125 +   echo "$me: cannot create a temporary directory in ." >&2
3126     { (exit 1); exit 1; }
3127  }
3128  
3129 @@ -7921,6 +8690,8 @@
3130  s,@TCLINCFN@,$TCLINCFN,;t t
3131  s,@TCL_REQS@,$TCL_REQS,;t t
3132  s,@TCL_LIBS@,$TCL_LIBS,;t t
3133 +s,@SSL_LIBS@,$SSL_LIBS,;t t
3134 +s,@SSL_INCLUDE@,$SSL_INCLUDE,;t t
3135  s,@EGGVERSION@,$EGGVERSION,;t t
3136  s,@DEST@,$DEST,;t t
3137  s,@MOD_UPDIR@,$MOD_UPDIR,;t t
3138 @@ -8303,7 +9074,7 @@
3139    cat $tmp/in >>$tmp/config.h
3140    rm -f $tmp/in
3141    if test x"$ac_file" != x-; then
3142 -    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
3143 +    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
3144        { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
3145  echo "$as_me: $ac_file is unchanged" >&6;}
3146      else
3147 @@ -8452,8 +9223,11 @@
3148  # need to make the FD available again.
3149  if test "$no_create" != yes; then
3150    ac_cs_success=:
3151 +  ac_config_status_args=
3152 +  test "$silent" = yes &&
3153 +    ac_config_status_args="$ac_config_status_args --quiet"
3154    exec 5>/dev/null
3155 -  $SHELL $CONFIG_STATUS || ac_cs_success=false
3156 +  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
3157    exec 5>>config.log
3158    # Use ||, not &&, to avoid exiting from the if with $? = 1, which
3159    # would make configure fail if this is the last instruction.
3160 diff -burN eggdrop1.6.15/configure.in eggdrop1.6.15-ssl/configure.in
3161 --- eggdrop1.6.15/configure.in  2003-05-05 00:05:32.000000000 +0200
3162 +++ eggdrop1.6.15-ssl/configure.in      2003-05-19 16:41:57.000000000 +0200
3163 @@ -124,6 +124,8 @@
3164  EGG_TCL_LUSH
3165  # ---------- end of (what used to be) robey's Tcl thingies
3166  
3167 +EGG_SSL_CRAP
3168 +
3169  EGG_FUNC_DLOPEN
3170  
3171  EGG_SUBST_EGGVERSION
3172 diff -burN eggdrop1.6.15/Makefile.in eggdrop1.6.15-ssl/Makefile.in
3173 --- eggdrop1.6.15/Makefile.in   2003-05-05 00:05:32.000000000 +0200
3174 +++ eggdrop1.6.15-ssl/Makefile.in       2003-05-19 16:41:57.000000000 +0200
3175 @@ -61,6 +61,8 @@
3176  # stuff for Tcl
3177  XREQS = @TCL_REQS@
3178  XLIBS = @TCL_LIBS@ @LIBS@
3179 +XSSL_LIBS = @SSL_LIBS@
3180 +XSSL_INCLUDE = @SSL_INCLUDE@
3181  TCLLIB = @TCLLIB@
3182  TCLLIBFN = @TCLLIBFN@
3183  
3184 @@ -86,7 +88,8 @@
3185  MAKE_MODEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \
3186  'STRIP=$(MOD_STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS)' \
3187  'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
3188 -'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=' 'MODOBJS='
3189 +'XSSL_LIBS=$(XSSL_LIBS)' 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' \
3190 +'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'EGGBUILD=' 'MODOBJS='
3191  
3192  MAKE_MODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
3193  'STRIP=$(SHLIB_STRIP)' 'CFLGS=$(CFLGS)' 'XLIBS=$(XLIBS)' 'MOD_EXT=$(MOD_EXT)'
3194 @@ -95,12 +98,13 @@
3195  'STRIP=$(STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS) -DSTATIC' \
3196  'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
3197  'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static version)' \
3198 -'MODOBJS=mod/*.o'
3199 +'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'XSSL_LIBS=$(XSSL_LIBS)' 'MODOBJS=mod/*.o'
3200  
3201  MAKE_DEBEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD) -g' \
3202  'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
3203  'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
3204 -'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(debug version)' 'MODOBJS='
3205 +'XSSL_LIBS=$(XSSL_LIBS)' 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' \
3206 +'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'EGGBUILD=(debug version)' 'MODOBJS='
3207  
3208  MAKE_DEBMODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
3209  'XLIBS=$(XLIBS)' 'STRIP=touch' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
3210 @@ -109,7 +113,8 @@
3211  MAKE_SDEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD) -g' \
3212  'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) -DSTATIC $(CFLGS)' \
3213  'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
3214 -'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static and debug version)' 'MODOBJS=mod/*.o'
3215 +'XSSL_INCLUDE=$(XSSL_INCLUDE)' 'XSSL_LIBS=$(XSSL_LIBS)' 'EGGEXEC=$(EGGEXEC)' \
3216 +'EGGBUILD=(static and debug version)' 'MODOBJS=mod/*.o'
3217  
3218  MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
3219  'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)'
3220 diff -burN eggdrop1.6.15/src/dcc.c eggdrop1.6.15-ssl/src/dcc.c
3221 --- eggdrop1.6.15/src/dcc.c     2003-05-05 00:05:32.000000000 +0200
3222 +++ eggdrop1.6.15-ssl/src/dcc.c 2003-05-19 16:41:57.000000000 +0200
3223 @@ -32,7 +32,11 @@
3224  #include "tandem.h"
3225  
3226  /* Includes for botnet md5 challenge/response code <cybah> */
3227 +#ifndef EGG_SSL_EXT
3228  #include "md5/md5.h"
3229 +#else
3230 +#include "openssl/md5.h"
3231 +#endif
3232  
3233  extern struct userrec *userlist;
3234  extern struct chanset_t *chanset;
3235 diff -burN eggdrop1.6.15/src/dccutil.c eggdrop1.6.15-ssl/src/dccutil.c
3236 --- eggdrop1.6.15/src/dccutil.c 2003-05-05 00:05:32.000000000 +0200
3237 +++ eggdrop1.6.15-ssl/src/dccutil.c     2003-05-19 16:41:57.000000000 +0200
3238 @@ -33,6 +33,7 @@
3239  #include "chan.h"
3240  #include "modules.h"
3241  #include "tandem.h"
3242 +#include "net.h"
3243  
3244  extern struct dcc_t *dcc;
3245  extern int dcc_total, max_dcc, dcc_flood_thr, backgrd, copy_to_tmp, MAXSOCKS;
3246 diff -burN eggdrop1.6.15/src/eggdrop.h eggdrop1.6.15-ssl/src/eggdrop.h
3247 --- eggdrop1.6.15/src/eggdrop.h 2003-05-05 00:05:32.000000000 +0200
3248 +++ eggdrop1.6.15-ssl/src/eggdrop.h     2003-05-19 16:41:57.000000000 +0200
3249 @@ -594,17 +594,7 @@
3250  /* This is used by the net module to keep track of sockets and what's
3251   * queued on them
3252   */
3253 -typedef struct {
3254 -  int sock;
3255 -  short flags;
3256 -  char *inbuf;
3257 -  char *outbuf;
3258 -  unsigned long outbuflen;      /* Outbuf could be binary data  */
3259 -  unsigned long inbuflen;       /* Inbuf could be binary data   */
3260 -#ifdef USE_IPV6
3261 -  unsigned int af;
3262 -#endif /* USE_IPV6 */
3263 -} sock_list;
3264 +/* sock_list moved to net.h */
3265  
3266  enum {
3267    EGG_OPTION_SET = 1,           /* Set option(s).               */
3268 diff -burN eggdrop1.6.15/src/main.c eggdrop1.6.15-ssl/src/main.c
3269 --- eggdrop1.6.15/src/main.c    2003-05-05 00:05:32.000000000 +0200
3270 +++ eggdrop1.6.15-ssl/src/main.c        2003-05-19 16:41:57.000000000 +0200
3271 @@ -162,6 +162,9 @@
3272  int cx_ptr = 0;
3273  #endif
3274  
3275 +#ifdef EGG_SSL_EXT
3276 + int clean_net();
3277 +#endif
3278  
3279  void fatal(const char *s, int recoverable)
3280  {
3281 @@ -172,6 +175,9 @@
3282    for (i = 0; i < dcc_total; i++)
3283      if (dcc[i].sock >= 0)
3284        killsock(dcc[i].sock);
3285 +#ifdef EGG_SSL_EXT
3286 +  clean_net();
3287 +#endif        
3288    unlink(pid_file);
3289    if (!recoverable) {
3290      bg_send_quit(BG_ABORT);
3291 diff -burN eggdrop1.6.15/src/Makefile.in eggdrop1.6.15-ssl/src/Makefile.in
3292 --- eggdrop1.6.15/src/Makefile.in       2003-05-05 00:05:32.000000000 +0200
3293 +++ eggdrop1.6.15-ssl/src/Makefile.in   2003-05-19 16:41:57.000000000 +0200
3294 @@ -15,7 +15,8 @@
3295  CC = @CC@
3296  LD = @CC@
3297  STRIP = @STRIP@
3298 -CFLAGS = @CFLAGS@ -I.. -I$(top_srcdir) @DEFS@ $(CFLGS)
3299 +#CFLAGS = @CFLAGS@ -I.. -I$(top_srcdir) @DEFS@ $(CFLGS)
3300 +CFLAGS = @CFLAGS@ -I$(XSSL_INCLUDE) -I.. -I$(top_srcdir) @DEFS@ $(CFLGS)
3301  CPPFLAGS = @CPPFLAGS@
3302  
3303  eggdrop_objs = bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o \
3304 @@ -37,7 +38,8 @@
3305         @echo "Linking eggdrop... $(EGGBUILD)"
3306         @echo ""
3307         @touch mod/mod.xlibs
3308 -       $(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs`
3309 +#      $(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs`
3310 +       $(LD) -o ../$(EGGEXEC) $(eggdrop_objs) $(XSSL_LIBS) $(MODOBJS) $(XLIBS) md5/md5c.o compat/*.o `cat mod/mod.xlibs`
3311         $(STRIP) ../$(EGGEXEC)
3312         @echo "Successful compile: $(EGGEXEC)"
3313         @echo ""
3314 diff -burN eggdrop1.6.15/src/md5/md5c.c eggdrop1.6.15-ssl/src/md5/md5c.c
3315 --- eggdrop1.6.15/src/md5/md5c.c        2003-05-05 00:05:32.000000000 +0200
3316 +++ eggdrop1.6.15-ssl/src/md5/md5c.c    2003-05-19 16:41:57.000000000 +0200
3317 @@ -15,6 +15,9 @@
3318   * and avoid compile-time configuration.
3319   */
3320  
3321 +#include "../config.h"
3322 +#ifndef EGG_SSL_EXT
3323 +
3324  #include <string.h>
3325  
3326  #include "md5.h"
3327 @@ -269,3 +272,5 @@
3328  
3329         egg_memset(ctx, 0, sizeof(ctx));
3330  }
3331 +
3332 +#endif
3333 diff -burN eggdrop1.6.15/src/md5/md5.h eggdrop1.6.15-ssl/src/md5/md5.h
3334 --- eggdrop1.6.15/src/md5/md5.h 2003-05-05 00:05:32.000000000 +0200
3335 +++ eggdrop1.6.15-ssl/src/md5/md5.h     2003-05-19 16:41:57.000000000 +0200
3336 @@ -6,6 +6,9 @@
3337   * the public domain.  See md5c.c for more information.
3338   */
3339  
3340 +#include "../config.h"
3341 +#ifndef EGG_SSL_EXT
3342 +
3343  #ifndef _MD5_H
3344  #define _MD5_H
3345  
3346 @@ -24,3 +27,4 @@
3347  extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
3348  
3349  #endif
3350 +#endif
3351 diff -burN eggdrop1.6.15/src/mod/compress.mod/compress.c eggdrop1.6.15-ssl/src/mod/compress.mod/compress.c
3352 --- eggdrop1.6.15/src/mod/compress.mod/compress.c       2003-05-05 00:05:32.000000000 +0200
3353 +++ eggdrop1.6.15-ssl/src/mod/compress.mod/compress.c   2003-05-19 16:41:57.000000000 +0200
3354 @@ -31,11 +31,12 @@
3355  
3356  #include <string.h>
3357  #include <errno.h>
3358 -#include <zlib.h>
3359  
3360  #include "src/mod/module.h"
3361  #include "share.mod/share.h"
3362  
3363 +#include <zlib.h>
3364 +
3365  #include "compress_config.h"
3366  #ifdef HAVE_MMAP
3367  #  include <sys/types.h>
3368 diff -burN eggdrop1.6.15/src/mod/irc.mod/chan.c eggdrop1.6.15-ssl/src/mod/irc.mod/chan.c
3369 --- eggdrop1.6.15/src/mod/irc.mod/chan.c        2003-05-05 00:05:32.000000000 +0200
3370 +++ eggdrop1.6.15-ssl/src/mod/irc.mod/chan.c    2003-05-19 16:41:57.000000000 +0200
3371 @@ -924,10 +924,10 @@
3372          q = strchr(p, ' ');
3373          if (q != NULL) {
3374            *q = 0;
3375 -          set_key(chan, p);
3376 +          set_keyegg(chan, p);
3377            strcpy(p, q + 1);
3378          } else {
3379 -          set_key(chan, p);
3380 +          set_keyegg(chan, p);
3381            *p = 0;
3382          }
3383        }
3384 diff -burN eggdrop1.6.15/src/mod/irc.mod/irc.c eggdrop1.6.15-ssl/src/mod/irc.mod/irc.c
3385 --- eggdrop1.6.15/src/mod/irc.mod/irc.c 2003-05-05 00:05:32.000000000 +0200
3386 +++ eggdrop1.6.15-ssl/src/mod/irc.mod/irc.c     2003-05-19 16:41:57.000000000 +0200
3387 @@ -253,7 +253,7 @@
3388  
3389  /* Set the key.
3390   */
3391 -static void set_key(struct chanset_t *chan, char *k)
3392 +static void set_keyegg(struct chanset_t *chan, char *k)
3393  {
3394    nfree(chan->channel.key);
3395    if (k == NULL) {
3396 diff -burN eggdrop1.6.15/src/mod/irc.mod/irc.h eggdrop1.6.15-ssl/src/mod/irc.mod/irc.h
3397 --- eggdrop1.6.15/src/mod/irc.mod/irc.h 2003-05-05 00:05:32.000000000 +0200
3398 +++ eggdrop1.6.15-ssl/src/mod/irc.mod/irc.h     2003-05-19 16:41:57.000000000 +0200
3399 @@ -69,7 +69,7 @@
3400  
3401  static void reset_chan_info(struct chanset_t *);
3402  static void recheck_channel(struct chanset_t *, int);
3403 -static void set_key(struct chanset_t *, char *);
3404 +static void set_keyegg(struct chanset_t *, char *);
3405  static void maybe_revenge(struct chanset_t *, char *, char *, int);
3406  static int detect_chan_flood(char *, char *, char *, struct chanset_t *, int,
3407                               char *);
3408 diff -burN eggdrop1.6.15/src/mod/irc.mod/mode.c eggdrop1.6.15-ssl/src/mod/irc.mod/mode.c
3409 --- eggdrop1.6.15/src/mod/irc.mod/mode.c        2003-05-05 00:05:32.000000000 +0200
3410 +++ eggdrop1.6.15-ssl/src/mod/irc.mod/mode.c    2003-05-19 16:41:57.000000000 +0200
3411 @@ -1106,7 +1106,7 @@
3412            }
3413            check_tcl_mode(nick, from, u, chan->dname, ms2, op);
3414            if (ms2[0] == '+') {
3415 -            set_key(chan, op);
3416 +            set_keyegg(chan, op);
3417              if (channel_active(chan))
3418                got_key(chan, nick, from, op);
3419            } else {
3420 @@ -1117,7 +1117,7 @@
3421                         !chan_master(user) && !match_my_nick(nick))
3422                  add_mode(chan, '+', 'k', chan->key_prot);
3423              }
3424 -            set_key(chan, NULL);
3425 +            set_keyegg(chan, NULL);
3426            }
3427            break;
3428          case 'o':
3429 diff -burN eggdrop1.6.15/src/mod/module.h eggdrop1.6.15-ssl/src/mod/module.h
3430 --- eggdrop1.6.15/src/mod/module.h      2003-05-05 00:05:32.000000000 +0200
3431 +++ eggdrop1.6.15-ssl/src/mod/module.h  2003-05-19 16:42:33.000000000 +0200
3432 @@ -477,8 +477,12 @@
3433  #define file_readable ((int (*) (char *))global[285])
3434  #define getprotocol ((int (*)(char *))global[286])
3435  #define open_listen_by_af ((int (*) (int *, int))global[287])
3436 -/* 288 - 291 */
3437 +/* 288 - 293 */
3438  #define egg_inet_ntop ((int (*)(int af, const void *src, char *dst, socklen_t size))global[288])
3439 +#ifdef EGG_SSL_EXT
3440 +#define net_switch_to_ssl ((int (*)(int))global[289])
3441 +#define use_ssl (*(int *)global[290]) /* kyotou */
3442 +#endif
3443  
3444  /* hostmasking */
3445  #define maskhost(a,b) _maskhost((a),(b),1)
3446 diff -burN eggdrop1.6.15/src/mod/server.mod/servmsg.c eggdrop1.6.15-ssl/src/mod/server.mod/servmsg.c
3447 --- eggdrop1.6.15/src/mod/server.mod/servmsg.c  2003-05-05 00:05:33.000000000 +0200
3448 +++ eggdrop1.6.15-ssl/src/mod/server.mod/servmsg.c      2003-05-19 16:41:57.000000000 +0200
3449 @@ -1242,6 +1242,14 @@
3450        fatal("NO SERVERS WILL ACCEPT MY CONNECTION.", 0);
3451    } else {
3452      dcc[servidx].sock = serv;
3453 +#ifdef EGG_SSL_EXT
3454 +    if (use_ssl) { /* kyotou */
3455 +        if (net_switch_to_ssl(serv)==0) {
3456 +            putlog(LOG_SERV, "*", "SSL %s %s (Error while switching to SSL)", IRC_FAILEDCONNECT, dcc[servidx].host);
3457 +            lostdcc(servidx);    
3458 +        }
3459 +    }    
3460 +#endif
3461      /* Queue standard login */
3462      dcc[servidx].timeval = now;
3463      SERVER_SOCKET.timeout_val = &server_timeout;
3464 diff -burN eggdrop1.6.15/src/modules.c eggdrop1.6.15-ssl/src/modules.c
3465 --- eggdrop1.6.15/src/modules.c 2003-05-05 00:05:33.000000000 +0200
3466 +++ eggdrop1.6.15-ssl/src/modules.c     2003-05-19 16:41:57.000000000 +0200
3467 @@ -28,7 +28,13 @@
3468  #include "main.h"
3469  #include "modules.h"
3470  #include "tandem.h"
3471 +
3472 +#ifndef EGG_SSL_EXT
3473  #include "md5/md5.h"
3474 +#else
3475 +#include "openssl/md5.h"
3476 +#endif
3477 +
3478  #include <ctype.h>
3479  #ifndef STATIC
3480  #  ifdef HPUX_HACKS
3481 @@ -65,6 +71,7 @@
3482  extern struct dcc_t *dcc;
3483  
3484  #include "users.h"
3485 +#include "net.h"
3486  
3487  
3488  extern struct userrec *userlist, *lastuser;
3489 @@ -83,6 +90,9 @@
3490             default_flags, require_p, share_greet, use_invites, use_exempts,
3491             password_timeout, force_expire, protect_readonly, reserved_port_min,
3492             reserved_port_max, copy_to_tmp, quiet_reject;
3493 +#ifdef EGG_SSL_EXT
3494 +extern int      use_ssl; /* kyotou */
3495 +#endif
3496  
3497  extern party_t *party;
3498  extern time_t now, online_since;
3499 @@ -97,6 +107,11 @@
3500  int xtra_unpack();
3501  static int module_rename(char *name, char *newname);
3502  
3503 +#ifdef EGG_SSL_EXT
3504 +int net_switch_to_ssl(int);
3505 +#endif
3506 +
3507 +
3508  
3509  #ifndef STATIC
3510  
3511 @@ -563,7 +578,13 @@
3512    (Function) file_readable,
3513    (Function) getprotocol,
3514    (Function) open_listen_by_af,
3515 +#ifdef EGG_SSL_EXT
3516 +  (Function) egg_inet_ntop,
3517 +  (Function) net_switch_to_ssl,
3518 +  (Function) & use_ssl /* kyotou */
3519 +#else
3520    (Function) egg_inet_ntop
3521 +#endif
3522  };
3523  
3524  void init_modules(void)
3525 diff -burN eggdrop1.6.15/src/net.c eggdrop1.6.15-ssl/src/net.c
3526 --- eggdrop1.6.15/src/net.c     2003-05-05 00:05:33.000000000 +0200
3527 +++ eggdrop1.6.15-ssl/src/net.c 2003-05-19 16:41:57.000000000 +0200
3528 @@ -34,6 +34,17 @@
3529  #  endif
3530  #endif
3531  
3532 +#ifdef EGG_SSL_EXT
3533 +# ifndef EGG_SSL_INCS
3534 +#  include <openssl/ssl.h>
3535 +#  include <openssl/err.h>
3536 +#  include <openssl/rand.h>
3537 +#  define EGG_SSL_INCS 1
3538 +# endif
3539 +#endif
3540 +
3541 +#include "net.h"
3542 +
3543  extern struct dcc_t *dcc;
3544  extern int backgrd, use_stderr, resolve_timeout, dcc_total;
3545  extern unsigned long otraffic_irc_today, otraffic_bn_today, otraffic_dcc_today,
3546 @@ -53,6 +64,11 @@
3547  char botuser[21] = "eggdrop"; /* Username of the user running the bot         */
3548  int dcc_sanitycheck = 0;      /* We should do some sanity checking on dcc
3549                                 * connections.                                 */
3550 +#ifdef EGG_SSL_EXT
3551 +SSL_CTX *ssl_ctx=NULL;
3552 +char   *tls_rand_file = NULL;
3553 +int     use_ssl = 0; /* kyotou */
3554 +#endif
3555  sock_list *socklist = NULL;   /* Enough to be safe                            */
3556  int MAXSOCKS = 0;
3557  jmp_buf alarmret;             /* Env buffer for alarm() returns               */
3558 @@ -109,6 +125,45 @@
3559  #endif /* USE_IPV6 */
3560  }
3561  
3562 +#ifdef EGG_SSL_EXT
3563 +int seed_PRNG(void)
3564 +{
3565 +    char stackdata[1024];
3566 +    static char rand_file[300];
3567 +    FILE *fh;
3568 +    
3569 +#if OPENSSL_VERSION_NUMBER >= 0x00905100
3570 +    if (RAND_status())
3571 +       return 0;     /* PRNG already good seeded */
3572 +#endif
3573 +    /* if the device '/dev/urandom' is present, OpenSSL uses it by default.
3574 +     * check if it's present, else we have to make random data ourselfs.
3575 +     */
3576 +    if ((fh = fopen("/dev/urandom", "r"))) {
3577 +       fclose(fh);
3578 +       return 0;
3579 +    }
3580 +    if (RAND_file_name(rand_file, sizeof(rand_file)))
3581 +       tls_rand_file = rand_file;
3582 +    else
3583 +       return 1;
3584 +    if (!RAND_load_file(rand_file, 1024)) {
3585 +       /* no .rnd file found, create new seed */
3586 +       unsigned int c;
3587 +       c = time(NULL);
3588 +       RAND_seed(&c, sizeof(c));
3589 +       c = getpid();
3590 +       RAND_seed(&c, sizeof(c));
3591 +       RAND_seed(stackdata, sizeof(stackdata));
3592 +    }
3593 +#if OPENSSL_VERSION_NUMBER >= 0x00905100
3594 +    if (!RAND_status())
3595 +       return 2;   /* PRNG still badly seeded */
3596 +#endif
3597 +    return 0;
3598 +}
3599 +#endif
3600 +
3601  /* Initialize the socklist
3602   */
3603  void init_net()
3604 @@ -117,9 +172,35 @@
3605  
3606    for (i = 0; i < MAXSOCKS; i++) {
3607      socklist[i].flags = SOCK_UNUSED;
3608 +#ifdef EGG_SSL_EXT
3609 +    socklist[i].ssl=NULL;
3610 +#endif
3611    }
3612 +#ifdef EGG_SSL_EXT
3613 +  /* good place to init ssl stuff */
3614 +  SSL_load_error_strings();
3615 +  OpenSSL_add_ssl_algorithms();
3616 +  ssl_ctx=SSL_CTX_new(SSLv23_client_method());
3617 +  if (!ssl_ctx) 
3618 +   fatal("SSL_CTX_new() failed",0);
3619 +  if (seed_PRNG())
3620 +    fatal("Wasn't able to properly seed the PRNG!",0); 
3621 +#endif
3622  }
3623  
3624 +#ifdef EGG_SSL_EXT
3625 +/* cleanup mess when quiting */
3626 +int clean_net() {
3627 +   if (ssl_ctx) {
3628 +       SSL_CTX_free(ssl_ctx);
3629 +       ssl_ctx = NULL;
3630 +  }
3631 +  if (tls_rand_file)
3632 +       RAND_write_file(tls_rand_file);
3633 + return 0;
3634 +}
3635 +#endif
3636 +
3637  int expmem_net()
3638  {
3639    int i, tot = 0;
3640 @@ -382,6 +463,13 @@
3641      return;
3642    for (i = 0; i < MAXSOCKS; i++) {
3643      if ((socklist[i].sock == sock) && !(socklist[i].flags & SOCK_UNUSED)) {
3644 +#ifdef EGG_SSL_EXT
3645 +      if (socklist[i].ssl) {
3646 +       SSL_shutdown(socklist[i].ssl);
3647 +       SSL_free(socklist[i].ssl);
3648 +       socklist[i].ssl=NULL;
3649 +  }
3650 +#endif
3651        close(socklist[i].sock);
3652        if (socklist[i].inbuf != NULL) {
3653          nfree(socklist[i].inbuf);
3654 @@ -625,6 +713,63 @@
3655    return sock;
3656  }
3657  
3658 +#ifdef EGG_SSL_EXT
3659 +int net_switch_to_ssl(int sock) {
3660 +int err;
3661 +int i=0;
3662 +    debug0("net_switch_to_ssl()");
3663 +    while (i<MAXSOCKS) {
3664 +     if (socklist[i].sock==sock) {
3665 +      break;
3666 +     }
3667 +     i++;
3668 +    }
3669 +    if (i==MAXSOCKS) {
3670 +        debug0("Error while swithing to SSL - sock not found in list");
3671 +       return 0;
3672 +    }
3673 +
3674 +    if (socklist[i].ssl) {
3675 +        debug0("Error while swithing to SSL - already in ssl");
3676 +       return 0;
3677 +    }
3678 +    socklist[i].ssl = SSL_new(ssl_ctx);
3679 +    if (!socklist[i].ssl) {
3680 +        debug0("Error while swithing to SSL - SSL_new() error");
3681 +       return 0;
3682 +    }
3683 +
3684 +     SSL_set_fd(socklist[i].ssl, socklist[i].sock);
3685 +     err = SSL_connect(socklist[i].ssl);
3686 +   
3687 +     while (err <= 0) {
3688 +        int errs;
3689 +        errs=SSL_get_error(socklist[i].ssl,err);
3690 +        if ((errs!=SSL_ERROR_WANT_READ)&&(errs!=SSL_ERROR_WANT_WRITE)&&
3691 +               (errs!=SSL_ERROR_WANT_X509_LOOKUP)) {
3692 +               putlog(LOG_DEBUG,"*", "SSL_connect() = %d, %s", err,
3693 +                       (char *)ERR_error_string(ERR_get_error(), NULL));
3694 +               SSL_shutdown(socklist[i].ssl);
3695 +               SSL_free(socklist[i].ssl);
3696 +               socklist[i].ssl = NULL;
3697 +               return 0;           
3698 +        }
3699 +        usleep(1000);
3700 +        err = SSL_connect(socklist[i].ssl);
3701 +     }
3702 +
3703 +     if (err==1) {
3704 +      debug0("SSL_connect() success"); 
3705 +      return 1;
3706 +     }
3707 +     debug0("Error while SSL_connect()"); 
3708 +     SSL_shutdown(socklist[i].ssl);
3709 +     SSL_free(socklist[i].ssl); 
3710 +     socklist[i].ssl = NULL;
3711 +     return 0;
3712 +}
3713 +#endif
3714 +
3715  /* Ordinary non-binary connection attempt */
3716  int open_telnet(char *server, int port)
3717  {
3718 @@ -957,6 +1102,9 @@
3719      for (i = 0; i < MAXSOCKS; i++) {
3720        if ((!(socklist[i].flags & SOCK_UNUSED)) &&
3721            ((FD_ISSET(socklist[i].sock, &fd)) ||
3722 +#ifdef EGG_SSL_EXT
3723 +          ((socklist[i].ssl)&&(SSL_pending(socklist[i].ssl))) ||
3724 +#endif   
3725            ((socklist[i].sock == STDOUT) && (!backgrd) &&
3726            (FD_ISSET(STDIN, &fd))))) {
3727          if (socklist[i].flags & (SOCK_LISTEN | SOCK_CONNECT)) {
3728 @@ -981,7 +1129,31 @@
3729          if ((socklist[i].sock == STDOUT) && !backgrd)
3730            x = read(STDIN, s, grab);
3731          else
3732 +#ifdef EGG_SSL_EXT
3733 +       {
3734 +        if (socklist[i].ssl) {
3735 +           x=SSL_read(socklist[i].ssl,s,grab);
3736 +          if (x < 0) {
3737 +           int err = SSL_get_error(socklist[i].ssl, x);
3738 +           x = -1;
3739 +           switch (err) {
3740 +               case SSL_ERROR_WANT_READ:
3741 +                   errno = EAGAIN;
3742 +                   break;
3743 +               case SSL_ERROR_WANT_WRITE:
3744 +                   errno = EAGAIN;
3745 +                   break;
3746 +               case SSL_ERROR_WANT_X509_LOOKUP:
3747 +                   errno = EAGAIN;
3748 +                   break;
3749 +               }
3750 +           }
3751 +        } else
3752            x = read(socklist[i].sock, s, grab);
3753 +       }
3754 +#else
3755 +         x = read(socklist[i].sock, s, grab);
3756 +#endif      
3757          if (x <= 0) {           /* eof */
3758            if (errno != EAGAIN) { /* EAGAIN happens when the operation would
3759                                    * block on a non-blocking socket, if the
3760 @@ -1283,6 +1455,26 @@
3761          socklist[i].outbuflen += len;
3762          return;
3763        }
3764 +#ifdef EGG_SSL_EXT
3765 +      if (socklist[i].ssl) {
3766 +       x=SSL_write(socklist[i].ssl,s,len);
3767 +          if (x < 0) {
3768 +           int err = SSL_get_error(socklist[i].ssl, x);
3769 +           x = -1;
3770 +           switch (err) {
3771 +               case SSL_ERROR_WANT_READ:
3772 +                   errno = EAGAIN;
3773 +                   break;
3774 +               case SSL_ERROR_WANT_WRITE:
3775 +                   errno = EAGAIN;
3776 +                   break;
3777 +               case SSL_ERROR_WANT_X509_LOOKUP:
3778 +                   errno = EAGAIN;
3779 +                   break;
3780 +               }
3781 +           }
3782 +      } else
3783 +#endif      
3784        /* Try. */
3785        x = write(z, s, len);
3786        if (x == -1)
3787 @@ -1354,6 +1546,27 @@
3788          (socklist[i].outbuf != NULL) && (FD_ISSET(socklist[i].sock, &wfds))) {
3789        /* Trick tputs into doing the work */
3790        errno = 0;
3791 +#ifdef EGG_SSL_EXT
3792 +       if (socklist[i].ssl) {
3793 +          x = write(socklist[i].sock, socklist[i].outbuf,
3794 +               socklist[i].outbuflen);
3795 +          if (x < 0) {
3796 +           int err = SSL_get_error(socklist[i].ssl, x);
3797 +           x = -1;
3798 +           switch (err) {
3799 +               case SSL_ERROR_WANT_READ:
3800 +                   errno = EAGAIN;
3801 +                   break;
3802 +               case SSL_ERROR_WANT_WRITE:
3803 +                   errno = EAGAIN;
3804 +                   break;
3805 +               case SSL_ERROR_WANT_X509_LOOKUP:
3806 +                   errno = EAGAIN;
3807 +                   break;
3808 +               }
3809 +           }
3810 +       } else
3811 +#endif      
3812        x = write(socklist[i].sock, socklist[i].outbuf, socklist[i].outbuflen);
3813        if ((x < 0) && (errno != EAGAIN)
3814  #ifdef EBADSLT
3815 diff -burN eggdrop1.6.15/src/net.h eggdrop1.6.15-ssl/src/net.h
3816 --- eggdrop1.6.15/src/net.h     1970-01-01 01:00:00.000000000 +0100
3817 +++ eggdrop1.6.15-ssl/src/net.h 2003-05-19 16:41:57.000000000 +0200
3818 @@ -0,0 +1,30 @@
3819 +#ifndef _EGG_NET_H
3820 +#define _EGG_NET_H
3821 +#ifdef EGG_SSL_EXT
3822 +# ifndef EGG_SSL_INCS
3823 +#  include <openssl/ssl.h>
3824 +#  include <openssl/err.h>
3825 +#  include <openssl/rand.h>
3826 +#  define EGG_SSL_INCS 1
3827 +# endif
3828 +#endif
3829 +
3830 +/* This is used by the net module to keep track of sockets and what's
3831 + * queued on them
3832 + */
3833 +typedef struct {
3834 +  int           sock;
3835 +#ifdef EGG_SSL_EXT
3836 +  SSL *ssl;  
3837 +#endif
3838 +  short                 flags;
3839 +  char         *inbuf;
3840 +  char         *outbuf;
3841 +  unsigned long  outbuflen;    /* Outbuf could be binary data  */
3842 +  unsigned long         inbuflen;      /* Inbuf could be binary data   */
3843 +#ifdef USE_IPV6
3844 +  unsigned int af;
3845 +#endif /* USE_IPV6 */
3846 +} sock_list;
3847 +
3848 +#endif                         /* _EGG_NET_H */
3849 diff -burN eggdrop1.6.15/src/patch.h eggdrop1.6.15-ssl/src/patch.h
3850 --- eggdrop1.6.15/src/patch.h   2003-05-05 00:08:01.000000000 +0200
3851 +++ eggdrop1.6.15-ssl/src/patch.h       2003-05-19 16:41:57.000000000 +0200
3852 @@ -32,6 +32,9 @@
3853   */
3854  #ifndef _EGG_PATCH_H
3855  #define _EGG_PATCH_H
3856 +#ifdef EGG_SSL_EXT
3857 +patch("SSL");
3858 +#endif
3859  /*
3860   *
3861   *
3862 diff -burN eggdrop1.6.15/src/tcl.c eggdrop1.6.15-ssl/src/tcl.c
3863 --- eggdrop1.6.15/src/tcl.c     2003-05-05 00:05:33.000000000 +0200
3864 +++ eggdrop1.6.15-ssl/src/tcl.c 2003-05-19 16:41:57.000000000 +0200
3865 @@ -44,6 +44,9 @@
3866  
3867  
3868  extern time_t online_since;
3869 +#ifdef EGG_SSL_EXT
3870 +extern int      use_ssl; /* kyotou */
3871 +#endif
3872  
3873  extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
3874              firewall[], helpdir[], notify_new[], hostname[], myip[], moddir[],
3875 @@ -529,6 +532,9 @@
3876    {"enable-simul",          &enable_simul,         0}, /* compat */
3877    {"debug-output",          &debug_output,         0}, /* compat */
3878    {"use-console-r",         &use_console_r,        0}, /* compat */
3879 +#ifdef EGG_SSL_EXT
3880 +  {"use-ssl",                  &use_ssl,               0}, /* kyotou */
3881 +#endif
3882    {NULL,                    NULL,                  0}
3883  };
3884  
3885 diff -burN eggdrop1.6.15/src/tclmisc.c eggdrop1.6.15-ssl/src/tclmisc.c
3886 --- eggdrop1.6.15/src/tclmisc.c 2003-05-05 00:05:33.000000000 +0200
3887 +++ eggdrop1.6.15-ssl/src/tclmisc.c     2003-05-19 16:41:57.000000000 +0200
3888 @@ -26,7 +26,13 @@
3889  #include "main.h"
3890  #include "modules.h"
3891  #include "tandem.h"
3892 +
3893 +#ifndef EGG_SSL_EXT
3894  #include "md5/md5.h"
3895 +#else
3896 +#include "openssl/md5.h"
3897 +#endif
3898 +
3899  #ifdef TIME_WITH_SYS_TIME
3900  # include <sys/time.h>
3901  # include <time.h>
This page took 0.558562 seconds and 3 git commands to generate.