Start packaging the bz2 python module as it is needed for building Qt5
[profile/ivi/python.git] / configure
1 #! /bin/sh
2 # From configure.in Revision.
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.67 for python 2.7.
5 #
6 # Report bugs to <http://bugs.python.org/>.
7 #
8 #
9 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
10 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11 # Foundation, Inc.
12 #
13 #
14 # This configure script is free software; the Free Software Foundation
15 # gives unlimited permission to copy, distribute and modify it.
16 ## -------------------- ##
17 ## M4sh Initialization. ##
18 ## -------------------- ##
19
20 # Be more Bourne compatible
21 DUALCASE=1; export DUALCASE # for MKS sh
22 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
23   emulate sh
24   NULLCMD=:
25   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26   # is contrary to our usage.  Disable this feature.
27   alias -g '${1+"$@"}'='"$@"'
28   setopt NO_GLOB_SUBST
29 else
30   case `(set -o) 2>/dev/null` in #(
31   *posix*) :
32     set -o posix ;; #(
33   *) :
34      ;;
35 esac
36 fi
37
38
39 as_nl='
40 '
41 export as_nl
42 # Printing a long string crashes Solaris 7 /usr/bin/printf.
43 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46 # Prefer a ksh shell builtin over an external printf program on Solaris,
47 # but without wasting forks for bash or zsh.
48 if test -z "$BASH_VERSION$ZSH_VERSION" \
49     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='print -r --'
51   as_echo_n='print -rn --'
52 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53   as_echo='printf %s\n'
54   as_echo_n='printf %s'
55 else
56   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58     as_echo_n='/usr/ucb/echo -n'
59   else
60     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61     as_echo_n_body='eval
62       arg=$1;
63       case $arg in #(
64       *"$as_nl"*)
65         expr "X$arg" : "X\\(.*\\)$as_nl";
66         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67       esac;
68       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69     '
70     export as_echo_n_body
71     as_echo_n='sh -c $as_echo_n_body as_echo'
72   fi
73   export as_echo_body
74   as_echo='sh -c $as_echo_body as_echo'
75 fi
76
77 # The user is always right.
78 if test "${PATH_SEPARATOR+set}" != set; then
79   PATH_SEPARATOR=:
80   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82       PATH_SEPARATOR=';'
83   }
84 fi
85
86
87 # IFS
88 # We need space, tab and new line, in precisely that order.  Quoting is
89 # there to prevent editors from complaining about space-tab.
90 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
91 # splitting by setting IFS to empty value.)
92 IFS=" ""        $as_nl"
93
94 # Find who we are.  Look in the path if we contain no directory separator.
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 if test "x$CONFIG_SHELL" = x; then
140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141   emulate sh
142   NULLCMD=:
143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144   # is contrary to our usage.  Disable this feature.
145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
146   setopt NO_GLOB_SUBST
147 else
148   case \`(set -o) 2>/dev/null\` in #(
149   *posix*) :
150     set -o posix ;; #(
151   *) :
152      ;;
153 esac
154 fi
155 "
156   as_required="as_fn_return () { (exit \$1); }
157 as_fn_success () { as_fn_return 0; }
158 as_fn_failure () { as_fn_return 1; }
159 as_fn_ret_success () { return 0; }
160 as_fn_ret_failure () { return 1; }
161
162 exitcode=0
163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169 else
170   exitcode=1; echo positional parameters were not saved.
171 fi
172 test x\$exitcode = x0 || exit 1"
173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177 test \$(( 1 + 1 )) = 2 || exit 1"
178   if (eval "$as_required") 2>/dev/null; then :
179   as_have_required=yes
180 else
181   as_have_required=no
182 fi
183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185 else
186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187 as_found=false
188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189 do
190   IFS=$as_save_IFS
191   test -z "$as_dir" && as_dir=.
192   as_found=:
193   case $as_dir in #(
194          /*)
195            for as_base in sh bash ksh sh5; do
196              # Try only shells that exist, to save several forks.
197              as_shell=$as_dir/$as_base
198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200   CONFIG_SHELL=$as_shell as_have_required=yes
201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202   break 2
203 fi
204 fi
205            done;;
206        esac
207   as_found=false
208 done
209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211   CONFIG_SHELL=$SHELL as_have_required=yes
212 fi; }
213 IFS=$as_save_IFS
214
215
216       if test "x$CONFIG_SHELL" != x; then :
217   # We cannot yet assume a decent shell, so we have to provide a
218         # neutralization value for shells without unset; and this also
219         # works around shells that cannot unset nonexistent variables.
220         BASH_ENV=/dev/null
221         ENV=/dev/null
222         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223         export CONFIG_SHELL
224         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225 fi
226
227     if test x$as_have_required = xno; then :
228   $as_echo "$0: This script requires a shell more modern than all"
229   $as_echo "$0: the shells that I found on your system."
230   if test x${ZSH_VERSION+set} = xset ; then
231     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233   else
234     $as_echo "$0: Please tell bug-autoconf@gnu.org and
235 $0: http://bugs.python.org/ about your system, including
236 $0: any error possibly output before this message. Then
237 $0: install a modern shell, or manually run the script
238 $0: under such a shell if you do have one."
239   fi
240   exit 1
241 fi
242 fi
243 fi
244 SHELL=${CONFIG_SHELL-/bin/sh}
245 export SHELL
246 # Unset more variables known to interfere with behavior of common tools.
247 CLICOLOR_FORCE= GREP_OPTIONS=
248 unset CLICOLOR_FORCE GREP_OPTIONS
249
250 ## --------------------- ##
251 ## M4sh Shell Functions. ##
252 ## --------------------- ##
253 # as_fn_unset VAR
254 # ---------------
255 # Portably unset VAR.
256 as_fn_unset ()
257 {
258   { eval $1=; unset $1;}
259 }
260 as_unset=as_fn_unset
261
262 # as_fn_set_status STATUS
263 # -----------------------
264 # Set $? to STATUS, without forking.
265 as_fn_set_status ()
266 {
267   return $1
268 } # as_fn_set_status
269
270 # as_fn_exit STATUS
271 # -----------------
272 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273 as_fn_exit ()
274 {
275   set +e
276   as_fn_set_status $1
277   exit $1
278 } # as_fn_exit
279
280 # as_fn_mkdir_p
281 # -------------
282 # Create "$as_dir" as a directory, including parents if necessary.
283 as_fn_mkdir_p ()
284 {
285
286   case $as_dir in #(
287   -*) as_dir=./$as_dir;;
288   esac
289   test -d "$as_dir" || eval $as_mkdir_p || {
290     as_dirs=
291     while :; do
292       case $as_dir in #(
293       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294       *) as_qdir=$as_dir;;
295       esac
296       as_dirs="'$as_qdir' $as_dirs"
297       as_dir=`$as_dirname -- "$as_dir" ||
298 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299          X"$as_dir" : 'X\(//\)[^/]' \| \
300          X"$as_dir" : 'X\(//\)$' \| \
301          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302 $as_echo X"$as_dir" |
303     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304             s//\1/
305             q
306           }
307           /^X\(\/\/\)[^/].*/{
308             s//\1/
309             q
310           }
311           /^X\(\/\/\)$/{
312             s//\1/
313             q
314           }
315           /^X\(\/\).*/{
316             s//\1/
317             q
318           }
319           s/.*/./; q'`
320       test -d "$as_dir" && break
321     done
322     test -z "$as_dirs" || eval "mkdir $as_dirs"
323   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
324
325
326 } # as_fn_mkdir_p
327 # as_fn_append VAR VALUE
328 # ----------------------
329 # Append the text in VALUE to the end of the definition contained in VAR. Take
330 # advantage of any shell optimizations that allow amortized linear growth over
331 # repeated appends, instead of the typical quadratic growth present in naive
332 # implementations.
333 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334   eval 'as_fn_append ()
335   {
336     eval $1+=\$2
337   }'
338 else
339   as_fn_append ()
340   {
341     eval $1=\$$1\$2
342   }
343 fi # as_fn_append
344
345 # as_fn_arith ARG...
346 # ------------------
347 # Perform arithmetic evaluation on the ARGs, and store the result in the
348 # global $as_val. Take advantage of shells that can avoid forks. The arguments
349 # must be portable across $(()) and expr.
350 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351   eval 'as_fn_arith ()
352   {
353     as_val=$(( $* ))
354   }'
355 else
356   as_fn_arith ()
357   {
358     as_val=`expr "$@" || test $? -eq 1`
359   }
360 fi # as_fn_arith
361
362
363 # as_fn_error STATUS ERROR [LINENO LOG_FD]
364 # ----------------------------------------
365 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
367 # script with STATUS, using 1 if that was 0.
368 as_fn_error ()
369 {
370   as_status=$1; test $as_status -eq 0 && as_status=1
371   if test "$4"; then
372     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
374   fi
375   $as_echo "$as_me: error: $2" >&2
376   as_fn_exit $as_status
377 } # as_fn_error
378
379 if expr a : '\(a\)' >/dev/null 2>&1 &&
380    test "X`expr 00001 : '.*\(...\)'`" = X001; then
381   as_expr=expr
382 else
383   as_expr=false
384 fi
385
386 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387   as_basename=basename
388 else
389   as_basename=false
390 fi
391
392 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393   as_dirname=dirname
394 else
395   as_dirname=false
396 fi
397
398 as_me=`$as_basename -- "$0" ||
399 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400          X"$0" : 'X\(//\)$' \| \
401          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
402 $as_echo X/"$0" |
403     sed '/^.*\/\([^/][^/]*\)\/*$/{
404             s//\1/
405             q
406           }
407           /^X\/\(\/\/\)$/{
408             s//\1/
409             q
410           }
411           /^X\/\(\/\).*/{
412             s//\1/
413             q
414           }
415           s/.*/./; q'`
416
417 # Avoid depending upon Character Ranges.
418 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421 as_cr_digits='0123456789'
422 as_cr_alnum=$as_cr_Letters$as_cr_digits
423
424
425   as_lineno_1=$LINENO as_lineno_1a=$LINENO
426   as_lineno_2=$LINENO as_lineno_2a=$LINENO
427   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
430   sed -n '
431     p
432     /[$]LINENO/=
433   ' <$as_myself |
434     sed '
435       s/[$]LINENO.*/&-/
436       t lineno
437       b
438       :lineno
439       N
440       :loop
441       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
442       t loop
443       s/-\n.*//
444     ' >$as_me.lineno &&
445   chmod +x "$as_me.lineno" ||
446     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
447
448   # Don't try to exec as it changes $[0], causing all sort of problems
449   # (the dirname of $[0] is not the place where we might find the
450   # original and so on.  Autoconf is especially sensitive to this).
451   . "./$as_me.lineno"
452   # Exit status is that of the last command.
453   exit
454 }
455
456 ECHO_C= ECHO_N= ECHO_T=
457 case `echo -n x` in #(((((
458 -n*)
459   case `echo 'xy\c'` in
460   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
461   xy)  ECHO_C='\c';;
462   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
463        ECHO_T=' ';;
464   esac;;
465 *)
466   ECHO_N='-n';;
467 esac
468
469 rm -f conf$$ conf$$.exe conf$$.file
470 if test -d conf$$.dir; then
471   rm -f conf$$.dir/conf$$.file
472 else
473   rm -f conf$$.dir
474   mkdir conf$$.dir 2>/dev/null
475 fi
476 if (echo >conf$$.file) 2>/dev/null; then
477   if ln -s conf$$.file conf$$ 2>/dev/null; then
478     as_ln_s='ln -s'
479     # ... but there are two gotchas:
480     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482     # In both cases, we have to default to `cp -p'.
483     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484       as_ln_s='cp -p'
485   elif ln conf$$.file conf$$ 2>/dev/null; then
486     as_ln_s=ln
487   else
488     as_ln_s='cp -p'
489   fi
490 else
491   as_ln_s='cp -p'
492 fi
493 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494 rmdir conf$$.dir 2>/dev/null
495
496 if mkdir -p . 2>/dev/null; then
497   as_mkdir_p='mkdir -p "$as_dir"'
498 else
499   test -d ./-p && rmdir ./-p
500   as_mkdir_p=false
501 fi
502
503 if test -x / >/dev/null 2>&1; then
504   as_test_x='test -x'
505 else
506   if ls -dL / >/dev/null 2>&1; then
507     as_ls_L_option=L
508   else
509     as_ls_L_option=
510   fi
511   as_test_x='
512     eval sh -c '\''
513       if test -d "$1"; then
514         test -d "$1/.";
515       else
516         case $1 in #(
517         -*)set "./$1";;
518         esac;
519         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
520         ???[sx]*):;;*)false;;esac;fi
521     '\'' sh
522   '
523 fi
524 as_executable_p=$as_test_x
525
526 # Sed expression to map a string onto a valid CPP name.
527 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
528
529 # Sed expression to map a string onto a valid variable name.
530 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
531
532
533 test -n "$DJDIR" || exec 7<&0 </dev/null
534 exec 6>&1
535
536 # Name of the host.
537 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
538 # so uname gets run too.
539 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
541 #
542 # Initializations.
543 #
544 ac_default_prefix=/usr/local
545 ac_clean_files=
546 ac_config_libobj_dir=.
547 LIBOBJS=
548 cross_compiling=no
549 subdirs=
550 MFLAGS=
551 MAKEFLAGS=
552
553 # Identity of this package.
554 PACKAGE_NAME='python'
555 PACKAGE_TARNAME='python'
556 PACKAGE_VERSION='2.7'
557 PACKAGE_STRING='python 2.7'
558 PACKAGE_BUGREPORT='http://bugs.python.org/'
559 PACKAGE_URL=''
560
561 ac_unique_file="Include/object.h"
562 # Factoring default headers for most tests.
563 ac_includes_default="\
564 #include <stdio.h>
565 #ifdef HAVE_SYS_TYPES_H
566 # include <sys/types.h>
567 #endif
568 #ifdef HAVE_SYS_STAT_H
569 # include <sys/stat.h>
570 #endif
571 #ifdef STDC_HEADERS
572 # include <stdlib.h>
573 # include <stddef.h>
574 #else
575 # ifdef HAVE_STDLIB_H
576 #  include <stdlib.h>
577 # endif
578 #endif
579 #ifdef HAVE_STRING_H
580 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
581 #  include <memory.h>
582 # endif
583 # include <string.h>
584 #endif
585 #ifdef HAVE_STRINGS_H
586 # include <strings.h>
587 #endif
588 #ifdef HAVE_INTTYPES_H
589 # include <inttypes.h>
590 #endif
591 #ifdef HAVE_STDINT_H
592 # include <stdint.h>
593 #endif
594 #ifdef HAVE_UNISTD_H
595 # include <unistd.h>
596 #endif"
597
598 ac_subst_vars='LTLIBOBJS
599 SRCDIRS
600 THREADHEADERS
601 UNICODE_OBJS
602 LIBC
603 LIBM
604 HAVE_GETHOSTBYNAME
605 HAVE_GETHOSTBYNAME_R
606 HAVE_GETHOSTBYNAME_R_3_ARG
607 HAVE_GETHOSTBYNAME_R_5_ARG
608 HAVE_GETHOSTBYNAME_R_6_ARG
609 LIBOBJS
610 TRUE
611 MACHDEP_OBJS
612 DYNLOADFILE
613 DLINCLDIR
614 THREADOBJ
615 LDLAST
616 USE_THREAD_MODULE
617 SIGNAL_OBJS
618 USE_SIGNAL_MODULE
619 LIBFFI_INCLUDEDIR
620 PKG_CONFIG
621 SHLIBS
622 CFLAGSFORSHARED
623 LINKFORSHARED
624 CCSHARED
625 BLDSHARED
626 LDCXXSHARED
627 LDSHARED
628 SO
629 LIBTOOL_CRUFT
630 OTHER_LIBTOOL_OPT
631 UNIVERSAL_ARCH_FLAGS
632 BASECFLAGS
633 OPT
634 LN
635 INSTALL_DATA
636 INSTALL_SCRIPT
637 INSTALL_PROGRAM
638 HAS_HG
639 HGBRANCH
640 HGTAG
641 HGVERSION
642 SVNVERSION
643 ARFLAGS
644 AR
645 RANLIB
646 GNULD
647 LINKCC
648 RUNSHARED
649 INSTSONAME
650 LDLIBRARYDIR
651 BLDLIBRARY
652 DLLLIBRARY
653 LDLIBRARY
654 LIBRARY
655 BUILDEXEEXT
656 EGREP
657 GREP
658 CPP
659 MAINCC
660 CXX
661 OBJEXT
662 EXEEXT
663 ac_ct_CC
664 CPPFLAGS
665 LDFLAGS
666 CFLAGS
667 CC
668 EXPORT_MACOSX_DEPLOYMENT_TARGET
669 CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670 EXTRAMACHDEPPATH
671 EXTRAPLATDIR
672 SGI_ABI
673 MACHDEP
674 FRAMEWORKINSTALLAPPSPREFIX
675 FRAMEWORKUNIXTOOLSPREFIX
676 FRAMEWORKALTINSTALLLAST
677 FRAMEWORKALTINSTALLFIRST
678 FRAMEWORKINSTALLLAST
679 FRAMEWORKINSTALLFIRST
680 PYTHONFRAMEWORKINSTALLDIR
681 PYTHONFRAMEWORKPREFIX
682 PYTHONFRAMEWORKDIR
683 PYTHONFRAMEWORKIDENTIFIER
684 PYTHONFRAMEWORK
685 LIPO_32BIT_FLAGS
686 ARCH_RUN_32BIT
687 UNIVERSALSDK
688 CONFIG_ARGS
689 SOVERSION
690 VERSION
691 target_alias
692 host_alias
693 build_alias
694 LIBS
695 ECHO_T
696 ECHO_N
697 ECHO_C
698 DEFS
699 mandir
700 localedir
701 libdir
702 psdir
703 pdfdir
704 dvidir
705 htmldir
706 infodir
707 docdir
708 oldincludedir
709 includedir
710 localstatedir
711 sharedstatedir
712 sysconfdir
713 datadir
714 datarootdir
715 libexecdir
716 sbindir
717 bindir
718 program_transform_name
719 prefix
720 exec_prefix
721 PACKAGE_URL
722 PACKAGE_BUGREPORT
723 PACKAGE_STRING
724 PACKAGE_VERSION
725 PACKAGE_TARNAME
726 PACKAGE_NAME
727 PATH_SEPARATOR
728 SHELL'
729 ac_subst_files=''
730 ac_user_opts='
731 enable_option_checking
732 enable_universalsdk
733 with_universal_archs
734 with_framework_name
735 enable_framework
736 with_gcc
737 with_cxx_main
738 with_suffix
739 enable_shared
740 enable_profiling
741 with_pydebug
742 enable_toolbox_glue
743 with_libs
744 with_system_expat
745 with_system_ffi
746 with_dbmliborder
747 with_signal_module
748 with_dec_threads
749 with_threads
750 with_thread
751 with_pth
752 enable_ipv6
753 with_doc_strings
754 with_tsc
755 with_pymalloc
756 with_valgrind
757 with_wctype_functions
758 with_fpectl
759 with_libm
760 with_libc
761 enable_big_digits
762 enable_unicode
763 '
764       ac_precious_vars='build_alias
765 host_alias
766 target_alias
767 CC
768 CFLAGS
769 LDFLAGS
770 LIBS
771 CPPFLAGS
772 CPP'
773
774
775 # Initialize some variables set by options.
776 ac_init_help=
777 ac_init_version=false
778 ac_unrecognized_opts=
779 ac_unrecognized_sep=
780 # The variables have the same names as the options, with
781 # dashes changed to underlines.
782 cache_file=/dev/null
783 exec_prefix=NONE
784 no_create=
785 no_recursion=
786 prefix=NONE
787 program_prefix=NONE
788 program_suffix=NONE
789 program_transform_name=s,x,x,
790 silent=
791 site=
792 srcdir=
793 verbose=
794 x_includes=NONE
795 x_libraries=NONE
796
797 # Installation directory options.
798 # These are left unexpanded so users can "make install exec_prefix=/foo"
799 # and all the variables that are supposed to be based on exec_prefix
800 # by default will actually change.
801 # Use braces instead of parens because sh, perl, etc. also accept them.
802 # (The list follows the same order as the GNU Coding Standards.)
803 bindir='${exec_prefix}/bin'
804 sbindir='${exec_prefix}/sbin'
805 libexecdir='${exec_prefix}/libexec'
806 datarootdir='${prefix}/share'
807 datadir='${datarootdir}'
808 sysconfdir='${prefix}/etc'
809 sharedstatedir='${prefix}/com'
810 localstatedir='${prefix}/var'
811 includedir='${prefix}/include'
812 oldincludedir='/usr/include'
813 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814 infodir='${datarootdir}/info'
815 htmldir='${docdir}'
816 dvidir='${docdir}'
817 pdfdir='${docdir}'
818 psdir='${docdir}'
819 libdir='${exec_prefix}/lib'
820 localedir='${datarootdir}/locale'
821 mandir='${datarootdir}/man'
822
823 ac_prev=
824 ac_dashdash=
825 for ac_option
826 do
827   # If the previous option needs an argument, assign it.
828   if test -n "$ac_prev"; then
829     eval $ac_prev=\$ac_option
830     ac_prev=
831     continue
832   fi
833
834   case $ac_option in
835   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836   *=)   ac_optarg= ;;
837   *)    ac_optarg=yes ;;
838   esac
839
840   # Accept the important Cygnus configure options, so we can diagnose typos.
841
842   case $ac_dashdash$ac_option in
843   --)
844     ac_dashdash=yes ;;
845
846   -bindir | --bindir | --bindi | --bind | --bin | --bi)
847     ac_prev=bindir ;;
848   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
849     bindir=$ac_optarg ;;
850
851   -build | --build | --buil | --bui | --bu)
852     ac_prev=build_alias ;;
853   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
854     build_alias=$ac_optarg ;;
855
856   -cache-file | --cache-file | --cache-fil | --cache-fi \
857   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858     ac_prev=cache_file ;;
859   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
861     cache_file=$ac_optarg ;;
862
863   --config-cache | -C)
864     cache_file=config.cache ;;
865
866   -datadir | --datadir | --datadi | --datad)
867     ac_prev=datadir ;;
868   -datadir=* | --datadir=* | --datadi=* | --datad=*)
869     datadir=$ac_optarg ;;
870
871   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872   | --dataroo | --dataro | --datar)
873     ac_prev=datarootdir ;;
874   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876     datarootdir=$ac_optarg ;;
877
878   -disable-* | --disable-*)
879     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
880     # Reject names that are not valid shell variable names.
881     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
882       as_fn_error $? "invalid feature name: $ac_useropt"
883     ac_useropt_orig=$ac_useropt
884     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885     case $ac_user_opts in
886       *"
887 "enable_$ac_useropt"
888 "*) ;;
889       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890          ac_unrecognized_sep=', ';;
891     esac
892     eval enable_$ac_useropt=no ;;
893
894   -docdir | --docdir | --docdi | --doc | --do)
895     ac_prev=docdir ;;
896   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897     docdir=$ac_optarg ;;
898
899   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900     ac_prev=dvidir ;;
901   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902     dvidir=$ac_optarg ;;
903
904   -enable-* | --enable-*)
905     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
906     # Reject names that are not valid shell variable names.
907     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
908       as_fn_error $? "invalid feature name: $ac_useropt"
909     ac_useropt_orig=$ac_useropt
910     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911     case $ac_user_opts in
912       *"
913 "enable_$ac_useropt"
914 "*) ;;
915       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916          ac_unrecognized_sep=', ';;
917     esac
918     eval enable_$ac_useropt=\$ac_optarg ;;
919
920   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922   | --exec | --exe | --ex)
923     ac_prev=exec_prefix ;;
924   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926   | --exec=* | --exe=* | --ex=*)
927     exec_prefix=$ac_optarg ;;
928
929   -gas | --gas | --ga | --g)
930     # Obsolete; use --with-gas.
931     with_gas=yes ;;
932
933   -help | --help | --hel | --he | -h)
934     ac_init_help=long ;;
935   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936     ac_init_help=recursive ;;
937   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938     ac_init_help=short ;;
939
940   -host | --host | --hos | --ho)
941     ac_prev=host_alias ;;
942   -host=* | --host=* | --hos=* | --ho=*)
943     host_alias=$ac_optarg ;;
944
945   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946     ac_prev=htmldir ;;
947   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948   | --ht=*)
949     htmldir=$ac_optarg ;;
950
951   -includedir | --includedir | --includedi | --included | --include \
952   | --includ | --inclu | --incl | --inc)
953     ac_prev=includedir ;;
954   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955   | --includ=* | --inclu=* | --incl=* | --inc=*)
956     includedir=$ac_optarg ;;
957
958   -infodir | --infodir | --infodi | --infod | --info | --inf)
959     ac_prev=infodir ;;
960   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
961     infodir=$ac_optarg ;;
962
963   -libdir | --libdir | --libdi | --libd)
964     ac_prev=libdir ;;
965   -libdir=* | --libdir=* | --libdi=* | --libd=*)
966     libdir=$ac_optarg ;;
967
968   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969   | --libexe | --libex | --libe)
970     ac_prev=libexecdir ;;
971   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972   | --libexe=* | --libex=* | --libe=*)
973     libexecdir=$ac_optarg ;;
974
975   -localedir | --localedir | --localedi | --localed | --locale)
976     ac_prev=localedir ;;
977   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978     localedir=$ac_optarg ;;
979
980   -localstatedir | --localstatedir | --localstatedi | --localstated \
981   | --localstate | --localstat | --localsta | --localst | --locals)
982     ac_prev=localstatedir ;;
983   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
984   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
985     localstatedir=$ac_optarg ;;
986
987   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988     ac_prev=mandir ;;
989   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
990     mandir=$ac_optarg ;;
991
992   -nfp | --nfp | --nf)
993     # Obsolete; use --without-fp.
994     with_fp=no ;;
995
996   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
997   | --no-cr | --no-c | -n)
998     no_create=yes ;;
999
1000   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002     no_recursion=yes ;;
1003
1004   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006   | --oldin | --oldi | --old | --ol | --o)
1007     ac_prev=oldincludedir ;;
1008   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1011     oldincludedir=$ac_optarg ;;
1012
1013   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014     ac_prev=prefix ;;
1015   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1016     prefix=$ac_optarg ;;
1017
1018   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019   | --program-pre | --program-pr | --program-p)
1020     ac_prev=program_prefix ;;
1021   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1023     program_prefix=$ac_optarg ;;
1024
1025   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026   | --program-suf | --program-su | --program-s)
1027     ac_prev=program_suffix ;;
1028   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1030     program_suffix=$ac_optarg ;;
1031
1032   -program-transform-name | --program-transform-name \
1033   | --program-transform-nam | --program-transform-na \
1034   | --program-transform-n | --program-transform- \
1035   | --program-transform | --program-transfor \
1036   | --program-transfo | --program-transf \
1037   | --program-trans | --program-tran \
1038   | --progr-tra | --program-tr | --program-t)
1039     ac_prev=program_transform_name ;;
1040   -program-transform-name=* | --program-transform-name=* \
1041   | --program-transform-nam=* | --program-transform-na=* \
1042   | --program-transform-n=* | --program-transform-=* \
1043   | --program-transform=* | --program-transfor=* \
1044   | --program-transfo=* | --program-transf=* \
1045   | --program-trans=* | --program-tran=* \
1046   | --progr-tra=* | --program-tr=* | --program-t=*)
1047     program_transform_name=$ac_optarg ;;
1048
1049   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050     ac_prev=pdfdir ;;
1051   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052     pdfdir=$ac_optarg ;;
1053
1054   -psdir | --psdir | --psdi | --psd | --ps)
1055     ac_prev=psdir ;;
1056   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057     psdir=$ac_optarg ;;
1058
1059   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060   | -silent | --silent | --silen | --sile | --sil)
1061     silent=yes ;;
1062
1063   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064     ac_prev=sbindir ;;
1065   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066   | --sbi=* | --sb=*)
1067     sbindir=$ac_optarg ;;
1068
1069   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071   | --sharedst | --shareds | --shared | --share | --shar \
1072   | --sha | --sh)
1073     ac_prev=sharedstatedir ;;
1074   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077   | --sha=* | --sh=*)
1078     sharedstatedir=$ac_optarg ;;
1079
1080   -site | --site | --sit)
1081     ac_prev=site ;;
1082   -site=* | --site=* | --sit=*)
1083     site=$ac_optarg ;;
1084
1085   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086     ac_prev=srcdir ;;
1087   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1088     srcdir=$ac_optarg ;;
1089
1090   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091   | --syscon | --sysco | --sysc | --sys | --sy)
1092     ac_prev=sysconfdir ;;
1093   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1095     sysconfdir=$ac_optarg ;;
1096
1097   -target | --target | --targe | --targ | --tar | --ta | --t)
1098     ac_prev=target_alias ;;
1099   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1100     target_alias=$ac_optarg ;;
1101
1102   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103     verbose=yes ;;
1104
1105   -version | --version | --versio | --versi | --vers | -V)
1106     ac_init_version=: ;;
1107
1108   -with-* | --with-*)
1109     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1110     # Reject names that are not valid shell variable names.
1111     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1112       as_fn_error $? "invalid package name: $ac_useropt"
1113     ac_useropt_orig=$ac_useropt
1114     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115     case $ac_user_opts in
1116       *"
1117 "with_$ac_useropt"
1118 "*) ;;
1119       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120          ac_unrecognized_sep=', ';;
1121     esac
1122     eval with_$ac_useropt=\$ac_optarg ;;
1123
1124   -without-* | --without-*)
1125     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1126     # Reject names that are not valid shell variable names.
1127     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1128       as_fn_error $? "invalid package name: $ac_useropt"
1129     ac_useropt_orig=$ac_useropt
1130     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131     case $ac_user_opts in
1132       *"
1133 "with_$ac_useropt"
1134 "*) ;;
1135       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136          ac_unrecognized_sep=', ';;
1137     esac
1138     eval with_$ac_useropt=no ;;
1139
1140   --x)
1141     # Obsolete; use --with-x.
1142     with_x=yes ;;
1143
1144   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145   | --x-incl | --x-inc | --x-in | --x-i)
1146     ac_prev=x_includes ;;
1147   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1149     x_includes=$ac_optarg ;;
1150
1151   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153     ac_prev=x_libraries ;;
1154   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1156     x_libraries=$ac_optarg ;;
1157
1158   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159 Try \`$0 --help' for more information"
1160     ;;
1161
1162   *=*)
1163     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164     # Reject names that are not valid shell variable names.
1165     case $ac_envvar in #(
1166       '' | [0-9]* | *[!_$as_cr_alnum]* )
1167       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1168     esac
1169     eval $ac_envvar=\$ac_optarg
1170     export $ac_envvar ;;
1171
1172   *)
1173     # FIXME: should be removed in autoconf 3.0.
1174     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1175     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1176       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1177     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1178     ;;
1179
1180   esac
1181 done
1182
1183 if test -n "$ac_prev"; then
1184   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1185   as_fn_error $? "missing argument to $ac_option"
1186 fi
1187
1188 if test -n "$ac_unrecognized_opts"; then
1189   case $enable_option_checking in
1190     no) ;;
1191     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1192     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193   esac
1194 fi
1195
1196 # Check all directory arguments for consistency.
1197 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198                 datadir sysconfdir sharedstatedir localstatedir includedir \
1199                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200                 libdir localedir mandir
1201 do
1202   eval ac_val=\$$ac_var
1203   # Remove trailing slashes.
1204   case $ac_val in
1205     */ )
1206       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207       eval $ac_var=\$ac_val;;
1208   esac
1209   # Be sure to have absolute directory names.
1210   case $ac_val in
1211     [\\/$]* | ?:[\\/]* )  continue;;
1212     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1213   esac
1214   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1215 done
1216
1217 # There might be people who depend on the old broken behavior: `$host'
1218 # used to hold the argument of --host etc.
1219 # FIXME: To remove some day.
1220 build=$build_alias
1221 host=$host_alias
1222 target=$target_alias
1223
1224 # FIXME: To remove some day.
1225 if test "x$host_alias" != x; then
1226   if test "x$build_alias" = x; then
1227     cross_compiling=maybe
1228     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229     If a cross compiler is detected then cross compile mode will be used" >&2
1230   elif test "x$build_alias" != "x$host_alias"; then
1231     cross_compiling=yes
1232   fi
1233 fi
1234
1235 ac_tool_prefix=
1236 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238 test "$silent" = yes && exec 6>/dev/null
1239
1240
1241 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242 ac_ls_di=`ls -di .` &&
1243 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1244   as_fn_error $? "working directory cannot be determined"
1245 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1246   as_fn_error $? "pwd does not report name of working directory"
1247
1248
1249 # Find the source files, if location was not specified.
1250 if test -z "$srcdir"; then
1251   ac_srcdir_defaulted=yes
1252   # Try the directory containing this script, then the parent directory.
1253   ac_confdir=`$as_dirname -- "$as_myself" ||
1254 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255          X"$as_myself" : 'X\(//\)[^/]' \| \
1256          X"$as_myself" : 'X\(//\)$' \| \
1257          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258 $as_echo X"$as_myself" |
1259     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260             s//\1/
1261             q
1262           }
1263           /^X\(\/\/\)[^/].*/{
1264             s//\1/
1265             q
1266           }
1267           /^X\(\/\/\)$/{
1268             s//\1/
1269             q
1270           }
1271           /^X\(\/\).*/{
1272             s//\1/
1273             q
1274           }
1275           s/.*/./; q'`
1276   srcdir=$ac_confdir
1277   if test ! -r "$srcdir/$ac_unique_file"; then
1278     srcdir=..
1279   fi
1280 else
1281   ac_srcdir_defaulted=no
1282 fi
1283 if test ! -r "$srcdir/$ac_unique_file"; then
1284   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1285   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1286 fi
1287 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288 ac_abs_confdir=`(
1289         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1290         pwd)`
1291 # When building in place, set srcdir=.
1292 if test "$ac_abs_confdir" = "$ac_pwd"; then
1293   srcdir=.
1294 fi
1295 # Remove unnecessary trailing slashes from srcdir.
1296 # Double slashes in file names in object file debugging info
1297 # mess up M-x gdb in Emacs.
1298 case $srcdir in
1299 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300 esac
1301 for ac_var in $ac_precious_vars; do
1302   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303   eval ac_env_${ac_var}_value=\$${ac_var}
1304   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306 done
1307
1308 #
1309 # Report the --help message.
1310 #
1311 if test "$ac_init_help" = "long"; then
1312   # Omit some internal or obsolete options to make the list less imposing.
1313   # This message is too long to be a string in the A/UX 3.1 sh.
1314   cat <<_ACEOF
1315 \`configure' configures python 2.7 to adapt to many kinds of systems.
1316
1317 Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320 VAR=VALUE.  See below for descriptions of some of the useful variables.
1321
1322 Defaults for the options are specified in brackets.
1323
1324 Configuration:
1325   -h, --help              display this help and exit
1326       --help=short        display options specific to this package
1327       --help=recursive    display the short help of all the included packages
1328   -V, --version           display version information and exit
1329   -q, --quiet, --silent   do not print \`checking ...' messages
1330       --cache-file=FILE   cache test results in FILE [disabled]
1331   -C, --config-cache      alias for \`--cache-file=config.cache'
1332   -n, --no-create         do not create output files
1333       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1334
1335 Installation directories:
1336   --prefix=PREFIX         install architecture-independent files in PREFIX
1337                           [$ac_default_prefix]
1338   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1339                           [PREFIX]
1340
1341 By default, \`make install' will install all the files in
1342 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1343 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344 for instance \`--prefix=\$HOME'.
1345
1346 For better control, use the options below.
1347
1348 Fine tuning of the installation directories:
1349   --bindir=DIR            user executables [EPREFIX/bin]
1350   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1351   --libexecdir=DIR        program executables [EPREFIX/libexec]
1352   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1353   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1354   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1355   --libdir=DIR            object code libraries [EPREFIX/lib]
1356   --includedir=DIR        C header files [PREFIX/include]
1357   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1358   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1359   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1360   --infodir=DIR           info documentation [DATAROOTDIR/info]
1361   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1362   --mandir=DIR            man documentation [DATAROOTDIR/man]
1363   --docdir=DIR            documentation root [DATAROOTDIR/doc/python]
1364   --htmldir=DIR           html documentation [DOCDIR]
1365   --dvidir=DIR            dvi documentation [DOCDIR]
1366   --pdfdir=DIR            pdf documentation [DOCDIR]
1367   --psdir=DIR             ps documentation [DOCDIR]
1368 _ACEOF
1369
1370   cat <<\_ACEOF
1371 _ACEOF
1372 fi
1373
1374 if test -n "$ac_init_help"; then
1375   case $ac_init_help in
1376      short | recursive ) echo "Configuration of python 2.7:";;
1377    esac
1378   cat <<\_ACEOF
1379
1380 Optional Features:
1381   --disable-option-checking  ignore unrecognized --enable/--with options
1382   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1383   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1384   --enable-universalsdk[=SDKDIR]
1385                           Build against Mac OS X 10.4u SDK (ppc/i386)
1386   --enable-framework[=INSTALLDIR]
1387                           Build (MacOSX|Darwin) framework
1388   --enable-shared         disable/enable building shared python library
1389   --enable-profiling      enable C-level code profiling
1390   --enable-toolbox-glue   disable/enable MacOSX glue code for extensions
1391   --enable-ipv6           Enable ipv6 (with ipv4) support
1392   --disable-ipv6          Disable ipv6 support
1393   --enable-big-digits[=BITS]
1394                           use big digits for Python longs [[BITS=30]]
1395   --enable-unicode[=ucs[24]]
1396                           Enable Unicode strings (default is ucs2)
1397
1398 Optional Packages:
1399   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1400   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1401   --with-universal-archs=ARCH
1402                           select architectures for universal build ("32-bit",
1403                           "64-bit", "3-way", "intel" or "all")
1404   --with-framework-name=FRAMEWORK
1405                           specify an alternate name of the framework built
1406                           with --enable-framework
1407   --without-gcc           never use gcc
1408   --with-cxx-main=<compiler>
1409                           compile main() and link python executable with C++
1410                           compiler
1411   --with-suffix=.exe      set executable suffix
1412   --with-pydebug          build with Py_DEBUG defined
1413   --with-libs='lib1 ...'  link against additional libs
1414   --with-system-expat     build pyexpat module using an installed expat
1415                           library
1416   --with-system-ffi       build _ctypes module using an installed ffi library
1417   --with-dbmliborder=db1:db2:...
1418                           order to check db backends for dbm. Valid value is a
1419                           colon separated string with the backend names
1420                           `ndbm', `gdbm' and `bdb'.
1421   --with-signal-module    disable/enable signal module
1422   --with-dec-threads      use DEC Alpha/OSF1 thread-safe libraries
1423   --with(out)-threads[=DIRECTORY]
1424                           disable/enable thread support
1425   --with(out)-thread[=DIRECTORY]
1426                           deprecated; use --with(out)-threads
1427   --with-pth              use GNU pth threading libraries
1428   --with(out)-doc-strings disable/enable documentation strings
1429   --with(out)-tsc         enable/disable timestamp counter profile
1430   --with(out)-pymalloc    disable/enable specialized mallocs
1431   --with-valgrind         Enable Valgrind support
1432   --with-wctype-functions use wctype.h functions
1433   --with-fpectl           enable SIGFPE catching
1434   --with-libm=STRING      math library
1435   --with-libc=STRING      C library
1436
1437 Some influential environment variables:
1438   CC          C compiler command
1439   CFLAGS      C compiler flags
1440   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1441               nonstandard directory <lib dir>
1442   LIBS        libraries to pass to the linker, e.g. -l<library>
1443   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1444               you have headers in a nonstandard directory <include dir>
1445   CPP         C preprocessor
1446
1447 Use these variables to override the choices made by `configure' or to help
1448 it to find libraries and programs with nonstandard names/locations.
1449
1450 Report bugs to <http://bugs.python.org/>.
1451 _ACEOF
1452 ac_status=$?
1453 fi
1454
1455 if test "$ac_init_help" = "recursive"; then
1456   # If there are subdirs, report their specific --help.
1457   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1458     test -d "$ac_dir" ||
1459       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1460       continue
1461     ac_builddir=.
1462
1463 case "$ac_dir" in
1464 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465 *)
1466   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1467   # A ".." for each directory in $ac_dir_suffix.
1468   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1469   case $ac_top_builddir_sub in
1470   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1472   esac ;;
1473 esac
1474 ac_abs_top_builddir=$ac_pwd
1475 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1476 # for backward compatibility:
1477 ac_top_builddir=$ac_top_build_prefix
1478
1479 case $srcdir in
1480   .)  # We are building in place.
1481     ac_srcdir=.
1482     ac_top_srcdir=$ac_top_builddir_sub
1483     ac_abs_top_srcdir=$ac_pwd ;;
1484   [\\/]* | ?:[\\/]* )  # Absolute name.
1485     ac_srcdir=$srcdir$ac_dir_suffix;
1486     ac_top_srcdir=$srcdir
1487     ac_abs_top_srcdir=$srcdir ;;
1488   *) # Relative name.
1489     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1490     ac_top_srcdir=$ac_top_build_prefix$srcdir
1491     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1492 esac
1493 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1494
1495     cd "$ac_dir" || { ac_status=$?; continue; }
1496     # Check for guested configure.
1497     if test -f "$ac_srcdir/configure.gnu"; then
1498       echo &&
1499       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1500     elif test -f "$ac_srcdir/configure"; then
1501       echo &&
1502       $SHELL "$ac_srcdir/configure" --help=recursive
1503     else
1504       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1505     fi || ac_status=$?
1506     cd "$ac_pwd" || { ac_status=$?; break; }
1507   done
1508 fi
1509
1510 test -n "$ac_init_help" && exit $ac_status
1511 if $ac_init_version; then
1512   cat <<\_ACEOF
1513 python configure 2.7
1514 generated by GNU Autoconf 2.67
1515
1516 Copyright (C) 2010 Free Software Foundation, Inc.
1517 This configure script is free software; the Free Software Foundation
1518 gives unlimited permission to copy, distribute and modify it.
1519 _ACEOF
1520   exit
1521 fi
1522
1523 ## ------------------------ ##
1524 ## Autoconf initialization. ##
1525 ## ------------------------ ##
1526
1527 # ac_fn_c_try_compile LINENO
1528 # --------------------------
1529 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1530 ac_fn_c_try_compile ()
1531 {
1532   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533   rm -f conftest.$ac_objext
1534   if { { ac_try="$ac_compile"
1535 case "(($ac_try" in
1536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537   *) ac_try_echo=$ac_try;;
1538 esac
1539 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540 $as_echo "$ac_try_echo"; } >&5
1541   (eval "$ac_compile") 2>conftest.err
1542   ac_status=$?
1543   if test -s conftest.err; then
1544     grep -v '^ *+' conftest.err >conftest.er1
1545     cat conftest.er1 >&5
1546     mv -f conftest.er1 conftest.err
1547   fi
1548   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549   test $ac_status = 0; } && {
1550          test -z "$ac_c_werror_flag" ||
1551          test ! -s conftest.err
1552        } && test -s conftest.$ac_objext; then :
1553   ac_retval=0
1554 else
1555   $as_echo "$as_me: failed program was:" >&5
1556 sed 's/^/| /' conftest.$ac_ext >&5
1557
1558         ac_retval=1
1559 fi
1560   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1561   as_fn_set_status $ac_retval
1562
1563 } # ac_fn_c_try_compile
1564
1565 # ac_fn_c_try_cpp LINENO
1566 # ----------------------
1567 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1568 ac_fn_c_try_cpp ()
1569 {
1570   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571   if { { ac_try="$ac_cpp conftest.$ac_ext"
1572 case "(($ac_try" in
1573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1574   *) ac_try_echo=$ac_try;;
1575 esac
1576 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1577 $as_echo "$ac_try_echo"; } >&5
1578   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1579   ac_status=$?
1580   if test -s conftest.err; then
1581     grep -v '^ *+' conftest.err >conftest.er1
1582     cat conftest.er1 >&5
1583     mv -f conftest.er1 conftest.err
1584   fi
1585   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1586   test $ac_status = 0; } > conftest.i && {
1587          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1588          test ! -s conftest.err
1589        }; then :
1590   ac_retval=0
1591 else
1592   $as_echo "$as_me: failed program was:" >&5
1593 sed 's/^/| /' conftest.$ac_ext >&5
1594
1595     ac_retval=1
1596 fi
1597   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1598   as_fn_set_status $ac_retval
1599
1600 } # ac_fn_c_try_cpp
1601
1602 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1603 # -------------------------------------------------------
1604 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1605 # the include files in INCLUDES and setting the cache variable VAR
1606 # accordingly.
1607 ac_fn_c_check_header_mongrel ()
1608 {
1609   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1610   if eval "test \"\${$3+set}\"" = set; then :
1611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1612 $as_echo_n "checking for $2... " >&6; }
1613 if eval "test \"\${$3+set}\"" = set; then :
1614   $as_echo_n "(cached) " >&6
1615 fi
1616 eval ac_res=\$$3
1617                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1618 $as_echo "$ac_res" >&6; }
1619 else
1620   # Is the header compilable?
1621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1622 $as_echo_n "checking $2 usability... " >&6; }
1623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1624 /* end confdefs.h.  */
1625 $4
1626 #include <$2>
1627 _ACEOF
1628 if ac_fn_c_try_compile "$LINENO"; then :
1629   ac_header_compiler=yes
1630 else
1631   ac_header_compiler=no
1632 fi
1633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1635 $as_echo "$ac_header_compiler" >&6; }
1636
1637 # Is the header present?
1638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1639 $as_echo_n "checking $2 presence... " >&6; }
1640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1641 /* end confdefs.h.  */
1642 #include <$2>
1643 _ACEOF
1644 if ac_fn_c_try_cpp "$LINENO"; then :
1645   ac_header_preproc=yes
1646 else
1647   ac_header_preproc=no
1648 fi
1649 rm -f conftest.err conftest.i conftest.$ac_ext
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1651 $as_echo "$ac_header_preproc" >&6; }
1652
1653 # So?  What about this header?
1654 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1655   yes:no: )
1656     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1657 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1658     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1659 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1660     ;;
1661   no:yes:* )
1662     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1663 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1664     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1665 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1666     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1667 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1668     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1669 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1670     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1671 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1672 ( $as_echo "## -------------------------------------- ##
1673 ## Report this to http://bugs.python.org/ ##
1674 ## -------------------------------------- ##"
1675      ) | sed "s/^/$as_me: WARNING:     /" >&2
1676     ;;
1677 esac
1678   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1679 $as_echo_n "checking for $2... " >&6; }
1680 if eval "test \"\${$3+set}\"" = set; then :
1681   $as_echo_n "(cached) " >&6
1682 else
1683   eval "$3=\$ac_header_compiler"
1684 fi
1685 eval ac_res=\$$3
1686                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1687 $as_echo "$ac_res" >&6; }
1688 fi
1689   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1690
1691 } # ac_fn_c_check_header_mongrel
1692
1693 # ac_fn_c_try_run LINENO
1694 # ----------------------
1695 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1696 # that executables *can* be run.
1697 ac_fn_c_try_run ()
1698 {
1699   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700   if { { ac_try="$ac_link"
1701 case "(($ac_try" in
1702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703   *) ac_try_echo=$ac_try;;
1704 esac
1705 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706 $as_echo "$ac_try_echo"; } >&5
1707   (eval "$ac_link") 2>&5
1708   ac_status=$?
1709   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1711   { { case "(($ac_try" in
1712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713   *) ac_try_echo=$ac_try;;
1714 esac
1715 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716 $as_echo "$ac_try_echo"; } >&5
1717   (eval "$ac_try") 2>&5
1718   ac_status=$?
1719   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720   test $ac_status = 0; }; }; then :
1721   ac_retval=0
1722 else
1723   $as_echo "$as_me: program exited with status $ac_status" >&5
1724        $as_echo "$as_me: failed program was:" >&5
1725 sed 's/^/| /' conftest.$ac_ext >&5
1726
1727        ac_retval=$ac_status
1728 fi
1729   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1730   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1731   as_fn_set_status $ac_retval
1732
1733 } # ac_fn_c_try_run
1734
1735 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1736 # -------------------------------------------------------
1737 # Tests whether HEADER exists and can be compiled using the include files in
1738 # INCLUDES, setting the cache variable VAR accordingly.
1739 ac_fn_c_check_header_compile ()
1740 {
1741   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743 $as_echo_n "checking for $2... " >&6; }
1744 if eval "test \"\${$3+set}\"" = set; then :
1745   $as_echo_n "(cached) " >&6
1746 else
1747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1748 /* end confdefs.h.  */
1749 $4
1750 #include <$2>
1751 _ACEOF
1752 if ac_fn_c_try_compile "$LINENO"; then :
1753   eval "$3=yes"
1754 else
1755   eval "$3=no"
1756 fi
1757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1758 fi
1759 eval ac_res=\$$3
1760                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1761 $as_echo "$ac_res" >&6; }
1762   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1763
1764 } # ac_fn_c_check_header_compile
1765
1766 # ac_fn_c_try_link LINENO
1767 # -----------------------
1768 # Try to link conftest.$ac_ext, and return whether this succeeded.
1769 ac_fn_c_try_link ()
1770 {
1771   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772   rm -f conftest.$ac_objext conftest$ac_exeext
1773   if { { ac_try="$ac_link"
1774 case "(($ac_try" in
1775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776   *) ac_try_echo=$ac_try;;
1777 esac
1778 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779 $as_echo "$ac_try_echo"; } >&5
1780   (eval "$ac_link") 2>conftest.err
1781   ac_status=$?
1782   if test -s conftest.err; then
1783     grep -v '^ *+' conftest.err >conftest.er1
1784     cat conftest.er1 >&5
1785     mv -f conftest.er1 conftest.err
1786   fi
1787   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788   test $ac_status = 0; } && {
1789          test -z "$ac_c_werror_flag" ||
1790          test ! -s conftest.err
1791        } && test -s conftest$ac_exeext && {
1792          test "$cross_compiling" = yes ||
1793          $as_test_x conftest$ac_exeext
1794        }; then :
1795   ac_retval=0
1796 else
1797   $as_echo "$as_me: failed program was:" >&5
1798 sed 's/^/| /' conftest.$ac_ext >&5
1799
1800         ac_retval=1
1801 fi
1802   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1803   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1804   # interfere with the next link command; also delete a directory that is
1805   # left behind by Apple's compiler.  We do this before executing the actions.
1806   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1807   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1808   as_fn_set_status $ac_retval
1809
1810 } # ac_fn_c_try_link
1811
1812 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1813 # -------------------------------------------
1814 # Tests whether TYPE exists after having included INCLUDES, setting cache
1815 # variable VAR accordingly.
1816 ac_fn_c_check_type ()
1817 {
1818   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval "test \"\${$3+set}\"" = set; then :
1822   $as_echo_n "(cached) " >&6
1823 else
1824   eval "$3=no"
1825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826 /* end confdefs.h.  */
1827 $4
1828 int
1829 main ()
1830 {
1831 if (sizeof ($2))
1832          return 0;
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 if ac_fn_c_try_compile "$LINENO"; then :
1838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839 /* end confdefs.h.  */
1840 $4
1841 int
1842 main ()
1843 {
1844 if (sizeof (($2)))
1845             return 0;
1846   ;
1847   return 0;
1848 }
1849 _ACEOF
1850 if ac_fn_c_try_compile "$LINENO"; then :
1851
1852 else
1853   eval "$3=yes"
1854 fi
1855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856 fi
1857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858 fi
1859 eval ac_res=\$$3
1860                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861 $as_echo "$ac_res" >&6; }
1862   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1863
1864 } # ac_fn_c_check_type
1865
1866 # ac_fn_c_find_uintX_t LINENO BITS VAR
1867 # ------------------------------------
1868 # Finds an unsigned integer type with width BITS, setting cache variable VAR
1869 # accordingly.
1870 ac_fn_c_find_uintX_t ()
1871 {
1872   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1874 $as_echo_n "checking for uint$2_t... " >&6; }
1875 if eval "test \"\${$3+set}\"" = set; then :
1876   $as_echo_n "(cached) " >&6
1877 else
1878   eval "$3=no"
1879      # Order is important - never check a type that is potentially smaller
1880      # than half of the expected target width.
1881      for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1882          'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1883        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884 /* end confdefs.h.  */
1885 $ac_includes_default
1886 int
1887 main ()
1888 {
1889 static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1890 test_array [0] = 0
1891
1892   ;
1893   return 0;
1894 }
1895 _ACEOF
1896 if ac_fn_c_try_compile "$LINENO"; then :
1897   case $ac_type in #(
1898   uint$2_t) :
1899     eval "$3=yes" ;; #(
1900   *) :
1901     eval "$3=\$ac_type" ;;
1902 esac
1903 fi
1904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1905        if eval test \"x\$"$3"\" = x"no"; then :
1906
1907 else
1908   break
1909 fi
1910      done
1911 fi
1912 eval ac_res=\$$3
1913                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914 $as_echo "$ac_res" >&6; }
1915   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1916
1917 } # ac_fn_c_find_uintX_t
1918
1919 # ac_fn_c_find_intX_t LINENO BITS VAR
1920 # -----------------------------------
1921 # Finds a signed integer type with width BITS, setting cache variable VAR
1922 # accordingly.
1923 ac_fn_c_find_intX_t ()
1924 {
1925   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927 $as_echo_n "checking for int$2_t... " >&6; }
1928 if eval "test \"\${$3+set}\"" = set; then :
1929   $as_echo_n "(cached) " >&6
1930 else
1931   eval "$3=no"
1932      # Order is important - never check a type that is potentially smaller
1933      # than half of the expected target width.
1934      for ac_type in int$2_t 'int' 'long int' \
1935          'long long int' 'short int' 'signed char'; do
1936        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937 /* end confdefs.h.  */
1938 $ac_includes_default
1939              enum { N = $2 / 2 - 1 };
1940 int
1941 main ()
1942 {
1943 static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
1944 test_array [0] = 0
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 if ac_fn_c_try_compile "$LINENO"; then :
1951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952 /* end confdefs.h.  */
1953 $ac_includes_default
1954                 enum { N = $2 / 2 - 1 };
1955 int
1956 main ()
1957 {
1958 static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
1959                  < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960 test_array [0] = 0
1961
1962   ;
1963   return 0;
1964 }
1965 _ACEOF
1966 if ac_fn_c_try_compile "$LINENO"; then :
1967
1968 else
1969   case $ac_type in #(
1970   int$2_t) :
1971     eval "$3=yes" ;; #(
1972   *) :
1973     eval "$3=\$ac_type" ;;
1974 esac
1975 fi
1976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977 fi
1978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979        if eval test \"x\$"$3"\" = x"no"; then :
1980
1981 else
1982   break
1983 fi
1984      done
1985 fi
1986 eval ac_res=\$$3
1987                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988 $as_echo "$ac_res" >&6; }
1989   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1990
1991 } # ac_fn_c_find_intX_t
1992
1993 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994 # --------------------------------------------
1995 # Tries to find the compile-time value of EXPR in a program that includes
1996 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1997 # computed
1998 ac_fn_c_compute_int ()
1999 {
2000   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001   if test "$cross_compiling" = yes; then
2002     # Depending upon the size, compute the lo and hi bounds.
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004 /* end confdefs.h.  */
2005 $4
2006 int
2007 main ()
2008 {
2009 static int test_array [1 - 2 * !(($2) >= 0)];
2010 test_array [0] = 0
2011
2012   ;
2013   return 0;
2014 }
2015 _ACEOF
2016 if ac_fn_c_try_compile "$LINENO"; then :
2017   ac_lo=0 ac_mid=0
2018   while :; do
2019     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020 /* end confdefs.h.  */
2021 $4
2022 int
2023 main ()
2024 {
2025 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026 test_array [0] = 0
2027
2028   ;
2029   return 0;
2030 }
2031 _ACEOF
2032 if ac_fn_c_try_compile "$LINENO"; then :
2033   ac_hi=$ac_mid; break
2034 else
2035   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036                         if test $ac_lo -le $ac_mid; then
2037                           ac_lo= ac_hi=
2038                           break
2039                         fi
2040                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041 fi
2042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043   done
2044 else
2045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046 /* end confdefs.h.  */
2047 $4
2048 int
2049 main ()
2050 {
2051 static int test_array [1 - 2 * !(($2) < 0)];
2052 test_array [0] = 0
2053
2054   ;
2055   return 0;
2056 }
2057 _ACEOF
2058 if ac_fn_c_try_compile "$LINENO"; then :
2059   ac_hi=-1 ac_mid=-1
2060   while :; do
2061     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062 /* end confdefs.h.  */
2063 $4
2064 int
2065 main ()
2066 {
2067 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068 test_array [0] = 0
2069
2070   ;
2071   return 0;
2072 }
2073 _ACEOF
2074 if ac_fn_c_try_compile "$LINENO"; then :
2075   ac_lo=$ac_mid; break
2076 else
2077   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078                         if test $ac_mid -le $ac_hi; then
2079                           ac_lo= ac_hi=
2080                           break
2081                         fi
2082                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083 fi
2084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085   done
2086 else
2087   ac_lo= ac_hi=
2088 fi
2089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090 fi
2091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 # Binary search between lo and hi bounds.
2093 while test "x$ac_lo" != "x$ac_hi"; do
2094   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096 /* end confdefs.h.  */
2097 $4
2098 int
2099 main ()
2100 {
2101 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102 test_array [0] = 0
2103
2104   ;
2105   return 0;
2106 }
2107 _ACEOF
2108 if ac_fn_c_try_compile "$LINENO"; then :
2109   ac_hi=$ac_mid
2110 else
2111   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112 fi
2113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114 done
2115 case $ac_lo in #((
2116 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117 '') ac_retval=1 ;;
2118 esac
2119   else
2120     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 static long int longval () { return $2; }
2124 static unsigned long int ulongval () { return $2; }
2125 #include <stdio.h>
2126 #include <stdlib.h>
2127 int
2128 main ()
2129 {
2130
2131   FILE *f = fopen ("conftest.val", "w");
2132   if (! f)
2133     return 1;
2134   if (($2) < 0)
2135     {
2136       long int i = longval ();
2137       if (i != ($2))
2138         return 1;
2139       fprintf (f, "%ld", i);
2140     }
2141   else
2142     {
2143       unsigned long int i = ulongval ();
2144       if (i != ($2))
2145         return 1;
2146       fprintf (f, "%lu", i);
2147     }
2148   /* Do not output a trailing newline, as this causes \r\n confusion
2149      on some platforms.  */
2150   return ferror (f) || fclose (f) != 0;
2151
2152   ;
2153   return 0;
2154 }
2155 _ACEOF
2156 if ac_fn_c_try_run "$LINENO"; then :
2157   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158 else
2159   ac_retval=1
2160 fi
2161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162   conftest.$ac_objext conftest.beam conftest.$ac_ext
2163 rm -f conftest.val
2164
2165   fi
2166   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2167   as_fn_set_status $ac_retval
2168
2169 } # ac_fn_c_compute_int
2170
2171 # ac_fn_c_check_func LINENO FUNC VAR
2172 # ----------------------------------
2173 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2174 ac_fn_c_check_func ()
2175 {
2176   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178 $as_echo_n "checking for $2... " >&6; }
2179 if eval "test \"\${$3+set}\"" = set; then :
2180   $as_echo_n "(cached) " >&6
2181 else
2182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h.  */
2184 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2186 #define $2 innocuous_$2
2187
2188 /* System header to define __stub macros and hopefully few prototypes,
2189     which can conflict with char $2 (); below.
2190     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191     <limits.h> exists even on freestanding compilers.  */
2192
2193 #ifdef __STDC__
2194 # include <limits.h>
2195 #else
2196 # include <assert.h>
2197 #endif
2198
2199 #undef $2
2200
2201 /* Override any GCC internal prototype to avoid an error.
2202    Use char because int might match the return type of a GCC
2203    builtin and then its argument prototype would still apply.  */
2204 #ifdef __cplusplus
2205 extern "C"
2206 #endif
2207 char $2 ();
2208 /* The GNU C library defines this for functions which it implements
2209     to always fail with ENOSYS.  Some functions are actually named
2210     something starting with __ and the normal name is an alias.  */
2211 #if defined __stub_$2 || defined __stub___$2
2212 choke me
2213 #endif
2214
2215 int
2216 main ()
2217 {
2218 return $2 ();
2219   ;
2220   return 0;
2221 }
2222 _ACEOF
2223 if ac_fn_c_try_link "$LINENO"; then :
2224   eval "$3=yes"
2225 else
2226   eval "$3=no"
2227 fi
2228 rm -f core conftest.err conftest.$ac_objext \
2229     conftest$ac_exeext conftest.$ac_ext
2230 fi
2231 eval ac_res=\$$3
2232                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233 $as_echo "$ac_res" >&6; }
2234   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2235
2236 } # ac_fn_c_check_func
2237
2238 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239 # ----------------------------------------------------
2240 # Tries to find if the field MEMBER exists in type AGGR, after including
2241 # INCLUDES, setting cache variable VAR accordingly.
2242 ac_fn_c_check_member ()
2243 {
2244   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246 $as_echo_n "checking for $2.$3... " >&6; }
2247 if eval "test \"\${$4+set}\"" = set; then :
2248   $as_echo_n "(cached) " >&6
2249 else
2250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251 /* end confdefs.h.  */
2252 $5
2253 int
2254 main ()
2255 {
2256 static $2 ac_aggr;
2257 if (ac_aggr.$3)
2258 return 0;
2259   ;
2260   return 0;
2261 }
2262 _ACEOF
2263 if ac_fn_c_try_compile "$LINENO"; then :
2264   eval "$4=yes"
2265 else
2266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267 /* end confdefs.h.  */
2268 $5
2269 int
2270 main ()
2271 {
2272 static $2 ac_aggr;
2273 if (sizeof ac_aggr.$3)
2274 return 0;
2275   ;
2276   return 0;
2277 }
2278 _ACEOF
2279 if ac_fn_c_try_compile "$LINENO"; then :
2280   eval "$4=yes"
2281 else
2282   eval "$4=no"
2283 fi
2284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285 fi
2286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287 fi
2288 eval ac_res=\$$4
2289                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290 $as_echo "$ac_res" >&6; }
2291   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2292
2293 } # ac_fn_c_check_member
2294
2295 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296 # ---------------------------------------------
2297 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298 # accordingly.
2299 ac_fn_c_check_decl ()
2300 {
2301   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302   as_decl_name=`echo $2|sed 's/ *(.*//'`
2303   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306 if eval "test \"\${$3+set}\"" = set; then :
2307   $as_echo_n "(cached) " >&6
2308 else
2309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h.  */
2311 $4
2312 int
2313 main ()
2314 {
2315 #ifndef $as_decl_name
2316 #ifdef __cplusplus
2317   (void) $as_decl_use;
2318 #else
2319   (void) $as_decl_name;
2320 #endif
2321 #endif
2322
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328   eval "$3=yes"
2329 else
2330   eval "$3=no"
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 fi
2334 eval ac_res=\$$3
2335                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336 $as_echo "$ac_res" >&6; }
2337   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2338
2339 } # ac_fn_c_check_decl
2340 cat >config.log <<_ACEOF
2341 This file contains any messages produced by compilers while
2342 running configure, to aid debugging if configure makes a mistake.
2343
2344 It was created by python $as_me 2.7, which was
2345 generated by GNU Autoconf 2.67.  Invocation command line was
2346
2347   $ $0 $@
2348
2349 _ACEOF
2350 exec 5>>config.log
2351 {
2352 cat <<_ASUNAME
2353 ## --------- ##
2354 ## Platform. ##
2355 ## --------- ##
2356
2357 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2365
2366 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2367 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2368 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2369 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2370 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2371 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2372 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2373
2374 _ASUNAME
2375
2376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377 for as_dir in $PATH
2378 do
2379   IFS=$as_save_IFS
2380   test -z "$as_dir" && as_dir=.
2381     $as_echo "PATH: $as_dir"
2382   done
2383 IFS=$as_save_IFS
2384
2385 } >&5
2386
2387 cat >&5 <<_ACEOF
2388
2389
2390 ## ----------- ##
2391 ## Core tests. ##
2392 ## ----------- ##
2393
2394 _ACEOF
2395
2396
2397 # Keep a trace of the command line.
2398 # Strip out --no-create and --no-recursion so they do not pile up.
2399 # Strip out --silent because we don't want to record it for future runs.
2400 # Also quote any args containing shell meta-characters.
2401 # Make two passes to allow for proper duplicate-argument suppression.
2402 ac_configure_args=
2403 ac_configure_args0=
2404 ac_configure_args1=
2405 ac_must_keep_next=false
2406 for ac_pass in 1 2
2407 do
2408   for ac_arg
2409   do
2410     case $ac_arg in
2411     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413     | -silent | --silent | --silen | --sile | --sil)
2414       continue ;;
2415     *\'*)
2416       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2417     esac
2418     case $ac_pass in
2419     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2420     2)
2421       as_fn_append ac_configure_args1 " '$ac_arg'"
2422       if test $ac_must_keep_next = true; then
2423         ac_must_keep_next=false # Got value, back to normal.
2424       else
2425         case $ac_arg in
2426           *=* | --config-cache | -C | -disable-* | --disable-* \
2427           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429           | -with-* | --with-* | -without-* | --without-* | --x)
2430             case "$ac_configure_args0 " in
2431               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432             esac
2433             ;;
2434           -* ) ac_must_keep_next=true ;;
2435         esac
2436       fi
2437       as_fn_append ac_configure_args " '$ac_arg'"
2438       ;;
2439     esac
2440   done
2441 done
2442 { ac_configure_args0=; unset ac_configure_args0;}
2443 { ac_configure_args1=; unset ac_configure_args1;}
2444
2445 # When interrupted or exit'd, cleanup temporary files, and complete
2446 # config.log.  We remove comments because anyway the quotes in there
2447 # would cause problems or look ugly.
2448 # WARNING: Use '\'' to represent an apostrophe within the trap.
2449 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2450 trap 'exit_status=$?
2451   # Save into config.log some information that might help in debugging.
2452   {
2453     echo
2454
2455     $as_echo "## ---------------- ##
2456 ## Cache variables. ##
2457 ## ---------------- ##"
2458     echo
2459     # The following way of writing the cache mishandles newlines in values,
2460 (
2461   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462     eval ac_val=\$$ac_var
2463     case $ac_val in #(
2464     *${as_nl}*)
2465       case $ac_var in #(
2466       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2468       esac
2469       case $ac_var in #(
2470       _ | IFS | as_nl) ;; #(
2471       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472       *) { eval $ac_var=; unset $ac_var;} ;;
2473       esac ;;
2474     esac
2475   done
2476   (set) 2>&1 |
2477     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478     *${as_nl}ac_space=\ *)
2479       sed -n \
2480         "s/'\''/'\''\\\\'\'''\''/g;
2481           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482       ;; #(
2483     *)
2484       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2485       ;;
2486     esac |
2487     sort
2488 )
2489     echo
2490
2491     $as_echo "## ----------------- ##
2492 ## Output variables. ##
2493 ## ----------------- ##"
2494     echo
2495     for ac_var in $ac_subst_vars
2496     do
2497       eval ac_val=\$$ac_var
2498       case $ac_val in
2499       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2500       esac
2501       $as_echo "$ac_var='\''$ac_val'\''"
2502     done | sort
2503     echo
2504
2505     if test -n "$ac_subst_files"; then
2506       $as_echo "## ------------------- ##
2507 ## File substitutions. ##
2508 ## ------------------- ##"
2509       echo
2510       for ac_var in $ac_subst_files
2511       do
2512         eval ac_val=\$$ac_var
2513         case $ac_val in
2514         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2515         esac
2516         $as_echo "$ac_var='\''$ac_val'\''"
2517       done | sort
2518       echo
2519     fi
2520
2521     if test -s confdefs.h; then
2522       $as_echo "## ----------- ##
2523 ## confdefs.h. ##
2524 ## ----------- ##"
2525       echo
2526       cat confdefs.h
2527       echo
2528     fi
2529     test "$ac_signal" != 0 &&
2530       $as_echo "$as_me: caught signal $ac_signal"
2531     $as_echo "$as_me: exit $exit_status"
2532   } >&5
2533   rm -f core *.core core.conftest.* &&
2534     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2535     exit $exit_status
2536 ' 0
2537 for ac_signal in 1 2 13 15; do
2538   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2539 done
2540 ac_signal=0
2541
2542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2543 rm -f -r conftest* confdefs.h
2544
2545 $as_echo "/* confdefs.h */" > confdefs.h
2546
2547 # Predefined preprocessor variables.
2548
2549 cat >>confdefs.h <<_ACEOF
2550 #define PACKAGE_NAME "$PACKAGE_NAME"
2551 _ACEOF
2552
2553 cat >>confdefs.h <<_ACEOF
2554 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555 _ACEOF
2556
2557 cat >>confdefs.h <<_ACEOF
2558 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2559 _ACEOF
2560
2561 cat >>confdefs.h <<_ACEOF
2562 #define PACKAGE_STRING "$PACKAGE_STRING"
2563 _ACEOF
2564
2565 cat >>confdefs.h <<_ACEOF
2566 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567 _ACEOF
2568
2569 cat >>confdefs.h <<_ACEOF
2570 #define PACKAGE_URL "$PACKAGE_URL"
2571 _ACEOF
2572
2573
2574 # Let the site file select an alternate cache file if it wants to.
2575 # Prefer an explicitly selected file to automatically selected ones.
2576 ac_site_file1=NONE
2577 ac_site_file2=NONE
2578 if test -n "$CONFIG_SITE"; then
2579   # We do not want a PATH search for config.site.
2580   case $CONFIG_SITE in #((
2581     -*)  ac_site_file1=./$CONFIG_SITE;;
2582     */*) ac_site_file1=$CONFIG_SITE;;
2583     *)   ac_site_file1=./$CONFIG_SITE;;
2584   esac
2585 elif test "x$prefix" != xNONE; then
2586   ac_site_file1=$prefix/share/config.site
2587   ac_site_file2=$prefix/etc/config.site
2588 else
2589   ac_site_file1=$ac_default_prefix/share/config.site
2590   ac_site_file2=$ac_default_prefix/etc/config.site
2591 fi
2592 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2593 do
2594   test "x$ac_site_file" = xNONE && continue
2595   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2598     sed 's/^/| /' "$ac_site_file" >&5
2599     . "$ac_site_file" \
2600       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602 as_fn_error $? "failed to load site script $ac_site_file
2603 See \`config.log' for more details" "$LINENO" 5 ; }
2604   fi
2605 done
2606
2607 if test -r "$cache_file"; then
2608   # Some versions of bash will fail to source /dev/null (special files
2609   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2610   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612 $as_echo "$as_me: loading cache $cache_file" >&6;}
2613     case $cache_file in
2614       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615       *)                      . "./$cache_file";;
2616     esac
2617   fi
2618 else
2619   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620 $as_echo "$as_me: creating cache $cache_file" >&6;}
2621   >$cache_file
2622 fi
2623
2624 # Check that the precious variables saved in the cache have kept the same
2625 # value.
2626 ac_cache_corrupted=false
2627 for ac_var in $ac_precious_vars; do
2628   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629   eval ac_new_set=\$ac_env_${ac_var}_set
2630   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631   eval ac_new_val=\$ac_env_${ac_var}_value
2632   case $ac_old_set,$ac_new_set in
2633     set,)
2634       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2636       ac_cache_corrupted=: ;;
2637     ,set)
2638       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2640       ac_cache_corrupted=: ;;
2641     ,);;
2642     *)
2643       if test "x$ac_old_val" != "x$ac_new_val"; then
2644         # differences in whitespace do not lead to failure.
2645         ac_old_val_w=`echo x $ac_old_val`
2646         ac_new_val_w=`echo x $ac_new_val`
2647         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650           ac_cache_corrupted=:
2651         else
2652           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654           eval $ac_var=\$ac_old_val
2655         fi
2656         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2657 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2658         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2659 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2660       fi;;
2661   esac
2662   # Pass precious variables to config.status.
2663   if test "$ac_new_set" = set; then
2664     case $ac_new_val in
2665     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2666     *) ac_arg=$ac_var=$ac_new_val ;;
2667     esac
2668     case " $ac_configure_args " in
2669       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2670       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2671     esac
2672   fi
2673 done
2674 if $ac_cache_corrupted; then
2675   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2679   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2680 fi
2681 ## -------------------- ##
2682 ## Main body of script. ##
2683 ## -------------------- ##
2684
2685 ac_ext=c
2686 ac_cpp='$CPP $CPPFLAGS'
2687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2690
2691
2692
2693 ac_config_headers="$ac_config_headers pyconfig.h"
2694
2695
2696
2697 if test "$prefix" != "/"; then
2698     prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2699 fi
2700
2701
2702
2703
2704 # We don't use PACKAGE_ variables, and they cause conflicts
2705 # with other autoconf-based packages that include Python.h
2706 grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2707 rm confdefs.h
2708 mv confdefs.h.new confdefs.h
2709
2710
2711 VERSION=2.7
2712
2713
2714 SOVERSION=1.0
2715
2716 # The later defininition of _XOPEN_SOURCE disables certain features
2717 # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2718
2719 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
2720
2721
2722 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723 # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2724 # them.
2725
2726 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
2727
2728
2729 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730 # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2731 # them.
2732
2733 $as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
2734
2735
2736 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737 # u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2738
2739 $as_echo "#define _BSD_TYPES 1" >>confdefs.h
2740
2741
2742 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2743 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2744 # them.
2745
2746 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
2747
2748
2749
2750 define_xopen_source=yes
2751
2752 # Arguments passed to configure.
2753
2754 CONFIG_ARGS="$ac_configure_args"
2755
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2757 $as_echo_n "checking for --enable-universalsdk... " >&6; }
2758 # Check whether --enable-universalsdk was given.
2759 if test "${enable_universalsdk+set}" = set; then :
2760   enableval=$enable_universalsdk;
2761         case $enableval in
2762         yes)
2763                 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2764                 if test ! -d "${enableval}"
2765                 then
2766                         enableval=/
2767                 fi
2768                 ;;
2769         esac
2770         case $enableval in
2771         no)
2772                 UNIVERSALSDK=
2773                 enable_universalsdk=
2774                 ;;
2775         *)
2776                 UNIVERSALSDK=$enableval
2777                 if test ! -d "${UNIVERSALSDK}"
2778                 then
2779                         as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
2780                 fi
2781                 ;;
2782         esac
2783
2784
2785 else
2786
2787         UNIVERSALSDK=
2788         enable_universalsdk=
2789
2790 fi
2791
2792 if test -n "${UNIVERSALSDK}"
2793 then
2794         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2795 $as_echo "${UNIVERSALSDK}" >&6; }
2796 else
2797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2798 $as_echo "no" >&6; }
2799 fi
2800
2801
2802
2803
2804 UNIVERSAL_ARCHS="32-bit"
2805
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2807 $as_echo_n "checking for --with-universal-archs... " >&6; }
2808
2809 # Check whether --with-universal-archs was given.
2810 if test "${with_universal_archs+set}" = set; then :
2811   withval=$with_universal_archs;
2812         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2813 $as_echo "$withval" >&6; }
2814         UNIVERSAL_ARCHS="$withval"
2815         if test "${enable_universalsdk}" ; then
2816                 :
2817         else
2818                 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
2819         fi
2820
2821 else
2822
2823         { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2824 $as_echo "32-bit" >&6; }
2825
2826 fi
2827
2828
2829
2830
2831
2832 # Check whether --with-framework-name was given.
2833 if test "${with_framework_name+set}" = set; then :
2834   withval=$with_framework_name;
2835     if test "${enable_framework}"; then
2836             :
2837     else
2838         as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
2839     fi
2840     PYTHONFRAMEWORK=${withval}
2841     PYTHONFRAMEWORKDIR=${withval}.framework
2842     PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2843
2844 else
2845
2846     PYTHONFRAMEWORK=Python
2847     PYTHONFRAMEWORKDIR=Python.framework
2848     PYTHONFRAMEWORKIDENTIFIER=org.python.python
2849
2850 fi
2851
2852 # Check whether --enable-framework was given.
2853 if test "${enable_framework+set}" = set; then :
2854   enableval=$enable_framework;
2855         case $enableval in
2856         yes)
2857                 enableval=/Library/Frameworks
2858         esac
2859         case $enableval in
2860         no)
2861                 PYTHONFRAMEWORK=
2862                 PYTHONFRAMEWORKDIR=no-framework
2863                 PYTHONFRAMEWORKPREFIX=
2864                 PYTHONFRAMEWORKINSTALLDIR=
2865                 FRAMEWORKINSTALLFIRST=
2866                 FRAMEWORKINSTALLLAST=
2867                 FRAMEWORKALTINSTALLFIRST=
2868                 FRAMEWORKALTINSTALLLAST=
2869                 if test "x${prefix}" = "xNONE"; then
2870                         FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2871                 else
2872                         FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2873                 fi
2874                 enable_framework=
2875                 ;;
2876         *)
2877                 PYTHONFRAMEWORKPREFIX="${enableval}"
2878                 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
2879                 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
2880                 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
2881                 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2882                 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2883                 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2884
2885                 if test "x${prefix}" = "xNONE" ; then
2886                         FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2887
2888                 else
2889                         FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2890                 fi
2891
2892                 case "${enableval}" in
2893                 /System*)
2894                         FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2895                         if test "${prefix}" = "NONE" ; then
2896                                 # See below
2897                                 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2898                         fi
2899                         ;;
2900
2901                 /Library*)
2902                         FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903                         ;;
2904
2905                 */Library/Frameworks)
2906                         MDIR="`dirname "${enableval}"`"
2907                         MDIR="`dirname "${MDIR}"`"
2908                         FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2909
2910                         if test "${prefix}" = "NONE"; then
2911                                 # User hasn't specified the
2912                                 # --prefix option, but wants to install
2913                                 # the framework in a non-default location,
2914                                 # ensure that the compatibility links get
2915                                 # installed relative to that prefix as well
2916                                 # instead of in /usr/local.
2917                                 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2918                         fi
2919                         ;;
2920
2921                 *)
2922                         FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2923                         ;;
2924                 esac
2925
2926                 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
2927
2928                 # Add files for Mac specific code to the list of output
2929                 # files:
2930                 ac_config_files="$ac_config_files Mac/Makefile"
2931
2932                 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
2933
2934                 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
2935
2936                 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2937
2938                 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2939
2940         esac
2941
2942 else
2943
2944         PYTHONFRAMEWORK=
2945         PYTHONFRAMEWORKDIR=no-framework
2946         PYTHONFRAMEWORKPREFIX=
2947         PYTHONFRAMEWORKINSTALLDIR=
2948         FRAMEWORKINSTALLFIRST=
2949         FRAMEWORKINSTALLLAST=
2950         FRAMEWORKALTINSTALLFIRST=
2951         FRAMEWORKALTINSTALLLAST=
2952         if test "x${prefix}" = "xNONE" ; then
2953                 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2954         else
2955                 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2956         fi
2957         enable_framework=
2958
2959
2960 fi
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974 ##AC_ARG_WITH(dyld,
2975 ##            AS_HELP_STRING([--with-dyld],
2976 ##                           [Use (OpenStep|Rhapsody) dynamic linker]))
2977 ##
2978 # Set name for machine-dependent library files
2979
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2981 $as_echo_n "checking MACHDEP... " >&6; }
2982 if test -z "$MACHDEP"
2983 then
2984         ac_sys_system=`uname -s`
2985         if test "$ac_sys_system" = "AIX" \
2986         -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
2987                 ac_sys_release=`uname -v`
2988         else
2989                 ac_sys_release=`uname -r`
2990         fi
2991         ac_md_system=`echo $ac_sys_system |
2992                            tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2993         ac_md_release=`echo $ac_sys_release |
2994                            tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
2995         MACHDEP="$ac_md_system$ac_md_release"
2996
2997         case $MACHDEP in
2998         linux*) MACHDEP="linux2";;
2999         cygwin*) MACHDEP="cygwin";;
3000         darwin*) MACHDEP="darwin";;
3001         atheos*) MACHDEP="atheos";;
3002         irix646) MACHDEP="irix6";;
3003         '')     MACHDEP="unknown";;
3004         esac
3005 fi
3006
3007 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3008 # disable features if it is defined, without any means to access these
3009 # features as extensions. For these systems, we skip the definition of
3010 # _XOPEN_SOURCE. Before adding a system to the list to gain access to
3011 # some feature, make sure there is no alternative way to access this
3012 # feature. Also, when using wildcards, make sure you have verified the
3013 # need for not defining _XOPEN_SOURCE on all systems matching the
3014 # wildcard, and that the wildcard does not include future systems
3015 # (which may remove their limitations).
3016 case $ac_sys_system/$ac_sys_release in
3017   # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3018   # even though select is a POSIX function. Reported by J. Ribbens.
3019   # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
3020   # In addition, Stefan Krah confirms that issue #1244610 exists through
3021   # OpenBSD 4.6, but is fixed in 4.7.
3022   OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
3023     define_xopen_source=no
3024     # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3025     # also defined. This can be overridden by defining _BSD_SOURCE
3026     # As this has a different meaning on Linux, only define it on OpenBSD
3027
3028 $as_echo "#define _BSD_SOURCE 1" >>confdefs.h
3029
3030     ;;
3031   OpenBSD/*)
3032     # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3033     # also defined. This can be overridden by defining _BSD_SOURCE
3034     # As this has a different meaning on Linux, only define it on OpenBSD
3035
3036 $as_echo "#define _BSD_SOURCE 1" >>confdefs.h
3037
3038     ;;
3039   # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3040   # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3041   # Marc Recht
3042   NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
3043     define_xopen_source=no;;
3044   # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3045   # request to enable features supported by the standard as a request
3046   # to disable features not supported by the standard.  The best way
3047   # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3048   # entirely and define __EXTENSIONS__ instead.
3049   SunOS/*)
3050     define_xopen_source=no;;
3051   # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3052   # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
3053   # Reconfirmed for 7.1.4 by Martin v. Loewis.
3054   OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
3055     define_xopen_source=no;;
3056   # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
3057   # but used in struct sockaddr.sa_family. Reported by Tim Rice.
3058   SCO_SV/3.2)
3059     define_xopen_source=no;;
3060   # On FreeBSD 4, the math functions C89 does not cover are never defined
3061   # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3062   FreeBSD/4.*)
3063     define_xopen_source=no;;
3064   # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3065   # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3066   # identifies itself as Darwin/7.*
3067   # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3068   # disables platform specific features beyond repair.
3069   # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3070   # has no effect, don't bother defining them
3071   Darwin/[6789].*)
3072     define_xopen_source=no;;
3073   Darwin/1[0-9].*)
3074     define_xopen_source=no;;
3075   # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3076   # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3077   # or has another value. By not (re)defining it, the defaults come in place.
3078   AIX/4)
3079     define_xopen_source=no;;
3080   AIX/5)
3081     if test `uname -r` -eq 1; then
3082       define_xopen_source=no
3083     fi
3084     ;;
3085   # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3086   # defining NI_NUMERICHOST.
3087   QNX/6.3.2)
3088     define_xopen_source=no
3089     ;;
3090
3091 esac
3092
3093 if test $define_xopen_source = yes
3094 then
3095
3096 $as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
3097
3098
3099   # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3100   # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3101   # several APIs are not declared. Since this is also needed in some
3102   # cases for HP-UX, we define it globally.
3103
3104 $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
3105
3106
3107
3108 $as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
3109
3110
3111 fi
3112
3113 #
3114 # SGI compilers allow the specification of the both the ABI and the
3115 # ISA on the command line.  Depending on the values of these switches,
3116 # different and often incompatable code will be generated.
3117 #
3118 # The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3119 # thus supply support for various ABI/ISA combinations.  The MACHDEP
3120 # variable is also adjusted.
3121 #
3122
3123 if test ! -z "$SGI_ABI"
3124 then
3125         CC="cc $SGI_ABI"
3126         LDFLAGS="$SGI_ABI $LDFLAGS"
3127         MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3128 fi
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3130 $as_echo "$MACHDEP" >&6; }
3131
3132 # And add extra plat-mac for darwin
3133
3134
3135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3136 $as_echo_n "checking EXTRAPLATDIR... " >&6; }
3137 if test -z "$EXTRAPLATDIR"
3138 then
3139         case $MACHDEP in
3140         darwin)
3141                 EXTRAPLATDIR="\$(PLATMACDIRS)"
3142                 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3143                 ;;
3144         *)
3145                 EXTRAPLATDIR=""
3146                 EXTRAMACHDEPPATH=""
3147                 ;;
3148         esac
3149 fi
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3151 $as_echo "$EXTRAPLATDIR" >&6; }
3152
3153 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3154 # it may influence the way we can build extensions, so distutils
3155 # needs to check it
3156
3157
3158 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
3159 EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
3160
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3162 $as_echo_n "checking machine type as reported by uname -m... " >&6; }
3163 ac_sys_machine=`uname -m`
3164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3165 $as_echo "$ac_sys_machine" >&6; }
3166
3167 # checks for alternative programs
3168
3169 # compiler flags are generated in two sets, BASECFLAGS and OPT.  OPT is just
3170 # for debug/optimization stuff.  BASECFLAGS is for flags that are required
3171 # just to get things to compile and link.  Users are free to override OPT
3172 # when running configure or make.  The build should not break if they do.
3173 # BASECFLAGS should generally not be messed with, however.
3174
3175 # XXX shouldn't some/most/all of this code be merged with the stuff later
3176 # on that fiddles with OPT and BASECFLAGS?
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3178 $as_echo_n "checking for --without-gcc... " >&6; }
3179
3180 # Check whether --with-gcc was given.
3181 if test "${with_gcc+set}" = set; then :
3182   withval=$with_gcc;
3183         case $withval in
3184         no)     CC=${CC:-cc}
3185                 without_gcc=yes;;
3186         yes)    CC=gcc
3187                 without_gcc=no;;
3188         *)      CC=$withval
3189                 without_gcc=$withval;;
3190         esac
3191 else
3192
3193         case $ac_sys_system in
3194         AIX*)   CC=${CC:-xlc_r}
3195                 without_gcc=;;
3196         BeOS*)
3197                 case $BE_HOST_CPU in
3198                 ppc)
3199                         CC=mwcc
3200                         without_gcc=yes
3201                         BASECFLAGS="$BASECFLAGS -export pragma"
3202                         OPT="$OPT -O"
3203                         LDFLAGS="$LDFLAGS -nodup"
3204                         ;;
3205                 x86)
3206                         CC=gcc
3207                         without_gcc=no
3208                         OPT="$OPT -O"
3209                         ;;
3210                 *)
3211                         as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
3212                         ;;
3213                 esac
3214                 AR="\$(srcdir)/Modules/ar_beos"
3215                 RANLIB=:
3216                 ;;
3217         *)      without_gcc=no;;
3218         esac
3219 fi
3220
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3222 $as_echo "$without_gcc" >&6; }
3223
3224 # If the user switches compilers, we can't believe the cache
3225 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3226 then
3227   as_fn_error $? "cached CC is different -- throw away $cache_file
3228 (it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
3229 fi
3230
3231 # If the user set CFLAGS, use this instead of the automatically
3232 # determined setting
3233 preset_cflags="$CFLAGS"
3234 ac_ext=c
3235 ac_cpp='$CPP $CPPFLAGS'
3236 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239 if test -n "$ac_tool_prefix"; then
3240   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3241 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3243 $as_echo_n "checking for $ac_word... " >&6; }
3244 if test "${ac_cv_prog_CC+set}" = set; then :
3245   $as_echo_n "(cached) " >&6
3246 else
3247   if test -n "$CC"; then
3248   ac_cv_prog_CC="$CC" # Let the user override the test.
3249 else
3250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251 for as_dir in $PATH
3252 do
3253   IFS=$as_save_IFS
3254   test -z "$as_dir" && as_dir=.
3255     for ac_exec_ext in '' $ac_executable_extensions; do
3256   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3257     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3259     break 2
3260   fi
3261 done
3262   done
3263 IFS=$as_save_IFS
3264
3265 fi
3266 fi
3267 CC=$ac_cv_prog_CC
3268 if test -n "$CC"; then
3269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3270 $as_echo "$CC" >&6; }
3271 else
3272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3273 $as_echo "no" >&6; }
3274 fi
3275
3276
3277 fi
3278 if test -z "$ac_cv_prog_CC"; then
3279   ac_ct_CC=$CC
3280   # Extract the first word of "gcc", so it can be a program name with args.
3281 set dummy gcc; ac_word=$2
3282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283 $as_echo_n "checking for $ac_word... " >&6; }
3284 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3285   $as_echo_n "(cached) " >&6
3286 else
3287   if test -n "$ac_ct_CC"; then
3288   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3289 else
3290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291 for as_dir in $PATH
3292 do
3293   IFS=$as_save_IFS
3294   test -z "$as_dir" && as_dir=.
3295     for ac_exec_ext in '' $ac_executable_extensions; do
3296   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3297     ac_cv_prog_ac_ct_CC="gcc"
3298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3299     break 2
3300   fi
3301 done
3302   done
3303 IFS=$as_save_IFS
3304
3305 fi
3306 fi
3307 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3308 if test -n "$ac_ct_CC"; then
3309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3310 $as_echo "$ac_ct_CC" >&6; }
3311 else
3312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3313 $as_echo "no" >&6; }
3314 fi
3315
3316   if test "x$ac_ct_CC" = x; then
3317     CC=""
3318   else
3319     case $cross_compiling:$ac_tool_warned in
3320 yes:)
3321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3322 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3323 ac_tool_warned=yes ;;
3324 esac
3325     CC=$ac_ct_CC
3326   fi
3327 else
3328   CC="$ac_cv_prog_CC"
3329 fi
3330
3331 if test -z "$CC"; then
3332           if test -n "$ac_tool_prefix"; then
3333     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3334 set dummy ${ac_tool_prefix}cc; ac_word=$2
3335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3336 $as_echo_n "checking for $ac_word... " >&6; }
3337 if test "${ac_cv_prog_CC+set}" = set; then :
3338   $as_echo_n "(cached) " >&6
3339 else
3340   if test -n "$CC"; then
3341   ac_cv_prog_CC="$CC" # Let the user override the test.
3342 else
3343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344 for as_dir in $PATH
3345 do
3346   IFS=$as_save_IFS
3347   test -z "$as_dir" && as_dir=.
3348     for ac_exec_ext in '' $ac_executable_extensions; do
3349   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3350     ac_cv_prog_CC="${ac_tool_prefix}cc"
3351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3352     break 2
3353   fi
3354 done
3355   done
3356 IFS=$as_save_IFS
3357
3358 fi
3359 fi
3360 CC=$ac_cv_prog_CC
3361 if test -n "$CC"; then
3362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3363 $as_echo "$CC" >&6; }
3364 else
3365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366 $as_echo "no" >&6; }
3367 fi
3368
3369
3370   fi
3371 fi
3372 if test -z "$CC"; then
3373   # Extract the first word of "cc", so it can be a program name with args.
3374 set dummy cc; ac_word=$2
3375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3376 $as_echo_n "checking for $ac_word... " >&6; }
3377 if test "${ac_cv_prog_CC+set}" = set; then :
3378   $as_echo_n "(cached) " >&6
3379 else
3380   if test -n "$CC"; then
3381   ac_cv_prog_CC="$CC" # Let the user override the test.
3382 else
3383   ac_prog_rejected=no
3384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385 for as_dir in $PATH
3386 do
3387   IFS=$as_save_IFS
3388   test -z "$as_dir" && as_dir=.
3389     for ac_exec_ext in '' $ac_executable_extensions; do
3390   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3391     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3392        ac_prog_rejected=yes
3393        continue
3394      fi
3395     ac_cv_prog_CC="cc"
3396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3397     break 2
3398   fi
3399 done
3400   done
3401 IFS=$as_save_IFS
3402
3403 if test $ac_prog_rejected = yes; then
3404   # We found a bogon in the path, so make sure we never use it.
3405   set dummy $ac_cv_prog_CC
3406   shift
3407   if test $# != 0; then
3408     # We chose a different compiler from the bogus one.
3409     # However, it has the same basename, so the bogon will be chosen
3410     # first if we set CC to just the basename; use the full file name.
3411     shift
3412     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3413   fi
3414 fi
3415 fi
3416 fi
3417 CC=$ac_cv_prog_CC
3418 if test -n "$CC"; then
3419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3420 $as_echo "$CC" >&6; }
3421 else
3422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423 $as_echo "no" >&6; }
3424 fi
3425
3426
3427 fi
3428 if test -z "$CC"; then
3429   if test -n "$ac_tool_prefix"; then
3430   for ac_prog in cl.exe
3431   do
3432     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3433 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3435 $as_echo_n "checking for $ac_word... " >&6; }
3436 if test "${ac_cv_prog_CC+set}" = set; then :
3437   $as_echo_n "(cached) " >&6
3438 else
3439   if test -n "$CC"; then
3440   ac_cv_prog_CC="$CC" # Let the user override the test.
3441 else
3442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3443 for as_dir in $PATH
3444 do
3445   IFS=$as_save_IFS
3446   test -z "$as_dir" && as_dir=.
3447     for ac_exec_ext in '' $ac_executable_extensions; do
3448   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3449     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3451     break 2
3452   fi
3453 done
3454   done
3455 IFS=$as_save_IFS
3456
3457 fi
3458 fi
3459 CC=$ac_cv_prog_CC
3460 if test -n "$CC"; then
3461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3462 $as_echo "$CC" >&6; }
3463 else
3464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3465 $as_echo "no" >&6; }
3466 fi
3467
3468
3469     test -n "$CC" && break
3470   done
3471 fi
3472 if test -z "$CC"; then
3473   ac_ct_CC=$CC
3474   for ac_prog in cl.exe
3475 do
3476   # Extract the first word of "$ac_prog", so it can be a program name with args.
3477 set dummy $ac_prog; ac_word=$2
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3479 $as_echo_n "checking for $ac_word... " >&6; }
3480 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3481   $as_echo_n "(cached) " >&6
3482 else
3483   if test -n "$ac_ct_CC"; then
3484   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3485 else
3486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3487 for as_dir in $PATH
3488 do
3489   IFS=$as_save_IFS
3490   test -z "$as_dir" && as_dir=.
3491     for ac_exec_ext in '' $ac_executable_extensions; do
3492   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3493     ac_cv_prog_ac_ct_CC="$ac_prog"
3494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3495     break 2
3496   fi
3497 done
3498   done
3499 IFS=$as_save_IFS
3500
3501 fi
3502 fi
3503 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3504 if test -n "$ac_ct_CC"; then
3505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3506 $as_echo "$ac_ct_CC" >&6; }
3507 else
3508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3509 $as_echo "no" >&6; }
3510 fi
3511
3512
3513   test -n "$ac_ct_CC" && break
3514 done
3515
3516   if test "x$ac_ct_CC" = x; then
3517     CC=""
3518   else
3519     case $cross_compiling:$ac_tool_warned in
3520 yes:)
3521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3522 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3523 ac_tool_warned=yes ;;
3524 esac
3525     CC=$ac_ct_CC
3526   fi
3527 fi
3528
3529 fi
3530
3531
3532 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3533 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3534 as_fn_error $? "no acceptable C compiler found in \$PATH
3535 See \`config.log' for more details" "$LINENO" 5 ; }
3536
3537 # Provide some information about the compiler.
3538 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3539 set X $ac_compile
3540 ac_compiler=$2
3541 for ac_option in --version -v -V -qversion; do
3542   { { ac_try="$ac_compiler $ac_option >&5"
3543 case "(($ac_try" in
3544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545   *) ac_try_echo=$ac_try;;
3546 esac
3547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3548 $as_echo "$ac_try_echo"; } >&5
3549   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3550   ac_status=$?
3551   if test -s conftest.err; then
3552     sed '10a\
3553 ... rest of stderr output deleted ...
3554          10q' conftest.err >conftest.er1
3555     cat conftest.er1 >&5
3556   fi
3557   rm -f conftest.er1 conftest.err
3558   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559   test $ac_status = 0; }
3560 done
3561
3562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3563 /* end confdefs.h.  */
3564
3565 int
3566 main ()
3567 {
3568
3569   ;
3570   return 0;
3571 }
3572 _ACEOF
3573 ac_clean_files_save=$ac_clean_files
3574 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3575 # Try to create an executable without -o first, disregard a.out.
3576 # It will help us diagnose broken compilers, and finding out an intuition
3577 # of exeext.
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3579 $as_echo_n "checking whether the C compiler works... " >&6; }
3580 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3581
3582 # The possible output files:
3583 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3584
3585 ac_rmfiles=
3586 for ac_file in $ac_files
3587 do
3588   case $ac_file in
3589     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3590     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3591   esac
3592 done
3593 rm -f $ac_rmfiles
3594
3595 if { { ac_try="$ac_link_default"
3596 case "(($ac_try" in
3597   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598   *) ac_try_echo=$ac_try;;
3599 esac
3600 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3601 $as_echo "$ac_try_echo"; } >&5
3602   (eval "$ac_link_default") 2>&5
3603   ac_status=$?
3604   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3605   test $ac_status = 0; }; then :
3606   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3607 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3608 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3609 # so that the user can short-circuit this test for compilers unknown to
3610 # Autoconf.
3611 for ac_file in $ac_files ''
3612 do
3613   test -f "$ac_file" || continue
3614   case $ac_file in
3615     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3616         ;;
3617     [ab].out )
3618         # We found the default executable, but exeext='' is most
3619         # certainly right.
3620         break;;
3621     *.* )
3622         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3623         then :; else
3624            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3625         fi
3626         # We set ac_cv_exeext here because the later test for it is not
3627         # safe: cross compilers may not add the suffix if given an `-o'
3628         # argument, so we may need to know it at that point already.
3629         # Even if this section looks crufty: it has the advantage of
3630         # actually working.
3631         break;;
3632     * )
3633         break;;
3634   esac
3635 done
3636 test "$ac_cv_exeext" = no && ac_cv_exeext=
3637
3638 else
3639   ac_file=''
3640 fi
3641 if test -z "$ac_file"; then :
3642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643 $as_echo "no" >&6; }
3644 $as_echo "$as_me: failed program was:" >&5
3645 sed 's/^/| /' conftest.$ac_ext >&5
3646
3647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3648 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3649 as_fn_error 77 "C compiler cannot create executables
3650 See \`config.log' for more details" "$LINENO" 5 ; }
3651 else
3652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3653 $as_echo "yes" >&6; }
3654 fi
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3656 $as_echo_n "checking for C compiler default output file name... " >&6; }
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3658 $as_echo "$ac_file" >&6; }
3659 ac_exeext=$ac_cv_exeext
3660
3661 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3662 ac_clean_files=$ac_clean_files_save
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3664 $as_echo_n "checking for suffix of executables... " >&6; }
3665 if { { ac_try="$ac_link"
3666 case "(($ac_try" in
3667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668   *) ac_try_echo=$ac_try;;
3669 esac
3670 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3671 $as_echo "$ac_try_echo"; } >&5
3672   (eval "$ac_link") 2>&5
3673   ac_status=$?
3674   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3675   test $ac_status = 0; }; then :
3676   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3677 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3678 # work properly (i.e., refer to `conftest.exe'), while it won't with
3679 # `rm'.
3680 for ac_file in conftest.exe conftest conftest.*; do
3681   test -f "$ac_file" || continue
3682   case $ac_file in
3683     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3684     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3685           break;;
3686     * ) break;;
3687   esac
3688 done
3689 else
3690   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3692 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3693 See \`config.log' for more details" "$LINENO" 5 ; }
3694 fi
3695 rm -f conftest conftest$ac_cv_exeext
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3697 $as_echo "$ac_cv_exeext" >&6; }
3698
3699 rm -f conftest.$ac_ext
3700 EXEEXT=$ac_cv_exeext
3701 ac_exeext=$EXEEXT
3702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3703 /* end confdefs.h.  */
3704 #include <stdio.h>
3705 int
3706 main ()
3707 {
3708 FILE *f = fopen ("conftest.out", "w");
3709  return ferror (f) || fclose (f) != 0;
3710
3711   ;
3712   return 0;
3713 }
3714 _ACEOF
3715 ac_clean_files="$ac_clean_files conftest.out"
3716 # Check that the compiler produces executables we can run.  If not, either
3717 # the compiler is broken, or we cross compile.
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3719 $as_echo_n "checking whether we are cross compiling... " >&6; }
3720 if test "$cross_compiling" != yes; then
3721   { { ac_try="$ac_link"
3722 case "(($ac_try" in
3723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3724   *) ac_try_echo=$ac_try;;
3725 esac
3726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3727 $as_echo "$ac_try_echo"; } >&5
3728   (eval "$ac_link") 2>&5
3729   ac_status=$?
3730   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3731   test $ac_status = 0; }
3732   if { ac_try='./conftest$ac_cv_exeext'
3733   { { case "(($ac_try" in
3734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735   *) ac_try_echo=$ac_try;;
3736 esac
3737 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738 $as_echo "$ac_try_echo"; } >&5
3739   (eval "$ac_try") 2>&5
3740   ac_status=$?
3741   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742   test $ac_status = 0; }; }; then
3743     cross_compiling=no
3744   else
3745     if test "$cross_compiling" = maybe; then
3746         cross_compiling=yes
3747     else
3748         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3749 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3750 as_fn_error $? "cannot run C compiled programs.
3751 If you meant to cross compile, use \`--host'.
3752 See \`config.log' for more details" "$LINENO" 5 ; }
3753     fi
3754   fi
3755 fi
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3757 $as_echo "$cross_compiling" >&6; }
3758
3759 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3760 ac_clean_files=$ac_clean_files_save
3761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3762 $as_echo_n "checking for suffix of object files... " >&6; }
3763 if test "${ac_cv_objext+set}" = set; then :
3764   $as_echo_n "(cached) " >&6
3765 else
3766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3767 /* end confdefs.h.  */
3768
3769 int
3770 main ()
3771 {
3772
3773   ;
3774   return 0;
3775 }
3776 _ACEOF
3777 rm -f conftest.o conftest.obj
3778 if { { ac_try="$ac_compile"
3779 case "(($ac_try" in
3780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3781   *) ac_try_echo=$ac_try;;
3782 esac
3783 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3784 $as_echo "$ac_try_echo"; } >&5
3785   (eval "$ac_compile") 2>&5
3786   ac_status=$?
3787   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3788   test $ac_status = 0; }; then :
3789   for ac_file in conftest.o conftest.obj conftest.*; do
3790   test -f "$ac_file" || continue;
3791   case $ac_file in
3792     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3793     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3794        break;;
3795   esac
3796 done
3797 else
3798   $as_echo "$as_me: failed program was:" >&5
3799 sed 's/^/| /' conftest.$ac_ext >&5
3800
3801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3802 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3803 as_fn_error $? "cannot compute suffix of object files: cannot compile
3804 See \`config.log' for more details" "$LINENO" 5 ; }
3805 fi
3806 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3807 fi
3808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3809 $as_echo "$ac_cv_objext" >&6; }
3810 OBJEXT=$ac_cv_objext
3811 ac_objext=$OBJEXT
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3813 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3814 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3815   $as_echo_n "(cached) " >&6
3816 else
3817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3818 /* end confdefs.h.  */
3819
3820 int
3821 main ()
3822 {
3823 #ifndef __GNUC__
3824        choke me
3825 #endif
3826
3827   ;
3828   return 0;
3829 }
3830 _ACEOF
3831 if ac_fn_c_try_compile "$LINENO"; then :
3832   ac_compiler_gnu=yes
3833 else
3834   ac_compiler_gnu=no
3835 fi
3836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3837 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3838
3839 fi
3840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3841 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3842 if test $ac_compiler_gnu = yes; then
3843   GCC=yes
3844 else
3845   GCC=
3846 fi
3847 ac_test_CFLAGS=${CFLAGS+set}
3848 ac_save_CFLAGS=$CFLAGS
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3850 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3851 if test "${ac_cv_prog_cc_g+set}" = set; then :
3852   $as_echo_n "(cached) " >&6
3853 else
3854   ac_save_c_werror_flag=$ac_c_werror_flag
3855    ac_c_werror_flag=yes
3856    ac_cv_prog_cc_g=no
3857    CFLAGS="-g"
3858    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3859 /* end confdefs.h.  */
3860
3861 int
3862 main ()
3863 {
3864
3865   ;
3866   return 0;
3867 }
3868 _ACEOF
3869 if ac_fn_c_try_compile "$LINENO"; then :
3870   ac_cv_prog_cc_g=yes
3871 else
3872   CFLAGS=""
3873       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3874 /* end confdefs.h.  */
3875
3876 int
3877 main ()
3878 {
3879
3880   ;
3881   return 0;
3882 }
3883 _ACEOF
3884 if ac_fn_c_try_compile "$LINENO"; then :
3885
3886 else
3887   ac_c_werror_flag=$ac_save_c_werror_flag
3888          CFLAGS="-g"
3889          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3890 /* end confdefs.h.  */
3891
3892 int
3893 main ()
3894 {
3895
3896   ;
3897   return 0;
3898 }
3899 _ACEOF
3900 if ac_fn_c_try_compile "$LINENO"; then :
3901   ac_cv_prog_cc_g=yes
3902 fi
3903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3904 fi
3905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3906 fi
3907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908    ac_c_werror_flag=$ac_save_c_werror_flag
3909 fi
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3911 $as_echo "$ac_cv_prog_cc_g" >&6; }
3912 if test "$ac_test_CFLAGS" = set; then
3913   CFLAGS=$ac_save_CFLAGS
3914 elif test $ac_cv_prog_cc_g = yes; then
3915   if test "$GCC" = yes; then
3916     CFLAGS="-g -O2"
3917   else
3918     CFLAGS="-g"
3919   fi
3920 else
3921   if test "$GCC" = yes; then
3922     CFLAGS="-O2"
3923   else
3924     CFLAGS=
3925   fi
3926 fi
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3928 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3929 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3930   $as_echo_n "(cached) " >&6
3931 else
3932   ac_cv_prog_cc_c89=no
3933 ac_save_CC=$CC
3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3935 /* end confdefs.h.  */
3936 #include <stdarg.h>
3937 #include <stdio.h>
3938 #include <sys/types.h>
3939 #include <sys/stat.h>
3940 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3941 struct buf { int x; };
3942 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3943 static char *e (p, i)
3944      char **p;
3945      int i;
3946 {
3947   return p[i];
3948 }
3949 static char *f (char * (*g) (char **, int), char **p, ...)
3950 {
3951   char *s;
3952   va_list v;
3953   va_start (v,p);
3954   s = g (p, va_arg (v,int));
3955   va_end (v);
3956   return s;
3957 }
3958
3959 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3960    function prototypes and stuff, but not '\xHH' hex character constants.
3961    These don't provoke an error unfortunately, instead are silently treated
3962    as 'x'.  The following induces an error, until -std is added to get
3963    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3964    array size at least.  It's necessary to write '\x00'==0 to get something
3965    that's true only with -std.  */
3966 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3967
3968 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3969    inside strings and character constants.  */
3970 #define FOO(x) 'x'
3971 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3972
3973 int test (int i, double x);
3974 struct s1 {int (*f) (int a);};
3975 struct s2 {int (*f) (double a);};
3976 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3977 int argc;
3978 char **argv;
3979 int
3980 main ()
3981 {
3982 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3983   ;
3984   return 0;
3985 }
3986 _ACEOF
3987 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3988         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3989 do
3990   CC="$ac_save_CC $ac_arg"
3991   if ac_fn_c_try_compile "$LINENO"; then :
3992   ac_cv_prog_cc_c89=$ac_arg
3993 fi
3994 rm -f core conftest.err conftest.$ac_objext
3995   test "x$ac_cv_prog_cc_c89" != "xno" && break
3996 done
3997 rm -f conftest.$ac_ext
3998 CC=$ac_save_CC
3999
4000 fi
4001 # AC_CACHE_VAL
4002 case "x$ac_cv_prog_cc_c89" in
4003   x)
4004     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4005 $as_echo "none needed" >&6; } ;;
4006   xno)
4007     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4008 $as_echo "unsupported" >&6; } ;;
4009   *)
4010     CC="$CC $ac_cv_prog_cc_c89"
4011     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4012 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4013 esac
4014 if test "x$ac_cv_prog_cc_c89" != xno; then :
4015
4016 fi
4017
4018 ac_ext=c
4019 ac_cpp='$CPP $CPPFLAGS'
4020 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4021 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4022 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4023
4024 if test ! -z "$preset_cflags"
4025 then
4026         CFLAGS=$preset_cflags
4027 fi
4028
4029
4030
4031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4032 $as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
4033
4034 # Check whether --with-cxx_main was given.
4035 if test "${with_cxx_main+set}" = set; then :
4036   withval=$with_cxx_main;
4037
4038         case $withval in
4039         no)     with_cxx_main=no
4040                 MAINCC='$(CC)';;
4041         yes)    with_cxx_main=yes
4042                 MAINCC='$(CXX)';;
4043         *)      with_cxx_main=yes
4044                 MAINCC=$withval
4045                 if test -z "$CXX"
4046                 then
4047                         CXX=$withval
4048                 fi;;
4049         esac
4050 else
4051
4052         with_cxx_main=no
4053         MAINCC='$(CC)'
4054
4055 fi
4056
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4058 $as_echo "$with_cxx_main" >&6; }
4059
4060 preset_cxx="$CXX"
4061 if test -z "$CXX"
4062 then
4063         case "$CC" in
4064         gcc)    # Extract the first word of "g++", so it can be a program name with args.
4065 set dummy g++; ac_word=$2
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067 $as_echo_n "checking for $ac_word... " >&6; }
4068 if test "${ac_cv_path_CXX+set}" = set; then :
4069   $as_echo_n "(cached) " >&6
4070 else
4071   case $CXX in
4072   [\\/]* | ?:[\\/]*)
4073   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4074   ;;
4075   *)
4076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077 for as_dir in notfound
4078 do
4079   IFS=$as_save_IFS
4080   test -z "$as_dir" && as_dir=.
4081     for ac_exec_ext in '' $ac_executable_extensions; do
4082   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4083     ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4085     break 2
4086   fi
4087 done
4088   done
4089 IFS=$as_save_IFS
4090
4091   test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4092   ;;
4093 esac
4094 fi
4095 CXX=$ac_cv_path_CXX
4096 if test -n "$CXX"; then
4097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4098 $as_echo "$CXX" >&6; }
4099 else
4100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101 $as_echo "no" >&6; }
4102 fi
4103
4104  ;;
4105         cc)     # Extract the first word of "c++", so it can be a program name with args.
4106 set dummy c++; ac_word=$2
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108 $as_echo_n "checking for $ac_word... " >&6; }
4109 if test "${ac_cv_path_CXX+set}" = set; then :
4110   $as_echo_n "(cached) " >&6
4111 else
4112   case $CXX in
4113   [\\/]* | ?:[\\/]*)
4114   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4115   ;;
4116   *)
4117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118 for as_dir in notfound
4119 do
4120   IFS=$as_save_IFS
4121   test -z "$as_dir" && as_dir=.
4122     for ac_exec_ext in '' $ac_executable_extensions; do
4123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4124     ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4126     break 2
4127   fi
4128 done
4129   done
4130 IFS=$as_save_IFS
4131
4132   test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4133   ;;
4134 esac
4135 fi
4136 CXX=$ac_cv_path_CXX
4137 if test -n "$CXX"; then
4138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4139 $as_echo "$CXX" >&6; }
4140 else
4141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142 $as_echo "no" >&6; }
4143 fi
4144
4145  ;;
4146         esac
4147         if test "$CXX" = "notfound"
4148         then
4149                 CXX=""
4150         fi
4151 fi
4152 if test -z "$CXX"
4153 then
4154         for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4155 do
4156   # Extract the first word of "$ac_prog", so it can be a program name with args.
4157 set dummy $ac_prog; ac_word=$2
4158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4159 $as_echo_n "checking for $ac_word... " >&6; }
4160 if test "${ac_cv_prog_CXX+set}" = set; then :
4161   $as_echo_n "(cached) " >&6
4162 else
4163   if test -n "$CXX"; then
4164   ac_cv_prog_CXX="$CXX" # Let the user override the test.
4165 else
4166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167 for as_dir in $PATH
4168 do
4169   IFS=$as_save_IFS
4170   test -z "$as_dir" && as_dir=.
4171     for ac_exec_ext in '' $ac_executable_extensions; do
4172   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4173     ac_cv_prog_CXX="$ac_prog"
4174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4175     break 2
4176   fi
4177 done
4178   done
4179 IFS=$as_save_IFS
4180
4181 fi
4182 fi
4183 CXX=$ac_cv_prog_CXX
4184 if test -n "$CXX"; then
4185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4186 $as_echo "$CXX" >&6; }
4187 else
4188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189 $as_echo "no" >&6; }
4190 fi
4191
4192
4193   test -n "$CXX" && break
4194 done
4195 test -n "$CXX" || CXX="notfound"
4196
4197         if test "$CXX" = "notfound"
4198         then
4199                 CXX=""
4200         fi
4201 fi
4202 if test "$preset_cxx" != "$CXX"
4203 then
4204         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4205
4206   By default, distutils will build C++ extension modules with \"$CXX\".
4207   If this is not intended, then set CXX on the configure command line.
4208   " >&5
4209 $as_echo "$as_me: WARNING:
4210
4211   By default, distutils will build C++ extension modules with \"$CXX\".
4212   If this is not intended, then set CXX on the configure command line.
4213   " >&2;}
4214 fi
4215
4216
4217 # checks for UNIX variants that set C preprocessor variables
4218
4219 ac_ext=c
4220 ac_cpp='$CPP $CPPFLAGS'
4221 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4222 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4223 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4225 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4226 # On Suns, sometimes $CPP names a directory.
4227 if test -n "$CPP" && test -d "$CPP"; then
4228   CPP=
4229 fi
4230 if test -z "$CPP"; then
4231   if test "${ac_cv_prog_CPP+set}" = set; then :
4232   $as_echo_n "(cached) " >&6
4233 else
4234       # Double quotes because CPP needs to be expanded
4235     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4236     do
4237       ac_preproc_ok=false
4238 for ac_c_preproc_warn_flag in '' yes
4239 do
4240   # Use a header file that comes with gcc, so configuring glibc
4241   # with a fresh cross-compiler works.
4242   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4243   # <limits.h> exists even on freestanding compilers.
4244   # On the NeXT, cc -E runs the code through the compiler's parser,
4245   # not just through cpp. "Syntax error" is here to catch this case.
4246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4247 /* end confdefs.h.  */
4248 #ifdef __STDC__
4249 # include <limits.h>
4250 #else
4251 # include <assert.h>
4252 #endif
4253                      Syntax error
4254 _ACEOF
4255 if ac_fn_c_try_cpp "$LINENO"; then :
4256
4257 else
4258   # Broken: fails on valid input.
4259 continue
4260 fi
4261 rm -f conftest.err conftest.i conftest.$ac_ext
4262
4263   # OK, works on sane cases.  Now check whether nonexistent headers
4264   # can be detected and how.
4265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4266 /* end confdefs.h.  */
4267 #include <ac_nonexistent.h>
4268 _ACEOF
4269 if ac_fn_c_try_cpp "$LINENO"; then :
4270   # Broken: success on invalid input.
4271 continue
4272 else
4273   # Passes both tests.
4274 ac_preproc_ok=:
4275 break
4276 fi
4277 rm -f conftest.err conftest.i conftest.$ac_ext
4278
4279 done
4280 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4281 rm -f conftest.i conftest.err conftest.$ac_ext
4282 if $ac_preproc_ok; then :
4283   break
4284 fi
4285
4286     done
4287     ac_cv_prog_CPP=$CPP
4288
4289 fi
4290   CPP=$ac_cv_prog_CPP
4291 else
4292   ac_cv_prog_CPP=$CPP
4293 fi
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4295 $as_echo "$CPP" >&6; }
4296 ac_preproc_ok=false
4297 for ac_c_preproc_warn_flag in '' yes
4298 do
4299   # Use a header file that comes with gcc, so configuring glibc
4300   # with a fresh cross-compiler works.
4301   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4302   # <limits.h> exists even on freestanding compilers.
4303   # On the NeXT, cc -E runs the code through the compiler's parser,
4304   # not just through cpp. "Syntax error" is here to catch this case.
4305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4306 /* end confdefs.h.  */
4307 #ifdef __STDC__
4308 # include <limits.h>
4309 #else
4310 # include <assert.h>
4311 #endif
4312                      Syntax error
4313 _ACEOF
4314 if ac_fn_c_try_cpp "$LINENO"; then :
4315
4316 else
4317   # Broken: fails on valid input.
4318 continue
4319 fi
4320 rm -f conftest.err conftest.i conftest.$ac_ext
4321
4322   # OK, works on sane cases.  Now check whether nonexistent headers
4323   # can be detected and how.
4324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h.  */
4326 #include <ac_nonexistent.h>
4327 _ACEOF
4328 if ac_fn_c_try_cpp "$LINENO"; then :
4329   # Broken: success on invalid input.
4330 continue
4331 else
4332   # Passes both tests.
4333 ac_preproc_ok=:
4334 break
4335 fi
4336 rm -f conftest.err conftest.i conftest.$ac_ext
4337
4338 done
4339 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4340 rm -f conftest.i conftest.err conftest.$ac_ext
4341 if $ac_preproc_ok; then :
4342
4343 else
4344   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4345 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4346 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4347 See \`config.log' for more details" "$LINENO" 5 ; }
4348 fi
4349
4350 ac_ext=c
4351 ac_cpp='$CPP $CPPFLAGS'
4352 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4353 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4354 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4355
4356
4357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4358 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4359 if test "${ac_cv_path_GREP+set}" = set; then :
4360   $as_echo_n "(cached) " >&6
4361 else
4362   if test -z "$GREP"; then
4363   ac_path_GREP_found=false
4364   # Loop through the user's path and test for each of PROGNAME-LIST
4365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4367 do
4368   IFS=$as_save_IFS
4369   test -z "$as_dir" && as_dir=.
4370     for ac_prog in grep ggrep; do
4371     for ac_exec_ext in '' $ac_executable_extensions; do
4372       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4373       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4374 # Check for GNU ac_path_GREP and select it if it is found.
4375   # Check for GNU $ac_path_GREP
4376 case `"$ac_path_GREP" --version 2>&1` in
4377 *GNU*)
4378   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4379 *)
4380   ac_count=0
4381   $as_echo_n 0123456789 >"conftest.in"
4382   while :
4383   do
4384     cat "conftest.in" "conftest.in" >"conftest.tmp"
4385     mv "conftest.tmp" "conftest.in"
4386     cp "conftest.in" "conftest.nl"
4387     $as_echo 'GREP' >> "conftest.nl"
4388     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4389     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4390     as_fn_arith $ac_count + 1 && ac_count=$as_val
4391     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4392       # Best one so far, save it but keep looking for a better one
4393       ac_cv_path_GREP="$ac_path_GREP"
4394       ac_path_GREP_max=$ac_count
4395     fi
4396     # 10*(2^10) chars as input seems more than enough
4397     test $ac_count -gt 10 && break
4398   done
4399   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4400 esac
4401
4402       $ac_path_GREP_found && break 3
4403     done
4404   done
4405   done
4406 IFS=$as_save_IFS
4407   if test -z "$ac_cv_path_GREP"; then
4408     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4409   fi
4410 else
4411   ac_cv_path_GREP=$GREP
4412 fi
4413
4414 fi
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4416 $as_echo "$ac_cv_path_GREP" >&6; }
4417  GREP="$ac_cv_path_GREP"
4418
4419
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4421 $as_echo_n "checking for egrep... " >&6; }
4422 if test "${ac_cv_path_EGREP+set}" = set; then :
4423   $as_echo_n "(cached) " >&6
4424 else
4425   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4426    then ac_cv_path_EGREP="$GREP -E"
4427    else
4428      if test -z "$EGREP"; then
4429   ac_path_EGREP_found=false
4430   # Loop through the user's path and test for each of PROGNAME-LIST
4431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4432 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4433 do
4434   IFS=$as_save_IFS
4435   test -z "$as_dir" && as_dir=.
4436     for ac_prog in egrep; do
4437     for ac_exec_ext in '' $ac_executable_extensions; do
4438       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4439       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4440 # Check for GNU ac_path_EGREP and select it if it is found.
4441   # Check for GNU $ac_path_EGREP
4442 case `"$ac_path_EGREP" --version 2>&1` in
4443 *GNU*)
4444   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4445 *)
4446   ac_count=0
4447   $as_echo_n 0123456789 >"conftest.in"
4448   while :
4449   do
4450     cat "conftest.in" "conftest.in" >"conftest.tmp"
4451     mv "conftest.tmp" "conftest.in"
4452     cp "conftest.in" "conftest.nl"
4453     $as_echo 'EGREP' >> "conftest.nl"
4454     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4455     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4456     as_fn_arith $ac_count + 1 && ac_count=$as_val
4457     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4458       # Best one so far, save it but keep looking for a better one
4459       ac_cv_path_EGREP="$ac_path_EGREP"
4460       ac_path_EGREP_max=$ac_count
4461     fi
4462     # 10*(2^10) chars as input seems more than enough
4463     test $ac_count -gt 10 && break
4464   done
4465   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4466 esac
4467
4468       $ac_path_EGREP_found && break 3
4469     done
4470   done
4471   done
4472 IFS=$as_save_IFS
4473   if test -z "$ac_cv_path_EGREP"; then
4474     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4475   fi
4476 else
4477   ac_cv_path_EGREP=$EGREP
4478 fi
4479
4480    fi
4481 fi
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4483 $as_echo "$ac_cv_path_EGREP" >&6; }
4484  EGREP="$ac_cv_path_EGREP"
4485
4486
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4488 $as_echo_n "checking for ANSI C header files... " >&6; }
4489 if test "${ac_cv_header_stdc+set}" = set; then :
4490   $as_echo_n "(cached) " >&6
4491 else
4492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4493 /* end confdefs.h.  */
4494 #include <stdlib.h>
4495 #include <stdarg.h>
4496 #include <string.h>
4497 #include <float.h>
4498
4499 int
4500 main ()
4501 {
4502
4503   ;
4504   return 0;
4505 }
4506 _ACEOF
4507 if ac_fn_c_try_compile "$LINENO"; then :
4508   ac_cv_header_stdc=yes
4509 else
4510   ac_cv_header_stdc=no
4511 fi
4512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4513
4514 if test $ac_cv_header_stdc = yes; then
4515   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517 /* end confdefs.h.  */
4518 #include <string.h>
4519
4520 _ACEOF
4521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4522   $EGREP "memchr" >/dev/null 2>&1; then :
4523
4524 else
4525   ac_cv_header_stdc=no
4526 fi
4527 rm -f conftest*
4528
4529 fi
4530
4531 if test $ac_cv_header_stdc = yes; then
4532   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534 /* end confdefs.h.  */
4535 #include <stdlib.h>
4536
4537 _ACEOF
4538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4539   $EGREP "free" >/dev/null 2>&1; then :
4540
4541 else
4542   ac_cv_header_stdc=no
4543 fi
4544 rm -f conftest*
4545
4546 fi
4547
4548 if test $ac_cv_header_stdc = yes; then
4549   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4550   if test "$cross_compiling" = yes; then :
4551   :
4552 else
4553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554 /* end confdefs.h.  */
4555 #include <ctype.h>
4556 #include <stdlib.h>
4557 #if ((' ' & 0x0FF) == 0x020)
4558 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4559 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4560 #else
4561 # define ISLOWER(c) \
4562                    (('a' <= (c) && (c) <= 'i') \
4563                      || ('j' <= (c) && (c) <= 'r') \
4564                      || ('s' <= (c) && (c) <= 'z'))
4565 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4566 #endif
4567
4568 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4569 int
4570 main ()
4571 {
4572   int i;
4573   for (i = 0; i < 256; i++)
4574     if (XOR (islower (i), ISLOWER (i))
4575         || toupper (i) != TOUPPER (i))
4576       return 2;
4577   return 0;
4578 }
4579 _ACEOF
4580 if ac_fn_c_try_run "$LINENO"; then :
4581
4582 else
4583   ac_cv_header_stdc=no
4584 fi
4585 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4586   conftest.$ac_objext conftest.beam conftest.$ac_ext
4587 fi
4588
4589 fi
4590 fi
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4592 $as_echo "$ac_cv_header_stdc" >&6; }
4593 if test $ac_cv_header_stdc = yes; then
4594
4595 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4596
4597 fi
4598
4599 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4600 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4601                   inttypes.h stdint.h unistd.h
4602 do :
4603   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4604 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4605 "
4606 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4607   cat >>confdefs.h <<_ACEOF
4608 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4609 _ACEOF
4610
4611 fi
4612
4613 done
4614
4615
4616
4617   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4618 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4619   MINIX=yes
4620 else
4621   MINIX=
4622 fi
4623
4624
4625   if test "$MINIX" = yes; then
4626
4627 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4628
4629
4630 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4631
4632
4633 $as_echo "#define _MINIX 1" >>confdefs.h
4634
4635   fi
4636
4637
4638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4639 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4640 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4641   $as_echo_n "(cached) " >&6
4642 else
4643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644 /* end confdefs.h.  */
4645
4646 #         define __EXTENSIONS__ 1
4647           $ac_includes_default
4648 int
4649 main ()
4650 {
4651
4652   ;
4653   return 0;
4654 }
4655 _ACEOF
4656 if ac_fn_c_try_compile "$LINENO"; then :
4657   ac_cv_safe_to_define___extensions__=yes
4658 else
4659   ac_cv_safe_to_define___extensions__=no
4660 fi
4661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4662 fi
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4664 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4665   test $ac_cv_safe_to_define___extensions__ = yes &&
4666     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4667
4668   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4669
4670   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4671
4672   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4673
4674   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4675
4676
4677
4678 # Check for unsupported systems
4679 case $ac_sys_system/$ac_sys_release in
4680 atheos*|Linux*/1*)
4681    echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4682    echo See README for details.
4683    exit 1;;
4684 esac
4685
4686
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4688 $as_echo_n "checking for --with-suffix... " >&6; }
4689
4690 # Check whether --with-suffix was given.
4691 if test "${with_suffix+set}" = set; then :
4692   withval=$with_suffix;
4693         case $withval in
4694         no)     EXEEXT=;;
4695         yes)    EXEEXT=.exe;;
4696         *)      EXEEXT=$withval;;
4697         esac
4698 fi
4699
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4701 $as_echo "$EXEEXT" >&6; }
4702
4703 # Test whether we're running on a non-case-sensitive system, in which
4704 # case we give a warning if no ext is given
4705
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4707 $as_echo_n "checking for case-insensitive build directory... " >&6; }
4708 if test ! -d CaseSensitiveTestDir; then
4709 mkdir CaseSensitiveTestDir
4710 fi
4711
4712 if test -d casesensitivetestdir
4713 then
4714     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4715 $as_echo "yes" >&6; }
4716     BUILDEXEEXT=.exe
4717 else
4718         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719 $as_echo "no" >&6; }
4720         BUILDEXEEXT=$EXEEXT
4721 fi
4722 rmdir CaseSensitiveTestDir
4723
4724 case $MACHDEP in
4725 bsdos*)
4726     case $CC in
4727     gcc) CC="$CC -D_HAVE_BSDI";;
4728     esac;;
4729 esac
4730
4731 case $ac_sys_system in
4732 hp*|HP*)
4733     case $CC in
4734     cc|*/cc) CC="$CC -Ae";;
4735     esac;;
4736 SunOS*)
4737     # Some functions have a prototype only with that define, e.g. confstr
4738
4739 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4740
4741     ;;
4742 esac
4743
4744
4745
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4747 $as_echo_n "checking LIBRARY... " >&6; }
4748 if test -z "$LIBRARY"
4749 then
4750         LIBRARY='libpython$(VERSION).a'
4751 fi
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4753 $as_echo "$LIBRARY" >&6; }
4754
4755 # LDLIBRARY is the name of the library to link against (as opposed to the
4756 # name of the library into which to insert object files). BLDLIBRARY is also
4757 # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4758 # is blank as the main program is not linked directly against LDLIBRARY.
4759 # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4760 # systems without shared libraries, LDLIBRARY is the same as LIBRARY
4761 # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4762 # DLLLIBRARY is the shared (i.e., DLL) library.
4763 #
4764 # RUNSHARED is used to run shared python without installed libraries
4765 #
4766 # INSTSONAME is the name of the shared library that will be use to install
4767 # on the system - some systems like version suffix, others don't
4768
4769
4770
4771
4772
4773
4774 LDLIBRARY="$LIBRARY"
4775 BLDLIBRARY='$(LDLIBRARY)'
4776 INSTSONAME='$(LDLIBRARY)'
4777 DLLLIBRARY=''
4778 LDLIBRARYDIR=''
4779 RUNSHARED=''
4780
4781 # LINKCC is the command that links the python executable -- default is $(CC).
4782 # If CXX is set, and if it is needed to link a main function that was
4783 # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4784 # python might then depend on the C++ runtime
4785 # This is altered for AIX in order to build the export list before
4786 # linking.
4787
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4789 $as_echo_n "checking LINKCC... " >&6; }
4790 if test -z "$LINKCC"
4791 then
4792         LINKCC='$(PURIFY) $(MAINCC)'
4793         case $ac_sys_system in
4794         AIX*)
4795            exp_extra="\"\""
4796            if test $ac_sys_release -ge 5 -o \
4797                    $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4798                exp_extra="."
4799            fi
4800            LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
4801         QNX*)
4802            # qcc must be used because the other compilers do not
4803            # support -N.
4804            LINKCC=qcc;;
4805         esac
4806 fi
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4808 $as_echo "$LINKCC" >&6; }
4809
4810 # GNULD is set to "yes" if the GNU linker is used.  If this goes wrong
4811 # make sure we default having it set to "no": this is used by
4812 # distutils.unixccompiler to know if it should add --enable-new-dtags
4813 # to linker command lines, and failing to detect GNU ld simply results
4814 # in the same bahaviour as before.
4815
4816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4817 $as_echo_n "checking for GNU ld... " >&6; }
4818 ac_prog=ld
4819 if test "$GCC" = yes; then
4820        ac_prog=`$CC -print-prog-name=ld`
4821 fi
4822 case `"$ac_prog" -V 2>&1 < /dev/null` in
4823       *GNU*)
4824           GNULD=yes;;
4825       *)
4826           GNULD=no;;
4827 esac
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4829 $as_echo "$GNULD" >&6; }
4830
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4832 $as_echo_n "checking for --enable-shared... " >&6; }
4833 # Check whether --enable-shared was given.
4834 if test "${enable_shared+set}" = set; then :
4835   enableval=$enable_shared;
4836 fi
4837
4838
4839 if test -z "$enable_shared"
4840 then
4841   case $ac_sys_system in
4842   CYGWIN* | atheos*)
4843     enable_shared="yes";;
4844   *)
4845     enable_shared="no";;
4846   esac
4847 fi
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4849 $as_echo "$enable_shared" >&6; }
4850
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4852 $as_echo_n "checking for --enable-profiling... " >&6; }
4853 # Check whether --enable-profiling was given.
4854 if test "${enable_profiling+set}" = set; then :
4855   enableval=$enable_profiling; ac_save_cc="$CC"
4856  CC="$CC -pg"
4857  if test "$cross_compiling" = yes; then :
4858   ac_enable_profiling="no"
4859 else
4860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h.  */
4862 int main() { return 0; }
4863 _ACEOF
4864 if ac_fn_c_try_run "$LINENO"; then :
4865   ac_enable_profiling="yes"
4866 else
4867   ac_enable_profiling="no"
4868 fi
4869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4870   conftest.$ac_objext conftest.beam conftest.$ac_ext
4871 fi
4872
4873  CC="$ac_save_cc"
4874 fi
4875
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4877 $as_echo "$ac_enable_profiling" >&6; }
4878
4879 case "$ac_enable_profiling" in
4880     "yes")
4881         BASECFLAGS="-pg $BASECFLAGS"
4882         LDFLAGS="-pg $LDFLAGS"
4883     ;;
4884 esac
4885
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4887 $as_echo_n "checking LDLIBRARY... " >&6; }
4888
4889 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4890 # library that we build, but we do not want to link against it (we
4891 # will find it with a -framework option). For this reason there is an
4892 # extra variable BLDLIBRARY against which Python and the extension
4893 # modules are linked, BLDLIBRARY. This is normally the same as
4894 # LDLIBRARY, but empty for MacOSX framework builds.
4895 if test "$enable_framework"
4896 then
4897   LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4898   RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4899   BLDLIBRARY=''
4900 else
4901   BLDLIBRARY='$(LDLIBRARY)'
4902 fi
4903
4904 # Other platforms follow
4905 if test $enable_shared = "yes"; then
4906
4907 $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
4908
4909   case $ac_sys_system in
4910     BeOS*)
4911           LDLIBRARY='libpython$(VERSION).so'
4912           ;;
4913     CYGWIN*)
4914           LDLIBRARY='libpython$(VERSION).dll.a'
4915           DLLLIBRARY='libpython$(VERSION).dll'
4916           ;;
4917     SunOS*)
4918           LDLIBRARY='libpython$(VERSION).so'
4919           BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4920           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4921           INSTSONAME="$LDLIBRARY".$SOVERSION
4922           ;;
4923     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
4924           LDLIBRARY='libpython$(VERSION).so'
4925           BLDLIBRARY='-L. -lpython$(VERSION)'
4926           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4927           case $ac_sys_system in
4928               FreeBSD*)
4929                 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4930                 ;;
4931           esac
4932           INSTSONAME="$LDLIBRARY".$SOVERSION
4933           ;;
4934     hp*|HP*)
4935           case `uname -m` in
4936                 ia64)
4937                         LDLIBRARY='libpython$(VERSION).so'
4938                         ;;
4939                 *)
4940                         LDLIBRARY='libpython$(VERSION).sl'
4941                         ;;
4942           esac
4943           BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4944           RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4945           ;;
4946     OSF*)
4947           LDLIBRARY='libpython$(VERSION).so'
4948           BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4949           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4950           ;;
4951     atheos*)
4952           LDLIBRARY='libpython$(VERSION).so'
4953           BLDLIBRARY='-L. -lpython$(VERSION)'
4954           RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4955           ;;
4956     Darwin*)
4957         LDLIBRARY='libpython$(VERSION).dylib'
4958         BLDLIBRARY='-L. -lpython$(VERSION)'
4959         RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4960         ;;
4961     AIX*)
4962         LDLIBRARY='libpython$(VERSION).so'
4963         RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4964         ;;
4965
4966   esac
4967 else # shared is disabled
4968   case $ac_sys_system in
4969     CYGWIN*)
4970           BLDLIBRARY='$(LIBRARY)'
4971           LDLIBRARY='libpython$(VERSION).dll.a'
4972           ;;
4973   esac
4974 fi
4975
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4977 $as_echo "$LDLIBRARY" >&6; }
4978
4979 if test -n "$ac_tool_prefix"; then
4980   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4981 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983 $as_echo_n "checking for $ac_word... " >&6; }
4984 if test "${ac_cv_prog_RANLIB+set}" = set; then :
4985   $as_echo_n "(cached) " >&6
4986 else
4987   if test -n "$RANLIB"; then
4988   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4989 else
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991 for as_dir in $PATH
4992 do
4993   IFS=$as_save_IFS
4994   test -z "$as_dir" && as_dir=.
4995     for ac_exec_ext in '' $ac_executable_extensions; do
4996   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4997     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999     break 2
5000   fi
5001 done
5002   done
5003 IFS=$as_save_IFS
5004
5005 fi
5006 fi
5007 RANLIB=$ac_cv_prog_RANLIB
5008 if test -n "$RANLIB"; then
5009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5010 $as_echo "$RANLIB" >&6; }
5011 else
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014 fi
5015
5016
5017 fi
5018 if test -z "$ac_cv_prog_RANLIB"; then
5019   ac_ct_RANLIB=$RANLIB
5020   # Extract the first word of "ranlib", so it can be a program name with args.
5021 set dummy ranlib; ac_word=$2
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023 $as_echo_n "checking for $ac_word... " >&6; }
5024 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5025   $as_echo_n "(cached) " >&6
5026 else
5027   if test -n "$ac_ct_RANLIB"; then
5028   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5029 else
5030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031 for as_dir in $PATH
5032 do
5033   IFS=$as_save_IFS
5034   test -z "$as_dir" && as_dir=.
5035     for ac_exec_ext in '' $ac_executable_extensions; do
5036   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037     ac_cv_prog_ac_ct_RANLIB="ranlib"
5038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5039     break 2
5040   fi
5041 done
5042   done
5043 IFS=$as_save_IFS
5044
5045 fi
5046 fi
5047 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5048 if test -n "$ac_ct_RANLIB"; then
5049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5050 $as_echo "$ac_ct_RANLIB" >&6; }
5051 else
5052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053 $as_echo "no" >&6; }
5054 fi
5055
5056   if test "x$ac_ct_RANLIB" = x; then
5057     RANLIB=":"
5058   else
5059     case $cross_compiling:$ac_tool_warned in
5060 yes:)
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5063 ac_tool_warned=yes ;;
5064 esac
5065     RANLIB=$ac_ct_RANLIB
5066   fi
5067 else
5068   RANLIB="$ac_cv_prog_RANLIB"
5069 fi
5070
5071
5072 for ac_prog in ar aal
5073 do
5074   # Extract the first word of "$ac_prog", so it can be a program name with args.
5075 set dummy $ac_prog; ac_word=$2
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077 $as_echo_n "checking for $ac_word... " >&6; }
5078 if test "${ac_cv_prog_AR+set}" = set; then :
5079   $as_echo_n "(cached) " >&6
5080 else
5081   if test -n "$AR"; then
5082   ac_cv_prog_AR="$AR" # Let the user override the test.
5083 else
5084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085 for as_dir in $PATH
5086 do
5087   IFS=$as_save_IFS
5088   test -z "$as_dir" && as_dir=.
5089     for ac_exec_ext in '' $ac_executable_extensions; do
5090   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091     ac_cv_prog_AR="$ac_prog"
5092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093     break 2
5094   fi
5095 done
5096   done
5097 IFS=$as_save_IFS
5098
5099 fi
5100 fi
5101 AR=$ac_cv_prog_AR
5102 if test -n "$AR"; then
5103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5104 $as_echo "$AR" >&6; }
5105 else
5106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107 $as_echo "no" >&6; }
5108 fi
5109
5110
5111   test -n "$AR" && break
5112 done
5113 test -n "$AR" || AR="ar"
5114
5115
5116 # tweak ARFLAGS only if the user didn't set it on the command line
5117
5118 if test -z "$ARFLAGS"
5119 then
5120         ARFLAGS="rc"
5121 fi
5122
5123
5124 # Extract the first word of "svnversion", so it can be a program name with args.
5125 set dummy svnversion; ac_word=$2
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127 $as_echo_n "checking for $ac_word... " >&6; }
5128 if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5129   $as_echo_n "(cached) " >&6
5130 else
5131   if test -n "$SVNVERSION"; then
5132   ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5133 else
5134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135 for as_dir in $PATH
5136 do
5137   IFS=$as_save_IFS
5138   test -z "$as_dir" && as_dir=.
5139     for ac_exec_ext in '' $ac_executable_extensions; do
5140   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5141     ac_cv_prog_SVNVERSION="found"
5142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143     break 2
5144   fi
5145 done
5146   done
5147 IFS=$as_save_IFS
5148
5149   test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5150 fi
5151 fi
5152 SVNVERSION=$ac_cv_prog_SVNVERSION
5153 if test -n "$SVNVERSION"; then
5154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5155 $as_echo "$SVNVERSION" >&6; }
5156 else
5157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158 $as_echo "no" >&6; }
5159 fi
5160
5161
5162 if test $SVNVERSION = found
5163 then
5164         SVNVERSION="svnversion \$(srcdir)"
5165 else
5166         SVNVERSION="echo Unversioned directory"
5167 fi
5168
5169
5170
5171
5172 # Extract the first word of "hg", so it can be a program name with args.
5173 set dummy hg; ac_word=$2
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5175 $as_echo_n "checking for $ac_word... " >&6; }
5176 if test "${ac_cv_prog_HAS_HG+set}" = set; then :
5177   $as_echo_n "(cached) " >&6
5178 else
5179   if test -n "$HAS_HG"; then
5180   ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5181 else
5182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183 for as_dir in $PATH
5184 do
5185   IFS=$as_save_IFS
5186   test -z "$as_dir" && as_dir=.
5187     for ac_exec_ext in '' $ac_executable_extensions; do
5188   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5189     ac_cv_prog_HAS_HG="found"
5190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191     break 2
5192   fi
5193 done
5194   done
5195 IFS=$as_save_IFS
5196
5197   test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5198 fi
5199 fi
5200 HAS_HG=$ac_cv_prog_HAS_HG
5201 if test -n "$HAS_HG"; then
5202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5203 $as_echo "$HAS_HG" >&6; }
5204 else
5205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206 $as_echo "no" >&6; }
5207 fi
5208
5209
5210 if test $HAS_HG = found
5211 then
5212     HGVERSION="hg id -i \$(srcdir)"
5213     HGTAG="hg id -t \$(srcdir)"
5214     HGBRANCH="hg id -b \$(srcdir)"
5215 else
5216     HGVERSION=""
5217     HGTAG=""
5218     HGBRANCH=""
5219 fi
5220
5221 case $MACHDEP in
5222 bsdos*|hp*|HP*)
5223         # install -d does not work on BSDI or HP-UX
5224         if test -z "$INSTALL"
5225         then
5226                 INSTALL="${srcdir}/install-sh -c"
5227         fi
5228 esac
5229 ac_aux_dir=
5230 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5231   if test -f "$ac_dir/install-sh"; then
5232     ac_aux_dir=$ac_dir
5233     ac_install_sh="$ac_aux_dir/install-sh -c"
5234     break
5235   elif test -f "$ac_dir/install.sh"; then
5236     ac_aux_dir=$ac_dir
5237     ac_install_sh="$ac_aux_dir/install.sh -c"
5238     break
5239   elif test -f "$ac_dir/shtool"; then
5240     ac_aux_dir=$ac_dir
5241     ac_install_sh="$ac_aux_dir/shtool install -c"
5242     break
5243   fi
5244 done
5245 if test -z "$ac_aux_dir"; then
5246   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5247 fi
5248
5249 # These three variables are undocumented and unsupported,
5250 # and are intended to be withdrawn in a future Autoconf release.
5251 # They can cause serious problems if a builder's source tree is in a directory
5252 # whose full name contains unusual characters.
5253 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
5254 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
5255 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
5256
5257
5258 # Find a good install program.  We prefer a C program (faster),
5259 # so one script is as good as another.  But avoid the broken or
5260 # incompatible versions:
5261 # SysV /etc/install, /usr/sbin/install
5262 # SunOS /usr/etc/install
5263 # IRIX /sbin/install
5264 # AIX /bin/install
5265 # AmigaOS /C/install, which installs bootblocks on floppy discs
5266 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5267 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5268 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5269 # OS/2's system install, which has a completely different semantic
5270 # ./install, which can be erroneously created by make from ./install.sh.
5271 # Reject install programs that cannot install multiple files.
5272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5273 $as_echo_n "checking for a BSD-compatible install... " >&6; }
5274 if test -z "$INSTALL"; then
5275 if test "${ac_cv_path_install+set}" = set; then :
5276   $as_echo_n "(cached) " >&6
5277 else
5278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279 for as_dir in $PATH
5280 do
5281   IFS=$as_save_IFS
5282   test -z "$as_dir" && as_dir=.
5283     # Account for people who put trailing slashes in PATH elements.
5284 case $as_dir/ in #((
5285   ./ | .// | /[cC]/* | \
5286   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5287   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5288   /usr/ucb/* ) ;;
5289   *)
5290     # OSF1 and SCO ODT 3.0 have their own names for install.
5291     # Don't use installbsd from OSF since it installs stuff as root
5292     # by default.
5293     for ac_prog in ginstall scoinst install; do
5294       for ac_exec_ext in '' $ac_executable_extensions; do
5295         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5296           if test $ac_prog = install &&
5297             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5298             # AIX install.  It has an incompatible calling convention.
5299             :
5300           elif test $ac_prog = install &&
5301             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5302             # program-specific install script used by HP pwplus--don't use.
5303             :
5304           else
5305             rm -rf conftest.one conftest.two conftest.dir
5306             echo one > conftest.one
5307             echo two > conftest.two
5308             mkdir conftest.dir
5309             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5310               test -s conftest.one && test -s conftest.two &&
5311               test -s conftest.dir/conftest.one &&
5312               test -s conftest.dir/conftest.two
5313             then
5314               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5315               break 3
5316             fi
5317           fi
5318         fi
5319       done
5320     done
5321     ;;
5322 esac
5323
5324   done
5325 IFS=$as_save_IFS
5326
5327 rm -rf conftest.one conftest.two conftest.dir
5328
5329 fi
5330   if test "${ac_cv_path_install+set}" = set; then
5331     INSTALL=$ac_cv_path_install
5332   else
5333     # As a last resort, use the slow shell script.  Don't cache a
5334     # value for INSTALL within a source directory, because that will
5335     # break other packages using the cache if that directory is
5336     # removed, or if the value is a relative name.
5337     INSTALL=$ac_install_sh
5338   fi
5339 fi
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5341 $as_echo "$INSTALL" >&6; }
5342
5343 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5344 # It thinks the first close brace ends the variable substitution.
5345 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5346
5347 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5348
5349 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5350
5351
5352 # Not every filesystem supports hard links
5353
5354 if test -z "$LN" ; then
5355         case $ac_sys_system in
5356                 BeOS*) LN="ln -s";;
5357                 CYGWIN*) LN="ln -s";;
5358                 atheos*) LN="ln -s";;
5359                 *) LN=ln;;
5360         esac
5361 fi
5362
5363 # Check for --with-pydebug
5364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5365 $as_echo_n "checking for --with-pydebug... " >&6; }
5366
5367 # Check whether --with-pydebug was given.
5368 if test "${with_pydebug+set}" = set; then :
5369   withval=$with_pydebug;
5370 if test "$withval" != no
5371 then
5372
5373 $as_echo "#define Py_DEBUG 1" >>confdefs.h
5374
5375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5376 $as_echo "yes" >&6; };
5377   Py_DEBUG='true'
5378 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379 $as_echo "no" >&6; }; Py_DEBUG='false'
5380 fi
5381 else
5382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383 $as_echo "no" >&6; }
5384 fi
5385
5386
5387 # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5388 # merged with this chunk of code?
5389
5390 # Optimizer/debugger flags
5391 # ------------------------
5392 # (The following bit of code is complicated enough - please keep things
5393 # indented properly.  Just pretend you're editing Python code. ;-)
5394
5395 # There are two parallel sets of case statements below, one that checks to
5396 # see if OPT was set and one that does BASECFLAGS setting based upon
5397 # compiler and platform.  BASECFLAGS tweaks need to be made even if the
5398 # user set OPT.
5399
5400 # tweak OPT based on compiler and platform, only if the user didn't set
5401 # it on the command line
5402
5403 if test "${OPT-unset}" = "unset"
5404 then
5405     case $GCC in
5406     yes)
5407         if test "$CC" != 'g++' ; then
5408             STRICT_PROTO="-Wstrict-prototypes"
5409         fi
5410         # For gcc 4.x we need to use -fwrapv so lets check if its supported
5411         if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5412            WRAP="-fwrapv"
5413         fi
5414
5415         # Clang also needs -fwrapv
5416         case $CC in
5417             *clang*) WRAP="-fwrapv"
5418             ;;
5419         esac
5420
5421         case $ac_cv_prog_cc_g in
5422         yes)
5423             if test "$Py_DEBUG" = 'true' ; then
5424                 # Optimization messes up debuggers, so turn it off for
5425                 # debug builds.
5426                 OPT="-g -O0 -Wall $STRICT_PROTO"
5427             else
5428                 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5429             fi
5430             ;;
5431         *)
5432             OPT="-O3 -Wall $STRICT_PROTO"
5433             ;;
5434         esac
5435         case $ac_sys_system in
5436             SCO_SV*) OPT="$OPT -m486 -DSCO5"
5437             ;;
5438         esac
5439         ;;
5440
5441     *)
5442         OPT="-O"
5443         ;;
5444     esac
5445 fi
5446
5447
5448
5449 # The -arch flags for universal builds on OSX
5450 UNIVERSAL_ARCH_FLAGS=
5451
5452
5453 # tweak BASECFLAGS based on compiler and platform
5454 case $GCC in
5455 yes)
5456     # Python violates C99 rules, by casting between incompatible
5457     # pointer types. GCC may generate bad code as a result of that,
5458     # so use -fno-strict-aliasing if supported.
5459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5460 $as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
5461      ac_save_cc="$CC"
5462      CC="$CC -fno-strict-aliasing"
5463      if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
5464   $as_echo_n "(cached) " >&6
5465 else
5466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467 /* end confdefs.h.  */
5468
5469 int
5470 main ()
5471 {
5472
5473   ;
5474   return 0;
5475 }
5476 _ACEOF
5477 if ac_fn_c_try_compile "$LINENO"; then :
5478   ac_cv_no_strict_aliasing_ok=yes
5479 else
5480   ac_cv_no_strict_aliasing_ok=no
5481 fi
5482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5483 fi
5484
5485      CC="$ac_save_cc"
5486     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5487 $as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
5488     if test $ac_cv_no_strict_aliasing_ok = yes
5489     then
5490       BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5491     fi
5492
5493     # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5494     # support.  Without this, treatment of subnormals doesn't follow
5495     # the standard.
5496     case $ac_sys_machine in
5497          alpha*)
5498                 BASECFLAGS="$BASECFLAGS -mieee"
5499                 ;;
5500     esac
5501
5502     case $ac_sys_system in
5503         SCO_SV*)
5504             BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5505             ;;
5506         # is there any other compiler on Darwin besides gcc?
5507         Darwin*)
5508             # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5509             # used to be here, but non-Apple gcc doesn't accept them.
5510             if test "${CC}" = gcc
5511             then
5512                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5513 $as_echo_n "checking which compiler should be used... " >&6; }
5514                 case "${UNIVERSALSDK}" in
5515                 */MacOSX10.4u.sdk)
5516                         # Build using 10.4 SDK, force usage of gcc when the
5517                         # compiler is gcc, otherwise the user will get very
5518                         # confusing error messages when building on OSX 10.6
5519                         CC=gcc-4.0
5520                         CPP=cpp-4.0
5521                         ;;
5522                 esac
5523                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5524 $as_echo "$CC" >&6; }
5525             fi
5526
5527             # Calculate the right deployment target for this build.
5528             #
5529             cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5530             if test ${cur_target} '>' 10.2; then
5531                     cur_target=10.3
5532                     if test ${enable_universalsdk}; then
5533                             if test "${UNIVERSAL_ARCHS}" = "all"; then
5534                                     # Ensure that the default platform for a
5535                                     # 4-way universal build is OSX 10.5,
5536                                     # that's the first OS release where
5537                                     # 4-way builds make sense.
5538                                     cur_target='10.5'
5539
5540                             elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5541                                     cur_target='10.5'
5542
5543                             elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5544                                     cur_target='10.5'
5545
5546                             elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5547                                     cur_target='10.5'
5548                             fi
5549                     else
5550                             if test `/usr/bin/arch` = "i386"; then
5551                                     # On Intel macs default to a deployment
5552                                     # target of 10.4, that's the first OSX
5553                                     # release with Intel support.
5554                                     cur_target="10.4"
5555                             fi
5556                     fi
5557             fi
5558             CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5559
5560             # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5561             # environment with a value that is the same as what we'll use
5562             # in the Makefile to ensure that we'll get the same compiler
5563             # environment during configure and build time.
5564             MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5565             export MACOSX_DEPLOYMENT_TARGET
5566             EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5567
5568             if test "${enable_universalsdk}"; then
5569                 UNIVERSAL_ARCH_FLAGS=""
5570                 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5571                    UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5572                    ARCH_RUN_32BIT=""
5573                    LIPO_32BIT_FLAGS=""
5574
5575                  elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5576                    UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5577                    LIPO_32BIT_FLAGS=""
5578                    ARCH_RUN_32BIT="true"
5579
5580                  elif test "$UNIVERSAL_ARCHS" = "all" ; then
5581                    UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5582                    LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
5583                    ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
5584
5585                  elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5586                    UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5587                    LIPO_32BIT_FLAGS="-extract i386"
5588                    ARCH_RUN_32BIT="/usr/bin/arch -i386"
5589
5590                  elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5591                    UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5592                    LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
5593                    ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
5594
5595                  else
5596                    as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
5597
5598                  fi
5599
5600
5601                 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5602                 if test "${UNIVERSALSDK}" != "/"
5603                 then
5604                         CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5605                         LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5606                         CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5607                 fi
5608
5609             fi
5610
5611
5612             ;;
5613         OSF*)
5614             BASECFLAGS="$BASECFLAGS -mieee"
5615             ;;
5616     esac
5617     ;;
5618
5619 *)
5620     case $ac_sys_system in
5621     OpenUNIX*|UnixWare*)
5622         BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5623         ;;
5624     OSF*)
5625         BASECFLAGS="$BASECFLAGS -ieee -std"
5626         ;;
5627     SCO_SV*)
5628         BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5629         ;;
5630     esac
5631     ;;
5632 esac
5633
5634 if test "$Py_DEBUG" = 'true'; then
5635   :
5636 else
5637   OPT="-DNDEBUG $OPT"
5638 fi
5639
5640 if test "$ac_arch_flags"
5641 then
5642         BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5643 fi
5644
5645 # disable check for icc since it seems to pass, but generates a warning
5646 if test "$CC" = icc
5647 then
5648   ac_cv_opt_olimit_ok=no
5649 fi
5650
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5652 $as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5653 if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5654   $as_echo_n "(cached) " >&6
5655 else
5656   ac_save_cc="$CC"
5657 CC="$CC -OPT:Olimit=0"
5658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5659 /* end confdefs.h.  */
5660
5661 int
5662 main ()
5663 {
5664
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 if ac_fn_c_try_compile "$LINENO"; then :
5670   ac_cv_opt_olimit_ok=yes
5671 else
5672   ac_cv_opt_olimit_ok=no
5673
5674 fi
5675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5676 CC="$ac_save_cc"
5677 fi
5678
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5680 $as_echo "$ac_cv_opt_olimit_ok" >&6; }
5681 if test $ac_cv_opt_olimit_ok = yes; then
5682     case $ac_sys_system in
5683         # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5684         # olimit_ok test is "no".  Is it "yes" in some other Darwin-esque
5685         # environment?
5686         Darwin*)
5687             ;;
5688         *)
5689             BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5690             ;;
5691     esac
5692 else
5693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5694 $as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5695   if test "${ac_cv_olimit_ok+set}" = set; then :
5696   $as_echo_n "(cached) " >&6
5697 else
5698   ac_save_cc="$CC"
5699   CC="$CC -Olimit 1500"
5700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5701 /* end confdefs.h.  */
5702
5703 int
5704 main ()
5705 {
5706
5707   ;
5708   return 0;
5709 }
5710 _ACEOF
5711 if ac_fn_c_try_compile "$LINENO"; then :
5712   ac_cv_olimit_ok=yes
5713 else
5714   ac_cv_olimit_ok=no
5715
5716 fi
5717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5718   CC="$ac_save_cc"
5719 fi
5720
5721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5722 $as_echo "$ac_cv_olimit_ok" >&6; }
5723   if test $ac_cv_olimit_ok = yes; then
5724     BASECFLAGS="$BASECFLAGS -Olimit 1500"
5725   fi
5726 fi
5727
5728 # Check whether GCC supports PyArg_ParseTuple format
5729 if test "$GCC" = "yes"
5730 then
5731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5732 $as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
5733   save_CFLAGS=$CFLAGS
5734   CFLAGS="$CFLAGS -Werror"
5735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5736 /* end confdefs.h.  */
5737
5738     void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5739 int
5740 main ()
5741 {
5742
5743   ;
5744   return 0;
5745 }
5746
5747 _ACEOF
5748 if ac_fn_c_try_compile "$LINENO"; then :
5749
5750
5751 $as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
5752
5753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5754 $as_echo "yes" >&6; }
5755
5756 else
5757
5758     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759 $as_echo "no" >&6; }
5760
5761 fi
5762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5763   CFLAGS=$save_CFLAGS
5764 fi
5765
5766 # On some compilers, pthreads are available without further options
5767 # (e.g. MacOS X). On some of these systems, the compiler will not
5768 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5769 # So we have to see first whether pthreads are available without
5770 # options before we can check whether -Kpthread improves anything.
5771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5772 $as_echo_n "checking whether pthreads are available without options... " >&6; }
5773 if test "${ac_cv_pthread_is_default+set}" = set; then :
5774   $as_echo_n "(cached) " >&6
5775 else
5776   if test "$cross_compiling" = yes; then :
5777   ac_cv_pthread_is_default=no
5778 else
5779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5780 /* end confdefs.h.  */
5781
5782 #include <pthread.h>
5783
5784 void* routine(void* p){return NULL;}
5785
5786 int main(){
5787   pthread_t p;
5788   if(pthread_create(&p,NULL,routine,NULL)!=0)
5789     return 1;
5790   (void)pthread_detach(p);
5791   return 0;
5792 }
5793
5794 _ACEOF
5795 if ac_fn_c_try_run "$LINENO"; then :
5796
5797   ac_cv_pthread_is_default=yes
5798   ac_cv_kthread=no
5799   ac_cv_pthread=no
5800
5801 else
5802   ac_cv_pthread_is_default=no
5803 fi
5804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5805   conftest.$ac_objext conftest.beam conftest.$ac_ext
5806 fi
5807
5808
5809 fi
5810
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5812 $as_echo "$ac_cv_pthread_is_default" >&6; }
5813
5814
5815 if test $ac_cv_pthread_is_default = yes
5816 then
5817   ac_cv_kpthread=no
5818 else
5819 # -Kpthread, if available, provides the right #defines
5820 # and linker options to make pthread_create available
5821 # Some compilers won't report that they do not support -Kpthread,
5822 # so we need to run a program to see whether it really made the
5823 # function available.
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5825 $as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5826 if test "${ac_cv_kpthread+set}" = set; then :
5827   $as_echo_n "(cached) " >&6
5828 else
5829   ac_save_cc="$CC"
5830 CC="$CC -Kpthread"
5831 if test "$cross_compiling" = yes; then :
5832   ac_cv_kpthread=no
5833 else
5834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5835 /* end confdefs.h.  */
5836
5837 #include <pthread.h>
5838
5839 void* routine(void* p){return NULL;}
5840
5841 int main(){
5842   pthread_t p;
5843   if(pthread_create(&p,NULL,routine,NULL)!=0)
5844     return 1;
5845   (void)pthread_detach(p);
5846   return 0;
5847 }
5848
5849 _ACEOF
5850 if ac_fn_c_try_run "$LINENO"; then :
5851   ac_cv_kpthread=yes
5852 else
5853   ac_cv_kpthread=no
5854 fi
5855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856   conftest.$ac_objext conftest.beam conftest.$ac_ext
5857 fi
5858
5859 CC="$ac_save_cc"
5860 fi
5861
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5863 $as_echo "$ac_cv_kpthread" >&6; }
5864 fi
5865
5866 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5867 then
5868 # -Kthread, if available, provides the right #defines
5869 # and linker options to make pthread_create available
5870 # Some compilers won't report that they do not support -Kthread,
5871 # so we need to run a program to see whether it really made the
5872 # function available.
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5874 $as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5875 if test "${ac_cv_kthread+set}" = set; then :
5876   $as_echo_n "(cached) " >&6
5877 else
5878   ac_save_cc="$CC"
5879 CC="$CC -Kthread"
5880 if test "$cross_compiling" = yes; then :
5881   ac_cv_kthread=no
5882 else
5883   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5884 /* end confdefs.h.  */
5885
5886 #include <pthread.h>
5887
5888 void* routine(void* p){return NULL;}
5889
5890 int main(){
5891   pthread_t p;
5892   if(pthread_create(&p,NULL,routine,NULL)!=0)
5893     return 1;
5894   (void)pthread_detach(p);
5895   return 0;
5896 }
5897
5898 _ACEOF
5899 if ac_fn_c_try_run "$LINENO"; then :
5900   ac_cv_kthread=yes
5901 else
5902   ac_cv_kthread=no
5903 fi
5904 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5905   conftest.$ac_objext conftest.beam conftest.$ac_ext
5906 fi
5907
5908 CC="$ac_save_cc"
5909 fi
5910
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5912 $as_echo "$ac_cv_kthread" >&6; }
5913 fi
5914
5915 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5916 then
5917 # -pthread, if available, provides the right #defines
5918 # and linker options to make pthread_create available
5919 # Some compilers won't report that they do not support -pthread,
5920 # so we need to run a program to see whether it really made the
5921 # function available.
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5923 $as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5924 if test "${ac_cv_thread+set}" = set; then :
5925   $as_echo_n "(cached) " >&6
5926 else
5927   ac_save_cc="$CC"
5928 CC="$CC -pthread"
5929 if test "$cross_compiling" = yes; then :
5930   ac_cv_pthread=no
5931 else
5932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5933 /* end confdefs.h.  */
5934
5935 #include <pthread.h>
5936
5937 void* routine(void* p){return NULL;}
5938
5939 int main(){
5940   pthread_t p;
5941   if(pthread_create(&p,NULL,routine,NULL)!=0)
5942     return 1;
5943   (void)pthread_detach(p);
5944   return 0;
5945 }
5946
5947 _ACEOF
5948 if ac_fn_c_try_run "$LINENO"; then :
5949   ac_cv_pthread=yes
5950 else
5951   ac_cv_pthread=no
5952 fi
5953 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5954   conftest.$ac_objext conftest.beam conftest.$ac_ext
5955 fi
5956
5957 CC="$ac_save_cc"
5958 fi
5959
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5961 $as_echo "$ac_cv_pthread" >&6; }
5962 fi
5963
5964 # If we have set a CC compiler flag for thread support then
5965 # check if it works for CXX, too.
5966 ac_cv_cxx_thread=no
5967 if test ! -z "$CXX"
5968 then
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5970 $as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
5971 ac_save_cxx="$CXX"
5972
5973 if test "$ac_cv_kpthread" = "yes"
5974 then
5975   CXX="$CXX -Kpthread"
5976   ac_cv_cxx_thread=yes
5977 elif test "$ac_cv_kthread" = "yes"
5978 then
5979   CXX="$CXX -Kthread"
5980   ac_cv_cxx_thread=yes
5981 elif test "$ac_cv_pthread" = "yes"
5982 then
5983   CXX="$CXX -pthread"
5984   ac_cv_cxx_thread=yes
5985 fi
5986
5987 if test $ac_cv_cxx_thread = yes
5988 then
5989   echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5990   $CXX -c conftest.$ac_ext 2>&5
5991   if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5992      && test -s conftest$ac_exeext && ./conftest$ac_exeext
5993   then
5994     ac_cv_cxx_thread=yes
5995   else
5996     ac_cv_cxx_thread=no
5997   fi
5998   rm -fr conftest*
5999 fi
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6001 $as_echo "$ac_cv_cxx_thread" >&6; }
6002 fi
6003 CXX="$ac_save_cxx"
6004
6005
6006 # checks for header files
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6008 $as_echo_n "checking for ANSI C header files... " >&6; }
6009 if test "${ac_cv_header_stdc+set}" = set; then :
6010   $as_echo_n "(cached) " >&6
6011 else
6012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6013 /* end confdefs.h.  */
6014 #include <stdlib.h>
6015 #include <stdarg.h>
6016 #include <string.h>
6017 #include <float.h>
6018
6019 int
6020 main ()
6021 {
6022
6023   ;
6024   return 0;
6025 }
6026 _ACEOF
6027 if ac_fn_c_try_compile "$LINENO"; then :
6028   ac_cv_header_stdc=yes
6029 else
6030   ac_cv_header_stdc=no
6031 fi
6032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6033
6034 if test $ac_cv_header_stdc = yes; then
6035   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037 /* end confdefs.h.  */
6038 #include <string.h>
6039
6040 _ACEOF
6041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6042   $EGREP "memchr" >/dev/null 2>&1; then :
6043
6044 else
6045   ac_cv_header_stdc=no
6046 fi
6047 rm -f conftest*
6048
6049 fi
6050
6051 if test $ac_cv_header_stdc = yes; then
6052   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6054 /* end confdefs.h.  */
6055 #include <stdlib.h>
6056
6057 _ACEOF
6058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6059   $EGREP "free" >/dev/null 2>&1; then :
6060
6061 else
6062   ac_cv_header_stdc=no
6063 fi
6064 rm -f conftest*
6065
6066 fi
6067
6068 if test $ac_cv_header_stdc = yes; then
6069   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6070   if test "$cross_compiling" = yes; then :
6071   :
6072 else
6073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6074 /* end confdefs.h.  */
6075 #include <ctype.h>
6076 #include <stdlib.h>
6077 #if ((' ' & 0x0FF) == 0x020)
6078 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6079 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6080 #else
6081 # define ISLOWER(c) \
6082                    (('a' <= (c) && (c) <= 'i') \
6083                      || ('j' <= (c) && (c) <= 'r') \
6084                      || ('s' <= (c) && (c) <= 'z'))
6085 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6086 #endif
6087
6088 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6089 int
6090 main ()
6091 {
6092   int i;
6093   for (i = 0; i < 256; i++)
6094     if (XOR (islower (i), ISLOWER (i))
6095         || toupper (i) != TOUPPER (i))
6096       return 2;
6097   return 0;
6098 }
6099 _ACEOF
6100 if ac_fn_c_try_run "$LINENO"; then :
6101
6102 else
6103   ac_cv_header_stdc=no
6104 fi
6105 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6106   conftest.$ac_objext conftest.beam conftest.$ac_ext
6107 fi
6108
6109 fi
6110 fi
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6112 $as_echo "$ac_cv_header_stdc" >&6; }
6113 if test $ac_cv_header_stdc = yes; then
6114
6115 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6116
6117 fi
6118
6119 for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6120 fcntl.h grp.h \
6121 ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
6122 shadow.h signal.h stdint.h stropts.h termios.h thread.h \
6123 unistd.h utime.h \
6124 sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6125 sys/lock.h sys/mkdev.h sys/modem.h \
6126 sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
6127 sys/termio.h sys/time.h \
6128 sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
6129 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
6130 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
6131 do :
6132   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6133 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6134 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6135   cat >>confdefs.h <<_ACEOF
6136 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6137 _ACEOF
6138
6139 fi
6140
6141 done
6142
6143 ac_header_dirent=no
6144 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6145   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6147 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6148 if eval "test \"\${$as_ac_Header+set}\"" = set; then :
6149   $as_echo_n "(cached) " >&6
6150 else
6151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6152 /* end confdefs.h.  */
6153 #include <sys/types.h>
6154 #include <$ac_hdr>
6155
6156 int
6157 main ()
6158 {
6159 if ((DIR *) 0)
6160 return 0;
6161   ;
6162   return 0;
6163 }
6164 _ACEOF
6165 if ac_fn_c_try_compile "$LINENO"; then :
6166   eval "$as_ac_Header=yes"
6167 else
6168   eval "$as_ac_Header=no"
6169 fi
6170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6171 fi
6172 eval ac_res=\$$as_ac_Header
6173                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6174 $as_echo "$ac_res" >&6; }
6175 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6176   cat >>confdefs.h <<_ACEOF
6177 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6178 _ACEOF
6179
6180 ac_header_dirent=$ac_hdr; break
6181 fi
6182
6183 done
6184 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6185 if test $ac_header_dirent = dirent.h; then
6186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6187 $as_echo_n "checking for library containing opendir... " >&6; }
6188 if test "${ac_cv_search_opendir+set}" = set; then :
6189   $as_echo_n "(cached) " >&6
6190 else
6191   ac_func_search_save_LIBS=$LIBS
6192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6193 /* end confdefs.h.  */
6194
6195 /* Override any GCC internal prototype to avoid an error.
6196    Use char because int might match the return type of a GCC
6197    builtin and then its argument prototype would still apply.  */
6198 #ifdef __cplusplus
6199 extern "C"
6200 #endif
6201 char opendir ();
6202 int
6203 main ()
6204 {
6205 return opendir ();
6206   ;
6207   return 0;
6208 }
6209 _ACEOF
6210 for ac_lib in '' dir; do
6211   if test -z "$ac_lib"; then
6212     ac_res="none required"
6213   else
6214     ac_res=-l$ac_lib
6215     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6216   fi
6217   if ac_fn_c_try_link "$LINENO"; then :
6218   ac_cv_search_opendir=$ac_res
6219 fi
6220 rm -f core conftest.err conftest.$ac_objext \
6221     conftest$ac_exeext
6222   if test "${ac_cv_search_opendir+set}" = set; then :
6223   break
6224 fi
6225 done
6226 if test "${ac_cv_search_opendir+set}" = set; then :
6227
6228 else
6229   ac_cv_search_opendir=no
6230 fi
6231 rm conftest.$ac_ext
6232 LIBS=$ac_func_search_save_LIBS
6233 fi
6234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6235 $as_echo "$ac_cv_search_opendir" >&6; }
6236 ac_res=$ac_cv_search_opendir
6237 if test "$ac_res" != no; then :
6238   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6239
6240 fi
6241
6242 else
6243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6244 $as_echo_n "checking for library containing opendir... " >&6; }
6245 if test "${ac_cv_search_opendir+set}" = set; then :
6246   $as_echo_n "(cached) " >&6
6247 else
6248   ac_func_search_save_LIBS=$LIBS
6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250 /* end confdefs.h.  */
6251
6252 /* Override any GCC internal prototype to avoid an error.
6253    Use char because int might match the return type of a GCC
6254    builtin and then its argument prototype would still apply.  */
6255 #ifdef __cplusplus
6256 extern "C"
6257 #endif
6258 char opendir ();
6259 int
6260 main ()
6261 {
6262 return opendir ();
6263   ;
6264   return 0;
6265 }
6266 _ACEOF
6267 for ac_lib in '' x; do
6268   if test -z "$ac_lib"; then
6269     ac_res="none required"
6270   else
6271     ac_res=-l$ac_lib
6272     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6273   fi
6274   if ac_fn_c_try_link "$LINENO"; then :
6275   ac_cv_search_opendir=$ac_res
6276 fi
6277 rm -f core conftest.err conftest.$ac_objext \
6278     conftest$ac_exeext
6279   if test "${ac_cv_search_opendir+set}" = set; then :
6280   break
6281 fi
6282 done
6283 if test "${ac_cv_search_opendir+set}" = set; then :
6284
6285 else
6286   ac_cv_search_opendir=no
6287 fi
6288 rm conftest.$ac_ext
6289 LIBS=$ac_func_search_save_LIBS
6290 fi
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6292 $as_echo "$ac_cv_search_opendir" >&6; }
6293 ac_res=$ac_cv_search_opendir
6294 if test "$ac_res" != no; then :
6295   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6296
6297 fi
6298
6299 fi
6300
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6302 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6303 if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6304   $as_echo_n "(cached) " >&6
6305 else
6306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307 /* end confdefs.h.  */
6308 #include <sys/types.h>
6309 int
6310 main ()
6311 {
6312 return makedev(0, 0);
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 if ac_fn_c_try_link "$LINENO"; then :
6318   ac_cv_header_sys_types_h_makedev=yes
6319 else
6320   ac_cv_header_sys_types_h_makedev=no
6321 fi
6322 rm -f core conftest.err conftest.$ac_objext \
6323     conftest$ac_exeext conftest.$ac_ext
6324
6325 fi
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6327 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
6328
6329 if test $ac_cv_header_sys_types_h_makedev = no; then
6330 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6331 if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
6332
6333 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
6334
6335 fi
6336
6337
6338
6339   if test $ac_cv_header_sys_mkdev_h = no; then
6340     ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6341 if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
6342
6343 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
6344
6345 fi
6346
6347
6348   fi
6349 fi
6350
6351
6352 # On Solaris, term.h requires curses.h
6353 for ac_header in term.h
6354 do :
6355   ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
6356 #ifdef HAVE_CURSES_H
6357 #include <curses.h>
6358 #endif
6359
6360 "
6361 if test "x$ac_cv_header_term_h" = x""yes; then :
6362   cat >>confdefs.h <<_ACEOF
6363 #define HAVE_TERM_H 1
6364 _ACEOF
6365
6366 fi
6367
6368 done
6369
6370
6371 # On Linux, netlink.h requires asm/types.h
6372 for ac_header in linux/netlink.h
6373 do :
6374   ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
6375 #ifdef HAVE_ASM_TYPES_H
6376 #include <asm/types.h>
6377 #endif
6378 #ifdef HAVE_SYS_SOCKET_H
6379 #include <sys/socket.h>
6380 #endif
6381
6382 "
6383 if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
6384   cat >>confdefs.h <<_ACEOF
6385 #define HAVE_LINUX_NETLINK_H 1
6386 _ACEOF
6387
6388 fi
6389
6390 done
6391
6392
6393 # checks for typedefs
6394 was_it_defined=no
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6396 $as_echo_n "checking for clock_t in time.h... " >&6; }
6397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6398 /* end confdefs.h.  */
6399 #include <time.h>
6400
6401 _ACEOF
6402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6403   $EGREP "clock_t" >/dev/null 2>&1; then :
6404   was_it_defined=yes
6405 else
6406
6407
6408 $as_echo "#define clock_t long" >>confdefs.h
6409
6410
6411 fi
6412 rm -f conftest*
6413
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6415 $as_echo "$was_it_defined" >&6; }
6416
6417 # Check whether using makedev requires defining _OSF_SOURCE
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6419 $as_echo_n "checking for makedev... " >&6; }
6420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6421 /* end confdefs.h.  */
6422
6423 #if defined(MAJOR_IN_MKDEV)
6424 #include <sys/mkdev.h>
6425 #elif defined(MAJOR_IN_SYSMACROS)
6426 #include <sys/sysmacros.h>
6427 #else
6428 #include <sys/types.h>
6429 #endif
6430 int
6431 main ()
6432 {
6433  makedev(0, 0)
6434   ;
6435   return 0;
6436 }
6437 _ACEOF
6438 if ac_fn_c_try_link "$LINENO"; then :
6439   ac_cv_has_makedev=yes
6440 else
6441   ac_cv_has_makedev=no
6442 fi
6443 rm -f core conftest.err conftest.$ac_objext \
6444     conftest$ac_exeext conftest.$ac_ext
6445 if test "$ac_cv_has_makedev" = "no"; then
6446     # we didn't link, try if _OSF_SOURCE will allow us to link
6447     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448 /* end confdefs.h.  */
6449
6450 #define _OSF_SOURCE 1
6451 #include <sys/types.h>
6452
6453 int
6454 main ()
6455 {
6456  makedev(0, 0)
6457   ;
6458   return 0;
6459 }
6460 _ACEOF
6461 if ac_fn_c_try_link "$LINENO"; then :
6462   ac_cv_has_makedev=yes
6463 else
6464   ac_cv_has_makedev=no
6465 fi
6466 rm -f core conftest.err conftest.$ac_objext \
6467     conftest$ac_exeext conftest.$ac_ext
6468     if test "$ac_cv_has_makedev" = "yes"; then
6469
6470 $as_echo "#define _OSF_SOURCE 1" >>confdefs.h
6471
6472     fi
6473 fi
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6475 $as_echo "$ac_cv_has_makedev" >&6; }
6476 if test "$ac_cv_has_makedev" = "yes"; then
6477
6478 $as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
6479
6480 fi
6481
6482 # Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6483 # the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6484 # defined, but the compiler does not support pragma redefine_extname,
6485 # and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6486 # structures (such as rlimit64) without declaring them. As a
6487 # work-around, disable LFS on such configurations
6488
6489 use_lfs=yes
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6491 $as_echo_n "checking Solaris LFS bug... " >&6; }
6492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6493 /* end confdefs.h.  */
6494
6495 #define _LARGEFILE_SOURCE 1
6496 #define _FILE_OFFSET_BITS 64
6497 #include <sys/resource.h>
6498
6499 int
6500 main ()
6501 {
6502 struct rlimit foo;
6503   ;
6504   return 0;
6505 }
6506 _ACEOF
6507 if ac_fn_c_try_compile "$LINENO"; then :
6508   sol_lfs_bug=no
6509 else
6510   sol_lfs_bug=yes
6511 fi
6512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6514 $as_echo "$sol_lfs_bug" >&6; }
6515 if test "$sol_lfs_bug" = "yes"; then
6516   use_lfs=no
6517 fi
6518
6519 if test "$use_lfs" = "yes"; then
6520 # Two defines needed to enable largefile support on various platforms
6521 # These may affect some typedefs
6522 case $ac_sys_system/$ac_sys_release in
6523 AIX*)
6524
6525 $as_echo "#define _LARGE_FILES 1" >>confdefs.h
6526
6527     ;;
6528 esac
6529
6530 $as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
6531
6532
6533 $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
6534
6535 fi
6536
6537 # Add some code to confdefs.h so that the test for off_t works on SCO
6538 cat >> confdefs.h <<\EOF
6539 #if defined(SCO_DS)
6540 #undef _OFF_T
6541 #endif
6542 EOF
6543
6544 # Type availability checks
6545 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6546 if test "x$ac_cv_type_mode_t" = x""yes; then :
6547
6548 else
6549
6550 cat >>confdefs.h <<_ACEOF
6551 #define mode_t int
6552 _ACEOF
6553
6554 fi
6555
6556 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6557 if test "x$ac_cv_type_off_t" = x""yes; then :
6558
6559 else
6560
6561 cat >>confdefs.h <<_ACEOF
6562 #define off_t long int
6563 _ACEOF
6564
6565 fi
6566
6567 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6568 if test "x$ac_cv_type_pid_t" = x""yes; then :
6569
6570 else
6571
6572 cat >>confdefs.h <<_ACEOF
6573 #define pid_t int
6574 _ACEOF
6575
6576 fi
6577
6578
6579 cat >>confdefs.h <<_ACEOF
6580 #define RETSIGTYPE void
6581 _ACEOF
6582
6583 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6584 if test "x$ac_cv_type_size_t" = x""yes; then :
6585
6586 else
6587
6588 cat >>confdefs.h <<_ACEOF
6589 #define size_t unsigned int
6590 _ACEOF
6591
6592 fi
6593
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6595 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6596 if test "${ac_cv_type_uid_t+set}" = set; then :
6597   $as_echo_n "(cached) " >&6
6598 else
6599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6600 /* end confdefs.h.  */
6601 #include <sys/types.h>
6602
6603 _ACEOF
6604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6605   $EGREP "uid_t" >/dev/null 2>&1; then :
6606   ac_cv_type_uid_t=yes
6607 else
6608   ac_cv_type_uid_t=no
6609 fi
6610 rm -f conftest*
6611
6612 fi
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6614 $as_echo "$ac_cv_type_uid_t" >&6; }
6615 if test $ac_cv_type_uid_t = no; then
6616
6617 $as_echo "#define uid_t int" >>confdefs.h
6618
6619
6620 $as_echo "#define gid_t int" >>confdefs.h
6621
6622 fi
6623
6624 ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6625 case $ac_cv_c_uint32_t in #(
6626   no|yes) ;; #(
6627   *)
6628
6629 $as_echo "#define _UINT32_T 1" >>confdefs.h
6630
6631
6632 cat >>confdefs.h <<_ACEOF
6633 #define uint32_t $ac_cv_c_uint32_t
6634 _ACEOF
6635 ;;
6636   esac
6637
6638 ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6639 case $ac_cv_c_uint64_t in #(
6640   no|yes) ;; #(
6641   *)
6642
6643 $as_echo "#define _UINT64_T 1" >>confdefs.h
6644
6645
6646 cat >>confdefs.h <<_ACEOF
6647 #define uint64_t $ac_cv_c_uint64_t
6648 _ACEOF
6649 ;;
6650   esac
6651
6652 ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6653 case $ac_cv_c_int32_t in #(
6654   no|yes) ;; #(
6655   *)
6656
6657 cat >>confdefs.h <<_ACEOF
6658 #define int32_t $ac_cv_c_int32_t
6659 _ACEOF
6660 ;;
6661 esac
6662
6663 ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6664 case $ac_cv_c_int64_t in #(
6665   no|yes) ;; #(
6666   *)
6667
6668 cat >>confdefs.h <<_ACEOF
6669 #define int64_t $ac_cv_c_int64_t
6670 _ACEOF
6671 ;;
6672 esac
6673
6674 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6675 if test "x$ac_cv_type_ssize_t" = x""yes; then :
6676
6677 $as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
6678
6679 fi
6680
6681
6682 # Sizes of various common basic types
6683 # ANSI C requires sizeof(char) == 1, so no need to check it
6684 # The cast to long int works around a bug in the HP C Compiler
6685 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6686 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6687 # This bug is HP SR number 8606223364.
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6689 $as_echo_n "checking size of int... " >&6; }
6690 if test "${ac_cv_sizeof_int+set}" = set; then :
6691   $as_echo_n "(cached) " >&6
6692 else
6693   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
6694
6695 else
6696   if test "$ac_cv_type_int" = yes; then
6697      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6698 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6699 as_fn_error 77 "cannot compute sizeof (int)
6700 See \`config.log' for more details" "$LINENO" 5 ; }
6701    else
6702      ac_cv_sizeof_int=0
6703    fi
6704 fi
6705
6706 fi
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6708 $as_echo "$ac_cv_sizeof_int" >&6; }
6709
6710
6711
6712 cat >>confdefs.h <<_ACEOF
6713 #define SIZEOF_INT $ac_cv_sizeof_int
6714 _ACEOF
6715
6716
6717 # The cast to long int works around a bug in the HP C Compiler
6718 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6719 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6720 # This bug is HP SR number 8606223364.
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6722 $as_echo_n "checking size of long... " >&6; }
6723 if test "${ac_cv_sizeof_long+set}" = set; then :
6724   $as_echo_n "(cached) " >&6
6725 else
6726   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
6727
6728 else
6729   if test "$ac_cv_type_long" = yes; then
6730      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6731 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6732 as_fn_error 77 "cannot compute sizeof (long)
6733 See \`config.log' for more details" "$LINENO" 5 ; }
6734    else
6735      ac_cv_sizeof_long=0
6736    fi
6737 fi
6738
6739 fi
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6741 $as_echo "$ac_cv_sizeof_long" >&6; }
6742
6743
6744
6745 cat >>confdefs.h <<_ACEOF
6746 #define SIZEOF_LONG $ac_cv_sizeof_long
6747 _ACEOF
6748
6749
6750 # The cast to long int works around a bug in the HP C Compiler
6751 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6752 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6753 # This bug is HP SR number 8606223364.
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6755 $as_echo_n "checking size of void *... " >&6; }
6756 if test "${ac_cv_sizeof_void_p+set}" = set; then :
6757   $as_echo_n "(cached) " >&6
6758 else
6759   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
6760
6761 else
6762   if test "$ac_cv_type_void_p" = yes; then
6763      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6764 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6765 as_fn_error 77 "cannot compute sizeof (void *)
6766 See \`config.log' for more details" "$LINENO" 5 ; }
6767    else
6768      ac_cv_sizeof_void_p=0
6769    fi
6770 fi
6771
6772 fi
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6774 $as_echo "$ac_cv_sizeof_void_p" >&6; }
6775
6776
6777
6778 cat >>confdefs.h <<_ACEOF
6779 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
6780 _ACEOF
6781
6782
6783 # The cast to long int works around a bug in the HP C Compiler
6784 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6785 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6786 # This bug is HP SR number 8606223364.
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6788 $as_echo_n "checking size of short... " >&6; }
6789 if test "${ac_cv_sizeof_short+set}" = set; then :
6790   $as_echo_n "(cached) " >&6
6791 else
6792   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
6793
6794 else
6795   if test "$ac_cv_type_short" = yes; then
6796      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6797 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6798 as_fn_error 77 "cannot compute sizeof (short)
6799 See \`config.log' for more details" "$LINENO" 5 ; }
6800    else
6801      ac_cv_sizeof_short=0
6802    fi
6803 fi
6804
6805 fi
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6807 $as_echo "$ac_cv_sizeof_short" >&6; }
6808
6809
6810
6811 cat >>confdefs.h <<_ACEOF
6812 #define SIZEOF_SHORT $ac_cv_sizeof_short
6813 _ACEOF
6814
6815
6816 # The cast to long int works around a bug in the HP C Compiler
6817 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6818 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6819 # This bug is HP SR number 8606223364.
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6821 $as_echo_n "checking size of float... " >&6; }
6822 if test "${ac_cv_sizeof_float+set}" = set; then :
6823   $as_echo_n "(cached) " >&6
6824 else
6825   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float"        "$ac_includes_default"; then :
6826
6827 else
6828   if test "$ac_cv_type_float" = yes; then
6829      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6830 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6831 as_fn_error 77 "cannot compute sizeof (float)
6832 See \`config.log' for more details" "$LINENO" 5 ; }
6833    else
6834      ac_cv_sizeof_float=0
6835    fi
6836 fi
6837
6838 fi
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6840 $as_echo "$ac_cv_sizeof_float" >&6; }
6841
6842
6843
6844 cat >>confdefs.h <<_ACEOF
6845 #define SIZEOF_FLOAT $ac_cv_sizeof_float
6846 _ACEOF
6847
6848
6849 # The cast to long int works around a bug in the HP C Compiler
6850 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6851 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6852 # This bug is HP SR number 8606223364.
6853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6854 $as_echo_n "checking size of double... " >&6; }
6855 if test "${ac_cv_sizeof_double+set}" = set; then :
6856   $as_echo_n "(cached) " >&6
6857 else
6858   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double"        "$ac_includes_default"; then :
6859
6860 else
6861   if test "$ac_cv_type_double" = yes; then
6862      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6863 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6864 as_fn_error 77 "cannot compute sizeof (double)
6865 See \`config.log' for more details" "$LINENO" 5 ; }
6866    else
6867      ac_cv_sizeof_double=0
6868    fi
6869 fi
6870
6871 fi
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6873 $as_echo "$ac_cv_sizeof_double" >&6; }
6874
6875
6876
6877 cat >>confdefs.h <<_ACEOF
6878 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
6879 _ACEOF
6880
6881
6882 # The cast to long int works around a bug in the HP C Compiler
6883 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6884 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6885 # This bug is HP SR number 8606223364.
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6887 $as_echo_n "checking size of fpos_t... " >&6; }
6888 if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6889   $as_echo_n "(cached) " >&6
6890 else
6891   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t"        "$ac_includes_default"; then :
6892
6893 else
6894   if test "$ac_cv_type_fpos_t" = yes; then
6895      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6896 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6897 as_fn_error 77 "cannot compute sizeof (fpos_t)
6898 See \`config.log' for more details" "$LINENO" 5 ; }
6899    else
6900      ac_cv_sizeof_fpos_t=0
6901    fi
6902 fi
6903
6904 fi
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6906 $as_echo "$ac_cv_sizeof_fpos_t" >&6; }
6907
6908
6909
6910 cat >>confdefs.h <<_ACEOF
6911 #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
6912 _ACEOF
6913
6914
6915 # The cast to long int works around a bug in the HP C Compiler
6916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918 # This bug is HP SR number 8606223364.
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6920 $as_echo_n "checking size of size_t... " >&6; }
6921 if test "${ac_cv_sizeof_size_t+set}" = set; then :
6922   $as_echo_n "(cached) " >&6
6923 else
6924   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
6925
6926 else
6927   if test "$ac_cv_type_size_t" = yes; then
6928      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6930 as_fn_error 77 "cannot compute sizeof (size_t)
6931 See \`config.log' for more details" "$LINENO" 5 ; }
6932    else
6933      ac_cv_sizeof_size_t=0
6934    fi
6935 fi
6936
6937 fi
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6939 $as_echo "$ac_cv_sizeof_size_t" >&6; }
6940
6941
6942
6943 cat >>confdefs.h <<_ACEOF
6944 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6945 _ACEOF
6946
6947
6948 # The cast to long int works around a bug in the HP C Compiler
6949 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6950 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6951 # This bug is HP SR number 8606223364.
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6953 $as_echo_n "checking size of pid_t... " >&6; }
6954 if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6955   $as_echo_n "(cached) " >&6
6956 else
6957   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t"        "$ac_includes_default"; then :
6958
6959 else
6960   if test "$ac_cv_type_pid_t" = yes; then
6961      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6963 as_fn_error 77 "cannot compute sizeof (pid_t)
6964 See \`config.log' for more details" "$LINENO" 5 ; }
6965    else
6966      ac_cv_sizeof_pid_t=0
6967    fi
6968 fi
6969
6970 fi
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6972 $as_echo "$ac_cv_sizeof_pid_t" >&6; }
6973
6974
6975
6976 cat >>confdefs.h <<_ACEOF
6977 #define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6978 _ACEOF
6979
6980
6981
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6983 $as_echo_n "checking for long long support... " >&6; }
6984 have_long_long=no
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986 /* end confdefs.h.  */
6987
6988 int
6989 main ()
6990 {
6991 long long x; x = (long long)0;
6992   ;
6993   return 0;
6994 }
6995 _ACEOF
6996 if ac_fn_c_try_compile "$LINENO"; then :
6997
6998
6999 $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
7000
7001   have_long_long=yes
7002
7003 fi
7004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7006 $as_echo "$have_long_long" >&6; }
7007 if test "$have_long_long" = yes ; then
7008 # The cast to long int works around a bug in the HP C Compiler
7009 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7010 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7011 # This bug is HP SR number 8606223364.
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7013 $as_echo_n "checking size of long long... " >&6; }
7014 if test "${ac_cv_sizeof_long_long+set}" = set; then :
7015   $as_echo_n "(cached) " >&6
7016 else
7017   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
7018
7019 else
7020   if test "$ac_cv_type_long_long" = yes; then
7021      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7022 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7023 as_fn_error 77 "cannot compute sizeof (long long)
7024 See \`config.log' for more details" "$LINENO" 5 ; }
7025    else
7026      ac_cv_sizeof_long_long=0
7027    fi
7028 fi
7029
7030 fi
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7032 $as_echo "$ac_cv_sizeof_long_long" >&6; }
7033
7034
7035
7036 cat >>confdefs.h <<_ACEOF
7037 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
7038 _ACEOF
7039
7040
7041 fi
7042
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7044 $as_echo_n "checking for long double support... " >&6; }
7045 have_long_double=no
7046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7047 /* end confdefs.h.  */
7048
7049 int
7050 main ()
7051 {
7052 long double x; x = (long double)0;
7053   ;
7054   return 0;
7055 }
7056 _ACEOF
7057 if ac_fn_c_try_compile "$LINENO"; then :
7058
7059
7060 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
7061
7062   have_long_double=yes
7063
7064 fi
7065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7067 $as_echo "$have_long_double" >&6; }
7068 if test "$have_long_double" = yes ; then
7069 # The cast to long int works around a bug in the HP C Compiler
7070 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7071 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7072 # This bug is HP SR number 8606223364.
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7074 $as_echo_n "checking size of long double... " >&6; }
7075 if test "${ac_cv_sizeof_long_double+set}" = set; then :
7076   $as_echo_n "(cached) " >&6
7077 else
7078   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double"        "$ac_includes_default"; then :
7079
7080 else
7081   if test "$ac_cv_type_long_double" = yes; then
7082      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7083 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7084 as_fn_error 77 "cannot compute sizeof (long double)
7085 See \`config.log' for more details" "$LINENO" 5 ; }
7086    else
7087      ac_cv_sizeof_long_double=0
7088    fi
7089 fi
7090
7091 fi
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7093 $as_echo "$ac_cv_sizeof_long_double" >&6; }
7094
7095
7096
7097 cat >>confdefs.h <<_ACEOF
7098 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7099 _ACEOF
7100
7101
7102 fi
7103
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7105 $as_echo_n "checking for _Bool support... " >&6; }
7106 have_c99_bool=no
7107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7108 /* end confdefs.h.  */
7109
7110 int
7111 main ()
7112 {
7113 _Bool x; x = (_Bool)0;
7114   ;
7115   return 0;
7116 }
7117 _ACEOF
7118 if ac_fn_c_try_compile "$LINENO"; then :
7119
7120
7121 $as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
7122
7123   have_c99_bool=yes
7124
7125 fi
7126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7128 $as_echo "$have_c99_bool" >&6; }
7129 if test "$have_c99_bool" = yes ; then
7130 # The cast to long int works around a bug in the HP C Compiler
7131 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7132 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7133 # This bug is HP SR number 8606223364.
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7135 $as_echo_n "checking size of _Bool... " >&6; }
7136 if test "${ac_cv_sizeof__Bool+set}" = set; then :
7137   $as_echo_n "(cached) " >&6
7138 else
7139   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool"        "$ac_includes_default"; then :
7140
7141 else
7142   if test "$ac_cv_type__Bool" = yes; then
7143      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7144 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7145 as_fn_error 77 "cannot compute sizeof (_Bool)
7146 See \`config.log' for more details" "$LINENO" 5 ; }
7147    else
7148      ac_cv_sizeof__Bool=0
7149    fi
7150 fi
7151
7152 fi
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7154 $as_echo "$ac_cv_sizeof__Bool" >&6; }
7155
7156
7157
7158 cat >>confdefs.h <<_ACEOF
7159 #define SIZEOF__BOOL $ac_cv_sizeof__Bool
7160 _ACEOF
7161
7162
7163 fi
7164
7165 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
7166         #include <stdint.h>
7167         #endif
7168         #ifdef HAVE_INTTYPES_H
7169         #include <inttypes.h>
7170         #endif
7171 "
7172 if test "x$ac_cv_type_uintptr_t" = x""yes; then :
7173
7174 cat >>confdefs.h <<_ACEOF
7175 #define HAVE_UINTPTR_T 1
7176 _ACEOF
7177
7178 # The cast to long int works around a bug in the HP C Compiler
7179 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7180 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7181 # This bug is HP SR number 8606223364.
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7183 $as_echo_n "checking size of uintptr_t... " >&6; }
7184 if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7185   $as_echo_n "(cached) " >&6
7186 else
7187   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t"        "$ac_includes_default"; then :
7188
7189 else
7190   if test "$ac_cv_type_uintptr_t" = yes; then
7191      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7193 as_fn_error 77 "cannot compute sizeof (uintptr_t)
7194 See \`config.log' for more details" "$LINENO" 5 ; }
7195    else
7196      ac_cv_sizeof_uintptr_t=0
7197    fi
7198 fi
7199
7200 fi
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7202 $as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
7203
7204
7205
7206 cat >>confdefs.h <<_ACEOF
7207 #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
7208 _ACEOF
7209
7210
7211 fi
7212
7213
7214 # The cast to long int works around a bug in the HP C Compiler
7215 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7216 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7217 # This bug is HP SR number 8606223364.
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7219 $as_echo_n "checking size of off_t... " >&6; }
7220 if test "${ac_cv_sizeof_off_t+set}" = set; then :
7221   $as_echo_n "(cached) " >&6
7222 else
7223   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "
7224 #ifdef HAVE_SYS_TYPES_H
7225 #include <sys/types.h>
7226 #endif
7227
7228 "; then :
7229
7230 else
7231   if test "$ac_cv_type_off_t" = yes; then
7232      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7233 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7234 as_fn_error 77 "cannot compute sizeof (off_t)
7235 See \`config.log' for more details" "$LINENO" 5 ; }
7236    else
7237      ac_cv_sizeof_off_t=0
7238    fi
7239 fi
7240
7241 fi
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7243 $as_echo "$ac_cv_sizeof_off_t" >&6; }
7244
7245
7246
7247 cat >>confdefs.h <<_ACEOF
7248 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
7249 _ACEOF
7250
7251
7252
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7254 $as_echo_n "checking whether to enable large file support... " >&6; }
7255 if test "$have_long_long" = yes
7256 then
7257 if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
7258         "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
7259
7260 $as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
7261
7262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7263 $as_echo "yes" >&6; }
7264 else
7265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7266 $as_echo "no" >&6; }
7267 fi
7268 else
7269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270 $as_echo "no" >&6; }
7271 fi
7272
7273 # The cast to long int works around a bug in the HP C Compiler
7274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7276 # This bug is HP SR number 8606223364.
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7278 $as_echo_n "checking size of time_t... " >&6; }
7279 if test "${ac_cv_sizeof_time_t+set}" = set; then :
7280   $as_echo_n "(cached) " >&6
7281 else
7282   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
7283 #ifdef HAVE_SYS_TYPES_H
7284 #include <sys/types.h>
7285 #endif
7286 #ifdef HAVE_TIME_H
7287 #include <time.h>
7288 #endif
7289
7290 "; then :
7291
7292 else
7293   if test "$ac_cv_type_time_t" = yes; then
7294      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7295 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7296 as_fn_error 77 "cannot compute sizeof (time_t)
7297 See \`config.log' for more details" "$LINENO" 5 ; }
7298    else
7299      ac_cv_sizeof_time_t=0
7300    fi
7301 fi
7302
7303 fi
7304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7305 $as_echo "$ac_cv_sizeof_time_t" >&6; }
7306
7307
7308
7309 cat >>confdefs.h <<_ACEOF
7310 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
7311 _ACEOF
7312
7313
7314
7315 # if have pthread_t then define SIZEOF_PTHREAD_T
7316 ac_save_cc="$CC"
7317 if test "$ac_cv_kpthread" = "yes"
7318 then CC="$CC -Kpthread"
7319 elif test "$ac_cv_kthread" = "yes"
7320 then CC="$CC -Kthread"
7321 elif test "$ac_cv_pthread" = "yes"
7322 then CC="$CC -pthread"
7323 fi
7324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7325 $as_echo_n "checking for pthread_t... " >&6; }
7326 have_pthread_t=no
7327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328 /* end confdefs.h.  */
7329
7330   #include <pthread.h>
7331 int
7332 main ()
7333 {
7334 pthread_t x; x = *(pthread_t*)0;
7335   ;
7336   return 0;
7337 }
7338
7339 _ACEOF
7340 if ac_fn_c_try_compile "$LINENO"; then :
7341   have_pthread_t=yes
7342 fi
7343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7345 $as_echo "$have_pthread_t" >&6; }
7346 if test "$have_pthread_t" = yes ; then
7347   # The cast to long int works around a bug in the HP C Compiler
7348 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7349 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7350 # This bug is HP SR number 8606223364.
7351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7352 $as_echo_n "checking size of pthread_t... " >&6; }
7353 if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7354   $as_echo_n "(cached) " >&6
7355 else
7356   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
7357 #ifdef HAVE_PTHREAD_H
7358 #include <pthread.h>
7359 #endif
7360
7361 "; then :
7362
7363 else
7364   if test "$ac_cv_type_pthread_t" = yes; then
7365      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7366 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7367 as_fn_error 77 "cannot compute sizeof (pthread_t)
7368 See \`config.log' for more details" "$LINENO" 5 ; }
7369    else
7370      ac_cv_sizeof_pthread_t=0
7371    fi
7372 fi
7373
7374 fi
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7376 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
7377
7378
7379
7380 cat >>confdefs.h <<_ACEOF
7381 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
7382 _ACEOF
7383
7384
7385 fi
7386 CC="$ac_save_cc"
7387
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7389 $as_echo_n "checking for --enable-toolbox-glue... " >&6; }
7390 # Check whether --enable-toolbox-glue was given.
7391 if test "${enable_toolbox_glue+set}" = set; then :
7392   enableval=$enable_toolbox_glue;
7393 fi
7394
7395
7396 if test -z "$enable_toolbox_glue"
7397 then
7398         case $ac_sys_system/$ac_sys_release in
7399         Darwin/*)
7400                 enable_toolbox_glue="yes";;
7401         *)
7402                 enable_toolbox_glue="no";;
7403         esac
7404 fi
7405 case "$enable_toolbox_glue" in
7406 yes)
7407         extra_machdep_objs="Python/mactoolboxglue.o"
7408         extra_undefs="-u _PyMac_Error"
7409
7410 $as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
7411
7412         ;;
7413 *)
7414         extra_machdep_objs=""
7415         extra_undefs=""
7416         ;;
7417 esac
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7419 $as_echo "$enable_toolbox_glue" >&6; }
7420
7421
7422
7423 case $ac_sys_system/$ac_sys_release in
7424   Darwin/[01567]\..*)
7425     OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7426     ;;
7427   Darwin/*)
7428     OTHER_LIBTOOL_OPT=""
7429     ;;
7430 esac
7431
7432
7433 ARCH_RUN_32BIT=""
7434
7435 case $ac_sys_system/$ac_sys_release in
7436   Darwin/[01567]\..*)
7437     LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7438     if test "${enable_universalsdk}"; then
7439             :
7440     else
7441         LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
7442     fi
7443     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7444     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
7445   Darwin/*)
7446     gcc_version=`gcc -dumpversion`
7447     if test ${gcc_version} '<' 4.0
7448         then
7449             LIBTOOL_CRUFT="-lcc_dynamic"
7450         else
7451             LIBTOOL_CRUFT=""
7452     fi
7453     if test "$cross_compiling" = yes; then :
7454   ac_osx_32bit=yes
7455 else
7456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7457 /* end confdefs.h.  */
7458
7459     #include <unistd.h>
7460     int main(int argc, char*argv[])
7461     {
7462       if (sizeof(long) == 4) {
7463           return 0;
7464       } else {
7465           return 1;
7466       }
7467     }
7468
7469 _ACEOF
7470 if ac_fn_c_try_run "$LINENO"; then :
7471   ac_osx_32bit=yes
7472 else
7473   ac_osx_32bit=no
7474 fi
7475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7476   conftest.$ac_objext conftest.beam conftest.$ac_ext
7477 fi
7478
7479
7480     if test "${ac_osx_32bit}" = "yes"; then
7481         case `/usr/bin/arch` in
7482         i386)
7483                 MACOSX_DEFAULT_ARCH="i386"
7484                 ;;
7485         ppc)
7486                 MACOSX_DEFAULT_ARCH="ppc"
7487                 ;;
7488         *)
7489                 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
7490                 ;;
7491         esac
7492     else
7493         case `/usr/bin/arch` in
7494         i386)
7495                 MACOSX_DEFAULT_ARCH="x86_64"
7496                 ;;
7497         ppc)
7498                 MACOSX_DEFAULT_ARCH="ppc64"
7499                 ;;
7500         *)
7501                 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
7502                 ;;
7503         esac
7504
7505         #ARCH_RUN_32BIT="true"
7506     fi
7507
7508     LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
7509     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7510     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
7511 esac
7512
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7514 $as_echo_n "checking for --enable-framework... " >&6; }
7515 if test "$enable_framework"
7516 then
7517         BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
7518         # -F. is needed to allow linking to the framework while
7519         # in the build location.
7520
7521 $as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
7522
7523         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7524 $as_echo "yes" >&6; }
7525         if test $enable_shared = "yes"
7526         then
7527                 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
7528         fi
7529 else
7530         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531 $as_echo "no" >&6; }
7532 fi
7533
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7535 $as_echo_n "checking for dyld... " >&6; }
7536 case $ac_sys_system/$ac_sys_release in
7537   Darwin/*)
7538
7539 $as_echo "#define WITH_DYLD 1" >>confdefs.h
7540
7541         { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7542 $as_echo "always on for Darwin" >&6; }
7543         ;;
7544   *)
7545         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546 $as_echo "no" >&6; }
7547         ;;
7548 esac
7549
7550 # Set info about shared libraries.
7551
7552
7553
7554
7555
7556
7557 # SO is the extension of shared libraries `(including the dot!)
7558 # -- usually .so, .sl on HP-UX, .dll on Cygwin
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7560 $as_echo_n "checking SO... " >&6; }
7561 if test -z "$SO"
7562 then
7563         case $ac_sys_system in
7564         hp*|HP*)
7565                 case `uname -m` in
7566                         ia64) SO=.so;;
7567                         *)    SO=.sl;;
7568                 esac
7569                 ;;
7570         CYGWIN*)   SO=.dll;;
7571         *)         SO=.so;;
7572         esac
7573 else
7574         # this might also be a termcap variable, see #610332
7575         echo
7576         echo '====================================================================='
7577         echo '+                                                                   +'
7578         echo '+ WARNING: You have set SO in your environment.                     +'
7579         echo '+ Do you really mean to change the extension for shared libraries?  +'
7580         echo '+ Continuing in 10 seconds to let you to ponder.                    +'
7581         echo '+                                                                   +'
7582         echo '====================================================================='
7583         sleep 10
7584 fi
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7586 $as_echo "$SO" >&6; }
7587
7588
7589 cat >>confdefs.h <<_ACEOF
7590 #define SHLIB_EXT "$SO"
7591 _ACEOF
7592
7593 # LDSHARED is the ld *command* used to create shared library
7594 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
7595 # (Shared libraries in this instance are shared modules to be loaded into
7596 # Python, as opposed to building Python itself as a shared library.)
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7598 $as_echo_n "checking LDSHARED... " >&6; }
7599 if test -z "$LDSHARED"
7600 then
7601         case $ac_sys_system/$ac_sys_release in
7602         AIX*)
7603                 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
7604                 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
7605                 ;;
7606         BeOS*)
7607                 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
7608                 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
7609                 ;;
7610         IRIX/5*) LDSHARED="ld -shared";;
7611         IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
7612         SunOS/5*)
7613                 if test "$GCC" = "yes" ; then
7614                         LDSHARED='$(CC) -shared'
7615                         LDCXXSHARED='$(CXX) -shared'
7616                 else
7617                         LDSHARED='$(CC) -G'
7618                         LDCXXSHARED='$(CXX) -G'
7619                 fi ;;
7620         hp*|HP*)
7621                 if test "$GCC" = "yes" ; then
7622                         LDSHARED='$(CC) -shared'
7623                         LDCXXSHARED='$(CXX) -shared'
7624                 else
7625                         LDSHARED='ld -b'
7626                 fi ;;
7627         OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
7628         Darwin/1.3*)
7629                 LDSHARED='$(CC) -bundle'
7630                 LDCXXSHARED='$(CXX) -bundle'
7631                 if test "$enable_framework" ; then
7632                         # Link against the framework. All externals should be defined.
7633                         BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7634                         LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7635                         LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7636                 else
7637                         # No framework. Ignore undefined symbols, assuming they come from Python
7638                         LDSHARED="$LDSHARED -undefined suppress"
7639                         LDCXXSHARED="$LDCXXSHARED -undefined suppress"
7640                 fi ;;
7641         Darwin/1.4*|Darwin/5.*|Darwin/6.*)
7642                 LDSHARED='$(CC) -bundle'
7643                 LDCXXSHARED='$(CXX) -bundle'
7644                 if test "$enable_framework" ; then
7645                         # Link against the framework. All externals should be defined.
7646                         BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7647                         LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7648                         LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7649                 else
7650                         # No framework, use the Python app as bundle-loader
7651                         BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7652                         LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
7653                         LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
7654                 fi ;;
7655         Darwin/*)
7656                 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7657                 # This allows an extension to be used in any Python
7658
7659                 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
7660                 then
7661                         if test "${enable_universalsdk}"; then
7662                                 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7663                         fi
7664                         LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7665                         LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
7666                         BLDSHARED="$LDSHARED"
7667                 else
7668                         LDSHARED='$(CC) -bundle'
7669                         LDCXXSHARED='$(CXX) -bundle'
7670                         if test "$enable_framework" ; then
7671                                 # Link against the framework. All externals should be defined.
7672                                 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7673                                 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7674                                 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7675                         else
7676                                 # No framework, use the Python app as bundle-loader
7677                                 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7678                                 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
7679                                 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
7680                         fi
7681                 fi
7682                 ;;
7683         Linux*|GNU*|QNX*)
7684                 LDSHARED='$(CC) -shared'
7685                 LDCXXSHARED='$(CXX) -shared';;
7686         BSD/OS*/4*)
7687                 LDSHARED="gcc -shared"
7688                 LDCXXSHARED="g++ -shared";;
7689         FreeBSD*)
7690                 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7691                 then
7692                         LDSHARED='$(CC) -shared'
7693                         LDCXXSHARED='$(CXX) -shared'
7694                 else
7695                         LDSHARED="ld -Bshareable"
7696                 fi;;
7697         OpenBSD*)
7698                 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7699                 then
7700                                 LDSHARED='$(CC) -shared $(CCSHARED)'
7701                                 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
7702                 else
7703                                 case `uname -r` in
7704                                 [01].* | 2.[0-7] | 2.[0-7].*)
7705                                    LDSHARED="ld -Bshareable ${LDFLAGS}"
7706                                    ;;
7707                                 *)
7708                                    LDSHARED='$(CC) -shared $(CCSHARED)'
7709                                    LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
7710                                    ;;
7711                                 esac
7712                 fi;;
7713         NetBSD*|DragonFly*)
7714                 LDSHARED='$(CC) -shared'
7715                 LDCXXSHARED='$(CXX) -shared';;
7716         OpenUNIX*|UnixWare*)
7717                 if test "$GCC" = "yes" ; then
7718                         LDSHARED='$(CC) -shared'
7719                         LDCXXSHARED='$(CXX) -shared'
7720                 else
7721                         LDSHARED='$(CC) -G'
7722                         LDCXXSHARED='$(CXX) -G'
7723                 fi;;
7724         SCO_SV*)
7725                 LDSHARED='$(CC) -Wl,-G,-Bexport'
7726                 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7727         CYGWIN*)
7728                 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7729                 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7730         atheos*)
7731                 LDSHARED="gcc -shared"
7732                 LDCXXSHARED="g++ -shared";;
7733         *)      LDSHARED="ld";;
7734         esac
7735 fi
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7737 $as_echo "$LDSHARED" >&6; }
7738 LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
7739 BLDSHARED=${BLDSHARED-$LDSHARED}
7740 # CCSHARED are the C *flags* used to create objects to go into a shared
7741 # library (module) -- this is only needed for a few systems
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7743 $as_echo_n "checking CCSHARED... " >&6; }
7744 if test -z "$CCSHARED"
7745 then
7746         case $ac_sys_system/$ac_sys_release in
7747         SunOS*) if test "$GCC" = yes;
7748                 then CCSHARED="-fPIC";
7749                 elif test `uname -p` = sparc;
7750                 then CCSHARED="-xcode=pic32";
7751                 else CCSHARED="-Kpic";
7752                 fi;;
7753         hp*|HP*) if test "$GCC" = yes;
7754                  then CCSHARED="-fPIC";
7755                  else CCSHARED="+z";
7756                  fi;;
7757         Linux*|GNU*) CCSHARED="-fPIC";;
7758         BSD/OS*/4*) CCSHARED="-fpic";;
7759         FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
7760         OpenUNIX*|UnixWare*)
7761                 if test "$GCC" = "yes"
7762                 then CCSHARED="-fPIC"
7763                 else CCSHARED="-KPIC"
7764                 fi;;
7765         SCO_SV*)
7766                 if test "$GCC" = "yes"
7767                 then CCSHARED="-fPIC"
7768                 else CCSHARED="-Kpic -belf"
7769                 fi;;
7770         IRIX*/6*)  case $CC in
7771                    *gcc*) CCSHARED="-shared";;
7772                    *) CCSHARED="";;
7773                    esac;;
7774         atheos*) CCSHARED="-fPIC";;
7775         esac
7776 fi
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7778 $as_echo "$CCSHARED" >&6; }
7779 # LINKFORSHARED are the flags passed to the $(CC) command that links
7780 # the python executable -- this is only needed for a few systems
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7782 $as_echo_n "checking LINKFORSHARED... " >&6; }
7783 if test -z "$LINKFORSHARED"
7784 then
7785         case $ac_sys_system/$ac_sys_release in
7786         AIX*)   LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
7787         hp*|HP*)
7788             LINKFORSHARED="-Wl,-E -Wl,+s";;
7789 #           LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
7790         BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
7791         Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
7792         # -u libsys_s pulls in all symbols in libsys
7793         Darwin/*)
7794                 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7795                 # which is
7796                 # not used by the core itself but which needs to be in the core so
7797                 # that dynamically loaded extension modules have access to it.
7798                 # -prebind is no longer used, because it actually seems to give a
7799                 # slowdown in stead of a speedup, maybe due to the large number of
7800                 # dynamic loads Python does.
7801
7802                 LINKFORSHARED="$extra_undefs"
7803                 if test "$enable_framework"
7804                 then
7805                         LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7806                 fi
7807                 LINKFORSHARED="$LINKFORSHARED";;
7808         OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
7809         SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
7810         ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
7811         FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
7812                 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7813                 then
7814                         LINKFORSHARED="-Wl,--export-dynamic"
7815                 fi;;
7816         SunOS/5*) case $CC in
7817                   *gcc*)
7818                     if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
7819                     then
7820                         LINKFORSHARED="-Xlinker --export-dynamic"
7821                     fi;;
7822                   esac;;
7823         CYGWIN*)
7824                 if test $enable_shared = "no"
7825                 then
7826                         LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7827                 fi;;
7828         QNX*)
7829                 # -Wl,-E causes the symbols to be added to the dynamic
7830                 # symbol table so that they can be found when a module
7831                 # is loaded.  -N 2048K causes the stack size to be set
7832                 # to 2048 kilobytes so that the stack doesn't overflow
7833                 # when running test_compile.py.
7834                 LINKFORSHARED='-Wl,-E -N 2048K';;
7835         esac
7836 fi
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7838 $as_echo "$LINKFORSHARED" >&6; }
7839
7840
7841
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7843 $as_echo_n "checking CFLAGSFORSHARED... " >&6; }
7844 if test ! "$LIBRARY" = "$LDLIBRARY"
7845 then
7846         case $ac_sys_system in
7847         CYGWIN*)
7848                 # Cygwin needs CCSHARED when building extension DLLs
7849                 # but not when building the interpreter DLL.
7850                 CFLAGSFORSHARED='';;
7851         *)
7852                 CFLAGSFORSHARED='$(CCSHARED)'
7853         esac
7854 fi
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7856 $as_echo "$CFLAGSFORSHARED" >&6; }
7857
7858 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
7859 # library (with --enable-shared).
7860 # For platforms on which shared libraries are not allowed to have unresolved
7861 # symbols, this must be set to $(LIBS) (expanded by make). We do this even
7862 # if it is not required, since it creates a dependency of the shared library
7863 # to LIBS. This, in turn, means that applications linking the shared libpython
7864 # don't need to link LIBS explicitly. The default should be only changed
7865 # on systems where this approach causes problems.
7866
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7868 $as_echo_n "checking SHLIBS... " >&6; }
7869 case "$ac_sys_system" in
7870         *)
7871                 SHLIBS='$(LIBS)';;
7872 esac
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7874 $as_echo "$SHLIBS" >&6; }
7875
7876
7877 # checks for libraries
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7879 $as_echo_n "checking for dlopen in -ldl... " >&6; }
7880 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7881   $as_echo_n "(cached) " >&6
7882 else
7883   ac_check_lib_save_LIBS=$LIBS
7884 LIBS="-ldl  $LIBS"
7885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886 /* end confdefs.h.  */
7887
7888 /* Override any GCC internal prototype to avoid an error.
7889    Use char because int might match the return type of a GCC
7890    builtin and then its argument prototype would still apply.  */
7891 #ifdef __cplusplus
7892 extern "C"
7893 #endif
7894 char dlopen ();
7895 int
7896 main ()
7897 {
7898 return dlopen ();
7899   ;
7900   return 0;
7901 }
7902 _ACEOF
7903 if ac_fn_c_try_link "$LINENO"; then :
7904   ac_cv_lib_dl_dlopen=yes
7905 else
7906   ac_cv_lib_dl_dlopen=no
7907 fi
7908 rm -f core conftest.err conftest.$ac_objext \
7909     conftest$ac_exeext conftest.$ac_ext
7910 LIBS=$ac_check_lib_save_LIBS
7911 fi
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7913 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7914 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
7915   cat >>confdefs.h <<_ACEOF
7916 #define HAVE_LIBDL 1
7917 _ACEOF
7918
7919   LIBS="-ldl $LIBS"
7920
7921 fi
7922         # Dynamic linking for SunOS/Solaris and SYSV
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7924 $as_echo_n "checking for shl_load in -ldld... " >&6; }
7925 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7926   $as_echo_n "(cached) " >&6
7927 else
7928   ac_check_lib_save_LIBS=$LIBS
7929 LIBS="-ldld  $LIBS"
7930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7931 /* end confdefs.h.  */
7932
7933 /* Override any GCC internal prototype to avoid an error.
7934    Use char because int might match the return type of a GCC
7935    builtin and then its argument prototype would still apply.  */
7936 #ifdef __cplusplus
7937 extern "C"
7938 #endif
7939 char shl_load ();
7940 int
7941 main ()
7942 {
7943 return shl_load ();
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 if ac_fn_c_try_link "$LINENO"; then :
7949   ac_cv_lib_dld_shl_load=yes
7950 else
7951   ac_cv_lib_dld_shl_load=no
7952 fi
7953 rm -f core conftest.err conftest.$ac_objext \
7954     conftest$ac_exeext conftest.$ac_ext
7955 LIBS=$ac_check_lib_save_LIBS
7956 fi
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7958 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7959 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
7960   cat >>confdefs.h <<_ACEOF
7961 #define HAVE_LIBDLD 1
7962 _ACEOF
7963
7964   LIBS="-ldld $LIBS"
7965
7966 fi
7967         # Dynamic linking for HP-UX
7968
7969 # only check for sem_init if thread support is requested
7970 if test "$with_threads" = "yes" -o -z "$with_threads"; then
7971     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7972 $as_echo_n "checking for library containing sem_init... " >&6; }
7973 if test "${ac_cv_search_sem_init+set}" = set; then :
7974   $as_echo_n "(cached) " >&6
7975 else
7976   ac_func_search_save_LIBS=$LIBS
7977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978 /* end confdefs.h.  */
7979
7980 /* Override any GCC internal prototype to avoid an error.
7981    Use char because int might match the return type of a GCC
7982    builtin and then its argument prototype would still apply.  */
7983 #ifdef __cplusplus
7984 extern "C"
7985 #endif
7986 char sem_init ();
7987 int
7988 main ()
7989 {
7990 return sem_init ();
7991   ;
7992   return 0;
7993 }
7994 _ACEOF
7995 for ac_lib in '' pthread rt posix4; do
7996   if test -z "$ac_lib"; then
7997     ac_res="none required"
7998   else
7999     ac_res=-l$ac_lib
8000     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8001   fi
8002   if ac_fn_c_try_link "$LINENO"; then :
8003   ac_cv_search_sem_init=$ac_res
8004 fi
8005 rm -f core conftest.err conftest.$ac_objext \
8006     conftest$ac_exeext
8007   if test "${ac_cv_search_sem_init+set}" = set; then :
8008   break
8009 fi
8010 done
8011 if test "${ac_cv_search_sem_init+set}" = set; then :
8012
8013 else
8014   ac_cv_search_sem_init=no
8015 fi
8016 rm conftest.$ac_ext
8017 LIBS=$ac_func_search_save_LIBS
8018 fi
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8020 $as_echo "$ac_cv_search_sem_init" >&6; }
8021 ac_res=$ac_cv_search_sem_init
8022 if test "$ac_res" != no; then :
8023   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8024
8025 fi
8026  # 'Real Time' functions on Solaris
8027                                                 # posix4 on Solaris 2.6
8028                                                 # pthread (first!) on Linux
8029 fi
8030
8031 # check if we need libintl for locale functions
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8033 $as_echo_n "checking for textdomain in -lintl... " >&6; }
8034 if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
8035   $as_echo_n "(cached) " >&6
8036 else
8037   ac_check_lib_save_LIBS=$LIBS
8038 LIBS="-lintl  $LIBS"
8039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8040 /* end confdefs.h.  */
8041
8042 /* Override any GCC internal prototype to avoid an error.
8043    Use char because int might match the return type of a GCC
8044    builtin and then its argument prototype would still apply.  */
8045 #ifdef __cplusplus
8046 extern "C"
8047 #endif
8048 char textdomain ();
8049 int
8050 main ()
8051 {
8052 return textdomain ();
8053   ;
8054   return 0;
8055 }
8056 _ACEOF
8057 if ac_fn_c_try_link "$LINENO"; then :
8058   ac_cv_lib_intl_textdomain=yes
8059 else
8060   ac_cv_lib_intl_textdomain=no
8061 fi
8062 rm -f core conftest.err conftest.$ac_objext \
8063     conftest$ac_exeext conftest.$ac_ext
8064 LIBS=$ac_check_lib_save_LIBS
8065 fi
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8067 $as_echo "$ac_cv_lib_intl_textdomain" >&6; }
8068 if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
8069
8070 $as_echo "#define WITH_LIBINTL 1" >>confdefs.h
8071
8072 fi
8073
8074
8075 # checks for system dependent C++ extensions support
8076 case "$ac_sys_system" in
8077         AIX*)   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8078 $as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8079                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8080 /* end confdefs.h.  */
8081
8082                   #include <load.h>
8083 int
8084 main ()
8085 {
8086 loadAndInit("", 0, "")
8087   ;
8088   return 0;
8089 }
8090
8091 _ACEOF
8092 if ac_fn_c_try_link "$LINENO"; then :
8093
8094
8095 $as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
8096
8097                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8098 $as_echo "yes" >&6; }
8099
8100 else
8101
8102                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103 $as_echo "no" >&6; }
8104
8105 fi
8106 rm -f core conftest.err conftest.$ac_objext \
8107     conftest$ac_exeext conftest.$ac_ext;;
8108         *) ;;
8109 esac
8110
8111 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
8112 # BeOS' sockets are stashed in libnet.
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8114 $as_echo_n "checking for t_open in -lnsl... " >&6; }
8115 if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
8116   $as_echo_n "(cached) " >&6
8117 else
8118   ac_check_lib_save_LIBS=$LIBS
8119 LIBS="-lnsl  $LIBS"
8120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8121 /* end confdefs.h.  */
8122
8123 /* Override any GCC internal prototype to avoid an error.
8124    Use char because int might match the return type of a GCC
8125    builtin and then its argument prototype would still apply.  */
8126 #ifdef __cplusplus
8127 extern "C"
8128 #endif
8129 char t_open ();
8130 int
8131 main ()
8132 {
8133 return t_open ();
8134   ;
8135   return 0;
8136 }
8137 _ACEOF
8138 if ac_fn_c_try_link "$LINENO"; then :
8139   ac_cv_lib_nsl_t_open=yes
8140 else
8141   ac_cv_lib_nsl_t_open=no
8142 fi
8143 rm -f core conftest.err conftest.$ac_objext \
8144     conftest$ac_exeext conftest.$ac_ext
8145 LIBS=$ac_check_lib_save_LIBS
8146 fi
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8148 $as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8149 if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
8150   LIBS="-lnsl $LIBS"
8151 fi
8152  # SVR4
8153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8154 $as_echo_n "checking for socket in -lsocket... " >&6; }
8155 if test "${ac_cv_lib_socket_socket+set}" = set; then :
8156   $as_echo_n "(cached) " >&6
8157 else
8158   ac_check_lib_save_LIBS=$LIBS
8159 LIBS="-lsocket $LIBS $LIBS"
8160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8161 /* end confdefs.h.  */
8162
8163 /* Override any GCC internal prototype to avoid an error.
8164    Use char because int might match the return type of a GCC
8165    builtin and then its argument prototype would still apply.  */
8166 #ifdef __cplusplus
8167 extern "C"
8168 #endif
8169 char socket ();
8170 int
8171 main ()
8172 {
8173 return socket ();
8174   ;
8175   return 0;
8176 }
8177 _ACEOF
8178 if ac_fn_c_try_link "$LINENO"; then :
8179   ac_cv_lib_socket_socket=yes
8180 else
8181   ac_cv_lib_socket_socket=no
8182 fi
8183 rm -f core conftest.err conftest.$ac_objext \
8184     conftest$ac_exeext conftest.$ac_ext
8185 LIBS=$ac_check_lib_save_LIBS
8186 fi
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8188 $as_echo "$ac_cv_lib_socket_socket" >&6; }
8189 if test "x$ac_cv_lib_socket_socket" = x""yes; then :
8190   LIBS="-lsocket $LIBS"
8191 fi
8192  # SVR4 sockets
8193
8194 case "$ac_sys_system" in
8195 BeOS*)
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8197 $as_echo_n "checking for socket in -lnet... " >&6; }
8198 if test "${ac_cv_lib_net_socket+set}" = set; then :
8199   $as_echo_n "(cached) " >&6
8200 else
8201   ac_check_lib_save_LIBS=$LIBS
8202 LIBS="-lnet $LIBS $LIBS"
8203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8204 /* end confdefs.h.  */
8205
8206 /* Override any GCC internal prototype to avoid an error.
8207    Use char because int might match the return type of a GCC
8208    builtin and then its argument prototype would still apply.  */
8209 #ifdef __cplusplus
8210 extern "C"
8211 #endif
8212 char socket ();
8213 int
8214 main ()
8215 {
8216 return socket ();
8217   ;
8218   return 0;
8219 }
8220 _ACEOF
8221 if ac_fn_c_try_link "$LINENO"; then :
8222   ac_cv_lib_net_socket=yes
8223 else
8224   ac_cv_lib_net_socket=no
8225 fi
8226 rm -f core conftest.err conftest.$ac_objext \
8227     conftest$ac_exeext conftest.$ac_ext
8228 LIBS=$ac_check_lib_save_LIBS
8229 fi
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8231 $as_echo "$ac_cv_lib_net_socket" >&6; }
8232 if test "x$ac_cv_lib_net_socket" = x""yes; then :
8233   LIBS="-lnet $LIBS"
8234 fi
8235  # BeOS
8236 ;;
8237 esac
8238
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8240 $as_echo_n "checking for --with-libs... " >&6; }
8241
8242 # Check whether --with-libs was given.
8243 if test "${with_libs+set}" = set; then :
8244   withval=$with_libs;
8245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8246 $as_echo "$withval" >&6; }
8247 LIBS="$withval $LIBS"
8248
8249 else
8250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251 $as_echo "no" >&6; }
8252 fi
8253
8254
8255 if test -n "$ac_tool_prefix"; then
8256   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8257 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8259 $as_echo_n "checking for $ac_word... " >&6; }
8260 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8261   $as_echo_n "(cached) " >&6
8262 else
8263   case $PKG_CONFIG in
8264   [\\/]* | ?:[\\/]*)
8265   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8266   ;;
8267   *)
8268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8269 for as_dir in $PATH
8270 do
8271   IFS=$as_save_IFS
8272   test -z "$as_dir" && as_dir=.
8273     for ac_exec_ext in '' $ac_executable_extensions; do
8274   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8275     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8277     break 2
8278   fi
8279 done
8280   done
8281 IFS=$as_save_IFS
8282
8283   ;;
8284 esac
8285 fi
8286 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8287 if test -n "$PKG_CONFIG"; then
8288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8289 $as_echo "$PKG_CONFIG" >&6; }
8290 else
8291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8292 $as_echo "no" >&6; }
8293 fi
8294
8295
8296 fi
8297 if test -z "$ac_cv_path_PKG_CONFIG"; then
8298   ac_pt_PKG_CONFIG=$PKG_CONFIG
8299   # Extract the first word of "pkg-config", so it can be a program name with args.
8300 set dummy pkg-config; ac_word=$2
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8302 $as_echo_n "checking for $ac_word... " >&6; }
8303 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8304   $as_echo_n "(cached) " >&6
8305 else
8306   case $ac_pt_PKG_CONFIG in
8307   [\\/]* | ?:[\\/]*)
8308   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8309   ;;
8310   *)
8311   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8312 for as_dir in $PATH
8313 do
8314   IFS=$as_save_IFS
8315   test -z "$as_dir" && as_dir=.
8316     for ac_exec_ext in '' $ac_executable_extensions; do
8317   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8318     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8320     break 2
8321   fi
8322 done
8323   done
8324 IFS=$as_save_IFS
8325
8326   ;;
8327 esac
8328 fi
8329 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8330 if test -n "$ac_pt_PKG_CONFIG"; then
8331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8332 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8333 else
8334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8335 $as_echo "no" >&6; }
8336 fi
8337
8338   if test "x$ac_pt_PKG_CONFIG" = x; then
8339     PKG_CONFIG=""
8340   else
8341     case $cross_compiling:$ac_tool_warned in
8342 yes:)
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8344 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8345 ac_tool_warned=yes ;;
8346 esac
8347     PKG_CONFIG=$ac_pt_PKG_CONFIG
8348   fi
8349 else
8350   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8351 fi
8352
8353
8354 # Check for use of the system expat library
8355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8356 $as_echo_n "checking for --with-system-expat... " >&6; }
8357
8358 # Check whether --with-system_expat was given.
8359 if test "${with_system_expat+set}" = set; then :
8360   withval=$with_system_expat;
8361 else
8362   with_system_expat="no"
8363 fi
8364
8365
8366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8367 $as_echo "$with_system_expat" >&6; }
8368
8369 # Check for use of the system libffi library
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8371 $as_echo_n "checking for --with-system-ffi... " >&6; }
8372
8373 # Check whether --with-system_ffi was given.
8374 if test "${with_system_ffi+set}" = set; then :
8375   withval=$with_system_ffi;
8376 else
8377   with_system_ffi="no"
8378 fi
8379
8380
8381 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
8382     LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8383 else
8384     LIBFFI_INCLUDEDIR=""
8385 fi
8386
8387
8388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8389 $as_echo "$with_system_ffi" >&6; }
8390
8391 # Check for --with-dbmliborder
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8393 $as_echo_n "checking for --with-dbmliborder... " >&6; }
8394
8395 # Check whether --with-dbmliborder was given.
8396 if test "${with_dbmliborder+set}" = set; then :
8397   withval=$with_dbmliborder;
8398 if test x$with_dbmliborder = xyes
8399 then
8400 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
8401 else
8402   for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8403     if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8404     then
8405       as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
8406     fi
8407   done
8408 fi
8409 fi
8410
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8412 $as_echo "$with_dbmliborder" >&6; }
8413
8414 # Determine if signalmodule should be used.
8415
8416
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8418 $as_echo_n "checking for --with-signal-module... " >&6; }
8419
8420 # Check whether --with-signal-module was given.
8421 if test "${with_signal_module+set}" = set; then :
8422   withval=$with_signal_module;
8423 fi
8424
8425
8426 if test -z "$with_signal_module"
8427 then with_signal_module="yes"
8428 fi
8429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8430 $as_echo "$with_signal_module" >&6; }
8431
8432 if test "${with_signal_module}" = "yes"; then
8433         USE_SIGNAL_MODULE=""
8434         SIGNAL_OBJS=""
8435 else
8436         USE_SIGNAL_MODULE="#"
8437         SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8438 fi
8439
8440 # This is used to generate Setup.config
8441
8442 USE_THREAD_MODULE=""
8443
8444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8445 $as_echo_n "checking for --with-dec-threads... " >&6; }
8446
8447
8448 # Check whether --with-dec-threads was given.
8449 if test "${with_dec_threads+set}" = set; then :
8450   withval=$with_dec_threads;
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8452 $as_echo "$withval" >&6; }
8453 LDLAST=-threads
8454 if test "${with_thread+set}" != set; then
8455    with_thread="$withval";
8456 fi
8457 else
8458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459 $as_echo "no" >&6; }
8460 fi
8461
8462
8463 # Templates for things AC_DEFINEd more than once.
8464 # For a single AC_DEFINE, no template is needed.
8465
8466
8467
8468
8469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8470 $as_echo_n "checking for --with-threads... " >&6; }
8471
8472 # Check whether --with-threads was given.
8473 if test "${with_threads+set}" = set; then :
8474   withval=$with_threads;
8475 fi
8476
8477
8478 # --with-thread is deprecated, but check for it anyway
8479
8480 # Check whether --with-thread was given.
8481 if test "${with_thread+set}" = set; then :
8482   withval=$with_thread; with_threads=$with_thread
8483 fi
8484
8485
8486 if test -z "$with_threads"
8487 then with_threads="yes"
8488 fi
8489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8490 $as_echo "$with_threads" >&6; }
8491
8492
8493 if test "$with_threads" = "no"
8494 then
8495     USE_THREAD_MODULE="#"
8496 elif test "$ac_cv_pthread_is_default" = yes
8497 then
8498     $as_echo "#define WITH_THREAD 1" >>confdefs.h
8499
8500     # Defining _REENTRANT on system with POSIX threads should not hurt.
8501     $as_echo "#define _REENTRANT 1" >>confdefs.h
8502
8503     posix_threads=yes
8504     THREADOBJ="Python/thread.o"
8505 elif test "$ac_cv_kpthread" = "yes"
8506 then
8507     CC="$CC -Kpthread"
8508     if test "$ac_cv_cxx_thread" = "yes"; then
8509         CXX="$CXX -Kpthread"
8510     fi
8511     $as_echo "#define WITH_THREAD 1" >>confdefs.h
8512
8513     posix_threads=yes
8514     THREADOBJ="Python/thread.o"
8515 elif test "$ac_cv_kthread" = "yes"
8516 then
8517     CC="$CC -Kthread"
8518     if test "$ac_cv_cxx_thread" = "yes"; then
8519         CXX="$CXX -Kthread"
8520     fi
8521     $as_echo "#define WITH_THREAD 1" >>confdefs.h
8522
8523     posix_threads=yes
8524     THREADOBJ="Python/thread.o"
8525 elif test "$ac_cv_pthread" = "yes"
8526 then
8527     CC="$CC -pthread"
8528     if test "$ac_cv_cxx_thread" = "yes"; then
8529         CXX="$CXX -pthread"
8530     fi
8531     $as_echo "#define WITH_THREAD 1" >>confdefs.h
8532
8533     posix_threads=yes
8534     THREADOBJ="Python/thread.o"
8535 else
8536     if test ! -z "$with_threads" -a -d "$with_threads"
8537     then LDFLAGS="$LDFLAGS -L$with_threads"
8538     fi
8539     if test ! -z "$withval" -a -d "$withval"
8540     then LDFLAGS="$LDFLAGS -L$withval"
8541     fi
8542
8543     # According to the POSIX spec, a pthreads implementation must
8544     # define _POSIX_THREADS in unistd.h. Some apparently don't
8545     # (e.g. gnu pth with pthread emulation)
8546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8547 $as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8548     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8549 /* end confdefs.h.  */
8550
8551 #include <unistd.h>
8552 #ifdef _POSIX_THREADS
8553 yes
8554 #endif
8555
8556 _ACEOF
8557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8558   $EGREP "yes" >/dev/null 2>&1; then :
8559   unistd_defines_pthreads=yes
8560 else
8561   unistd_defines_pthreads=no
8562 fi
8563 rm -f conftest*
8564
8565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8566 $as_echo "$unistd_defines_pthreads" >&6; }
8567
8568     $as_echo "#define _REENTRANT 1" >>confdefs.h
8569
8570     ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8571 if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8572   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8573
8574     $as_echo "#define C_THREADS 1" >>confdefs.h
8575
8576
8577 $as_echo "#define HURD_C_THREADS 1" >>confdefs.h
8578
8579     LIBS="$LIBS -lthreads"
8580     THREADOBJ="Python/thread.o"
8581 else
8582
8583     ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8584 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8585   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8586
8587     $as_echo "#define C_THREADS 1" >>confdefs.h
8588
8589
8590 $as_echo "#define MACH_C_THREADS 1" >>confdefs.h
8591
8592     THREADOBJ="Python/thread.o"
8593 else
8594
8595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8596 $as_echo_n "checking for --with-pth... " >&6; }
8597
8598 # Check whether --with-pth was given.
8599 if test "${with_pth+set}" = set; then :
8600   withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8601 $as_echo "$withval" >&6; }
8602                   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8603
8604
8605 $as_echo "#define HAVE_PTH 1" >>confdefs.h
8606
8607                   LIBS="-lpth $LIBS"
8608                   THREADOBJ="Python/thread.o"
8609 else
8610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611 $as_echo "no" >&6; }
8612
8613     # Just looking for pthread_create in libpthread is not enough:
8614     # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8615     # So we really have to include pthread.h, and then link.
8616     _libs=$LIBS
8617     LIBS="$LIBS -lpthread"
8618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8619 $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8620     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8621 /* end confdefs.h.  */
8622 #include <pthread.h>
8623
8624 void * start_routine (void *arg) { exit (0); }
8625 int
8626 main ()
8627 {
8628
8629 pthread_create (NULL, NULL, start_routine, NULL)
8630   ;
8631   return 0;
8632 }
8633 _ACEOF
8634 if ac_fn_c_try_link "$LINENO"; then :
8635
8636     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8637 $as_echo "yes" >&6; }
8638     $as_echo "#define WITH_THREAD 1" >>confdefs.h
8639
8640     posix_threads=yes
8641     THREADOBJ="Python/thread.o"
8642 else
8643
8644     LIBS=$_libs
8645     ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8646 if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8647   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8648
8649     posix_threads=yes
8650     THREADOBJ="Python/thread.o"
8651 else
8652
8653     ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
8654 if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
8655   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8656
8657
8658 $as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
8659
8660     THREADOBJ="Python/thread.o"
8661 else
8662
8663     ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
8664 if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
8665   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8666
8667
8668 $as_echo "#define BEOS_THREADS 1" >>confdefs.h
8669
8670     THREADOBJ="Python/thread.o"
8671 else
8672
8673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8674 $as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8675 if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8676   $as_echo_n "(cached) " >&6
8677 else
8678   ac_check_lib_save_LIBS=$LIBS
8679 LIBS="-lpthreads  $LIBS"
8680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8681 /* end confdefs.h.  */
8682
8683 /* Override any GCC internal prototype to avoid an error.
8684    Use char because int might match the return type of a GCC
8685    builtin and then its argument prototype would still apply.  */
8686 #ifdef __cplusplus
8687 extern "C"
8688 #endif
8689 char pthread_create ();
8690 int
8691 main ()
8692 {
8693 return pthread_create ();
8694   ;
8695   return 0;
8696 }
8697 _ACEOF
8698 if ac_fn_c_try_link "$LINENO"; then :
8699   ac_cv_lib_pthreads_pthread_create=yes
8700 else
8701   ac_cv_lib_pthreads_pthread_create=no
8702 fi
8703 rm -f core conftest.err conftest.$ac_objext \
8704     conftest$ac_exeext conftest.$ac_ext
8705 LIBS=$ac_check_lib_save_LIBS
8706 fi
8707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8708 $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8709 if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8710   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8711
8712     posix_threads=yes
8713     LIBS="$LIBS -lpthreads"
8714     THREADOBJ="Python/thread.o"
8715 else
8716
8717     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8718 $as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8719 if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8720   $as_echo_n "(cached) " >&6
8721 else
8722   ac_check_lib_save_LIBS=$LIBS
8723 LIBS="-lc_r  $LIBS"
8724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8725 /* end confdefs.h.  */
8726
8727 /* Override any GCC internal prototype to avoid an error.
8728    Use char because int might match the return type of a GCC
8729    builtin and then its argument prototype would still apply.  */
8730 #ifdef __cplusplus
8731 extern "C"
8732 #endif
8733 char pthread_create ();
8734 int
8735 main ()
8736 {
8737 return pthread_create ();
8738   ;
8739   return 0;
8740 }
8741 _ACEOF
8742 if ac_fn_c_try_link "$LINENO"; then :
8743   ac_cv_lib_c_r_pthread_create=yes
8744 else
8745   ac_cv_lib_c_r_pthread_create=no
8746 fi
8747 rm -f core conftest.err conftest.$ac_objext \
8748     conftest$ac_exeext conftest.$ac_ext
8749 LIBS=$ac_check_lib_save_LIBS
8750 fi
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8752 $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8753 if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8754   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8755
8756     posix_threads=yes
8757     LIBS="$LIBS -lc_r"
8758     THREADOBJ="Python/thread.o"
8759 else
8760
8761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8762 $as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8763 if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8764   $as_echo_n "(cached) " >&6
8765 else
8766   ac_check_lib_save_LIBS=$LIBS
8767 LIBS="-lpthread  $LIBS"
8768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8769 /* end confdefs.h.  */
8770
8771 /* Override any GCC internal prototype to avoid an error.
8772    Use char because int might match the return type of a GCC
8773    builtin and then its argument prototype would still apply.  */
8774 #ifdef __cplusplus
8775 extern "C"
8776 #endif
8777 char __pthread_create_system ();
8778 int
8779 main ()
8780 {
8781 return __pthread_create_system ();
8782   ;
8783   return 0;
8784 }
8785 _ACEOF
8786 if ac_fn_c_try_link "$LINENO"; then :
8787   ac_cv_lib_pthread___pthread_create_system=yes
8788 else
8789   ac_cv_lib_pthread___pthread_create_system=no
8790 fi
8791 rm -f core conftest.err conftest.$ac_objext \
8792     conftest$ac_exeext conftest.$ac_ext
8793 LIBS=$ac_check_lib_save_LIBS
8794 fi
8795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8796 $as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8797 if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8798   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8799
8800     posix_threads=yes
8801     LIBS="$LIBS -lpthread"
8802     THREADOBJ="Python/thread.o"
8803 else
8804
8805     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8806 $as_echo_n "checking for pthread_create in -lcma... " >&6; }
8807 if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8808   $as_echo_n "(cached) " >&6
8809 else
8810   ac_check_lib_save_LIBS=$LIBS
8811 LIBS="-lcma  $LIBS"
8812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8813 /* end confdefs.h.  */
8814
8815 /* Override any GCC internal prototype to avoid an error.
8816    Use char because int might match the return type of a GCC
8817    builtin and then its argument prototype would still apply.  */
8818 #ifdef __cplusplus
8819 extern "C"
8820 #endif
8821 char pthread_create ();
8822 int
8823 main ()
8824 {
8825 return pthread_create ();
8826   ;
8827   return 0;
8828 }
8829 _ACEOF
8830 if ac_fn_c_try_link "$LINENO"; then :
8831   ac_cv_lib_cma_pthread_create=yes
8832 else
8833   ac_cv_lib_cma_pthread_create=no
8834 fi
8835 rm -f core conftest.err conftest.$ac_objext \
8836     conftest$ac_exeext conftest.$ac_ext
8837 LIBS=$ac_check_lib_save_LIBS
8838 fi
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8840 $as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8841 if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8842   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8843
8844     posix_threads=yes
8845     LIBS="$LIBS -lcma"
8846     THREADOBJ="Python/thread.o"
8847 else
8848
8849     USE_THREAD_MODULE="#"
8850 fi
8851
8852
8853 fi
8854
8855 fi
8856
8857 fi
8858
8859 fi
8860
8861
8862 fi
8863
8864
8865 fi
8866
8867 fi
8868 rm -f core conftest.err conftest.$ac_objext \
8869     conftest$ac_exeext conftest.$ac_ext
8870 fi
8871
8872 fi
8873
8874
8875 fi
8876
8877
8878
8879     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8880 $as_echo_n "checking for usconfig in -lmpc... " >&6; }
8881 if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8882   $as_echo_n "(cached) " >&6
8883 else
8884   ac_check_lib_save_LIBS=$LIBS
8885 LIBS="-lmpc  $LIBS"
8886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8887 /* end confdefs.h.  */
8888
8889 /* Override any GCC internal prototype to avoid an error.
8890    Use char because int might match the return type of a GCC
8891    builtin and then its argument prototype would still apply.  */
8892 #ifdef __cplusplus
8893 extern "C"
8894 #endif
8895 char usconfig ();
8896 int
8897 main ()
8898 {
8899 return usconfig ();
8900   ;
8901   return 0;
8902 }
8903 _ACEOF
8904 if ac_fn_c_try_link "$LINENO"; then :
8905   ac_cv_lib_mpc_usconfig=yes
8906 else
8907   ac_cv_lib_mpc_usconfig=no
8908 fi
8909 rm -f core conftest.err conftest.$ac_objext \
8910     conftest$ac_exeext conftest.$ac_ext
8911 LIBS=$ac_check_lib_save_LIBS
8912 fi
8913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8914 $as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8915 if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8916   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8917
8918     LIBS="$LIBS -lmpc"
8919     THREADOBJ="Python/thread.o"
8920     USE_THREAD_MODULE=""
8921 fi
8922
8923
8924     if test "$posix_threads" != "yes"; then
8925       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8926 $as_echo_n "checking for thr_create in -lthread... " >&6; }
8927 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8928   $as_echo_n "(cached) " >&6
8929 else
8930   ac_check_lib_save_LIBS=$LIBS
8931 LIBS="-lthread  $LIBS"
8932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8933 /* end confdefs.h.  */
8934
8935 /* Override any GCC internal prototype to avoid an error.
8936    Use char because int might match the return type of a GCC
8937    builtin and then its argument prototype would still apply.  */
8938 #ifdef __cplusplus
8939 extern "C"
8940 #endif
8941 char thr_create ();
8942 int
8943 main ()
8944 {
8945 return thr_create ();
8946   ;
8947   return 0;
8948 }
8949 _ACEOF
8950 if ac_fn_c_try_link "$LINENO"; then :
8951   ac_cv_lib_thread_thr_create=yes
8952 else
8953   ac_cv_lib_thread_thr_create=no
8954 fi
8955 rm -f core conftest.err conftest.$ac_objext \
8956     conftest$ac_exeext conftest.$ac_ext
8957 LIBS=$ac_check_lib_save_LIBS
8958 fi
8959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8960 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8961 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8962   $as_echo "#define WITH_THREAD 1" >>confdefs.h
8963
8964       LIBS="$LIBS -lthread"
8965       THREADOBJ="Python/thread.o"
8966       USE_THREAD_MODULE=""
8967 fi
8968
8969     fi
8970
8971     if test "$USE_THREAD_MODULE" != "#"
8972     then
8973         # If the above checks didn't disable threads, (at least) OSF1
8974         # needs this '-threads' argument during linking.
8975         case $ac_sys_system in
8976         OSF1) LDLAST=-threads;;
8977         esac
8978     fi
8979 fi
8980
8981 if test "$posix_threads" = "yes"; then
8982       if test "$unistd_defines_pthreads" = "no"; then
8983
8984 $as_echo "#define _POSIX_THREADS 1" >>confdefs.h
8985
8986       fi
8987
8988       # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8989       case  $ac_sys_system/$ac_sys_release in
8990       SunOS/5.6)
8991 $as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
8992
8993                        ;;
8994       SunOS/5.8)
8995 $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8996
8997                        ;;
8998       AIX/*)
8999 $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
9000
9001                        ;;
9002       esac
9003
9004       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9005 $as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
9006       if test "${ac_cv_pthread_system_supported+set}" = set; then :
9007   $as_echo_n "(cached) " >&6
9008 else
9009   if test "$cross_compiling" = yes; then :
9010   ac_cv_pthread_system_supported=no
9011 else
9012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9013 /* end confdefs.h.  */
9014 #include <pthread.h>
9015       void *foo(void *parm) {
9016         return NULL;
9017       }
9018       main() {
9019         pthread_attr_t attr;
9020         pthread_t id;
9021         if (pthread_attr_init(&attr)) exit(-1);
9022         if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9023         if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9024         exit(0);
9025       }
9026 _ACEOF
9027 if ac_fn_c_try_run "$LINENO"; then :
9028   ac_cv_pthread_system_supported=yes
9029 else
9030   ac_cv_pthread_system_supported=no
9031 fi
9032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9033   conftest.$ac_objext conftest.beam conftest.$ac_ext
9034 fi
9035
9036
9037 fi
9038
9039       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9040 $as_echo "$ac_cv_pthread_system_supported" >&6; }
9041       if test "$ac_cv_pthread_system_supported" = "yes"; then
9042
9043 $as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
9044
9045       fi
9046       for ac_func in pthread_sigmask
9047 do :
9048   ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
9049 if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
9050   cat >>confdefs.h <<_ACEOF
9051 #define HAVE_PTHREAD_SIGMASK 1
9052 _ACEOF
9053  case $ac_sys_system in
9054         CYGWIN*)
9055
9056 $as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
9057
9058             ;;
9059         esac
9060 fi
9061 done
9062
9063 fi
9064
9065
9066 # Check for enable-ipv6
9067
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9069 $as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
9070 # Check whether --enable-ipv6 was given.
9071 if test "${enable_ipv6+set}" = set; then :
9072   enableval=$enable_ipv6;  case "$enableval" in
9073   no)
9074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075 $as_echo "no" >&6; }
9076        ipv6=no
9077        ;;
9078   *)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9079 $as_echo "yes" >&6; }
9080        $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
9081
9082        ipv6=yes
9083        ;;
9084   esac
9085 else
9086
9087   if test "$cross_compiling" = yes; then :
9088
9089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090 $as_echo "no" >&6; }
9091   ipv6=no
9092
9093 else
9094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9095 /* end confdefs.h.  */
9096  /* AF_INET6 available check */
9097 #include <sys/types.h>
9098 #include <sys/socket.h>
9099 main()
9100 {
9101  if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9102    exit(1);
9103  else
9104    exit(0);
9105 }
9106
9107 _ACEOF
9108 if ac_fn_c_try_run "$LINENO"; then :
9109
9110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9111 $as_echo "yes" >&6; }
9112   ipv6=yes
9113
9114 else
9115
9116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117 $as_echo "no" >&6; }
9118   ipv6=no
9119
9120 fi
9121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9122   conftest.$ac_objext conftest.beam conftest.$ac_ext
9123 fi
9124
9125
9126 if test "$ipv6" = "yes"; then
9127         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9128 $as_echo_n "checking if RFC2553 API is available... " >&6; }
9129         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9130 /* end confdefs.h.  */
9131
9132           #include <sys/types.h>
9133 #include <netinet/in.h>
9134 int
9135 main ()
9136 {
9137 struct sockaddr_in6 x;
9138                             x.sin6_scope_id;
9139   ;
9140   return 0;
9141 }
9142
9143 _ACEOF
9144 if ac_fn_c_try_compile "$LINENO"; then :
9145
9146           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9147 $as_echo "yes" >&6; }
9148           ipv6=yes
9149
9150 else
9151
9152           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153 $as_echo "no" >&6; }
9154           ipv6=no
9155
9156 fi
9157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9158 fi
9159
9160 if test "$ipv6" = "yes"; then
9161         $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
9162
9163 fi
9164
9165 fi
9166
9167
9168 ipv6type=unknown
9169 ipv6lib=none
9170 ipv6trylibc=no
9171
9172 if test "$ipv6" = "yes"; then
9173         { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9174 $as_echo_n "checking ipv6 stack type... " >&6; }
9175         for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9176         do
9177                 case $i in
9178                 inria)
9179                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9180 /* end confdefs.h.  */
9181
9182 #include <netinet/in.h>
9183 #ifdef IPV6_INRIA_VERSION
9184 yes
9185 #endif
9186 _ACEOF
9187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9188   $EGREP "yes" >/dev/null 2>&1; then :
9189   ipv6type=$i
9190 fi
9191 rm -f conftest*
9192
9193                         ;;
9194                 kame)
9195                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196 /* end confdefs.h.  */
9197
9198 #include <netinet/in.h>
9199 #ifdef __KAME__
9200 yes
9201 #endif
9202 _ACEOF
9203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9204   $EGREP "yes" >/dev/null 2>&1; then :
9205   ipv6type=$i;
9206                                 ipv6lib=inet6
9207                                 ipv6libdir=/usr/local/v6/lib
9208                                 ipv6trylibc=yes
9209 fi
9210 rm -f conftest*
9211
9212                         ;;
9213                 linux-glibc)
9214                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215 /* end confdefs.h.  */
9216
9217 #include <features.h>
9218 #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9219 yes
9220 #endif
9221 _ACEOF
9222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9223   $EGREP "yes" >/dev/null 2>&1; then :
9224   ipv6type=$i;
9225                                 ipv6trylibc=yes
9226 fi
9227 rm -f conftest*
9228
9229                         ;;
9230                 linux-inet6)
9231                                                 if test -d /usr/inet6; then
9232                                 ipv6type=$i
9233                                 ipv6lib=inet6
9234                                 ipv6libdir=/usr/inet6/lib
9235                                 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
9236                         fi
9237                         ;;
9238                 solaris)
9239                         if test -f /etc/netconfig; then
9240                           if $GREP -q tcp6 /etc/netconfig; then
9241                                 ipv6type=$i
9242                                 ipv6trylibc=yes
9243                           fi
9244                         fi
9245                         ;;
9246                 toshiba)
9247                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9248 /* end confdefs.h.  */
9249
9250 #include <sys/param.h>
9251 #ifdef _TOSHIBA_INET6
9252 yes
9253 #endif
9254 _ACEOF
9255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9256   $EGREP "yes" >/dev/null 2>&1; then :
9257   ipv6type=$i;
9258                                 ipv6lib=inet6;
9259                                 ipv6libdir=/usr/local/v6/lib
9260 fi
9261 rm -f conftest*
9262
9263                         ;;
9264                 v6d)
9265                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9266 /* end confdefs.h.  */
9267
9268 #include </usr/local/v6/include/sys/v6config.h>
9269 #ifdef __V6D__
9270 yes
9271 #endif
9272 _ACEOF
9273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9274   $EGREP "yes" >/dev/null 2>&1; then :
9275   ipv6type=$i;
9276                                 ipv6lib=v6;
9277                                 ipv6libdir=/usr/local/v6/lib;
9278                                 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
9279 fi
9280 rm -f conftest*
9281
9282                         ;;
9283                 zeta)
9284                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9285 /* end confdefs.h.  */
9286
9287 #include <sys/param.h>
9288 #ifdef _ZETA_MINAMI_INET6
9289 yes
9290 #endif
9291 _ACEOF
9292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9293   $EGREP "yes" >/dev/null 2>&1; then :
9294   ipv6type=$i;
9295                                 ipv6lib=inet6;
9296                                 ipv6libdir=/usr/local/v6/lib
9297 fi
9298 rm -f conftest*
9299
9300                         ;;
9301                 esac
9302                 if test "$ipv6type" != "unknown"; then
9303                         break
9304                 fi
9305         done
9306         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9307 $as_echo "$ipv6type" >&6; }
9308 fi
9309
9310 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9311         if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9312                 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9313                 echo "using lib$ipv6lib"
9314         else
9315                 if test $ipv6trylibc = "yes"; then
9316                         echo "using libc"
9317                 else
9318                         echo 'Fatal: no $ipv6lib library found.  cannot continue.'
9319                         echo "You need to fetch lib$ipv6lib.a from appropriate"
9320                         echo 'ipv6 kit and compile beforehand.'
9321                         exit 1
9322                 fi
9323         fi
9324 fi
9325
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9327 $as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9329 /* end confdefs.h.  */
9330
9331   #include <Carbon/Carbon.h>
9332 int
9333 main ()
9334 {
9335 FSIORefNum fRef = 0
9336   ;
9337   return 0;
9338 }
9339
9340 _ACEOF
9341 if ac_fn_c_try_compile "$LINENO"; then :
9342
9343
9344 $as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
9345
9346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9347 $as_echo "yes" >&6; }
9348
9349 else
9350
9351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352 $as_echo "no" >&6; }
9353
9354 fi
9355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9356
9357 # Check for --with-doc-strings
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9359 $as_echo_n "checking for --with-doc-strings... " >&6; }
9360
9361 # Check whether --with-doc-strings was given.
9362 if test "${with_doc_strings+set}" = set; then :
9363   withval=$with_doc_strings;
9364 fi
9365
9366
9367 if test -z "$with_doc_strings"
9368 then with_doc_strings="yes"
9369 fi
9370 if test "$with_doc_strings" != "no"
9371 then
9372
9373 $as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
9374
9375 fi
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9377 $as_echo "$with_doc_strings" >&6; }
9378
9379 # Check for Python-specific malloc support
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9381 $as_echo_n "checking for --with-tsc... " >&6; }
9382
9383 # Check whether --with-tsc was given.
9384 if test "${with_tsc+set}" = set; then :
9385   withval=$with_tsc;
9386 if test "$withval" != no
9387 then
9388
9389 $as_echo "#define WITH_TSC 1" >>confdefs.h
9390
9391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9392 $as_echo "yes" >&6; }
9393 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394 $as_echo "no" >&6; }
9395 fi
9396 else
9397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398 $as_echo "no" >&6; }
9399 fi
9400
9401
9402 # Check for Python-specific malloc support
9403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9404 $as_echo_n "checking for --with-pymalloc... " >&6; }
9405
9406 # Check whether --with-pymalloc was given.
9407 if test "${with_pymalloc+set}" = set; then :
9408   withval=$with_pymalloc;
9409 fi
9410
9411
9412 if test -z "$with_pymalloc"
9413 then with_pymalloc="yes"
9414 fi
9415 if test "$with_pymalloc" != "no"
9416 then
9417
9418 $as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
9419
9420 fi
9421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9422 $as_echo "$with_pymalloc" >&6; }
9423
9424 # Check for Valgrind support
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9426 $as_echo_n "checking for --with-valgrind... " >&6; }
9427
9428 # Check whether --with-valgrind was given.
9429 if test "${with_valgrind+set}" = set; then :
9430   withval=$with_valgrind;
9431 else
9432   with_valgrind=no
9433 fi
9434
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9436 $as_echo "$with_valgrind" >&6; }
9437 if test "$with_valgrind" != no; then
9438     ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9439 if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
9440
9441 $as_echo "#define WITH_VALGRIND 1" >>confdefs.h
9442
9443 else
9444   as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
9445
9446 fi
9447
9448
9449 fi
9450
9451 # Check for --with-wctype-functions
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9453 $as_echo_n "checking for --with-wctype-functions... " >&6; }
9454
9455 # Check whether --with-wctype-functions was given.
9456 if test "${with_wctype_functions+set}" = set; then :
9457   withval=$with_wctype_functions;
9458 if test "$withval" != no
9459 then
9460
9461 $as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
9462
9463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9464 $as_echo "yes" >&6; }
9465 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466 $as_echo "no" >&6; }
9467 fi
9468 else
9469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470 $as_echo "no" >&6; }
9471 fi
9472
9473
9474 # -I${DLINCLDIR} is added to the compile rule for importdl.o
9475
9476 DLINCLDIR=.
9477
9478 # the dlopen() function means we might want to use dynload_shlib.o. some
9479 # platforms, such as AIX, have dlopen(), but don't want to use it.
9480 for ac_func in dlopen
9481 do :
9482   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9483 if test "x$ac_cv_func_dlopen" = x""yes; then :
9484   cat >>confdefs.h <<_ACEOF
9485 #define HAVE_DLOPEN 1
9486 _ACEOF
9487
9488 fi
9489 done
9490
9491
9492 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9493 # loading of modules.
9494
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9496 $as_echo_n "checking DYNLOADFILE... " >&6; }
9497 if test -z "$DYNLOADFILE"
9498 then
9499         case $ac_sys_system/$ac_sys_release in
9500         AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9501         if test "$ac_cv_func_dlopen" = yes
9502         then DYNLOADFILE="dynload_shlib.o"
9503         else DYNLOADFILE="dynload_aix.o"
9504         fi
9505         ;;
9506         BeOS*) DYNLOADFILE="dynload_beos.o";;
9507         hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
9508         # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9509         Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
9510         atheos*) DYNLOADFILE="dynload_atheos.o";;
9511         *)
9512         # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9513         # out any dynamic loading
9514         if test "$ac_cv_func_dlopen" = yes
9515         then DYNLOADFILE="dynload_shlib.o"
9516         else DYNLOADFILE="dynload_stub.o"
9517         fi
9518         ;;
9519         esac
9520 fi
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9522 $as_echo "$DYNLOADFILE" >&6; }
9523 if test "$DYNLOADFILE" != "dynload_stub.o"
9524 then
9525
9526 $as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
9527
9528 fi
9529
9530 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
9531
9532
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9534 $as_echo_n "checking MACHDEP_OBJS... " >&6; }
9535 if test -z "$MACHDEP_OBJS"
9536 then
9537         MACHDEP_OBJS=$extra_machdep_objs
9538 else
9539         MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
9540 fi
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9542 $as_echo "MACHDEP_OBJS" >&6; }
9543
9544 # checks for library functions
9545 for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9546  clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
9547  gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
9548  getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
9549  initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
9550  mremap nice pathconf pause plock poll pthread_init \
9551  putenv readlink realpath \
9552  select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9553  setgid \
9554  setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
9555  setlocale setregid setreuid setresuid setresgid \
9556  setsid setpgid setpgrp setuid setvbuf snprintf \
9557  sigaction siginterrupt sigrelse strftime \
9558  sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
9559  truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
9560 do :
9561   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9562 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9563 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9564   cat >>confdefs.h <<_ACEOF
9565 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9566 _ACEOF
9567
9568 fi
9569 done
9570
9571
9572 # For some functions, having a definition is not sufficient, since
9573 # we want to take their address.
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9575 $as_echo_n "checking for chroot... " >&6; }
9576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9577 /* end confdefs.h.  */
9578 #include <unistd.h>
9579 int
9580 main ()
9581 {
9582 void *x=chroot
9583   ;
9584   return 0;
9585 }
9586 _ACEOF
9587 if ac_fn_c_try_compile "$LINENO"; then :
9588
9589 $as_echo "#define HAVE_CHROOT 1" >>confdefs.h
9590
9591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9592 $as_echo "yes" >&6; }
9593 else
9594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595 $as_echo "no" >&6; }
9596
9597 fi
9598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9600 $as_echo_n "checking for link... " >&6; }
9601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9602 /* end confdefs.h.  */
9603 #include <unistd.h>
9604 int
9605 main ()
9606 {
9607 void *x=link
9608   ;
9609   return 0;
9610 }
9611 _ACEOF
9612 if ac_fn_c_try_compile "$LINENO"; then :
9613
9614 $as_echo "#define HAVE_LINK 1" >>confdefs.h
9615
9616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9617 $as_echo "yes" >&6; }
9618 else
9619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9620 $as_echo "no" >&6; }
9621
9622 fi
9623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9625 $as_echo_n "checking for symlink... " >&6; }
9626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9627 /* end confdefs.h.  */
9628 #include <unistd.h>
9629 int
9630 main ()
9631 {
9632 void *x=symlink
9633   ;
9634   return 0;
9635 }
9636 _ACEOF
9637 if ac_fn_c_try_compile "$LINENO"; then :
9638
9639 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
9640
9641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9642 $as_echo "yes" >&6; }
9643 else
9644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645 $as_echo "no" >&6; }
9646
9647 fi
9648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9650 $as_echo_n "checking for fchdir... " >&6; }
9651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9652 /* end confdefs.h.  */
9653 #include <unistd.h>
9654 int
9655 main ()
9656 {
9657 void *x=fchdir
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 if ac_fn_c_try_compile "$LINENO"; then :
9663
9664 $as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
9665
9666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9667 $as_echo "yes" >&6; }
9668 else
9669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670 $as_echo "no" >&6; }
9671
9672 fi
9673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9675 $as_echo_n "checking for fsync... " >&6; }
9676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9677 /* end confdefs.h.  */
9678 #include <unistd.h>
9679 int
9680 main ()
9681 {
9682 void *x=fsync
9683   ;
9684   return 0;
9685 }
9686 _ACEOF
9687 if ac_fn_c_try_compile "$LINENO"; then :
9688
9689 $as_echo "#define HAVE_FSYNC 1" >>confdefs.h
9690
9691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9692 $as_echo "yes" >&6; }
9693 else
9694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695 $as_echo "no" >&6; }
9696
9697 fi
9698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9700 $as_echo_n "checking for fdatasync... " >&6; }
9701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9702 /* end confdefs.h.  */
9703 #include <unistd.h>
9704 int
9705 main ()
9706 {
9707 void *x=fdatasync
9708   ;
9709   return 0;
9710 }
9711 _ACEOF
9712 if ac_fn_c_try_compile "$LINENO"; then :
9713
9714 $as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
9715
9716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9717 $as_echo "yes" >&6; }
9718 else
9719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720 $as_echo "no" >&6; }
9721
9722 fi
9723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9725 $as_echo_n "checking for epoll... " >&6; }
9726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9727 /* end confdefs.h.  */
9728 #include <sys/epoll.h>
9729 int
9730 main ()
9731 {
9732 void *x=epoll_create
9733   ;
9734   return 0;
9735 }
9736 _ACEOF
9737 if ac_fn_c_try_compile "$LINENO"; then :
9738
9739 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
9740
9741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9742 $as_echo "yes" >&6; }
9743 else
9744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745 $as_echo "no" >&6; }
9746
9747 fi
9748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9750 $as_echo_n "checking for kqueue... " >&6; }
9751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9752 /* end confdefs.h.  */
9753
9754 #include <sys/types.h>
9755 #include <sys/event.h>
9756
9757 int
9758 main ()
9759 {
9760 int x=kqueue()
9761   ;
9762   return 0;
9763 }
9764 _ACEOF
9765 if ac_fn_c_try_compile "$LINENO"; then :
9766
9767 $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
9768
9769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9770 $as_echo "yes" >&6; }
9771 else
9772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773 $as_echo "no" >&6; }
9774
9775 fi
9776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9777 # On some systems (eg. FreeBSD 5), we would find a definition of the
9778 # functions ctermid_r, setgroups in the library, but no prototype
9779 # (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9780 # address to avoid compiler warnings and potential miscompilations
9781 # because of the missing prototypes.
9782
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9784 $as_echo_n "checking for ctermid_r... " >&6; }
9785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9786 /* end confdefs.h.  */
9787
9788 #include <stdio.h>
9789
9790 int
9791 main ()
9792 {
9793 void* p = ctermid_r
9794   ;
9795   return 0;
9796 }
9797 _ACEOF
9798 if ac_fn_c_try_compile "$LINENO"; then :
9799
9800 $as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
9801
9802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9803 $as_echo "yes" >&6; }
9804 else
9805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806 $as_echo "no" >&6; }
9807
9808 fi
9809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9810
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9812 $as_echo_n "checking for flock declaration... " >&6; }
9813 if test "${ac_cv_flock_decl+set}" = set; then :
9814   $as_echo_n "(cached) " >&6
9815 else
9816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9817 /* end confdefs.h.  */
9818 #include <sys/file.h>
9819 int
9820 main ()
9821 {
9822 void* p = flock
9823
9824   ;
9825   return 0;
9826 }
9827 _ACEOF
9828 if ac_fn_c_try_compile "$LINENO"; then :
9829   ac_cv_flock_decl=yes
9830 else
9831   ac_cv_flock_decl=no
9832
9833 fi
9834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9835
9836 fi
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9838 $as_echo "$ac_cv_flock_decl" >&6; }
9839 if test "x${ac_cv_flock_decl}" = xyes; then
9840   for ac_func in flock
9841 do :
9842   ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9843 if test "x$ac_cv_func_flock" = x""yes; then :
9844   cat >>confdefs.h <<_ACEOF
9845 #define HAVE_FLOCK 1
9846 _ACEOF
9847
9848 else
9849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
9850 $as_echo_n "checking for flock in -lbsd... " >&6; }
9851 if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9852   $as_echo_n "(cached) " >&6
9853 else
9854   ac_check_lib_save_LIBS=$LIBS
9855 LIBS="-lbsd  $LIBS"
9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857 /* end confdefs.h.  */
9858
9859 /* Override any GCC internal prototype to avoid an error.
9860    Use char because int might match the return type of a GCC
9861    builtin and then its argument prototype would still apply.  */
9862 #ifdef __cplusplus
9863 extern "C"
9864 #endif
9865 char flock ();
9866 int
9867 main ()
9868 {
9869 return flock ();
9870   ;
9871   return 0;
9872 }
9873 _ACEOF
9874 if ac_fn_c_try_link "$LINENO"; then :
9875   ac_cv_lib_bsd_flock=yes
9876 else
9877   ac_cv_lib_bsd_flock=no
9878 fi
9879 rm -f core conftest.err conftest.$ac_objext \
9880     conftest$ac_exeext conftest.$ac_ext
9881 LIBS=$ac_check_lib_save_LIBS
9882 fi
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9884 $as_echo "$ac_cv_lib_bsd_flock" >&6; }
9885 if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
9886   $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
9887
9888
9889 $as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9890
9891
9892 fi
9893
9894
9895 fi
9896 done
9897
9898 fi
9899
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9901 $as_echo_n "checking for getpagesize... " >&6; }
9902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9903 /* end confdefs.h.  */
9904
9905 #include <unistd.h>
9906
9907 int
9908 main ()
9909 {
9910 void* p = getpagesize
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 if ac_fn_c_try_compile "$LINENO"; then :
9916
9917 $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
9918
9919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9920 $as_echo "yes" >&6; }
9921 else
9922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923 $as_echo "no" >&6; }
9924
9925 fi
9926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9927
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9929 $as_echo_n "checking for broken unsetenv... " >&6; }
9930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9931 /* end confdefs.h.  */
9932
9933 #include <stdlib.h>
9934
9935 int
9936 main ()
9937 {
9938 int res = unsetenv("DUMMY")
9939   ;
9940   return 0;
9941 }
9942 _ACEOF
9943 if ac_fn_c_try_compile "$LINENO"; then :
9944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945 $as_echo "no" >&6; }
9946 else
9947
9948 $as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9949
9950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9951 $as_echo "yes" >&6; }
9952
9953 fi
9954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9955
9956 for ac_prog in true
9957 do
9958   # Extract the first word of "$ac_prog", so it can be a program name with args.
9959 set dummy $ac_prog; ac_word=$2
9960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9961 $as_echo_n "checking for $ac_word... " >&6; }
9962 if test "${ac_cv_prog_TRUE+set}" = set; then :
9963   $as_echo_n "(cached) " >&6
9964 else
9965   if test -n "$TRUE"; then
9966   ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9967 else
9968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9969 for as_dir in $PATH
9970 do
9971   IFS=$as_save_IFS
9972   test -z "$as_dir" && as_dir=.
9973     for ac_exec_ext in '' $ac_executable_extensions; do
9974   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9975     ac_cv_prog_TRUE="$ac_prog"
9976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9977     break 2
9978   fi
9979 done
9980   done
9981 IFS=$as_save_IFS
9982
9983 fi
9984 fi
9985 TRUE=$ac_cv_prog_TRUE
9986 if test -n "$TRUE"; then
9987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9988 $as_echo "$TRUE" >&6; }
9989 else
9990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9991 $as_echo "no" >&6; }
9992 fi
9993
9994
9995   test -n "$TRUE" && break
9996 done
9997 test -n "$TRUE" || TRUE="/bin/true"
9998
9999
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10001 $as_echo_n "checking for inet_aton in -lc... " >&6; }
10002 if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
10003   $as_echo_n "(cached) " >&6
10004 else
10005   ac_check_lib_save_LIBS=$LIBS
10006 LIBS="-lc  $LIBS"
10007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10008 /* end confdefs.h.  */
10009
10010 /* Override any GCC internal prototype to avoid an error.
10011    Use char because int might match the return type of a GCC
10012    builtin and then its argument prototype would still apply.  */
10013 #ifdef __cplusplus
10014 extern "C"
10015 #endif
10016 char inet_aton ();
10017 int
10018 main ()
10019 {
10020 return inet_aton ();
10021   ;
10022   return 0;
10023 }
10024 _ACEOF
10025 if ac_fn_c_try_link "$LINENO"; then :
10026   ac_cv_lib_c_inet_aton=yes
10027 else
10028   ac_cv_lib_c_inet_aton=no
10029 fi
10030 rm -f core conftest.err conftest.$ac_objext \
10031     conftest$ac_exeext conftest.$ac_ext
10032 LIBS=$ac_check_lib_save_LIBS
10033 fi
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10035 $as_echo "$ac_cv_lib_c_inet_aton" >&6; }
10036 if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
10037   $ac_cv_prog_TRUE
10038 else
10039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10040 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
10041 if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
10042   $as_echo_n "(cached) " >&6
10043 else
10044   ac_check_lib_save_LIBS=$LIBS
10045 LIBS="-lresolv  $LIBS"
10046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10047 /* end confdefs.h.  */
10048
10049 /* Override any GCC internal prototype to avoid an error.
10050    Use char because int might match the return type of a GCC
10051    builtin and then its argument prototype would still apply.  */
10052 #ifdef __cplusplus
10053 extern "C"
10054 #endif
10055 char inet_aton ();
10056 int
10057 main ()
10058 {
10059 return inet_aton ();
10060   ;
10061   return 0;
10062 }
10063 _ACEOF
10064 if ac_fn_c_try_link "$LINENO"; then :
10065   ac_cv_lib_resolv_inet_aton=yes
10066 else
10067   ac_cv_lib_resolv_inet_aton=no
10068 fi
10069 rm -f core conftest.err conftest.$ac_objext \
10070     conftest$ac_exeext conftest.$ac_ext
10071 LIBS=$ac_check_lib_save_LIBS
10072 fi
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10074 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
10075 if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
10076   cat >>confdefs.h <<_ACEOF
10077 #define HAVE_LIBRESOLV 1
10078 _ACEOF
10079
10080   LIBS="-lresolv $LIBS"
10081
10082 fi
10083
10084
10085 fi
10086
10087
10088 # On Tru64, chflags seems to be present, but calling it will
10089 # exit Python
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10091 $as_echo_n "checking for chflags... " >&6; }
10092 if test "${ac_cv_have_chflags+set}" = set; then :
10093   $as_echo_n "(cached) " >&6
10094 else
10095   if test "$cross_compiling" = yes; then :
10096   ac_cv_have_chflags=cross
10097 else
10098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10099 /* end confdefs.h.  */
10100
10101 #include <sys/stat.h>
10102 #include <unistd.h>
10103 int main(int argc, char*argv[])
10104 {
10105   if(chflags(argv[0], 0) != 0)
10106     return 1;
10107   return 0;
10108 }
10109
10110 _ACEOF
10111 if ac_fn_c_try_run "$LINENO"; then :
10112   ac_cv_have_chflags=yes
10113 else
10114   ac_cv_have_chflags=no
10115 fi
10116 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10117   conftest.$ac_objext conftest.beam conftest.$ac_ext
10118 fi
10119
10120
10121 fi
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10123 $as_echo "$ac_cv_have_chflags" >&6; }
10124 if test "$ac_cv_have_chflags" = cross ; then
10125   ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
10126 if test "x$ac_cv_func_chflags" = x""yes; then :
10127   ac_cv_have_chflags="yes"
10128 else
10129   ac_cv_have_chflags="no"
10130 fi
10131
10132 fi
10133 if test "$ac_cv_have_chflags" = yes ; then
10134
10135 $as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
10136
10137 fi
10138
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10140 $as_echo_n "checking for lchflags... " >&6; }
10141 if test "${ac_cv_have_lchflags+set}" = set; then :
10142   $as_echo_n "(cached) " >&6
10143 else
10144   if test "$cross_compiling" = yes; then :
10145   ac_cv_have_lchflags=cross
10146 else
10147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10148 /* end confdefs.h.  */
10149
10150 #include <sys/stat.h>
10151 #include <unistd.h>
10152 int main(int argc, char*argv[])
10153 {
10154   if(lchflags(argv[0], 0) != 0)
10155     return 1;
10156   return 0;
10157 }
10158
10159 _ACEOF
10160 if ac_fn_c_try_run "$LINENO"; then :
10161   ac_cv_have_lchflags=yes
10162 else
10163   ac_cv_have_lchflags=no
10164 fi
10165 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10166   conftest.$ac_objext conftest.beam conftest.$ac_ext
10167 fi
10168
10169
10170 fi
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10172 $as_echo "$ac_cv_have_lchflags" >&6; }
10173 if test "$ac_cv_have_lchflags" = cross ; then
10174   ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
10175 if test "x$ac_cv_func_lchflags" = x""yes; then :
10176   ac_cv_have_lchflags="yes"
10177 else
10178   ac_cv_have_lchflags="no"
10179 fi
10180
10181 fi
10182 if test "$ac_cv_have_lchflags" = yes ; then
10183
10184 $as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
10185
10186 fi
10187
10188 case $ac_sys_system/$ac_sys_release in
10189 Darwin/*)
10190         _CUR_CFLAGS="${CFLAGS}"
10191         _CUR_LDFLAGS="${LDFLAGS}"
10192         CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10193         LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10194         ;;
10195 esac
10196
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10198 $as_echo_n "checking for inflateCopy in -lz... " >&6; }
10199 if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
10200   $as_echo_n "(cached) " >&6
10201 else
10202   ac_check_lib_save_LIBS=$LIBS
10203 LIBS="-lz  $LIBS"
10204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10205 /* end confdefs.h.  */
10206
10207 /* Override any GCC internal prototype to avoid an error.
10208    Use char because int might match the return type of a GCC
10209    builtin and then its argument prototype would still apply.  */
10210 #ifdef __cplusplus
10211 extern "C"
10212 #endif
10213 char inflateCopy ();
10214 int
10215 main ()
10216 {
10217 return inflateCopy ();
10218   ;
10219   return 0;
10220 }
10221 _ACEOF
10222 if ac_fn_c_try_link "$LINENO"; then :
10223   ac_cv_lib_z_inflateCopy=yes
10224 else
10225   ac_cv_lib_z_inflateCopy=no
10226 fi
10227 rm -f core conftest.err conftest.$ac_objext \
10228     conftest$ac_exeext conftest.$ac_ext
10229 LIBS=$ac_check_lib_save_LIBS
10230 fi
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10232 $as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
10233 if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
10234
10235 $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
10236
10237 fi
10238
10239
10240 case $ac_sys_system/$ac_sys_release in
10241 Darwin/*)
10242         CFLAGS="${_CUR_CFLAGS}"
10243         LDFLAGS="${_CUR_LDFLAGS}"
10244         ;;
10245 esac
10246
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10248 $as_echo_n "checking for hstrerror... " >&6; }
10249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h.  */
10251
10252 #include <netdb.h>
10253
10254 int
10255 main ()
10256 {
10257 void* p = hstrerror; hstrerror(0)
10258   ;
10259   return 0;
10260 }
10261 _ACEOF
10262 if ac_fn_c_try_link "$LINENO"; then :
10263
10264 $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
10265
10266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10267 $as_echo "yes" >&6; }
10268 else
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270 $as_echo "no" >&6; }
10271
10272 fi
10273 rm -f core conftest.err conftest.$ac_objext \
10274     conftest$ac_exeext conftest.$ac_ext
10275
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10277 $as_echo_n "checking for inet_aton... " >&6; }
10278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10279 /* end confdefs.h.  */
10280
10281 #include <sys/types.h>
10282 #include <sys/socket.h>
10283 #include <netinet/in.h>
10284 #include <arpa/inet.h>
10285
10286 int
10287 main ()
10288 {
10289 void* p = inet_aton;inet_aton(0,0)
10290   ;
10291   return 0;
10292 }
10293 _ACEOF
10294 if ac_fn_c_try_link "$LINENO"; then :
10295
10296 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
10297
10298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10299 $as_echo "yes" >&6; }
10300 else
10301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302 $as_echo "no" >&6; }
10303
10304 fi
10305 rm -f core conftest.err conftest.$ac_objext \
10306     conftest$ac_exeext conftest.$ac_ext
10307
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10309 $as_echo_n "checking for inet_pton... " >&6; }
10310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10311 /* end confdefs.h.  */
10312
10313 #include <sys/types.h>
10314 #include <sys/socket.h>
10315 #include <netinet/in.h>
10316 #include <arpa/inet.h>
10317
10318 int
10319 main ()
10320 {
10321 void* p = inet_pton
10322   ;
10323   return 0;
10324 }
10325 _ACEOF
10326 if ac_fn_c_try_compile "$LINENO"; then :
10327
10328 $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
10329
10330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10331 $as_echo "yes" >&6; }
10332 else
10333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334 $as_echo "no" >&6; }
10335
10336 fi
10337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10338
10339 # On some systems, setgroups is in unistd.h, on others, in grp.h
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10341 $as_echo_n "checking for setgroups... " >&6; }
10342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10343 /* end confdefs.h.  */
10344
10345 #include <unistd.h>
10346 #ifdef HAVE_GRP_H
10347 #include <grp.h>
10348 #endif
10349
10350 int
10351 main ()
10352 {
10353 void* p = setgroups
10354   ;
10355   return 0;
10356 }
10357 _ACEOF
10358 if ac_fn_c_try_compile "$LINENO"; then :
10359
10360 $as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
10361
10362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10363 $as_echo "yes" >&6; }
10364 else
10365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366 $as_echo "no" >&6; }
10367
10368 fi
10369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10370
10371 # check for openpty and forkpty
10372
10373 for ac_func in openpty
10374 do :
10375   ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10376 if test "x$ac_cv_func_openpty" = x""yes; then :
10377   cat >>confdefs.h <<_ACEOF
10378 #define HAVE_OPENPTY 1
10379 _ACEOF
10380
10381 else
10382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10383 $as_echo_n "checking for openpty in -lutil... " >&6; }
10384 if test "${ac_cv_lib_util_openpty+set}" = set; then :
10385   $as_echo_n "(cached) " >&6
10386 else
10387   ac_check_lib_save_LIBS=$LIBS
10388 LIBS="-lutil  $LIBS"
10389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10390 /* end confdefs.h.  */
10391
10392 /* Override any GCC internal prototype to avoid an error.
10393    Use char because int might match the return type of a GCC
10394    builtin and then its argument prototype would still apply.  */
10395 #ifdef __cplusplus
10396 extern "C"
10397 #endif
10398 char openpty ();
10399 int
10400 main ()
10401 {
10402 return openpty ();
10403   ;
10404   return 0;
10405 }
10406 _ACEOF
10407 if ac_fn_c_try_link "$LINENO"; then :
10408   ac_cv_lib_util_openpty=yes
10409 else
10410   ac_cv_lib_util_openpty=no
10411 fi
10412 rm -f core conftest.err conftest.$ac_objext \
10413     conftest$ac_exeext conftest.$ac_ext
10414 LIBS=$ac_check_lib_save_LIBS
10415 fi
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10417 $as_echo "$ac_cv_lib_util_openpty" >&6; }
10418 if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10419   $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
10420  LIBS="$LIBS -lutil"
10421 else
10422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10423 $as_echo_n "checking for openpty in -lbsd... " >&6; }
10424 if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10425   $as_echo_n "(cached) " >&6
10426 else
10427   ac_check_lib_save_LIBS=$LIBS
10428 LIBS="-lbsd  $LIBS"
10429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10430 /* end confdefs.h.  */
10431
10432 /* Override any GCC internal prototype to avoid an error.
10433    Use char because int might match the return type of a GCC
10434    builtin and then its argument prototype would still apply.  */
10435 #ifdef __cplusplus
10436 extern "C"
10437 #endif
10438 char openpty ();
10439 int
10440 main ()
10441 {
10442 return openpty ();
10443   ;
10444   return 0;
10445 }
10446 _ACEOF
10447 if ac_fn_c_try_link "$LINENO"; then :
10448   ac_cv_lib_bsd_openpty=yes
10449 else
10450   ac_cv_lib_bsd_openpty=no
10451 fi
10452 rm -f core conftest.err conftest.$ac_objext \
10453     conftest$ac_exeext conftest.$ac_ext
10454 LIBS=$ac_check_lib_save_LIBS
10455 fi
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10457 $as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10458 if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10459   $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
10460  LIBS="$LIBS -lbsd"
10461 fi
10462
10463
10464 fi
10465
10466
10467 fi
10468 done
10469
10470 for ac_func in forkpty
10471 do :
10472   ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10473 if test "x$ac_cv_func_forkpty" = x""yes; then :
10474   cat >>confdefs.h <<_ACEOF
10475 #define HAVE_FORKPTY 1
10476 _ACEOF
10477
10478 else
10479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10480 $as_echo_n "checking for forkpty in -lutil... " >&6; }
10481 if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10482   $as_echo_n "(cached) " >&6
10483 else
10484   ac_check_lib_save_LIBS=$LIBS
10485 LIBS="-lutil  $LIBS"
10486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10487 /* end confdefs.h.  */
10488
10489 /* Override any GCC internal prototype to avoid an error.
10490    Use char because int might match the return type of a GCC
10491    builtin and then its argument prototype would still apply.  */
10492 #ifdef __cplusplus
10493 extern "C"
10494 #endif
10495 char forkpty ();
10496 int
10497 main ()
10498 {
10499 return forkpty ();
10500   ;
10501   return 0;
10502 }
10503 _ACEOF
10504 if ac_fn_c_try_link "$LINENO"; then :
10505   ac_cv_lib_util_forkpty=yes
10506 else
10507   ac_cv_lib_util_forkpty=no
10508 fi
10509 rm -f core conftest.err conftest.$ac_objext \
10510     conftest$ac_exeext conftest.$ac_ext
10511 LIBS=$ac_check_lib_save_LIBS
10512 fi
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10514 $as_echo "$ac_cv_lib_util_forkpty" >&6; }
10515 if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10516   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
10517  LIBS="$LIBS -lutil"
10518 else
10519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10520 $as_echo_n "checking for forkpty in -lbsd... " >&6; }
10521 if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10522   $as_echo_n "(cached) " >&6
10523 else
10524   ac_check_lib_save_LIBS=$LIBS
10525 LIBS="-lbsd  $LIBS"
10526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10527 /* end confdefs.h.  */
10528
10529 /* Override any GCC internal prototype to avoid an error.
10530    Use char because int might match the return type of a GCC
10531    builtin and then its argument prototype would still apply.  */
10532 #ifdef __cplusplus
10533 extern "C"
10534 #endif
10535 char forkpty ();
10536 int
10537 main ()
10538 {
10539 return forkpty ();
10540   ;
10541   return 0;
10542 }
10543 _ACEOF
10544 if ac_fn_c_try_link "$LINENO"; then :
10545   ac_cv_lib_bsd_forkpty=yes
10546 else
10547   ac_cv_lib_bsd_forkpty=no
10548 fi
10549 rm -f core conftest.err conftest.$ac_objext \
10550     conftest$ac_exeext conftest.$ac_ext
10551 LIBS=$ac_check_lib_save_LIBS
10552 fi
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10554 $as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10555 if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10556   $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
10557  LIBS="$LIBS -lbsd"
10558 fi
10559
10560
10561 fi
10562
10563
10564 fi
10565 done
10566
10567
10568 # Stuff for expat.
10569 for ac_func in memmove
10570 do :
10571   ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10572 if test "x$ac_cv_func_memmove" = x""yes; then :
10573   cat >>confdefs.h <<_ACEOF
10574 #define HAVE_MEMMOVE 1
10575 _ACEOF
10576
10577 fi
10578 done
10579
10580
10581 # check for long file support functions
10582 for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
10583 do :
10584   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10585 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10586 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10587   cat >>confdefs.h <<_ACEOF
10588 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10589 _ACEOF
10590
10591 fi
10592 done
10593
10594
10595 ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10596 if test "x$ac_cv_func_dup2" = x""yes; then :
10597   $as_echo "#define HAVE_DUP2 1" >>confdefs.h
10598
10599 else
10600   case " $LIBOBJS " in
10601   *" dup2.$ac_objext "* ) ;;
10602   *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
10603  ;;
10604 esac
10605
10606 fi
10607
10608 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10609 if test "x$ac_cv_func_getcwd" = x""yes; then :
10610   $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10611
10612 else
10613   case " $LIBOBJS " in
10614   *" getcwd.$ac_objext "* ) ;;
10615   *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10616  ;;
10617 esac
10618
10619 fi
10620
10621 ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10622 if test "x$ac_cv_func_strdup" = x""yes; then :
10623   $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10624
10625 else
10626   case " $LIBOBJS " in
10627   *" strdup.$ac_objext "* ) ;;
10628   *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10629  ;;
10630 esac
10631
10632 fi
10633
10634
10635 for ac_func in getpgrp
10636 do :
10637   ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10638 if test "x$ac_cv_func_getpgrp" = x""yes; then :
10639   cat >>confdefs.h <<_ACEOF
10640 #define HAVE_GETPGRP 1
10641 _ACEOF
10642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10643 /* end confdefs.h.  */
10644 #include <unistd.h>
10645 int
10646 main ()
10647 {
10648 getpgrp(0);
10649   ;
10650   return 0;
10651 }
10652 _ACEOF
10653 if ac_fn_c_try_compile "$LINENO"; then :
10654
10655 $as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
10656
10657 fi
10658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10659
10660 fi
10661 done
10662
10663 for ac_func in setpgrp
10664 do :
10665   ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10666 if test "x$ac_cv_func_setpgrp" = x""yes; then :
10667   cat >>confdefs.h <<_ACEOF
10668 #define HAVE_SETPGRP 1
10669 _ACEOF
10670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672 #include <unistd.h>
10673 int
10674 main ()
10675 {
10676 setpgrp(0,0);
10677   ;
10678   return 0;
10679 }
10680 _ACEOF
10681 if ac_fn_c_try_compile "$LINENO"; then :
10682
10683 $as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
10684
10685 fi
10686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10687
10688 fi
10689 done
10690
10691 for ac_func in gettimeofday
10692 do :
10693   ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10694 if test "x$ac_cv_func_gettimeofday" = x""yes; then :
10695   cat >>confdefs.h <<_ACEOF
10696 #define HAVE_GETTIMEOFDAY 1
10697 _ACEOF
10698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h.  */
10700 #include <sys/time.h>
10701 int
10702 main ()
10703 {
10704 gettimeofday((struct timeval*)0,(struct timezone*)0);
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 if ac_fn_c_try_compile "$LINENO"; then :
10710
10711 else
10712
10713 $as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
10714
10715
10716 fi
10717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10718
10719 fi
10720 done
10721
10722
10723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10724 $as_echo_n "checking for major... " >&6; }
10725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10726 /* end confdefs.h.  */
10727
10728 #if defined(MAJOR_IN_MKDEV)
10729 #include <sys/mkdev.h>
10730 #elif defined(MAJOR_IN_SYSMACROS)
10731 #include <sys/sysmacros.h>
10732 #else
10733 #include <sys/types.h>
10734 #endif
10735
10736 int
10737 main ()
10738 {
10739
10740   makedev(major(0),minor(0));
10741
10742   ;
10743   return 0;
10744 }
10745 _ACEOF
10746 if ac_fn_c_try_link "$LINENO"; then :
10747
10748
10749 $as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
10750
10751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10752 $as_echo "yes" >&6; }
10753
10754 else
10755
10756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757 $as_echo "no" >&6; }
10758
10759 fi
10760 rm -f core conftest.err conftest.$ac_objext \
10761     conftest$ac_exeext conftest.$ac_ext
10762
10763 # On OSF/1 V5.1, getaddrinfo is available, but a define
10764 # for [no]getaddrinfo in netdb.h.
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10766 $as_echo_n "checking for getaddrinfo... " >&6; }
10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10768 /* end confdefs.h.  */
10769
10770 #include <sys/types.h>
10771 #include <sys/socket.h>
10772 #include <netdb.h>
10773 #include <stdio.h>
10774
10775 int
10776 main ()
10777 {
10778 getaddrinfo(NULL, NULL, NULL, NULL);
10779   ;
10780   return 0;
10781 }
10782 _ACEOF
10783 if ac_fn_c_try_link "$LINENO"; then :
10784   have_getaddrinfo=yes
10785 else
10786   have_getaddrinfo=no
10787 fi
10788 rm -f core conftest.err conftest.$ac_objext \
10789     conftest$ac_exeext conftest.$ac_ext
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10791 $as_echo "$have_getaddrinfo" >&6; }
10792 if test $have_getaddrinfo = yes
10793 then
10794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10795 $as_echo_n "checking getaddrinfo bug... " >&6; }
10796   if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10797   $as_echo_n "(cached) " >&6
10798 else
10799   if test "$cross_compiling" = yes; then :
10800   ac_cv_buggy_getaddrinfo=yes
10801 else
10802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10803 /* end confdefs.h.  */
10804
10805 #include <sys/types.h>
10806 #include <netdb.h>
10807 #include <string.h>
10808 #include <sys/socket.h>
10809 #include <netinet/in.h>
10810
10811 int main()
10812 {
10813   int passive, gaierr, inet4 = 0, inet6 = 0;
10814   struct addrinfo hints, *ai, *aitop;
10815   char straddr[INET6_ADDRSTRLEN], strport[16];
10816
10817   for (passive = 0; passive <= 1; passive++) {
10818     memset(&hints, 0, sizeof(hints));
10819     hints.ai_family = AF_UNSPEC;
10820     hints.ai_flags = passive ? AI_PASSIVE : 0;
10821     hints.ai_socktype = SOCK_STREAM;
10822     hints.ai_protocol = IPPROTO_TCP;
10823     if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10824       (void)gai_strerror(gaierr);
10825       goto bad;
10826     }
10827     for (ai = aitop; ai; ai = ai->ai_next) {
10828       if (ai->ai_addr == NULL ||
10829           ai->ai_addrlen == 0 ||
10830           getnameinfo(ai->ai_addr, ai->ai_addrlen,
10831                       straddr, sizeof(straddr), strport, sizeof(strport),
10832                       NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10833         goto bad;
10834       }
10835       switch (ai->ai_family) {
10836       case AF_INET:
10837         if (strcmp(strport, "54321") != 0) {
10838           goto bad;
10839         }
10840         if (passive) {
10841           if (strcmp(straddr, "0.0.0.0") != 0) {
10842             goto bad;
10843           }
10844         } else {
10845           if (strcmp(straddr, "127.0.0.1") != 0) {
10846             goto bad;
10847           }
10848         }
10849         inet4++;
10850         break;
10851       case AF_INET6:
10852         if (strcmp(strport, "54321") != 0) {
10853           goto bad;
10854         }
10855         if (passive) {
10856           if (strcmp(straddr, "::") != 0) {
10857             goto bad;
10858           }
10859         } else {
10860           if (strcmp(straddr, "::1") != 0) {
10861             goto bad;
10862           }
10863         }
10864         inet6++;
10865         break;
10866       case AF_UNSPEC:
10867         goto bad;
10868         break;
10869       default:
10870         /* another family support? */
10871         break;
10872       }
10873     }
10874   }
10875
10876   if (!(inet4 == 0 || inet4 == 2))
10877     goto bad;
10878   if (!(inet6 == 0 || inet6 == 2))
10879     goto bad;
10880
10881   if (aitop)
10882     freeaddrinfo(aitop);
10883   return 0;
10884
10885  bad:
10886   if (aitop)
10887     freeaddrinfo(aitop);
10888   return 1;
10889 }
10890
10891 _ACEOF
10892 if ac_fn_c_try_run "$LINENO"; then :
10893   ac_cv_buggy_getaddrinfo=no
10894 else
10895   ac_cv_buggy_getaddrinfo=yes
10896 fi
10897 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10898   conftest.$ac_objext conftest.beam conftest.$ac_ext
10899 fi
10900
10901 fi
10902
10903 fi
10904
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10906 $as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10907
10908 if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
10909 then
10910         if test $ipv6 = yes
10911         then
10912                 echo 'Fatal: You must get working getaddrinfo() function.'
10913                 echo '       or you can specify "--disable-ipv6"'.
10914                 exit 1
10915         fi
10916 else
10917
10918 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
10919
10920 fi
10921
10922 for ac_func in getnameinfo
10923 do :
10924   ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10925 if test "x$ac_cv_func_getnameinfo" = x""yes; then :
10926   cat >>confdefs.h <<_ACEOF
10927 #define HAVE_GETNAMEINFO 1
10928 _ACEOF
10929
10930 fi
10931 done
10932
10933
10934 # checks for structures
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10936 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10937 if test "${ac_cv_header_time+set}" = set; then :
10938   $as_echo_n "(cached) " >&6
10939 else
10940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10941 /* end confdefs.h.  */
10942 #include <sys/types.h>
10943 #include <sys/time.h>
10944 #include <time.h>
10945
10946 int
10947 main ()
10948 {
10949 if ((struct tm *) 0)
10950 return 0;
10951   ;
10952   return 0;
10953 }
10954 _ACEOF
10955 if ac_fn_c_try_compile "$LINENO"; then :
10956   ac_cv_header_time=yes
10957 else
10958   ac_cv_header_time=no
10959 fi
10960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10961 fi
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10963 $as_echo "$ac_cv_header_time" >&6; }
10964 if test $ac_cv_header_time = yes; then
10965
10966 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
10967
10968 fi
10969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10971 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10972 if test "${ac_cv_struct_tm+set}" = set; then :
10973   $as_echo_n "(cached) " >&6
10974 else
10975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976 /* end confdefs.h.  */
10977 #include <sys/types.h>
10978 #include <time.h>
10979
10980 int
10981 main ()
10982 {
10983 struct tm tm;
10984                                      int *p = &tm.tm_sec;
10985                                      return !p;
10986   ;
10987   return 0;
10988 }
10989 _ACEOF
10990 if ac_fn_c_try_compile "$LINENO"; then :
10991   ac_cv_struct_tm=time.h
10992 else
10993   ac_cv_struct_tm=sys/time.h
10994 fi
10995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10996 fi
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10998 $as_echo "$ac_cv_struct_tm" >&6; }
10999 if test $ac_cv_struct_tm = sys/time.h; then
11000
11001 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11002
11003 fi
11004
11005 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11006 #include <$ac_cv_struct_tm>
11007
11008 "
11009 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
11010
11011 cat >>confdefs.h <<_ACEOF
11012 #define HAVE_STRUCT_TM_TM_ZONE 1
11013 _ACEOF
11014
11015
11016 fi
11017
11018 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11019
11020 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11021
11022 else
11023   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11024 "
11025 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
11026   ac_have_decl=1
11027 else
11028   ac_have_decl=0
11029 fi
11030
11031 cat >>confdefs.h <<_ACEOF
11032 #define HAVE_DECL_TZNAME $ac_have_decl
11033 _ACEOF
11034
11035   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11036 $as_echo_n "checking for tzname... " >&6; }
11037 if test "${ac_cv_var_tzname+set}" = set; then :
11038   $as_echo_n "(cached) " >&6
11039 else
11040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11041 /* end confdefs.h.  */
11042 #include <time.h>
11043 #if !HAVE_DECL_TZNAME
11044 extern char *tzname[];
11045 #endif
11046
11047 int
11048 main ()
11049 {
11050 return tzname[0][0];
11051   ;
11052   return 0;
11053 }
11054 _ACEOF
11055 if ac_fn_c_try_link "$LINENO"; then :
11056   ac_cv_var_tzname=yes
11057 else
11058   ac_cv_var_tzname=no
11059 fi
11060 rm -f core conftest.err conftest.$ac_objext \
11061     conftest$ac_exeext conftest.$ac_ext
11062 fi
11063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11064 $as_echo "$ac_cv_var_tzname" >&6; }
11065   if test $ac_cv_var_tzname = yes; then
11066
11067 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11068
11069   fi
11070 fi
11071
11072 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
11073 if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
11074
11075 cat >>confdefs.h <<_ACEOF
11076 #define HAVE_STRUCT_STAT_ST_RDEV 1
11077 _ACEOF
11078
11079
11080 fi
11081
11082 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11083 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
11084
11085 cat >>confdefs.h <<_ACEOF
11086 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11087 _ACEOF
11088
11089
11090 fi
11091
11092 ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
11093 if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
11094
11095 cat >>confdefs.h <<_ACEOF
11096 #define HAVE_STRUCT_STAT_ST_FLAGS 1
11097 _ACEOF
11098
11099
11100 fi
11101
11102 ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
11103 if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
11104
11105 cat >>confdefs.h <<_ACEOF
11106 #define HAVE_STRUCT_STAT_ST_GEN 1
11107 _ACEOF
11108
11109
11110 fi
11111
11112 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
11113 if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
11114
11115 cat >>confdefs.h <<_ACEOF
11116 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11117 _ACEOF
11118
11119
11120 fi
11121
11122 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11123 if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11124
11125 cat >>confdefs.h <<_ACEOF
11126 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
11127 _ACEOF
11128
11129
11130 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
11131
11132 else
11133   case " $LIBOBJS " in
11134   *" fileblocks.$ac_objext "* ) ;;
11135   *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11136  ;;
11137 esac
11138
11139 fi
11140
11141
11142
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11144 $as_echo_n "checking for time.h that defines altzone... " >&6; }
11145 if test "${ac_cv_header_time_altzone+set}" = set; then :
11146   $as_echo_n "(cached) " >&6
11147 else
11148
11149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11150 /* end confdefs.h.  */
11151 #include <time.h>
11152 int
11153 main ()
11154 {
11155 return altzone;
11156   ;
11157   return 0;
11158 }
11159 _ACEOF
11160 if ac_fn_c_try_compile "$LINENO"; then :
11161   ac_cv_header_time_altzone=yes
11162 else
11163   ac_cv_header_time_altzone=no
11164 fi
11165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11166
11167 fi
11168
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11170 $as_echo "$ac_cv_header_time_altzone" >&6; }
11171 if test $ac_cv_header_time_altzone = yes; then
11172
11173 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
11174
11175 fi
11176
11177 was_it_defined=no
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11179 $as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11181 /* end confdefs.h.  */
11182
11183 #include <sys/types.h>
11184 #include <sys/select.h>
11185 #include <sys/time.h>
11186
11187 int
11188 main ()
11189 {
11190 ;
11191   ;
11192   return 0;
11193 }
11194 _ACEOF
11195 if ac_fn_c_try_compile "$LINENO"; then :
11196
11197
11198 $as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
11199
11200   was_it_defined=yes
11201
11202 fi
11203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11205 $as_echo "$was_it_defined" >&6; }
11206
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11208 $as_echo_n "checking for addrinfo... " >&6; }
11209 if test "${ac_cv_struct_addrinfo+set}" = set; then :
11210   $as_echo_n "(cached) " >&6
11211 else
11212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11213 /* end confdefs.h.  */
11214 #include <netdb.h>
11215 int
11216 main ()
11217 {
11218 struct addrinfo a
11219   ;
11220   return 0;
11221 }
11222 _ACEOF
11223 if ac_fn_c_try_compile "$LINENO"; then :
11224   ac_cv_struct_addrinfo=yes
11225 else
11226   ac_cv_struct_addrinfo=no
11227 fi
11228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11229 fi
11230
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11232 $as_echo "$ac_cv_struct_addrinfo" >&6; }
11233 if test $ac_cv_struct_addrinfo = yes; then
11234
11235 $as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
11236
11237 fi
11238
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11240 $as_echo_n "checking for sockaddr_storage... " >&6; }
11241 if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
11242   $as_echo_n "(cached) " >&6
11243 else
11244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245 /* end confdefs.h.  */
11246
11247 #               include <sys/types.h>
11248 #               include <sys/socket.h>
11249 int
11250 main ()
11251 {
11252 struct sockaddr_storage s
11253   ;
11254   return 0;
11255 }
11256 _ACEOF
11257 if ac_fn_c_try_compile "$LINENO"; then :
11258   ac_cv_struct_sockaddr_storage=yes
11259 else
11260   ac_cv_struct_sockaddr_storage=no
11261 fi
11262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11263 fi
11264
11265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11266 $as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
11267 if test $ac_cv_struct_sockaddr_storage = yes; then
11268
11269 $as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
11270
11271 fi
11272
11273 # checks for compiler characteristics
11274
11275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11276 $as_echo_n "checking whether char is unsigned... " >&6; }
11277 if test "${ac_cv_c_char_unsigned+set}" = set; then :
11278   $as_echo_n "(cached) " >&6
11279 else
11280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11281 /* end confdefs.h.  */
11282 $ac_includes_default
11283 int
11284 main ()
11285 {
11286 static int test_array [1 - 2 * !(((char) -1) < 0)];
11287 test_array [0] = 0
11288
11289   ;
11290   return 0;
11291 }
11292 _ACEOF
11293 if ac_fn_c_try_compile "$LINENO"; then :
11294   ac_cv_c_char_unsigned=no
11295 else
11296   ac_cv_c_char_unsigned=yes
11297 fi
11298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11299 fi
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11301 $as_echo "$ac_cv_c_char_unsigned" >&6; }
11302 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
11303   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
11304
11305 fi
11306
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11308 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11309 if test "${ac_cv_c_const+set}" = set; then :
11310   $as_echo_n "(cached) " >&6
11311 else
11312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11313 /* end confdefs.h.  */
11314
11315 int
11316 main ()
11317 {
11318 /* FIXME: Include the comments suggested by Paul. */
11319 #ifndef __cplusplus
11320   /* Ultrix mips cc rejects this.  */
11321   typedef int charset[2];
11322   const charset cs;
11323   /* SunOS 4.1.1 cc rejects this.  */
11324   char const *const *pcpcc;
11325   char **ppc;
11326   /* NEC SVR4.0.2 mips cc rejects this.  */
11327   struct point {int x, y;};
11328   static struct point const zero = {0,0};
11329   /* AIX XL C 1.02.0.0 rejects this.
11330      It does not let you subtract one const X* pointer from another in
11331      an arm of an if-expression whose if-part is not a constant
11332      expression */
11333   const char *g = "string";
11334   pcpcc = &g + (g ? g-g : 0);
11335   /* HPUX 7.0 cc rejects these. */
11336   ++pcpcc;
11337   ppc = (char**) pcpcc;
11338   pcpcc = (char const *const *) ppc;
11339   { /* SCO 3.2v4 cc rejects this.  */
11340     char *t;
11341     char const *s = 0 ? (char *) 0 : (char const *) 0;
11342
11343     *t++ = 0;
11344     if (s) return 0;
11345   }
11346   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11347     int x[] = {25, 17};
11348     const int *foo = &x[0];
11349     ++foo;
11350   }
11351   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11352     typedef const int *iptr;
11353     iptr p = 0;
11354     ++p;
11355   }
11356   { /* AIX XL C 1.02.0.0 rejects this saying
11357        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11358     struct s { int j; const int *ap[3]; };
11359     struct s *b; b->j = 5;
11360   }
11361   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11362     const int foo = 10;
11363     if (!foo) return 0;
11364   }
11365   return !cs[0] && !zero.x;
11366 #endif
11367
11368   ;
11369   return 0;
11370 }
11371 _ACEOF
11372 if ac_fn_c_try_compile "$LINENO"; then :
11373   ac_cv_c_const=yes
11374 else
11375   ac_cv_c_const=no
11376 fi
11377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11378 fi
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11380 $as_echo "$ac_cv_c_const" >&6; }
11381 if test $ac_cv_c_const = no; then
11382
11383 $as_echo "#define const /**/" >>confdefs.h
11384
11385 fi
11386
11387
11388 works=no
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11390 $as_echo_n "checking for working volatile... " >&6; }
11391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392 /* end confdefs.h.  */
11393
11394 int
11395 main ()
11396 {
11397 volatile int x; x = 0;
11398   ;
11399   return 0;
11400 }
11401 _ACEOF
11402 if ac_fn_c_try_compile "$LINENO"; then :
11403   works=yes
11404 else
11405
11406 $as_echo "#define volatile /**/" >>confdefs.h
11407
11408
11409 fi
11410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11412 $as_echo "$works" >&6; }
11413
11414 works=no
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11416 $as_echo_n "checking for working signed char... " >&6; }
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h.  */
11419
11420 int
11421 main ()
11422 {
11423 signed char c;
11424   ;
11425   return 0;
11426 }
11427 _ACEOF
11428 if ac_fn_c_try_compile "$LINENO"; then :
11429   works=yes
11430 else
11431
11432 $as_echo "#define signed /**/" >>confdefs.h
11433
11434
11435 fi
11436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11438 $as_echo "$works" >&6; }
11439
11440 have_prototypes=no
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11442 $as_echo_n "checking for prototypes... " >&6; }
11443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11444 /* end confdefs.h.  */
11445 int foo(int x) { return 0; }
11446 int
11447 main ()
11448 {
11449 return foo(10);
11450   ;
11451   return 0;
11452 }
11453 _ACEOF
11454 if ac_fn_c_try_compile "$LINENO"; then :
11455
11456 $as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
11457
11458    have_prototypes=yes
11459 fi
11460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11462 $as_echo "$have_prototypes" >&6; }
11463
11464 works=no
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11466 $as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11468 /* end confdefs.h.  */
11469
11470 #include <stdarg.h>
11471 int foo(int x, ...) {
11472         va_list va;
11473         va_start(va, x);
11474         va_arg(va, int);
11475         va_arg(va, char *);
11476         va_arg(va, double);
11477         return 0;
11478 }
11479
11480 int
11481 main ()
11482 {
11483 return foo(10, "", 3.14);
11484   ;
11485   return 0;
11486 }
11487 _ACEOF
11488 if ac_fn_c_try_compile "$LINENO"; then :
11489
11490
11491 $as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
11492
11493   works=yes
11494
11495 fi
11496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11498 $as_echo "$works" >&6; }
11499
11500 # check for socketpair
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11502 $as_echo_n "checking for socketpair... " >&6; }
11503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11504 /* end confdefs.h.  */
11505
11506 #include <sys/types.h>
11507 #include <sys/socket.h>
11508
11509 int
11510 main ()
11511 {
11512 void *x=socketpair
11513   ;
11514   return 0;
11515 }
11516 _ACEOF
11517 if ac_fn_c_try_compile "$LINENO"; then :
11518
11519 $as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
11520
11521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11522 $as_echo "yes" >&6; }
11523 else
11524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525 $as_echo "no" >&6; }
11526
11527 fi
11528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11529
11530 # check if sockaddr has sa_len member
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11532 $as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534 /* end confdefs.h.  */
11535 #include <sys/types.h>
11536 #include <sys/socket.h>
11537 int
11538 main ()
11539 {
11540 struct sockaddr x;
11541 x.sa_len = 0;
11542   ;
11543   return 0;
11544 }
11545 _ACEOF
11546 if ac_fn_c_try_compile "$LINENO"; then :
11547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11548 $as_echo "yes" >&6; }
11549
11550 $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
11551
11552 else
11553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554 $as_echo "no" >&6; }
11555
11556 fi
11557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11558
11559 va_list_is_array=no
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11561 $as_echo_n "checking whether va_list is an array... " >&6; }
11562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11563 /* end confdefs.h.  */
11564
11565 #ifdef HAVE_STDARG_PROTOTYPES
11566 #include <stdarg.h>
11567 #else
11568 #include <varargs.h>
11569 #endif
11570
11571 int
11572 main ()
11573 {
11574 va_list list1, list2; list1 = list2;
11575   ;
11576   return 0;
11577 }
11578 _ACEOF
11579 if ac_fn_c_try_compile "$LINENO"; then :
11580
11581 else
11582
11583
11584 $as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
11585
11586  va_list_is_array=yes
11587
11588 fi
11589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11591 $as_echo "$va_list_is_array" >&6; }
11592
11593 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
11594
11595
11596 ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11597 if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
11598
11599   $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11600
11601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11602 $as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
11603   OLD_CFLAGS=$CFLAGS
11604   CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
11605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11606 /* end confdefs.h.  */
11607
11608 #   include <netdb.h>
11609
11610 int
11611 main ()
11612 {
11613
11614     char *name;
11615     struct hostent *he, *res;
11616     char buffer[2048];
11617     int buflen = 2048;
11618     int h_errnop;
11619
11620     (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
11621
11622   ;
11623   return 0;
11624 }
11625 _ACEOF
11626 if ac_fn_c_try_compile "$LINENO"; then :
11627
11628     $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11629
11630
11631 $as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
11632
11633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11634 $as_echo "yes" >&6; }
11635
11636 else
11637
11638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639 $as_echo "no" >&6; }
11640     { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11641 $as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11642     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11643 /* end confdefs.h.  */
11644
11645 #       include <netdb.h>
11646
11647 int
11648 main ()
11649 {
11650
11651         char *name;
11652         struct hostent *he;
11653         char buffer[2048];
11654         int buflen = 2048;
11655         int h_errnop;
11656
11657         (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
11658
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 if ac_fn_c_try_compile "$LINENO"; then :
11664
11665         $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11666
11667
11668 $as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
11669
11670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11671 $as_echo "yes" >&6; }
11672
11673 else
11674
11675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676 $as_echo "no" >&6; }
11677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11678 $as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11679         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680 /* end confdefs.h.  */
11681
11682 #           include <netdb.h>
11683
11684 int
11685 main ()
11686 {
11687
11688             char *name;
11689             struct hostent *he;
11690             struct hostent_data data;
11691
11692             (void) gethostbyname_r(name, he, &data);
11693
11694   ;
11695   return 0;
11696 }
11697 _ACEOF
11698 if ac_fn_c_try_compile "$LINENO"; then :
11699
11700             $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11701
11702
11703 $as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11704
11705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11706 $as_echo "yes" >&6; }
11707
11708 else
11709
11710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711 $as_echo "no" >&6; }
11712
11713 fi
11714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11715
11716 fi
11717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11718
11719 fi
11720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11721   CFLAGS=$OLD_CFLAGS
11722
11723 else
11724
11725   for ac_func in gethostbyname
11726 do :
11727   ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11728 if test "x$ac_cv_func_gethostbyname" = x""yes; then :
11729   cat >>confdefs.h <<_ACEOF
11730 #define HAVE_GETHOSTBYNAME 1
11731 _ACEOF
11732
11733 fi
11734 done
11735
11736
11737 fi
11738
11739
11740
11741
11742
11743
11744
11745 # checks for system services
11746 # (none yet)
11747
11748 # Linux requires this for correct f.p. operations
11749 ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11750 if test "x$ac_cv_func___fpu_control" = x""yes; then :
11751
11752 else
11753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11754 $as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11755 if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11756   $as_echo_n "(cached) " >&6
11757 else
11758   ac_check_lib_save_LIBS=$LIBS
11759 LIBS="-lieee  $LIBS"
11760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761 /* end confdefs.h.  */
11762
11763 /* Override any GCC internal prototype to avoid an error.
11764    Use char because int might match the return type of a GCC
11765    builtin and then its argument prototype would still apply.  */
11766 #ifdef __cplusplus
11767 extern "C"
11768 #endif
11769 char __fpu_control ();
11770 int
11771 main ()
11772 {
11773 return __fpu_control ();
11774   ;
11775   return 0;
11776 }
11777 _ACEOF
11778 if ac_fn_c_try_link "$LINENO"; then :
11779   ac_cv_lib_ieee___fpu_control=yes
11780 else
11781   ac_cv_lib_ieee___fpu_control=no
11782 fi
11783 rm -f core conftest.err conftest.$ac_objext \
11784     conftest$ac_exeext conftest.$ac_ext
11785 LIBS=$ac_check_lib_save_LIBS
11786 fi
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11788 $as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11789 if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
11790   cat >>confdefs.h <<_ACEOF
11791 #define HAVE_LIBIEEE 1
11792 _ACEOF
11793
11794   LIBS="-lieee $LIBS"
11795
11796 fi
11797
11798
11799 fi
11800
11801
11802 # Check for --with-fpectl
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11804 $as_echo_n "checking for --with-fpectl... " >&6; }
11805
11806 # Check whether --with-fpectl was given.
11807 if test "${with_fpectl+set}" = set; then :
11808   withval=$with_fpectl;
11809 if test "$withval" != no
11810 then
11811
11812 $as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
11813
11814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11815 $as_echo "yes" >&6; }
11816 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817 $as_echo "no" >&6; }
11818 fi
11819 else
11820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821 $as_echo "no" >&6; }
11822 fi
11823
11824
11825 # check for --with-libm=...
11826
11827 case $ac_sys_system in
11828 Darwin) ;;
11829 BeOS) ;;
11830 *) LIBM=-lm
11831 esac
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11833 $as_echo_n "checking for --with-libm=STRING... " >&6; }
11834
11835 # Check whether --with-libm was given.
11836 if test "${with_libm+set}" = set; then :
11837   withval=$with_libm;
11838 if test "$withval" = no
11839 then LIBM=
11840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11841 $as_echo "force LIBM empty" >&6; }
11842 elif test "$withval" != yes
11843 then LIBM=$withval
11844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11845 $as_echo "set LIBM=\"$withval\"" >&6; }
11846 else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
11847 fi
11848 else
11849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11850 $as_echo "default LIBM=\"$LIBM\"" >&6; }
11851 fi
11852
11853
11854 # check for --with-libc=...
11855
11856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11857 $as_echo_n "checking for --with-libc=STRING... " >&6; }
11858
11859 # Check whether --with-libc was given.
11860 if test "${with_libc+set}" = set; then :
11861   withval=$with_libc;
11862 if test "$withval" = no
11863 then LIBC=
11864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11865 $as_echo "force LIBC empty" >&6; }
11866 elif test "$withval" != yes
11867 then LIBC=$withval
11868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11869 $as_echo "set LIBC=\"$withval\"" >&6; }
11870 else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
11871 fi
11872 else
11873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11874 $as_echo "default LIBC=\"$LIBC\"" >&6; }
11875 fi
11876
11877
11878 # **************************************************
11879 # * Check for various properties of floating point *
11880 # **************************************************
11881
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11883 $as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11884 if test "${ac_cv_little_endian_double+set}" = set; then :
11885   $as_echo_n "(cached) " >&6
11886 else
11887
11888 if test "$cross_compiling" = yes; then :
11889   ac_cv_little_endian_double=no
11890 else
11891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892 /* end confdefs.h.  */
11893
11894 #include <string.h>
11895 int main() {
11896     double x = 9006104071832581.0;
11897     if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11898         return 0;
11899     else
11900         return 1;
11901 }
11902
11903 _ACEOF
11904 if ac_fn_c_try_run "$LINENO"; then :
11905   ac_cv_little_endian_double=yes
11906 else
11907   ac_cv_little_endian_double=no
11908 fi
11909 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11910   conftest.$ac_objext conftest.beam conftest.$ac_ext
11911 fi
11912
11913 fi
11914
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11916 $as_echo "$ac_cv_little_endian_double" >&6; }
11917 if test "$ac_cv_little_endian_double" = yes
11918 then
11919
11920 $as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
11921
11922 fi
11923
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11925 $as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11926 if test "${ac_cv_big_endian_double+set}" = set; then :
11927   $as_echo_n "(cached) " >&6
11928 else
11929
11930 if test "$cross_compiling" = yes; then :
11931   ac_cv_big_endian_double=no
11932 else
11933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11934 /* end confdefs.h.  */
11935
11936 #include <string.h>
11937 int main() {
11938     double x = 9006104071832581.0;
11939     if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11940         return 0;
11941     else
11942         return 1;
11943 }
11944
11945 _ACEOF
11946 if ac_fn_c_try_run "$LINENO"; then :
11947   ac_cv_big_endian_double=yes
11948 else
11949   ac_cv_big_endian_double=no
11950 fi
11951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952   conftest.$ac_objext conftest.beam conftest.$ac_ext
11953 fi
11954
11955 fi
11956
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11958 $as_echo "$ac_cv_big_endian_double" >&6; }
11959 if test "$ac_cv_big_endian_double" = yes
11960 then
11961
11962 $as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
11963
11964 fi
11965
11966 # Some ARM platforms use a mixed-endian representation for doubles.
11967 # While Python doesn't currently have full support for these platforms
11968 # (see e.g., issue 1762561), we can at least make sure that float <-> string
11969 # conversions work.
11970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11971 $as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11972 if test "${ac_cv_mixed_endian_double+set}" = set; then :
11973   $as_echo_n "(cached) " >&6
11974 else
11975
11976 if test "$cross_compiling" = yes; then :
11977   ac_cv_mixed_endian_double=no
11978 else
11979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980 /* end confdefs.h.  */
11981
11982 #include <string.h>
11983 int main() {
11984     double x = 9006104071832581.0;
11985     if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11986         return 0;
11987     else
11988         return 1;
11989 }
11990
11991 _ACEOF
11992 if ac_fn_c_try_run "$LINENO"; then :
11993   ac_cv_mixed_endian_double=yes
11994 else
11995   ac_cv_mixed_endian_double=no
11996 fi
11997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11998   conftest.$ac_objext conftest.beam conftest.$ac_ext
11999 fi
12000
12001 fi
12002
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12004 $as_echo "$ac_cv_mixed_endian_double" >&6; }
12005 if test "$ac_cv_mixed_endian_double" = yes
12006 then
12007
12008 $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
12009
12010 fi
12011
12012 # The short float repr introduced in Python 3.1 requires the
12013 # correctly-rounded string <-> double conversion functions from
12014 # Python/dtoa.c, which in turn require that the FPU uses 53-bit
12015 # rounding; this is a problem on x86, where the x87 FPU has a default
12016 # rounding precision of 64 bits.  For gcc/x86, we can fix this by
12017 # using inline assembler to get and set the x87 FPU control word.
12018
12019 # This inline assembler syntax may also work for suncc and icc,
12020 # so we try it on all platforms.
12021
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12023 $as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025 /* end confdefs.h.  */
12026
12027 int
12028 main ()
12029 {
12030
12031   unsigned short cw;
12032   __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12033   __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
12034
12035   ;
12036   return 0;
12037 }
12038 _ACEOF
12039 if ac_fn_c_try_compile "$LINENO"; then :
12040   have_gcc_asm_for_x87=yes
12041 else
12042   have_gcc_asm_for_x87=no
12043 fi
12044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12046 $as_echo "$have_gcc_asm_for_x87" >&6; }
12047 if test "$have_gcc_asm_for_x87" = yes
12048 then
12049
12050 $as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
12051
12052 fi
12053
12054 # Detect whether system arithmetic is subject to x87-style double
12055 # rounding issues.  The result of this test has little meaning on non
12056 # IEEE 754 platforms.  On IEEE 754, test should return 1 if rounding
12057 # mode is round-to-nearest and double rounding issues are present, and
12058 # 0 otherwise.  See http://bugs.python.org/issue2937 for more info.
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12060 $as_echo_n "checking for x87-style double rounding... " >&6; }
12061 # $BASECFLAGS may affect the result
12062 ac_save_cc="$CC"
12063 CC="$CC $BASECFLAGS"
12064 if test "$cross_compiling" = yes; then :
12065   ac_cv_x87_double_rounding=no
12066 else
12067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068 /* end confdefs.h.  */
12069
12070 #include <stdlib.h>
12071 #include <math.h>
12072 int main() {
12073     volatile double x, y, z;
12074     /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12075     x = 0.99999999999999989; /* 1-2**-53 */
12076     y = 1./x;
12077     if (y != 1.)
12078         exit(0);
12079     /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12080     x = 1e16;
12081     y = 2.99999;
12082     z = x + y;
12083     if (z != 1e16+4.)
12084         exit(0);
12085     /* both tests show evidence of double rounding */
12086     exit(1);
12087 }
12088
12089 _ACEOF
12090 if ac_fn_c_try_run "$LINENO"; then :
12091   ac_cv_x87_double_rounding=no
12092 else
12093   ac_cv_x87_double_rounding=yes
12094 fi
12095 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12096   conftest.$ac_objext conftest.beam conftest.$ac_ext
12097 fi
12098
12099 CC="$ac_save_cc"
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12101 $as_echo "$ac_cv_x87_double_rounding" >&6; }
12102 if test "$ac_cv_x87_double_rounding" = yes
12103 then
12104
12105 $as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
12106
12107 fi
12108
12109 # ************************************
12110 # * Check for mathematical functions *
12111 # ************************************
12112
12113 LIBS_SAVE=$LIBS
12114 LIBS="$LIBS $LIBM"
12115
12116 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12117 # -0. on some architectures.
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12119 $as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
12120 if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
12121   $as_echo_n "(cached) " >&6
12122 else
12123
12124 if test "$cross_compiling" = yes; then :
12125   ac_cv_tanh_preserves_zero_sign=no
12126 else
12127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h.  */
12129
12130 #include <math.h>
12131 #include <stdlib.h>
12132 int main() {
12133     /* return 0 if either negative zeros don't exist
12134        on this platform or if negative zeros exist
12135        and tanh(-0.) == -0. */
12136   if (atan2(0., -1.) == atan2(-0., -1.) ||
12137       atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12138   else exit(1);
12139 }
12140
12141 _ACEOF
12142 if ac_fn_c_try_run "$LINENO"; then :
12143   ac_cv_tanh_preserves_zero_sign=yes
12144 else
12145   ac_cv_tanh_preserves_zero_sign=no
12146 fi
12147 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12148   conftest.$ac_objext conftest.beam conftest.$ac_ext
12149 fi
12150
12151 fi
12152
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12154 $as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
12155 if test "$ac_cv_tanh_preserves_zero_sign" = yes
12156 then
12157
12158 $as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
12159
12160 fi
12161
12162 for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12163 do :
12164   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12165 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12166 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12167   cat >>confdefs.h <<_ACEOF
12168 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12169 _ACEOF
12170
12171 fi
12172 done
12173
12174 for ac_func in hypot lgamma log1p round tgamma
12175 do :
12176   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12177 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12178 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12179   cat >>confdefs.h <<_ACEOF
12180 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12181 _ACEOF
12182
12183 fi
12184 done
12185
12186 ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12187 "
12188 if test "x$ac_cv_have_decl_isinf" = x""yes; then :
12189   ac_have_decl=1
12190 else
12191   ac_have_decl=0
12192 fi
12193
12194 cat >>confdefs.h <<_ACEOF
12195 #define HAVE_DECL_ISINF $ac_have_decl
12196 _ACEOF
12197 ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12198 "
12199 if test "x$ac_cv_have_decl_isnan" = x""yes; then :
12200   ac_have_decl=1
12201 else
12202   ac_have_decl=0
12203 fi
12204
12205 cat >>confdefs.h <<_ACEOF
12206 #define HAVE_DECL_ISNAN $ac_have_decl
12207 _ACEOF
12208 ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12209 "
12210 if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
12211   ac_have_decl=1
12212 else
12213   ac_have_decl=0
12214 fi
12215
12216 cat >>confdefs.h <<_ACEOF
12217 #define HAVE_DECL_ISFINITE $ac_have_decl
12218 _ACEOF
12219
12220
12221 LIBS=$LIBS_SAVE
12222
12223 # For multiprocessing module, check that sem_open
12224 # actually works.  For FreeBSD versions <= 7.2,
12225 # the kernel module that provides POSIX semaphores
12226 # isn't loaded by default, so an attempt to call
12227 # sem_open results in a 'Signal 12' error.
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12229 $as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
12230 if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
12231   $as_echo_n "(cached) " >&6
12232 else
12233   if test "$cross_compiling" = yes; then :
12234   ac_cv_posix_semaphores_enabled=yes
12235 else
12236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12237 /* end confdefs.h.  */
12238
12239 #include <unistd.h>
12240 #include <fcntl.h>
12241 #include <stdio.h>
12242 #include <semaphore.h>
12243 #include <sys/stat.h>
12244
12245 int main(void) {
12246   sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12247   if (a == SEM_FAILED) {
12248     perror("sem_open");
12249     return 1;
12250   }
12251   sem_close(a);
12252   sem_unlink("/autoconf");
12253   return 0;
12254 }
12255
12256 _ACEOF
12257 if ac_fn_c_try_run "$LINENO"; then :
12258   ac_cv_posix_semaphores_enabled=yes
12259 else
12260   ac_cv_posix_semaphores_enabled=no
12261 fi
12262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12263   conftest.$ac_objext conftest.beam conftest.$ac_ext
12264 fi
12265
12266
12267 fi
12268
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12270 $as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
12271 if test $ac_cv_posix_semaphores_enabled = no
12272 then
12273
12274 $as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
12275
12276 fi
12277
12278 # Multiprocessing check for broken sem_getvalue
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12280 $as_echo_n "checking for broken sem_getvalue... " >&6; }
12281 if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
12282   $as_echo_n "(cached) " >&6
12283 else
12284   if test "$cross_compiling" = yes; then :
12285   ac_cv_broken_sem_getvalue=yes
12286 else
12287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288 /* end confdefs.h.  */
12289
12290 #include <unistd.h>
12291 #include <fcntl.h>
12292 #include <stdio.h>
12293 #include <semaphore.h>
12294 #include <sys/stat.h>
12295
12296 int main(void){
12297   sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
12298   int count;
12299   int res;
12300   if(a==SEM_FAILED){
12301     perror("sem_open");
12302     return 1;
12303
12304   }
12305   res = sem_getvalue(a, &count);
12306   sem_close(a);
12307   sem_unlink("/autocftw");
12308   return res==-1 ? 1 : 0;
12309 }
12310
12311 _ACEOF
12312 if ac_fn_c_try_run "$LINENO"; then :
12313   ac_cv_broken_sem_getvalue=no
12314 else
12315   ac_cv_broken_sem_getvalue=yes
12316 fi
12317 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12318   conftest.$ac_objext conftest.beam conftest.$ac_ext
12319 fi
12320
12321
12322 fi
12323
12324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12325 $as_echo "$ac_cv_broken_sem_getvalue" >&6; }
12326 if test $ac_cv_broken_sem_getvalue = yes
12327 then
12328
12329 $as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
12330
12331 fi
12332
12333 # determine what size digit to use for Python's longs
12334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12335 $as_echo_n "checking digit size for Python's longs... " >&6; }
12336 # Check whether --enable-big-digits was given.
12337 if test "${enable_big_digits+set}" = set; then :
12338   enableval=$enable_big_digits; case $enable_big_digits in
12339 yes)
12340   enable_big_digits=30 ;;
12341 no)
12342   enable_big_digits=15 ;;
12343 15|30)
12344   ;;
12345 *)
12346   as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5  ;;
12347 esac
12348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12349 $as_echo "$enable_big_digits" >&6; }
12350
12351 cat >>confdefs.h <<_ACEOF
12352 #define PYLONG_BITS_IN_DIGIT $enable_big_digits
12353 _ACEOF
12354
12355
12356 else
12357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12358 $as_echo "no value specified" >&6; }
12359 fi
12360
12361
12362 # check for wchar.h
12363 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12364 if test "x$ac_cv_header_wchar_h" = x""yes; then :
12365
12366
12367 $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
12368
12369   wchar_h="yes"
12370
12371 else
12372   wchar_h="no"
12373
12374 fi
12375
12376
12377
12378 # determine wchar_t size
12379 if test "$wchar_h" = yes
12380 then
12381   # The cast to long int works around a bug in the HP C Compiler
12382 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12383 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12384 # This bug is HP SR number 8606223364.
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12386 $as_echo_n "checking size of wchar_t... " >&6; }
12387 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12388   $as_echo_n "(cached) " >&6
12389 else
12390   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "#include <wchar.h>
12391 "; then :
12392
12393 else
12394   if test "$ac_cv_type_wchar_t" = yes; then
12395      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12396 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12397 as_fn_error 77 "cannot compute sizeof (wchar_t)
12398 See \`config.log' for more details" "$LINENO" 5 ; }
12399    else
12400      ac_cv_sizeof_wchar_t=0
12401    fi
12402 fi
12403
12404 fi
12405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12406 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
12407
12408
12409
12410 cat >>confdefs.h <<_ACEOF
12411 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
12412 _ACEOF
12413
12414
12415 fi
12416
12417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12418 $as_echo_n "checking for UCS-4 tcl... " >&6; }
12419 have_ucs4_tcl=no
12420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12421 /* end confdefs.h.  */
12422
12423 #include <tcl.h>
12424 #if TCL_UTF_MAX != 6
12425 # error "NOT UCS4_TCL"
12426 #endif
12427 int
12428 main ()
12429 {
12430
12431   ;
12432   return 0;
12433 }
12434 _ACEOF
12435 if ac_fn_c_try_compile "$LINENO"; then :
12436
12437
12438 $as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
12439
12440   have_ucs4_tcl=yes
12441
12442 fi
12443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12445 $as_echo "$have_ucs4_tcl" >&6; }
12446
12447 # check whether wchar_t is signed or not
12448 if test "$wchar_h" = yes
12449 then
12450   # check whether wchar_t is signed or not
12451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12452 $as_echo_n "checking whether wchar_t is signed... " >&6; }
12453   if test "${ac_cv_wchar_t_signed+set}" = set; then :
12454   $as_echo_n "(cached) " >&6
12455 else
12456
12457   if test "$cross_compiling" = yes; then :
12458   ac_cv_wchar_t_signed=yes
12459 else
12460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12461 /* end confdefs.h.  */
12462
12463   #include <wchar.h>
12464   int main()
12465   {
12466         /* Success: exit code 0 */
12467         exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
12468   }
12469
12470 _ACEOF
12471 if ac_fn_c_try_run "$LINENO"; then :
12472   ac_cv_wchar_t_signed=yes
12473 else
12474   ac_cv_wchar_t_signed=no
12475 fi
12476 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12477   conftest.$ac_objext conftest.beam conftest.$ac_ext
12478 fi
12479
12480 fi
12481
12482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12483 $as_echo "$ac_cv_wchar_t_signed" >&6; }
12484 fi
12485
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12487 $as_echo_n "checking what type to use for unicode... " >&6; }
12488 # Check whether --enable-unicode was given.
12489 if test "${enable_unicode+set}" = set; then :
12490   enableval=$enable_unicode;
12491 else
12492   enable_unicode=yes
12493 fi
12494
12495
12496 if test $enable_unicode = yes
12497 then
12498   # Without any arguments, Py_UNICODE defaults to two-byte mode
12499   case "$have_ucs4_tcl" in
12500   yes) enable_unicode="ucs4"
12501        ;;
12502   *)   enable_unicode="ucs2"
12503        ;;
12504   esac
12505 fi
12506
12507
12508 case "$enable_unicode" in
12509 ucs2) unicode_size="2"
12510       $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
12511
12512       ;;
12513 ucs4) unicode_size="4"
12514       $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12515
12516       ;;
12517 *) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5  ;;
12518 esac
12519
12520
12521
12522
12523 if test "$enable_unicode" = "no"
12524 then
12525   UNICODE_OBJS=""
12526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12527 $as_echo "not used" >&6; }
12528 else
12529   UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
12530
12531 $as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
12532
12533
12534   # wchar_t is only usable if it maps to an unsigned type
12535   if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
12536           -a "$ac_cv_wchar_t_signed" = "no"
12537   then
12538     PY_UNICODE_TYPE="wchar_t"
12539
12540 $as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
12541
12542     $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
12543
12544   elif test "$ac_cv_sizeof_short" = "$unicode_size"
12545   then
12546        PY_UNICODE_TYPE="unsigned short"
12547        $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
12548
12549   elif test "$ac_cv_sizeof_long" = "$unicode_size"
12550   then
12551        PY_UNICODE_TYPE="unsigned long"
12552        $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
12553
12554   else
12555        PY_UNICODE_TYPE="no type found"
12556   fi
12557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12558 $as_echo "$PY_UNICODE_TYPE" >&6; }
12559 fi
12560
12561 # check for endianness
12562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12563 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12564 if test "${ac_cv_c_bigendian+set}" = set; then :
12565   $as_echo_n "(cached) " >&6
12566 else
12567   ac_cv_c_bigendian=unknown
12568     # See if we're dealing with a universal compiler.
12569     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12570 /* end confdefs.h.  */
12571 #ifndef __APPLE_CC__
12572                not a universal capable compiler
12573              #endif
12574              typedef int dummy;
12575
12576 _ACEOF
12577 if ac_fn_c_try_compile "$LINENO"; then :
12578
12579         # Check for potential -arch flags.  It is not universal unless
12580         # there are at least two -arch flags with different values.
12581         ac_arch=
12582         ac_prev=
12583         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12584          if test -n "$ac_prev"; then
12585            case $ac_word in
12586              i?86 | x86_64 | ppc | ppc64)
12587                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12588                  ac_arch=$ac_word
12589                else
12590                  ac_cv_c_bigendian=universal
12591                  break
12592                fi
12593                ;;
12594            esac
12595            ac_prev=
12596          elif test "x$ac_word" = "x-arch"; then
12597            ac_prev=arch
12598          fi
12599        done
12600 fi
12601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12602     if test $ac_cv_c_bigendian = unknown; then
12603       # See if sys/param.h defines the BYTE_ORDER macro.
12604       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12605 /* end confdefs.h.  */
12606 #include <sys/types.h>
12607              #include <sys/param.h>
12608
12609 int
12610 main ()
12611 {
12612 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12613                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12614                      && LITTLE_ENDIAN)
12615               bogus endian macros
12616              #endif
12617
12618   ;
12619   return 0;
12620 }
12621 _ACEOF
12622 if ac_fn_c_try_compile "$LINENO"; then :
12623   # It does; now see whether it defined to BIG_ENDIAN or not.
12624          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12625 /* end confdefs.h.  */
12626 #include <sys/types.h>
12627                 #include <sys/param.h>
12628
12629 int
12630 main ()
12631 {
12632 #if BYTE_ORDER != BIG_ENDIAN
12633                  not big endian
12634                 #endif
12635
12636   ;
12637   return 0;
12638 }
12639 _ACEOF
12640 if ac_fn_c_try_compile "$LINENO"; then :
12641   ac_cv_c_bigendian=yes
12642 else
12643   ac_cv_c_bigendian=no
12644 fi
12645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12646 fi
12647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12648     fi
12649     if test $ac_cv_c_bigendian = unknown; then
12650       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12651       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12652 /* end confdefs.h.  */
12653 #include <limits.h>
12654
12655 int
12656 main ()
12657 {
12658 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12659               bogus endian macros
12660              #endif
12661
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 if ac_fn_c_try_compile "$LINENO"; then :
12667   # It does; now see whether it defined to _BIG_ENDIAN or not.
12668          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669 /* end confdefs.h.  */
12670 #include <limits.h>
12671
12672 int
12673 main ()
12674 {
12675 #ifndef _BIG_ENDIAN
12676                  not big endian
12677                 #endif
12678
12679   ;
12680   return 0;
12681 }
12682 _ACEOF
12683 if ac_fn_c_try_compile "$LINENO"; then :
12684   ac_cv_c_bigendian=yes
12685 else
12686   ac_cv_c_bigendian=no
12687 fi
12688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12689 fi
12690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12691     fi
12692     if test $ac_cv_c_bigendian = unknown; then
12693       # Compile a test program.
12694       if test "$cross_compiling" = yes; then :
12695   # Try to guess by grepping values from an object file.
12696          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697 /* end confdefs.h.  */
12698 short int ascii_mm[] =
12699                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12700                 short int ascii_ii[] =
12701                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12702                 int use_ascii (int i) {
12703                   return ascii_mm[i] + ascii_ii[i];
12704                 }
12705                 short int ebcdic_ii[] =
12706                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12707                 short int ebcdic_mm[] =
12708                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12709                 int use_ebcdic (int i) {
12710                   return ebcdic_mm[i] + ebcdic_ii[i];
12711                 }
12712                 extern int foo;
12713
12714 int
12715 main ()
12716 {
12717 return use_ascii (foo) == use_ebcdic (foo);
12718   ;
12719   return 0;
12720 }
12721 _ACEOF
12722 if ac_fn_c_try_compile "$LINENO"; then :
12723   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12724               ac_cv_c_bigendian=yes
12725             fi
12726             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12727               if test "$ac_cv_c_bigendian" = unknown; then
12728                 ac_cv_c_bigendian=no
12729               else
12730                 # finding both strings is unlikely to happen, but who knows?
12731                 ac_cv_c_bigendian=unknown
12732               fi
12733             fi
12734 fi
12735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12736 else
12737   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738 /* end confdefs.h.  */
12739 $ac_includes_default
12740 int
12741 main ()
12742 {
12743
12744              /* Are we little or big endian?  From Harbison&Steele.  */
12745              union
12746              {
12747                long int l;
12748                char c[sizeof (long int)];
12749              } u;
12750              u.l = 1;
12751              return u.c[sizeof (long int) - 1] == 1;
12752
12753   ;
12754   return 0;
12755 }
12756 _ACEOF
12757 if ac_fn_c_try_run "$LINENO"; then :
12758   ac_cv_c_bigendian=no
12759 else
12760   ac_cv_c_bigendian=yes
12761 fi
12762 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12763   conftest.$ac_objext conftest.beam conftest.$ac_ext
12764 fi
12765
12766     fi
12767 fi
12768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12769 $as_echo "$ac_cv_c_bigendian" >&6; }
12770  case $ac_cv_c_bigendian in #(
12771    yes)
12772      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12773 ;; #(
12774    no)
12775       ;; #(
12776    universal)
12777
12778 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12779
12780      ;; #(
12781    *)
12782      as_fn_error $? "unknown endianness
12783  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5  ;;
12784  esac
12785
12786
12787 # Check whether right shifting a negative integer extends the sign bit
12788 # or fills with zeros (like the Cray J90, according to Tim Peters).
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12790 $as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12791 if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12792   $as_echo_n "(cached) " >&6
12793 else
12794
12795 if test "$cross_compiling" = yes; then :
12796   ac_cv_rshift_extends_sign=yes
12797 else
12798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799 /* end confdefs.h.  */
12800
12801 int main()
12802 {
12803         exit(((-1)>>3 == -1) ? 0 : 1);
12804 }
12805
12806 _ACEOF
12807 if ac_fn_c_try_run "$LINENO"; then :
12808   ac_cv_rshift_extends_sign=yes
12809 else
12810   ac_cv_rshift_extends_sign=no
12811 fi
12812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12813   conftest.$ac_objext conftest.beam conftest.$ac_ext
12814 fi
12815
12816 fi
12817
12818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12819 $as_echo "$ac_cv_rshift_extends_sign" >&6; }
12820 if test "$ac_cv_rshift_extends_sign" = no
12821 then
12822
12823 $as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
12824
12825 fi
12826
12827 # check for getc_unlocked and related locking functions
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12829 $as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12830 if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12831   $as_echo_n "(cached) " >&6
12832 else
12833
12834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12835 /* end confdefs.h.  */
12836 #include <stdio.h>
12837 int
12838 main ()
12839 {
12840
12841         FILE *f = fopen("/dev/null", "r");
12842         flockfile(f);
12843         getc_unlocked(f);
12844         funlockfile(f);
12845
12846   ;
12847   return 0;
12848 }
12849 _ACEOF
12850 if ac_fn_c_try_link "$LINENO"; then :
12851   ac_cv_have_getc_unlocked=yes
12852 else
12853   ac_cv_have_getc_unlocked=no
12854 fi
12855 rm -f core conftest.err conftest.$ac_objext \
12856     conftest$ac_exeext conftest.$ac_ext
12857 fi
12858
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12860 $as_echo "$ac_cv_have_getc_unlocked" >&6; }
12861 if test "$ac_cv_have_getc_unlocked" = yes
12862 then
12863
12864 $as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
12865
12866 fi
12867
12868 # check where readline lives
12869 # save the value of LIBS so we don't actually link Python with readline
12870 LIBS_no_readline=$LIBS
12871
12872 # On some systems we need to link readline to a termcap compatible
12873 # library.  NOTE: Keep the precedence of listed libraries synchronised
12874 # with setup.py.
12875 py_cv_lib_readline=no
12876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12877 $as_echo_n "checking how to link readline libs... " >&6; }
12878 for py_libtermcap in "" ncursesw ncurses curses termcap; do
12879   if test -z "$py_libtermcap"; then
12880     READLINE_LIBS="-lreadline"
12881   else
12882     READLINE_LIBS="-lreadline -l$py_libtermcap"
12883   fi
12884   LIBS="$READLINE_LIBS $LIBS_no_readline"
12885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12886 /* end confdefs.h.  */
12887
12888 /* Override any GCC internal prototype to avoid an error.
12889    Use char because int might match the return type of a GCC
12890    builtin and then its argument prototype would still apply.  */
12891 #ifdef __cplusplus
12892 extern "C"
12893 #endif
12894 char readline ();
12895 int
12896 main ()
12897 {
12898 return readline ();
12899   ;
12900   return 0;
12901 }
12902 _ACEOF
12903 if ac_fn_c_try_link "$LINENO"; then :
12904   py_cv_lib_readline=yes
12905 fi
12906 rm -f core conftest.err conftest.$ac_objext \
12907     conftest$ac_exeext conftest.$ac_ext
12908   if test $py_cv_lib_readline = yes; then
12909     break
12910   fi
12911 done
12912 # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12913 #AC_SUBST([READLINE_LIBS])
12914 if test $py_cv_lib_readline = no; then
12915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12916 $as_echo "none" >&6; }
12917 else
12918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12919 $as_echo "$READLINE_LIBS" >&6; }
12920
12921 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12922
12923 fi
12924
12925 # check for readline 2.1
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12927 $as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12928 if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12929   $as_echo_n "(cached) " >&6
12930 else
12931   ac_check_lib_save_LIBS=$LIBS
12932 LIBS="-lreadline $READLINE_LIBS $LIBS"
12933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h.  */
12935
12936 /* Override any GCC internal prototype to avoid an error.
12937    Use char because int might match the return type of a GCC
12938    builtin and then its argument prototype would still apply.  */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 char rl_callback_handler_install ();
12943 int
12944 main ()
12945 {
12946 return rl_callback_handler_install ();
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_link "$LINENO"; then :
12952   ac_cv_lib_readline_rl_callback_handler_install=yes
12953 else
12954   ac_cv_lib_readline_rl_callback_handler_install=no
12955 fi
12956 rm -f core conftest.err conftest.$ac_objext \
12957     conftest$ac_exeext conftest.$ac_ext
12958 LIBS=$ac_check_lib_save_LIBS
12959 fi
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12961 $as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12962 if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
12963
12964 $as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
12965
12966 fi
12967
12968
12969 # check for readline 2.2
12970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12971 /* end confdefs.h.  */
12972 #include <readline/readline.h>
12973 _ACEOF
12974 if ac_fn_c_try_cpp "$LINENO"; then :
12975   have_readline=yes
12976 else
12977   have_readline=no
12978
12979 fi
12980 rm -f conftest.err conftest.i conftest.$ac_ext
12981 if test $have_readline = yes
12982 then
12983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984 /* end confdefs.h.  */
12985 #include <readline/readline.h>
12986
12987 _ACEOF
12988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12989   $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
12990
12991 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
12992
12993 fi
12994 rm -f conftest*
12995
12996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12997 /* end confdefs.h.  */
12998 #include <readline/readline.h>
12999
13000 _ACEOF
13001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13002   $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
13003
13004 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
13005
13006 fi
13007 rm -f conftest*
13008
13009 fi
13010
13011 # check for readline 4.0
13012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13013 $as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
13014 if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
13015   $as_echo_n "(cached) " >&6
13016 else
13017   ac_check_lib_save_LIBS=$LIBS
13018 LIBS="-lreadline $READLINE_LIBS $LIBS"
13019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020 /* end confdefs.h.  */
13021
13022 /* Override any GCC internal prototype to avoid an error.
13023    Use char because int might match the return type of a GCC
13024    builtin and then its argument prototype would still apply.  */
13025 #ifdef __cplusplus
13026 extern "C"
13027 #endif
13028 char rl_pre_input_hook ();
13029 int
13030 main ()
13031 {
13032 return rl_pre_input_hook ();
13033   ;
13034   return 0;
13035 }
13036 _ACEOF
13037 if ac_fn_c_try_link "$LINENO"; then :
13038   ac_cv_lib_readline_rl_pre_input_hook=yes
13039 else
13040   ac_cv_lib_readline_rl_pre_input_hook=no
13041 fi
13042 rm -f core conftest.err conftest.$ac_objext \
13043     conftest$ac_exeext conftest.$ac_ext
13044 LIBS=$ac_check_lib_save_LIBS
13045 fi
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13047 $as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
13048 if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
13049
13050 $as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
13051
13052 fi
13053
13054
13055 # also in 4.0
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13057 $as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
13058 if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
13059   $as_echo_n "(cached) " >&6
13060 else
13061   ac_check_lib_save_LIBS=$LIBS
13062 LIBS="-lreadline $READLINE_LIBS $LIBS"
13063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13064 /* end confdefs.h.  */
13065
13066 /* Override any GCC internal prototype to avoid an error.
13067    Use char because int might match the return type of a GCC
13068    builtin and then its argument prototype would still apply.  */
13069 #ifdef __cplusplus
13070 extern "C"
13071 #endif
13072 char rl_completion_display_matches_hook ();
13073 int
13074 main ()
13075 {
13076 return rl_completion_display_matches_hook ();
13077   ;
13078   return 0;
13079 }
13080 _ACEOF
13081 if ac_fn_c_try_link "$LINENO"; then :
13082   ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13083 else
13084   ac_cv_lib_readline_rl_completion_display_matches_hook=no
13085 fi
13086 rm -f core conftest.err conftest.$ac_objext \
13087     conftest$ac_exeext conftest.$ac_ext
13088 LIBS=$ac_check_lib_save_LIBS
13089 fi
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13091 $as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
13092 if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
13093
13094 $as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
13095
13096 fi
13097
13098
13099 # check for readline 4.2
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13101 $as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
13102 if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
13103   $as_echo_n "(cached) " >&6
13104 else
13105   ac_check_lib_save_LIBS=$LIBS
13106 LIBS="-lreadline $READLINE_LIBS $LIBS"
13107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13108 /* end confdefs.h.  */
13109
13110 /* Override any GCC internal prototype to avoid an error.
13111    Use char because int might match the return type of a GCC
13112    builtin and then its argument prototype would still apply.  */
13113 #ifdef __cplusplus
13114 extern "C"
13115 #endif
13116 char rl_completion_matches ();
13117 int
13118 main ()
13119 {
13120 return rl_completion_matches ();
13121   ;
13122   return 0;
13123 }
13124 _ACEOF
13125 if ac_fn_c_try_link "$LINENO"; then :
13126   ac_cv_lib_readline_rl_completion_matches=yes
13127 else
13128   ac_cv_lib_readline_rl_completion_matches=no
13129 fi
13130 rm -f core conftest.err conftest.$ac_objext \
13131     conftest$ac_exeext conftest.$ac_ext
13132 LIBS=$ac_check_lib_save_LIBS
13133 fi
13134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13135 $as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
13136 if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
13137
13138 $as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
13139
13140 fi
13141
13142
13143 # also in readline 4.2
13144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13145 /* end confdefs.h.  */
13146 #include <readline/readline.h>
13147 _ACEOF
13148 if ac_fn_c_try_cpp "$LINENO"; then :
13149   have_readline=yes
13150 else
13151   have_readline=no
13152
13153 fi
13154 rm -f conftest.err conftest.i conftest.$ac_ext
13155 if test $have_readline = yes
13156 then
13157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13158 /* end confdefs.h.  */
13159 #include <readline/readline.h>
13160
13161 _ACEOF
13162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13163   $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
13164
13165 $as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
13166
13167 fi
13168 rm -f conftest*
13169
13170 fi
13171
13172 # End of readline checks: restore LIBS
13173 LIBS=$LIBS_no_readline
13174
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13176 $as_echo_n "checking for broken nice()... " >&6; }
13177 if test "${ac_cv_broken_nice+set}" = set; then :
13178   $as_echo_n "(cached) " >&6
13179 else
13180
13181 if test "$cross_compiling" = yes; then :
13182   ac_cv_broken_nice=no
13183 else
13184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185 /* end confdefs.h.  */
13186
13187 int main()
13188 {
13189         int val1 = nice(1);
13190         if (val1 != -1 && val1 == nice(2))
13191                 exit(0);
13192         exit(1);
13193 }
13194
13195 _ACEOF
13196 if ac_fn_c_try_run "$LINENO"; then :
13197   ac_cv_broken_nice=yes
13198 else
13199   ac_cv_broken_nice=no
13200 fi
13201 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13202   conftest.$ac_objext conftest.beam conftest.$ac_ext
13203 fi
13204
13205 fi
13206
13207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13208 $as_echo "$ac_cv_broken_nice" >&6; }
13209 if test "$ac_cv_broken_nice" = yes
13210 then
13211
13212 $as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
13213
13214 fi
13215
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13217 $as_echo_n "checking for broken poll()... " >&6; }
13218 if test "${ac_cv_broken_poll+set}" = set; then :
13219   $as_echo_n "(cached) " >&6
13220 else
13221   if test "$cross_compiling" = yes; then :
13222   ac_cv_broken_poll=no
13223 else
13224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13225 /* end confdefs.h.  */
13226
13227 #include <poll.h>
13228
13229 int main()
13230 {
13231     struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
13232     int poll_test;
13233
13234     close (42);
13235
13236     poll_test = poll(&poll_struct, 1, 0);
13237     if (poll_test < 0)
13238         return 0;
13239     else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
13240         return 0;
13241     else
13242         return 1;
13243 }
13244
13245 _ACEOF
13246 if ac_fn_c_try_run "$LINENO"; then :
13247   ac_cv_broken_poll=yes
13248 else
13249   ac_cv_broken_poll=no
13250 fi
13251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13252   conftest.$ac_objext conftest.beam conftest.$ac_ext
13253 fi
13254
13255 fi
13256
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13258 $as_echo "$ac_cv_broken_poll" >&6; }
13259 if test "$ac_cv_broken_poll" = yes
13260 then
13261
13262 $as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
13263
13264 fi
13265
13266 # Before we can test tzset, we need to check if struct tm has a tm_zone
13267 # (which is not required by ISO C or UNIX spec) and/or if we support
13268 # tzname[]
13269 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13270 #include <$ac_cv_struct_tm>
13271
13272 "
13273 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
13274
13275 cat >>confdefs.h <<_ACEOF
13276 #define HAVE_STRUCT_TM_TM_ZONE 1
13277 _ACEOF
13278
13279
13280 fi
13281
13282 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13283
13284 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
13285
13286 else
13287   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13288 "
13289 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13290   ac_have_decl=1
13291 else
13292   ac_have_decl=0
13293 fi
13294
13295 cat >>confdefs.h <<_ACEOF
13296 #define HAVE_DECL_TZNAME $ac_have_decl
13297 _ACEOF
13298
13299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13300 $as_echo_n "checking for tzname... " >&6; }
13301 if test "${ac_cv_var_tzname+set}" = set; then :
13302   $as_echo_n "(cached) " >&6
13303 else
13304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305 /* end confdefs.h.  */
13306 #include <time.h>
13307 #if !HAVE_DECL_TZNAME
13308 extern char *tzname[];
13309 #endif
13310
13311 int
13312 main ()
13313 {
13314 return tzname[0][0];
13315   ;
13316   return 0;
13317 }
13318 _ACEOF
13319 if ac_fn_c_try_link "$LINENO"; then :
13320   ac_cv_var_tzname=yes
13321 else
13322   ac_cv_var_tzname=no
13323 fi
13324 rm -f core conftest.err conftest.$ac_objext \
13325     conftest$ac_exeext conftest.$ac_ext
13326 fi
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13328 $as_echo "$ac_cv_var_tzname" >&6; }
13329   if test $ac_cv_var_tzname = yes; then
13330
13331 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
13332
13333   fi
13334 fi
13335
13336
13337 # check tzset(3) exists and works like we expect it to
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13339 $as_echo_n "checking for working tzset()... " >&6; }
13340 if test "${ac_cv_working_tzset+set}" = set; then :
13341   $as_echo_n "(cached) " >&6
13342 else
13343
13344 if test "$cross_compiling" = yes; then :
13345   ac_cv_working_tzset=no
13346 else
13347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348 /* end confdefs.h.  */
13349
13350 #include <stdlib.h>
13351 #include <time.h>
13352 #include <string.h>
13353
13354 #if HAVE_TZNAME
13355 extern char *tzname[];
13356 #endif
13357
13358 int main()
13359 {
13360         /* Note that we need to ensure that not only does tzset(3)
13361            do 'something' with localtime, but it works as documented
13362            in the library reference and as expected by the test suite.
13363            This includes making sure that tzname is set properly if
13364            tm->tm_zone does not exist since it is the alternative way
13365            of getting timezone info.
13366
13367            Red Hat 6.2 doesn't understand the southern hemisphere
13368            after New Year's Day.
13369         */
13370
13371         time_t groundhogday = 1044144000; /* GMT-based */
13372         time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13373
13374         putenv("TZ=UTC+0");
13375         tzset();
13376         if (localtime(&groundhogday)->tm_hour != 0)
13377             exit(1);
13378 #if HAVE_TZNAME
13379         /* For UTC, tzname[1] is sometimes "", sometimes "   " */
13380         if (strcmp(tzname[0], "UTC") ||
13381                 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13382             exit(1);
13383 #endif
13384
13385         putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
13386         tzset();
13387         if (localtime(&groundhogday)->tm_hour != 19)
13388             exit(1);
13389 #if HAVE_TZNAME
13390         if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13391             exit(1);
13392 #endif
13393
13394         putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13395         tzset();
13396         if (localtime(&groundhogday)->tm_hour != 11)
13397             exit(1);
13398 #if HAVE_TZNAME
13399         if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13400             exit(1);
13401 #endif
13402
13403 #if HAVE_STRUCT_TM_TM_ZONE
13404         if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13405             exit(1);
13406         if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13407             exit(1);
13408 #endif
13409
13410         exit(0);
13411 }
13412
13413 _ACEOF
13414 if ac_fn_c_try_run "$LINENO"; then :
13415   ac_cv_working_tzset=yes
13416 else
13417   ac_cv_working_tzset=no
13418 fi
13419 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13420   conftest.$ac_objext conftest.beam conftest.$ac_ext
13421 fi
13422
13423 fi
13424
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13426 $as_echo "$ac_cv_working_tzset" >&6; }
13427 if test "$ac_cv_working_tzset" = yes
13428 then
13429
13430 $as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
13431
13432 fi
13433
13434 # Look for subsecond timestamps in struct stat
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13436 $as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13437 if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13438   $as_echo_n "(cached) " >&6
13439 else
13440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13441 /* end confdefs.h.  */
13442 #include <sys/stat.h>
13443 int
13444 main ()
13445 {
13446
13447 struct stat st;
13448 st.st_mtim.tv_nsec = 1;
13449
13450   ;
13451   return 0;
13452 }
13453 _ACEOF
13454 if ac_fn_c_try_compile "$LINENO"; then :
13455   ac_cv_stat_tv_nsec=yes
13456 else
13457   ac_cv_stat_tv_nsec=no
13458 fi
13459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13460 fi
13461
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13463 $as_echo "$ac_cv_stat_tv_nsec" >&6; }
13464 if test "$ac_cv_stat_tv_nsec" = yes
13465 then
13466
13467 $as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
13468
13469 fi
13470
13471 # Look for BSD style subsecond timestamps in struct stat
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13473 $as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13474 if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13475   $as_echo_n "(cached) " >&6
13476 else
13477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478 /* end confdefs.h.  */
13479 #include <sys/stat.h>
13480 int
13481 main ()
13482 {
13483
13484 struct stat st;
13485 st.st_mtimespec.tv_nsec = 1;
13486
13487   ;
13488   return 0;
13489 }
13490 _ACEOF
13491 if ac_fn_c_try_compile "$LINENO"; then :
13492   ac_cv_stat_tv_nsec2=yes
13493 else
13494   ac_cv_stat_tv_nsec2=no
13495 fi
13496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13497 fi
13498
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13500 $as_echo "$ac_cv_stat_tv_nsec2" >&6; }
13501 if test "$ac_cv_stat_tv_nsec2" = yes
13502 then
13503
13504 $as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
13505
13506 fi
13507
13508 # On HP/UX 11.0, mvwdelch is a block with a return statement
13509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13510 $as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13511 if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13512   $as_echo_n "(cached) " >&6
13513 else
13514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13515 /* end confdefs.h.  */
13516 #include <curses.h>
13517 int
13518 main ()
13519 {
13520
13521   int rtn;
13522   rtn = mvwdelch(0,0,0);
13523
13524   ;
13525   return 0;
13526 }
13527 _ACEOF
13528 if ac_fn_c_try_compile "$LINENO"; then :
13529   ac_cv_mvwdelch_is_expression=yes
13530 else
13531   ac_cv_mvwdelch_is_expression=no
13532 fi
13533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13534 fi
13535
13536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13537 $as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
13538
13539 if test "$ac_cv_mvwdelch_is_expression" = yes
13540 then
13541
13542 $as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
13543
13544 fi
13545
13546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13547 $as_echo_n "checking whether WINDOW has _flags... " >&6; }
13548 if test "${ac_cv_window_has_flags+set}" = set; then :
13549   $as_echo_n "(cached) " >&6
13550 else
13551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13552 /* end confdefs.h.  */
13553 #include <curses.h>
13554 int
13555 main ()
13556 {
13557
13558   WINDOW *w;
13559   w->_flags = 0;
13560
13561   ;
13562   return 0;
13563 }
13564 _ACEOF
13565 if ac_fn_c_try_compile "$LINENO"; then :
13566   ac_cv_window_has_flags=yes
13567 else
13568   ac_cv_window_has_flags=no
13569 fi
13570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571 fi
13572
13573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13574 $as_echo "$ac_cv_window_has_flags" >&6; }
13575
13576
13577 if test "$ac_cv_window_has_flags" = yes
13578 then
13579
13580 $as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
13581
13582 fi
13583
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13585 $as_echo_n "checking for is_term_resized... " >&6; }
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587 /* end confdefs.h.  */
13588 #include <curses.h>
13589 int
13590 main ()
13591 {
13592 void *x=is_term_resized
13593   ;
13594   return 0;
13595 }
13596 _ACEOF
13597 if ac_fn_c_try_compile "$LINENO"; then :
13598
13599 $as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
13600
13601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13602 $as_echo "yes" >&6; }
13603 else
13604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13605 $as_echo "no" >&6; }
13606
13607 fi
13608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13609
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13611 $as_echo_n "checking for resize_term... " >&6; }
13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613 /* end confdefs.h.  */
13614 #include <curses.h>
13615 int
13616 main ()
13617 {
13618 void *x=resize_term
13619   ;
13620   return 0;
13621 }
13622 _ACEOF
13623 if ac_fn_c_try_compile "$LINENO"; then :
13624
13625 $as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
13626
13627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13628 $as_echo "yes" >&6; }
13629 else
13630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13631 $as_echo "no" >&6; }
13632
13633 fi
13634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13635
13636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13637 $as_echo_n "checking for resizeterm... " >&6; }
13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639 /* end confdefs.h.  */
13640 #include <curses.h>
13641 int
13642 main ()
13643 {
13644 void *x=resizeterm
13645   ;
13646   return 0;
13647 }
13648 _ACEOF
13649 if ac_fn_c_try_compile "$LINENO"; then :
13650
13651 $as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
13652
13653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13654 $as_echo "yes" >&6; }
13655 else
13656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13657 $as_echo "no" >&6; }
13658
13659 fi
13660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13661
13662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13663 $as_echo_n "checking for /dev/ptmx... " >&6; }
13664
13665 if test -r /dev/ptmx
13666 then
13667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13668 $as_echo "yes" >&6; }
13669
13670 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
13671
13672 else
13673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13674 $as_echo "no" >&6; }
13675 fi
13676
13677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13678 $as_echo_n "checking for /dev/ptc... " >&6; }
13679
13680 if test -r /dev/ptc
13681 then
13682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13683 $as_echo "yes" >&6; }
13684
13685 $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
13686
13687 else
13688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13689 $as_echo "no" >&6; }
13690 fi
13691
13692 if test "$have_long_long" = yes
13693 then
13694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13695 $as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13696   if test "${ac_cv_have_long_long_format+set}" = set; then :
13697   $as_echo_n "(cached) " >&6
13698 else
13699   if test "$cross_compiling" = yes; then :
13700   ac_cv_have_long_long_format=no
13701 else
13702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13703 /* end confdefs.h.  */
13704
13705   #include <stdio.h>
13706   #include <stddef.h>
13707   #include <string.h>
13708
13709   #ifdef HAVE_SYS_TYPES_H
13710   #include <sys/types.h>
13711   #endif
13712
13713   int main()
13714   {
13715       char buffer[256];
13716
13717       if (sprintf(buffer, "%lld", (long long)123) < 0)
13718           return 1;
13719       if (strcmp(buffer, "123"))
13720           return 1;
13721
13722       if (sprintf(buffer, "%lld", (long long)-123) < 0)
13723           return 1;
13724       if (strcmp(buffer, "-123"))
13725           return 1;
13726
13727       if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13728           return 1;
13729       if (strcmp(buffer, "123"))
13730           return 1;
13731
13732       return 0;
13733   }
13734
13735 _ACEOF
13736 if ac_fn_c_try_run "$LINENO"; then :
13737   ac_cv_have_long_long_format=yes
13738 else
13739   ac_cv_have_long_long_format=no
13740 fi
13741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13742   conftest.$ac_objext conftest.beam conftest.$ac_ext
13743 fi
13744
13745
13746 fi
13747
13748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13749 $as_echo "$ac_cv_have_long_long_format" >&6; }
13750 fi
13751
13752 if test "$ac_cv_have_long_long_format" = yes
13753 then
13754
13755 $as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
13756
13757 fi
13758
13759 if test $ac_sys_system = Darwin
13760 then
13761         LIBS="$LIBS -framework CoreFoundation"
13762 fi
13763
13764
13765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13766 $as_echo_n "checking for %zd printf() format support... " >&6; }
13767 if test "${ac_cv_have_size_t_format+set}" = set; then :
13768   $as_echo_n "(cached) " >&6
13769 else
13770   if test "$cross_compiling" = yes; then :
13771   ac_cv_have_size_t_format="cross -- assuming yes"
13772
13773 else
13774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13775 /* end confdefs.h.  */
13776
13777 #include <stdio.h>
13778 #include <stddef.h>
13779 #include <string.h>
13780
13781 #ifdef HAVE_SYS_TYPES_H
13782 #include <sys/types.h>
13783 #endif
13784
13785 #ifdef HAVE_SSIZE_T
13786 typedef ssize_t Py_ssize_t;
13787 #elif SIZEOF_VOID_P == SIZEOF_LONG
13788 typedef long Py_ssize_t;
13789 #else
13790 typedef int Py_ssize_t;
13791 #endif
13792
13793 int main()
13794 {
13795     char buffer[256];
13796
13797     if(sprintf(buffer, "%zd", (size_t)123) < 0)
13798         return 1;
13799
13800     if (strcmp(buffer, "123"))
13801         return 1;
13802
13803     if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13804         return 1;
13805
13806     if (strcmp(buffer, "-123"))
13807         return 1;
13808
13809     return 0;
13810 }
13811
13812 _ACEOF
13813 if ac_fn_c_try_run "$LINENO"; then :
13814   ac_cv_have_size_t_format=yes
13815 else
13816   ac_cv_have_size_t_format=no
13817 fi
13818 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13819   conftest.$ac_objext conftest.beam conftest.$ac_ext
13820 fi
13821
13822 fi
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13824 $as_echo "$ac_cv_have_size_t_format" >&6; }
13825 if test "$ac_cv_have_size_t_format" != no ; then
13826
13827 $as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
13828
13829 fi
13830
13831 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
13832 #ifdef HAVE_SYS_TYPES_H
13833 #include <sys/types.h>
13834 #endif
13835 #ifdef HAVE_SYS_SOCKET_H
13836 #include <sys/socket.h>
13837 #endif
13838
13839 "
13840 if test "x$ac_cv_type_socklen_t" = x""yes; then :
13841
13842 else
13843
13844 $as_echo "#define socklen_t int" >>confdefs.h
13845
13846 fi
13847
13848
13849 case $ac_sys_system in
13850 AIX*)
13851
13852 $as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13853  ;;
13854 esac
13855
13856
13857
13858
13859 for h in `(cd $srcdir;echo Python/thread_*.h)`
13860 do
13861   THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13862 done
13863
13864
13865 SRCDIRS="Parser Grammar Objects Python Modules Mac"
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13867 $as_echo_n "checking for build directories... " >&6; }
13868 for dir in $SRCDIRS; do
13869     if test ! -d $dir; then
13870         mkdir $dir
13871     fi
13872 done
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13874 $as_echo "done" >&6; }
13875
13876 # generate output files
13877 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
13878
13879 ac_config_files="$ac_config_files Modules/ld_so_aix"
13880
13881 cat >confcache <<\_ACEOF
13882 # This file is a shell script that caches the results of configure
13883 # tests run on this system so they can be shared between configure
13884 # scripts and configure runs, see configure's option --config-cache.
13885 # It is not useful on other systems.  If it contains results you don't
13886 # want to keep, you may remove or edit it.
13887 #
13888 # config.status only pays attention to the cache file if you give it
13889 # the --recheck option to rerun configure.
13890 #
13891 # `ac_cv_env_foo' variables (set or unset) will be overridden when
13892 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13893 # following values.
13894
13895 _ACEOF
13896
13897 # The following way of writing the cache mishandles newlines in values,
13898 # but we know of no workaround that is simple, portable, and efficient.
13899 # So, we kill variables containing newlines.
13900 # Ultrix sh set writes to stderr and can't be redirected directly,
13901 # and sets the high bit in the cache file unless we assign to the vars.
13902 (
13903   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13904     eval ac_val=\$$ac_var
13905     case $ac_val in #(
13906     *${as_nl}*)
13907       case $ac_var in #(
13908       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13909 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13910       esac
13911       case $ac_var in #(
13912       _ | IFS | as_nl) ;; #(
13913       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13914       *) { eval $ac_var=; unset $ac_var;} ;;
13915       esac ;;
13916     esac
13917   done
13918
13919   (set) 2>&1 |
13920     case $as_nl`(ac_space=' '; set) 2>&1` in #(
13921     *${as_nl}ac_space=\ *)
13922       # `set' does not quote correctly, so add quotes: double-quote
13923       # substitution turns \\\\ into \\, and sed turns \\ into \.
13924       sed -n \
13925         "s/'/'\\\\''/g;
13926           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13927       ;; #(
13928     *)
13929       # `set' quotes correctly as required by POSIX, so do not add quotes.
13930       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
13931       ;;
13932     esac |
13933     sort
13934 ) |
13935   sed '
13936      /^ac_cv_env_/b end
13937      t clear
13938      :clear
13939      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13940      t end
13941      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13942      :end' >>confcache
13943 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13944   if test -w "$cache_file"; then
13945     test "x$cache_file" != "x/dev/null" &&
13946       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13947 $as_echo "$as_me: updating cache $cache_file" >&6;}
13948     cat confcache >$cache_file
13949   else
13950     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13951 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
13952   fi
13953 fi
13954 rm -f confcache
13955
13956 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13957 # Let make expand exec_prefix.
13958 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13959
13960 DEFS=-DHAVE_CONFIG_H
13961
13962 ac_libobjs=
13963 ac_ltlibobjs=
13964 U=
13965 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13966   # 1. Remove the extension, and $U if already installed.
13967   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13968   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
13969   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
13970   #    will be set to the directory where LIBOBJS objects are built.
13971   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13972   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
13973 done
13974 LIBOBJS=$ac_libobjs
13975
13976 LTLIBOBJS=$ac_ltlibobjs
13977
13978
13979
13980
13981 : ${CONFIG_STATUS=./config.status}
13982 ac_write_fail=0
13983 ac_clean_files_save=$ac_clean_files
13984 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13985 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13986 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13987 as_write_fail=0
13988 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
13989 #! $SHELL
13990 # Generated by $as_me.
13991 # Run this file to recreate the current configuration.
13992 # Compiler output produced by configure, useful for debugging
13993 # configure, is in config.log if it exists.
13994
13995 debug=false
13996 ac_cs_recheck=false
13997 ac_cs_silent=false
13998
13999 SHELL=\${CONFIG_SHELL-$SHELL}
14000 export SHELL
14001 _ASEOF
14002 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14003 ## -------------------- ##
14004 ## M4sh Initialization. ##
14005 ## -------------------- ##
14006
14007 # Be more Bourne compatible
14008 DUALCASE=1; export DUALCASE # for MKS sh
14009 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14010   emulate sh
14011   NULLCMD=:
14012   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14013   # is contrary to our usage.  Disable this feature.
14014   alias -g '${1+"$@"}'='"$@"'
14015   setopt NO_GLOB_SUBST
14016 else
14017   case `(set -o) 2>/dev/null` in #(
14018   *posix*) :
14019     set -o posix ;; #(
14020   *) :
14021      ;;
14022 esac
14023 fi
14024
14025
14026 as_nl='
14027 '
14028 export as_nl
14029 # Printing a long string crashes Solaris 7 /usr/bin/printf.
14030 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14031 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14032 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14033 # Prefer a ksh shell builtin over an external printf program on Solaris,
14034 # but without wasting forks for bash or zsh.
14035 if test -z "$BASH_VERSION$ZSH_VERSION" \
14036     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14037   as_echo='print -r --'
14038   as_echo_n='print -rn --'
14039 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14040   as_echo='printf %s\n'
14041   as_echo_n='printf %s'
14042 else
14043   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14044     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14045     as_echo_n='/usr/ucb/echo -n'
14046   else
14047     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14048     as_echo_n_body='eval
14049       arg=$1;
14050       case $arg in #(
14051       *"$as_nl"*)
14052         expr "X$arg" : "X\\(.*\\)$as_nl";
14053         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14054       esac;
14055       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14056     '
14057     export as_echo_n_body
14058     as_echo_n='sh -c $as_echo_n_body as_echo'
14059   fi
14060   export as_echo_body
14061   as_echo='sh -c $as_echo_body as_echo'
14062 fi
14063
14064 # The user is always right.
14065 if test "${PATH_SEPARATOR+set}" != set; then
14066   PATH_SEPARATOR=:
14067   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14068     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14069       PATH_SEPARATOR=';'
14070   }
14071 fi
14072
14073
14074 # IFS
14075 # We need space, tab and new line, in precisely that order.  Quoting is
14076 # there to prevent editors from complaining about space-tab.
14077 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
14078 # splitting by setting IFS to empty value.)
14079 IFS=" ""        $as_nl"
14080
14081 # Find who we are.  Look in the path if we contain no directory separator.
14082 case $0 in #((
14083   *[\\/]* ) as_myself=$0 ;;
14084   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14085 for as_dir in $PATH
14086 do
14087   IFS=$as_save_IFS
14088   test -z "$as_dir" && as_dir=.
14089     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14090   done
14091 IFS=$as_save_IFS
14092
14093      ;;
14094 esac
14095 # We did not find ourselves, most probably we were run as `sh COMMAND'
14096 # in which case we are not to be found in the path.
14097 if test "x$as_myself" = x; then
14098   as_myself=$0
14099 fi
14100 if test ! -f "$as_myself"; then
14101   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14102   exit 1
14103 fi
14104
14105 # Unset variables that we do not need and which cause bugs (e.g. in
14106 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14107 # suppresses any "Segmentation fault" message there.  '((' could
14108 # trigger a bug in pdksh 5.2.14.
14109 for as_var in BASH_ENV ENV MAIL MAILPATH
14110 do eval test x\${$as_var+set} = xset \
14111   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14112 done
14113 PS1='$ '
14114 PS2='> '
14115 PS4='+ '
14116
14117 # NLS nuisances.
14118 LC_ALL=C
14119 export LC_ALL
14120 LANGUAGE=C
14121 export LANGUAGE
14122
14123 # CDPATH.
14124 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14125
14126
14127 # as_fn_error STATUS ERROR [LINENO LOG_FD]
14128 # ----------------------------------------
14129 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14130 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14131 # script with STATUS, using 1 if that was 0.
14132 as_fn_error ()
14133 {
14134   as_status=$1; test $as_status -eq 0 && as_status=1
14135   if test "$4"; then
14136     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14137     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14138   fi
14139   $as_echo "$as_me: error: $2" >&2
14140   as_fn_exit $as_status
14141 } # as_fn_error
14142
14143
14144 # as_fn_set_status STATUS
14145 # -----------------------
14146 # Set $? to STATUS, without forking.
14147 as_fn_set_status ()
14148 {
14149   return $1
14150 } # as_fn_set_status
14151
14152 # as_fn_exit STATUS
14153 # -----------------
14154 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14155 as_fn_exit ()
14156 {
14157   set +e
14158   as_fn_set_status $1
14159   exit $1
14160 } # as_fn_exit
14161
14162 # as_fn_unset VAR
14163 # ---------------
14164 # Portably unset VAR.
14165 as_fn_unset ()
14166 {
14167   { eval $1=; unset $1;}
14168 }
14169 as_unset=as_fn_unset
14170 # as_fn_append VAR VALUE
14171 # ----------------------
14172 # Append the text in VALUE to the end of the definition contained in VAR. Take
14173 # advantage of any shell optimizations that allow amortized linear growth over
14174 # repeated appends, instead of the typical quadratic growth present in naive
14175 # implementations.
14176 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14177   eval 'as_fn_append ()
14178   {
14179     eval $1+=\$2
14180   }'
14181 else
14182   as_fn_append ()
14183   {
14184     eval $1=\$$1\$2
14185   }
14186 fi # as_fn_append
14187
14188 # as_fn_arith ARG...
14189 # ------------------
14190 # Perform arithmetic evaluation on the ARGs, and store the result in the
14191 # global $as_val. Take advantage of shells that can avoid forks. The arguments
14192 # must be portable across $(()) and expr.
14193 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14194   eval 'as_fn_arith ()
14195   {
14196     as_val=$(( $* ))
14197   }'
14198 else
14199   as_fn_arith ()
14200   {
14201     as_val=`expr "$@" || test $? -eq 1`
14202   }
14203 fi # as_fn_arith
14204
14205
14206 if expr a : '\(a\)' >/dev/null 2>&1 &&
14207    test "X`expr 00001 : '.*\(...\)'`" = X001; then
14208   as_expr=expr
14209 else
14210   as_expr=false
14211 fi
14212
14213 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14214   as_basename=basename
14215 else
14216   as_basename=false
14217 fi
14218
14219 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14220   as_dirname=dirname
14221 else
14222   as_dirname=false
14223 fi
14224
14225 as_me=`$as_basename -- "$0" ||
14226 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14227          X"$0" : 'X\(//\)$' \| \
14228          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14229 $as_echo X/"$0" |
14230     sed '/^.*\/\([^/][^/]*\)\/*$/{
14231             s//\1/
14232             q
14233           }
14234           /^X\/\(\/\/\)$/{
14235             s//\1/
14236             q
14237           }
14238           /^X\/\(\/\).*/{
14239             s//\1/
14240             q
14241           }
14242           s/.*/./; q'`
14243
14244 # Avoid depending upon Character Ranges.
14245 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14246 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14247 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14248 as_cr_digits='0123456789'
14249 as_cr_alnum=$as_cr_Letters$as_cr_digits
14250
14251 ECHO_C= ECHO_N= ECHO_T=
14252 case `echo -n x` in #(((((
14253 -n*)
14254   case `echo 'xy\c'` in
14255   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
14256   xy)  ECHO_C='\c';;
14257   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
14258        ECHO_T=' ';;
14259   esac;;
14260 *)
14261   ECHO_N='-n';;
14262 esac
14263
14264 rm -f conf$$ conf$$.exe conf$$.file
14265 if test -d conf$$.dir; then
14266   rm -f conf$$.dir/conf$$.file
14267 else
14268   rm -f conf$$.dir
14269   mkdir conf$$.dir 2>/dev/null
14270 fi
14271 if (echo >conf$$.file) 2>/dev/null; then
14272   if ln -s conf$$.file conf$$ 2>/dev/null; then
14273     as_ln_s='ln -s'
14274     # ... but there are two gotchas:
14275     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14276     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14277     # In both cases, we have to default to `cp -p'.
14278     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14279       as_ln_s='cp -p'
14280   elif ln conf$$.file conf$$ 2>/dev/null; then
14281     as_ln_s=ln
14282   else
14283     as_ln_s='cp -p'
14284   fi
14285 else
14286   as_ln_s='cp -p'
14287 fi
14288 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14289 rmdir conf$$.dir 2>/dev/null
14290
14291
14292 # as_fn_mkdir_p
14293 # -------------
14294 # Create "$as_dir" as a directory, including parents if necessary.
14295 as_fn_mkdir_p ()
14296 {
14297
14298   case $as_dir in #(
14299   -*) as_dir=./$as_dir;;
14300   esac
14301   test -d "$as_dir" || eval $as_mkdir_p || {
14302     as_dirs=
14303     while :; do
14304       case $as_dir in #(
14305       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14306       *) as_qdir=$as_dir;;
14307       esac
14308       as_dirs="'$as_qdir' $as_dirs"
14309       as_dir=`$as_dirname -- "$as_dir" ||
14310 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14311          X"$as_dir" : 'X\(//\)[^/]' \| \
14312          X"$as_dir" : 'X\(//\)$' \| \
14313          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14314 $as_echo X"$as_dir" |
14315     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14316             s//\1/
14317             q
14318           }
14319           /^X\(\/\/\)[^/].*/{
14320             s//\1/
14321             q
14322           }
14323           /^X\(\/\/\)$/{
14324             s//\1/
14325             q
14326           }
14327           /^X\(\/\).*/{
14328             s//\1/
14329             q
14330           }
14331           s/.*/./; q'`
14332       test -d "$as_dir" && break
14333     done
14334     test -z "$as_dirs" || eval "mkdir $as_dirs"
14335   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14336
14337
14338 } # as_fn_mkdir_p
14339 if mkdir -p . 2>/dev/null; then
14340   as_mkdir_p='mkdir -p "$as_dir"'
14341 else
14342   test -d ./-p && rmdir ./-p
14343   as_mkdir_p=false
14344 fi
14345
14346 if test -x / >/dev/null 2>&1; then
14347   as_test_x='test -x'
14348 else
14349   if ls -dL / >/dev/null 2>&1; then
14350     as_ls_L_option=L
14351   else
14352     as_ls_L_option=
14353   fi
14354   as_test_x='
14355     eval sh -c '\''
14356       if test -d "$1"; then
14357         test -d "$1/.";
14358       else
14359         case $1 in #(
14360         -*)set "./$1";;
14361         esac;
14362         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14363         ???[sx]*):;;*)false;;esac;fi
14364     '\'' sh
14365   '
14366 fi
14367 as_executable_p=$as_test_x
14368
14369 # Sed expression to map a string onto a valid CPP name.
14370 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14371
14372 # Sed expression to map a string onto a valid variable name.
14373 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14374
14375
14376 exec 6>&1
14377 ## ----------------------------------- ##
14378 ## Main body of $CONFIG_STATUS script. ##
14379 ## ----------------------------------- ##
14380 _ASEOF
14381 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14382
14383 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14384 # Save the log message, to keep $0 and so on meaningful, and to
14385 # report actual input values of CONFIG_FILES etc. instead of their
14386 # values after options handling.
14387 ac_log="
14388 This file was extended by python $as_me 2.7, which was
14389 generated by GNU Autoconf 2.67.  Invocation command line was
14390
14391   CONFIG_FILES    = $CONFIG_FILES
14392   CONFIG_HEADERS  = $CONFIG_HEADERS
14393   CONFIG_LINKS    = $CONFIG_LINKS
14394   CONFIG_COMMANDS = $CONFIG_COMMANDS
14395   $ $0 $@
14396
14397 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14398 "
14399
14400 _ACEOF
14401
14402 case $ac_config_files in *"
14403 "*) set x $ac_config_files; shift; ac_config_files=$*;;
14404 esac
14405
14406 case $ac_config_headers in *"
14407 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14408 esac
14409
14410
14411 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14412 # Files that config.status was made for.
14413 config_files="$ac_config_files"
14414 config_headers="$ac_config_headers"
14415
14416 _ACEOF
14417
14418 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14419 ac_cs_usage="\
14420 \`$as_me' instantiates files and other configuration actions
14421 from templates according to the current configuration.  Unless the files
14422 and actions are specified as TAGs, all are instantiated by default.
14423
14424 Usage: $0 [OPTION]... [TAG]...
14425
14426   -h, --help       print this help, then exit
14427   -V, --version    print version number and configuration settings, then exit
14428       --config     print configuration, then exit
14429   -q, --quiet, --silent
14430                    do not print progress messages
14431   -d, --debug      don't remove temporary files
14432       --recheck    update $as_me by reconfiguring in the same conditions
14433       --file=FILE[:TEMPLATE]
14434                    instantiate the configuration file FILE
14435       --header=FILE[:TEMPLATE]
14436                    instantiate the configuration header FILE
14437
14438 Configuration files:
14439 $config_files
14440
14441 Configuration headers:
14442 $config_headers
14443
14444 Report bugs to <http://bugs.python.org/>."
14445
14446 _ACEOF
14447 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14448 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14449 ac_cs_version="\\
14450 python config.status 2.7
14451 configured by $0, generated by GNU Autoconf 2.67,
14452   with options \\"\$ac_cs_config\\"
14453
14454 Copyright (C) 2010 Free Software Foundation, Inc.
14455 This config.status script is free software; the Free Software Foundation
14456 gives unlimited permission to copy, distribute and modify it."
14457
14458 ac_pwd='$ac_pwd'
14459 srcdir='$srcdir'
14460 INSTALL='$INSTALL'
14461 test -n "\$AWK" || AWK=awk
14462 _ACEOF
14463
14464 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14465 # The default lists apply if the user does not specify any file.
14466 ac_need_defaults=:
14467 while test $# != 0
14468 do
14469   case $1 in
14470   --*=?*)
14471     ac_option=`expr "X$1" : 'X\([^=]*\)='`
14472     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14473     ac_shift=:
14474     ;;
14475   --*=)
14476     ac_option=`expr "X$1" : 'X\([^=]*\)='`
14477     ac_optarg=
14478     ac_shift=:
14479     ;;
14480   *)
14481     ac_option=$1
14482     ac_optarg=$2
14483     ac_shift=shift
14484     ;;
14485   esac
14486
14487   case $ac_option in
14488   # Handling of the options.
14489   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14490     ac_cs_recheck=: ;;
14491   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14492     $as_echo "$ac_cs_version"; exit ;;
14493   --config | --confi | --conf | --con | --co | --c )
14494     $as_echo "$ac_cs_config"; exit ;;
14495   --debug | --debu | --deb | --de | --d | -d )
14496     debug=: ;;
14497   --file | --fil | --fi | --f )
14498     $ac_shift
14499     case $ac_optarg in
14500     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14501     '') as_fn_error $? "missing file argument" ;;
14502     esac
14503     as_fn_append CONFIG_FILES " '$ac_optarg'"
14504     ac_need_defaults=false;;
14505   --header | --heade | --head | --hea )
14506     $ac_shift
14507     case $ac_optarg in
14508     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14509     esac
14510     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14511     ac_need_defaults=false;;
14512   --he | --h)
14513     # Conflict between --help and --header
14514     as_fn_error $? "ambiguous option: \`$1'
14515 Try \`$0 --help' for more information.";;
14516   --help | --hel | -h )
14517     $as_echo "$ac_cs_usage"; exit ;;
14518   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14519   | -silent | --silent | --silen | --sile | --sil | --si | --s)
14520     ac_cs_silent=: ;;
14521
14522   # This is an error.
14523   -*) as_fn_error $? "unrecognized option: \`$1'
14524 Try \`$0 --help' for more information." ;;
14525
14526   *) as_fn_append ac_config_targets " $1"
14527      ac_need_defaults=false ;;
14528
14529   esac
14530   shift
14531 done
14532
14533 ac_configure_extra_args=
14534
14535 if $ac_cs_silent; then
14536   exec 6>/dev/null
14537   ac_configure_extra_args="$ac_configure_extra_args --silent"
14538 fi
14539
14540 _ACEOF
14541 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14542 if \$ac_cs_recheck; then
14543   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14544   shift
14545   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14546   CONFIG_SHELL='$SHELL'
14547   export CONFIG_SHELL
14548   exec "\$@"
14549 fi
14550
14551 _ACEOF
14552 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14553 exec 5>>config.log
14554 {
14555   echo
14556   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14557 ## Running $as_me. ##
14558 _ASBOX
14559   $as_echo "$ac_log"
14560 } >&5
14561
14562 _ACEOF
14563 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14564 _ACEOF
14565
14566 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14567
14568 # Handling of arguments.
14569 for ac_config_target in $ac_config_targets
14570 do
14571   case $ac_config_target in
14572     "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14573     "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14574     "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14575     "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
14576     "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14577     "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
14578     "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14579     "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
14580     "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
14581     "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
14582
14583   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
14584   esac
14585 done
14586
14587
14588 # If the user did not use the arguments to specify the items to instantiate,
14589 # then the envvar interface is used.  Set only those that are not.
14590 # We use the long form for the default assignment because of an extremely
14591 # bizarre bug on SunOS 4.1.3.
14592 if $ac_need_defaults; then
14593   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14594   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14595 fi
14596
14597 # Have a temporary directory for convenience.  Make it in the build tree
14598 # simply because there is no reason against having it here, and in addition,
14599 # creating and moving files from /tmp can sometimes cause problems.
14600 # Hook for its removal unless debugging.
14601 # Note that there is a small window in which the directory will not be cleaned:
14602 # after its creation but before its name has been assigned to `$tmp'.
14603 $debug ||
14604 {
14605   tmp=
14606   trap 'exit_status=$?
14607   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14608 ' 0
14609   trap 'as_fn_exit 1' 1 2 13 15
14610 }
14611 # Create a (secure) tmp directory for tmp files.
14612
14613 {
14614   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14615   test -n "$tmp" && test -d "$tmp"
14616 }  ||
14617 {
14618   tmp=./conf$$-$RANDOM
14619   (umask 077 && mkdir "$tmp")
14620 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14621
14622 # Set up the scripts for CONFIG_FILES section.
14623 # No need to generate them if there are no CONFIG_FILES.
14624 # This happens for instance with `./config.status config.h'.
14625 if test -n "$CONFIG_FILES"; then
14626
14627
14628 ac_cr=`echo X | tr X '\015'`
14629 # On cygwin, bash can eat \r inside `` if the user requested igncr.
14630 # But we know of no other shell where ac_cr would be empty at this
14631 # point, so we can use a bashism as a fallback.
14632 if test "x$ac_cr" = x; then
14633   eval ac_cr=\$\'\\r\'
14634 fi
14635 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14636 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14637   ac_cs_awk_cr='\\r'
14638 else
14639   ac_cs_awk_cr=$ac_cr
14640 fi
14641
14642 echo 'BEGIN {' >"$tmp/subs1.awk" &&
14643 _ACEOF
14644
14645
14646 {
14647   echo "cat >conf$$subs.awk <<_ACEOF" &&
14648   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14649   echo "_ACEOF"
14650 } >conf$$subs.sh ||
14651   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14652 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
14653 ac_delim='%!_!# '
14654 for ac_last_try in false false false false false :; do
14655   . ./conf$$subs.sh ||
14656     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14657
14658   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14659   if test $ac_delim_n = $ac_delim_num; then
14660     break
14661   elif $ac_last_try; then
14662     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14663   else
14664     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14665   fi
14666 done
14667 rm -f conf$$subs.sh
14668
14669 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14670 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14671 _ACEOF
14672 sed -n '
14673 h
14674 s/^/S["/; s/!.*/"]=/
14675 p
14676 g
14677 s/^[^!]*!//
14678 :repl
14679 t repl
14680 s/'"$ac_delim"'$//
14681 t delim
14682 :nl
14683 h
14684 s/\(.\{148\}\)..*/\1/
14685 t more1
14686 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14687 p
14688 n
14689 b repl
14690 :more1
14691 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14692 p
14693 g
14694 s/.\{148\}//
14695 t nl
14696 :delim
14697 h
14698 s/\(.\{148\}\)..*/\1/
14699 t more2
14700 s/["\\]/\\&/g; s/^/"/; s/$/"/
14701 p
14702 b
14703 :more2
14704 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14705 p
14706 g
14707 s/.\{148\}//
14708 t delim
14709 ' <conf$$subs.awk | sed '
14710 /^[^""]/{
14711   N
14712   s/\n//
14713 }
14714 ' >>$CONFIG_STATUS || ac_write_fail=1
14715 rm -f conf$$subs.awk
14716 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14717 _ACAWK
14718 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14719   for (key in S) S_is_set[key] = 1
14720   FS = "\a"
14721
14722 }
14723 {
14724   line = $ 0
14725   nfields = split(line, field, "@")
14726   substed = 0
14727   len = length(field[1])
14728   for (i = 2; i < nfields; i++) {
14729     key = field[i]
14730     keylen = length(key)
14731     if (S_is_set[key]) {
14732       value = S[key]
14733       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14734       len += length(value) + length(field[++i])
14735       substed = 1
14736     } else
14737       len += 1 + keylen
14738   }
14739
14740   print line
14741 }
14742
14743 _ACAWK
14744 _ACEOF
14745 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14746 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14747   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14748 else
14749   cat
14750 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14751   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14752 _ACEOF
14753
14754 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14755 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14756 # trailing colons and then remove the whole line if VPATH becomes empty
14757 # (actually we leave an empty line to preserve line numbers).
14758 if test "x$srcdir" = x.; then
14759   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
14760 h
14761 s///
14762 s/^/:/
14763 s/[      ]*$/:/
14764 s/:\$(srcdir):/:/g
14765 s/:\${srcdir}:/:/g
14766 s/:@srcdir@:/:/g
14767 s/^:*//
14768 s/:*$//
14769 x
14770 s/\(=[   ]*\).*/\1/
14771 G
14772 s/\n//
14773 s/^[^=]*=[       ]*$//
14774 }'
14775 fi
14776
14777 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14778 fi # test -n "$CONFIG_FILES"
14779
14780 # Set up the scripts for CONFIG_HEADERS section.
14781 # No need to generate them if there are no CONFIG_HEADERS.
14782 # This happens for instance with `./config.status Makefile'.
14783 if test -n "$CONFIG_HEADERS"; then
14784 cat >"$tmp/defines.awk" <<\_ACAWK ||
14785 BEGIN {
14786 _ACEOF
14787
14788 # Transform confdefs.h into an awk script `defines.awk', embedded as
14789 # here-document in config.status, that substitutes the proper values into
14790 # config.h.in to produce config.h.
14791
14792 # Create a delimiter string that does not exist in confdefs.h, to ease
14793 # handling of long lines.
14794 ac_delim='%!_!# '
14795 for ac_last_try in false false :; do
14796   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14797   if test -z "$ac_t"; then
14798     break
14799   elif $ac_last_try; then
14800     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14801   else
14802     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14803   fi
14804 done
14805
14806 # For the awk script, D is an array of macro values keyed by name,
14807 # likewise P contains macro parameters if any.  Preserve backslash
14808 # newline sequences.
14809
14810 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14811 sed -n '
14812 s/.\{148\}/&'"$ac_delim"'/g
14813 t rset
14814 :rset
14815 s/^[     ]*#[    ]*define[       ][      ]*/ /
14816 t def
14817 d
14818 :def
14819 s/\\$//
14820 t bsnl
14821 s/["\\]/\\&/g
14822 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
14823 D["\1"]=" \3"/p
14824 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
14825 d
14826 :bsnl
14827 s/["\\]/\\&/g
14828 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
14829 D["\1"]=" \3\\\\\\n"\\/p
14830 t cont
14831 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14832 t cont
14833 d
14834 :cont
14835 n
14836 s/.\{148\}/&'"$ac_delim"'/g
14837 t clear
14838 :clear
14839 s/\\$//
14840 t bsnlc
14841 s/["\\]/\\&/g; s/^/"/; s/$/"/p
14842 d
14843 :bsnlc
14844 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14845 b cont
14846 ' <confdefs.h | sed '
14847 s/'"$ac_delim"'/"\\\
14848 "/g' >>$CONFIG_STATUS || ac_write_fail=1
14849
14850 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14851   for (key in D) D_is_set[key] = 1
14852   FS = "\a"
14853 }
14854 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14855   line = \$ 0
14856   split(line, arg, " ")
14857   if (arg[1] == "#") {
14858     defundef = arg[2]
14859     mac1 = arg[3]
14860   } else {
14861     defundef = substr(arg[1], 2)
14862     mac1 = arg[2]
14863   }
14864   split(mac1, mac2, "(") #)
14865   macro = mac2[1]
14866   prefix = substr(line, 1, index(line, defundef) - 1)
14867   if (D_is_set[macro]) {
14868     # Preserve the white space surrounding the "#".
14869     print prefix "define", macro P[macro] D[macro]
14870     next
14871   } else {
14872     # Replace #undef with comments.  This is necessary, for example,
14873     # in the case of _POSIX_SOURCE, which is predefined and required
14874     # on some systems where configure will not decide to define it.
14875     if (defundef == "undef") {
14876       print "/*", prefix defundef, macro, "*/"
14877       next
14878     }
14879   }
14880 }
14881 { print }
14882 _ACAWK
14883 _ACEOF
14884 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14885   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14886 fi # test -n "$CONFIG_HEADERS"
14887
14888
14889 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
14890 shift
14891 for ac_tag
14892 do
14893   case $ac_tag in
14894   :[FHLC]) ac_mode=$ac_tag; continue;;
14895   esac
14896   case $ac_mode$ac_tag in
14897   :[FHL]*:*);;
14898   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
14899   :[FH]-) ac_tag=-:-;;
14900   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14901   esac
14902   ac_save_IFS=$IFS
14903   IFS=:
14904   set x $ac_tag
14905   IFS=$ac_save_IFS
14906   shift
14907   ac_file=$1
14908   shift
14909
14910   case $ac_mode in
14911   :L) ac_source=$1;;
14912   :[FH])
14913     ac_file_inputs=
14914     for ac_f
14915     do
14916       case $ac_f in
14917       -) ac_f="$tmp/stdin";;
14918       *) # Look for the file first in the build tree, then in the source tree
14919          # (if the path is not absolute).  The absolute path cannot be DOS-style,
14920          # because $ac_f cannot contain `:'.
14921          test -f "$ac_f" ||
14922            case $ac_f in
14923            [\\/$]*) false;;
14924            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14925            esac ||
14926            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
14927       esac
14928       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14929       as_fn_append ac_file_inputs " '$ac_f'"
14930     done
14931
14932     # Let's still pretend it is `configure' which instantiates (i.e., don't
14933     # use $as_me), people would be surprised to read:
14934     #    /* config.h.  Generated by config.status.  */
14935     configure_input='Generated from '`
14936           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14937         `' by configure.'
14938     if test x"$ac_file" != x-; then
14939       configure_input="$ac_file.  $configure_input"
14940       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14941 $as_echo "$as_me: creating $ac_file" >&6;}
14942     fi
14943     # Neutralize special characters interpreted by sed in replacement strings.
14944     case $configure_input in #(
14945     *\&* | *\|* | *\\* )
14946        ac_sed_conf_input=`$as_echo "$configure_input" |
14947        sed 's/[\\\\&|]/\\\\&/g'`;; #(
14948     *) ac_sed_conf_input=$configure_input;;
14949     esac
14950
14951     case $ac_tag in
14952     *:-:* | *:-) cat >"$tmp/stdin" \
14953       || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
14954     esac
14955     ;;
14956   esac
14957
14958   ac_dir=`$as_dirname -- "$ac_file" ||
14959 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14960          X"$ac_file" : 'X\(//\)[^/]' \| \
14961          X"$ac_file" : 'X\(//\)$' \| \
14962          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14963 $as_echo X"$ac_file" |
14964     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14965             s//\1/
14966             q
14967           }
14968           /^X\(\/\/\)[^/].*/{
14969             s//\1/
14970             q
14971           }
14972           /^X\(\/\/\)$/{
14973             s//\1/
14974             q
14975           }
14976           /^X\(\/\).*/{
14977             s//\1/
14978             q
14979           }
14980           s/.*/./; q'`
14981   as_dir="$ac_dir"; as_fn_mkdir_p
14982   ac_builddir=.
14983
14984 case "$ac_dir" in
14985 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14986 *)
14987   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14988   # A ".." for each directory in $ac_dir_suffix.
14989   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14990   case $ac_top_builddir_sub in
14991   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14992   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14993   esac ;;
14994 esac
14995 ac_abs_top_builddir=$ac_pwd
14996 ac_abs_builddir=$ac_pwd$ac_dir_suffix
14997 # for backward compatibility:
14998 ac_top_builddir=$ac_top_build_prefix
14999
15000 case $srcdir in
15001   .)  # We are building in place.
15002     ac_srcdir=.
15003     ac_top_srcdir=$ac_top_builddir_sub
15004     ac_abs_top_srcdir=$ac_pwd ;;
15005   [\\/]* | ?:[\\/]* )  # Absolute name.
15006     ac_srcdir=$srcdir$ac_dir_suffix;
15007     ac_top_srcdir=$srcdir
15008     ac_abs_top_srcdir=$srcdir ;;
15009   *) # Relative name.
15010     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15011     ac_top_srcdir=$ac_top_build_prefix$srcdir
15012     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15013 esac
15014 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15015
15016
15017   case $ac_mode in
15018   :F)
15019   #
15020   # CONFIG_FILE
15021   #
15022
15023   case $INSTALL in
15024   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15025   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15026   esac
15027 _ACEOF
15028
15029 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15030 # If the template does not know about datarootdir, expand it.
15031 # FIXME: This hack should be removed a few years after 2.60.
15032 ac_datarootdir_hack=; ac_datarootdir_seen=
15033 ac_sed_dataroot='
15034 /datarootdir/ {
15035   p
15036   q
15037 }
15038 /@datadir@/p
15039 /@docdir@/p
15040 /@infodir@/p
15041 /@localedir@/p
15042 /@mandir@/p'
15043 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15044 *datarootdir*) ac_datarootdir_seen=yes;;
15045 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15046   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15047 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15048 _ACEOF
15049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15050   ac_datarootdir_hack='
15051   s&@datadir@&$datadir&g
15052   s&@docdir@&$docdir&g
15053   s&@infodir@&$infodir&g
15054   s&@localedir@&$localedir&g
15055   s&@mandir@&$mandir&g
15056   s&\\\${datarootdir}&$datarootdir&g' ;;
15057 esac
15058 _ACEOF
15059
15060 # Neutralize VPATH when `$srcdir' = `.'.
15061 # Shell code in configure.ac might set extrasub.
15062 # FIXME: do we really want to maintain this feature?
15063 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15064 ac_sed_extra="$ac_vpsub
15065 $extrasub
15066 _ACEOF
15067 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15068 :t
15069 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15070 s|@configure_input@|$ac_sed_conf_input|;t t
15071 s&@top_builddir@&$ac_top_builddir_sub&;t t
15072 s&@top_build_prefix@&$ac_top_build_prefix&;t t
15073 s&@srcdir@&$ac_srcdir&;t t
15074 s&@abs_srcdir@&$ac_abs_srcdir&;t t
15075 s&@top_srcdir@&$ac_top_srcdir&;t t
15076 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15077 s&@builddir@&$ac_builddir&;t t
15078 s&@abs_builddir@&$ac_abs_builddir&;t t
15079 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15080 s&@INSTALL@&$ac_INSTALL&;t t
15081 $ac_datarootdir_hack
15082 "
15083 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15084   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15085
15086 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15087   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15088   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15089   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15090 which seems to be undefined.  Please make sure it is defined" >&5
15091 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15092 which seems to be undefined.  Please make sure it is defined" >&2;}
15093
15094   rm -f "$tmp/stdin"
15095   case $ac_file in
15096   -) cat "$tmp/out" && rm -f "$tmp/out";;
15097   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15098   esac \
15099   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15100  ;;
15101   :H)
15102   #
15103   # CONFIG_HEADER
15104   #
15105   if test x"$ac_file" != x-; then
15106     {
15107       $as_echo "/* $configure_input  */" \
15108       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15109     } >"$tmp/config.h" \
15110       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15111     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15112       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15113 $as_echo "$as_me: $ac_file is unchanged" >&6;}
15114     else
15115       rm -f "$ac_file"
15116       mv "$tmp/config.h" "$ac_file" \
15117         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15118     fi
15119   else
15120     $as_echo "/* $configure_input  */" \
15121       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15122       || as_fn_error $? "could not create -" "$LINENO" 5
15123   fi
15124  ;;
15125
15126
15127   esac
15128
15129
15130   case $ac_file$ac_mode in
15131     "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15132
15133   esac
15134 done # for ac_tag
15135
15136
15137 as_fn_exit 0
15138 _ACEOF
15139 ac_clean_files=$ac_clean_files_save
15140
15141 test $ac_write_fail = 0 ||
15142   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15143
15144
15145 # configure is writing to config.log, and then calls config.status.
15146 # config.status does its own redirection, appending to config.log.
15147 # Unfortunately, on DOS this fails, as config.log is still kept open
15148 # by configure, so config.status won't be able to write to it; its
15149 # output is simply discarded.  So we exec the FD to /dev/null,
15150 # effectively closing config.log, so it can be properly (re)opened and
15151 # appended to by config.status.  When coming back to configure, we
15152 # need to make the FD available again.
15153 if test "$no_create" != yes; then
15154   ac_cs_success=:
15155   ac_config_status_args=
15156   test "$silent" = yes &&
15157     ac_config_status_args="$ac_config_status_args --quiet"
15158   exec 5>/dev/null
15159   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15160   exec 5>>config.log
15161   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15162   # would make configure fail if this is the last instruction.
15163   $ac_cs_success || as_fn_exit 1
15164 fi
15165 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15166   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15167 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15168 fi
15169
15170
15171 echo "creating Modules/Setup"
15172 if test ! -f Modules/Setup
15173 then
15174         cp $srcdir/Modules/Setup.dist Modules/Setup
15175 fi
15176
15177 echo "creating Modules/Setup.local"
15178 if test ! -f Modules/Setup.local
15179 then
15180         echo "# Edit this file for local setup changes" >Modules/Setup.local
15181 fi
15182
15183 echo "creating Makefile"
15184 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15185                         -s Modules Modules/Setup.config \
15186                         Modules/Setup.local Modules/Setup
15187
15188 case $ac_sys_system in
15189 BeOS)
15190         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15191
15192   Support for BeOS is deprecated as of Python 2.6.
15193   See PEP 11 for the gory details.
15194   " >&5
15195 $as_echo "$as_me: WARNING:
15196
15197   Support for BeOS is deprecated as of Python 2.6.
15198   See PEP 11 for the gory details.
15199   " >&2;}
15200   ;;
15201 *) ;;
15202 esac
15203
15204 mv config.c Modules