This commit was manufactured by cvs2svn to create tag 'r221c2'.
[python/dscho.git] / configure
blob37d0a4b77b98730d2aac0ffc51d0a95cffe6ee1d
1 #! /bin/sh
3 # From configure.in Revision: 1.288.6.4
5 # Guess values for system-dependent variables and create Makefiles.
6 # Generated automatically using autoconf version 2.13
7 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Defaults:
13 ac_help=
14 ac_default_prefix=/usr/local
15 # Any additions from configure.in:
16 ac_help="$ac_help
17 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
18 ac_help="$ac_help
19 --without-gcc never use gcc"
20 ac_help="$ac_help
21 --with-cxx=<compiler> enable C++ support"
22 ac_help="$ac_help
23 --with-suffix=.exe set executable suffix"
24 ac_help="$ac_help
25 --with-pydebug build with Py_DEBUG defined"
26 ac_help="$ac_help
27 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28 ac_help="$ac_help
29 --with-libs='lib1 ...' link against additional libs"
30 ac_help="$ac_help
31 --with-signal-module disable/enable signal module"
32 ac_help="$ac_help
33 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
34 ac_help="$ac_help
35 --with(out)-threads[=DIRECTORY] disable/enable thread support"
36 ac_help="$ac_help
37 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
38 ac_help="$ac_help
39 --with-pth use GNU pth threading libraries"
40 ac_help="$ac_help
41 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43 ac_help="$ac_help
44 --with(out)-cycle-gc disable/enable garbage collection"
45 ac_help="$ac_help
46 --with(out)-pymalloc disable/enable specialized mallocs"
47 ac_help="$ac_help
48 --with-wctype-functions use wctype.h functions"
49 ac_help="$ac_help
50 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
51 ac_help="$ac_help
52 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
53 ac_help="$ac_help
54 --with-fpectl enable SIGFPE catching"
55 ac_help="$ac_help
56 --with-libm=STRING math library"
57 ac_help="$ac_help
58 --with-libc=STRING C library"
59 ac_help="$ac_help
60 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
62 # Initialize some variables set by options.
63 # The variables have the same names as the options, with
64 # dashes changed to underlines.
65 build=NONE
66 cache_file=./config.cache
67 exec_prefix=NONE
68 host=NONE
69 no_create=
70 nonopt=NONE
71 no_recursion=
72 prefix=NONE
73 program_prefix=NONE
74 program_suffix=NONE
75 program_transform_name=s,x,x,
76 silent=
77 site=
78 srcdir=
79 target=NONE
80 verbose=
81 x_includes=NONE
82 x_libraries=NONE
83 bindir='${exec_prefix}/bin'
84 sbindir='${exec_prefix}/sbin'
85 libexecdir='${exec_prefix}/libexec'
86 datadir='${prefix}/share'
87 sysconfdir='${prefix}/etc'
88 sharedstatedir='${prefix}/com'
89 localstatedir='${prefix}/var'
90 libdir='${exec_prefix}/lib'
91 includedir='${prefix}/include'
92 oldincludedir='/usr/include'
93 infodir='${prefix}/info'
94 mandir='${prefix}/man'
96 # Initialize some other variables.
97 subdirs=
98 MFLAGS= MAKEFLAGS=
99 SHELL=${CONFIG_SHELL-/bin/sh}
100 # Maximum number of lines to put in a shell here document.
101 ac_max_here_lines=12
103 ac_prev=
104 for ac_option
107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
119 # Accept the important Cygnus configure options, so we can diagnose typos.
121 case "$ac_option" in
123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
126 bindir="$ac_optarg" ;;
128 -build | --build | --buil | --bui | --bu)
129 ac_prev=build ;;
130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
131 build="$ac_optarg" ;;
133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
138 cache_file="$ac_optarg" ;;
140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
144 datadir="$ac_optarg" ;;
146 -disable-* | --disable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
148 # Reject names that are not valid shell variable names.
149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
155 -enable-* | --enable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
157 # Reject names that are not valid shell variable names.
158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
175 exec_prefix="$ac_optarg" ;;
177 -gas | --gas | --ga | --g)
178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
181 -help | --help | --hel | --he)
182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
184 cat << EOF
185 Usage: configure [options] [host]
186 Options: [defaults in brackets after descriptions]
187 Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193 Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
197 [same as prefix]
198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
218 cat << EOF
219 Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223 Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
234 exit 0 ;;
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
279 -nfp | --nfp | --nf)
280 # Obsolete; use --without-fp.
281 with_fp=no ;;
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
365 srcdir="$ac_optarg" ;;
367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
372 sysconfdir="$ac_optarg" ;;
374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
382 -version | --version | --versio | --versi | --vers)
383 echo "configure generated by autoconf version 2.13"
384 exit 0 ;;
386 -with-* | --with-*)
387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
388 # Reject names that are not valid shell variable names.
389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
399 -without-* | --without-*)
400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
401 # Reject names that are not valid shell variable names.
402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
417 x_includes="$ac_optarg" ;;
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
424 x_libraries="$ac_optarg" ;;
426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
431 echo "configure: warning: $ac_option: invalid host type" 1>&2
433 if test "x$nonopt" != xNONE; then
434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
436 nonopt="$ac_option"
439 esac
440 done
442 if test -n "$ac_prev"; then
443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
446 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
448 # File descriptor usage:
449 # 0 standard input
450 # 1 file creation
451 # 2 errors and warnings
452 # 3 some systems may open it to /dev/tty
453 # 4 used on the Kubota Titan
454 # 6 checking for... messages and results
455 # 5 compiler messages saved in config.log
456 if test "$silent" = yes; then
457 exec 6>/dev/null
458 else
459 exec 6>&1
461 exec 5>./config.log
463 echo "\
464 This file contains any messages produced by compilers while
465 running configure, to aid debugging if configure makes a mistake.
466 " 1>&5
468 # Strip out --no-create and --no-recursion so they do not pile up.
469 # Also quote any args containing shell metacharacters.
470 ac_configure_args=
471 for ac_arg
473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
481 esac
482 done
484 # NLS nuisances.
485 # Only set these to C if already set. These must not be set unconditionally
486 # because not all systems understand e.g. LANG=C (notably SCO).
487 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488 # Non-C LC_CTYPE values break the ctype check.
489 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
490 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
494 # confdefs.h avoids OS command line length limits that DEFS can exceed.
495 rm -rf conftest* confdefs.h
496 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
497 echo > confdefs.h
499 # A filename unique to this package, relative to the directory that
500 # configure is in, which we can look for to find out if srcdir is correct.
501 ac_unique_file=Include/object.h
503 # Find the source files, if location was not specified.
504 if test -z "$srcdir"; then
505 ac_srcdir_defaulted=yes
506 # Try the directory containing this script, then its parent.
507 ac_prog=$0
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
512 srcdir=..
514 else
515 ac_srcdir_defaulted=no
517 if test ! -r $srcdir/$ac_unique_file; then
518 if test "$ac_srcdir_defaulted" = yes; then
519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
520 else
521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
524 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
526 # Prefer explicitly selected file to automatically selected ones.
527 if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
539 done
541 if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
543 . $cache_file
544 else
545 echo "creating cache $cache_file"
546 > $cache_file
549 ac_ext=c
550 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
551 ac_cpp='$CPP $CPPFLAGS'
552 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
553 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
554 cross_compiling=$ac_cv_prog_cc_cross
556 ac_exeext=
557 ac_objext=o
558 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
559 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
560 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
561 ac_n= ac_c='
562 ' ac_t=' '
563 else
564 ac_n=-n ac_c= ac_t=
566 else
567 ac_n= ac_c='\c' ac_t=
573 # Set VERSION so we only need to edit in one place (i.e., here)
575 VERSION=2.2
577 # Arguments passed to configure.
579 CONFIG_ARGS="$ac_configure_args"
582 # Check whether --enable-framework or --disable-framework was given.
583 if test "${enable_framework+set}" = set; then
584 enableval="$enable_framework"
586 case $enableval in
587 yes)
588 enableval=/Library/Frameworks
589 esac
590 case $enableval in
592 PYTHONFRAMEWORK=
593 PYTHONFRAMEWORKDIR=no-framework
594 PYTHONFRAMEWORKPREFIX=
595 PYTHONFRAMEWORKINSTALLDIR=
596 enable_framework=
599 PYTHONFRAMEWORK=Python
600 PYTHONFRAMEWORKDIR=Python.framework
601 PYTHONFRAMEWORKPREFIX=$enableval
602 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
603 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
604 esac
606 else
608 PYTHONFRAMEWORK=
609 PYTHONFRAMEWORKDIR=no-framework
610 PYTHONFRAMEWORKPREFIX=
611 PYTHONFRAMEWORKINSTALLDIR=
612 enable_framework=
621 ##AC_ARG_WITH(dyld,
622 ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
624 # Set name for machine-dependent library files
626 echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
627 echo "configure:628: checking MACHDEP" >&5
628 if test -z "$MACHDEP"
629 then
630 ac_sys_system=`uname -s`
631 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
632 ac_sys_release=`uname -v`
633 else
634 ac_sys_release=`uname -r`
636 ac_md_system=`echo $ac_sys_system |
637 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
638 ac_md_release=`echo $ac_sys_release |
639 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
640 MACHDEP="$ac_md_system$ac_md_release"
642 case $MACHDEP in
643 cygwin*) MACHDEP="cygwin";;
644 darwin*) MACHDEP="darwin";;
645 '') MACHDEP="unknown";;
646 esac
650 # SGI compilers allow the specification of the both the ABI and the
651 # ISA on the command line. Depending on the values of these switches,
652 # different and often incompatable code will be generated.
654 # The SGI_ABI variable can be used to modify the CC and LDFLAGS and
655 # thus supply support for various ABI/ISA combinations. The MACHDEP
656 # variable is also adjusted.
659 if test ! -z "$SGI_ABI"
660 then
661 CC="cc $SGI_ABI"
662 LDFLAGS="$SGI_ABI $LDFLAGS"
663 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
665 echo "$ac_t""$MACHDEP" 1>&6
667 # checks for alternative programs
668 echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
669 echo "configure:670: checking for --without-gcc" >&5
670 # Check whether --with-gcc or --without-gcc was given.
671 if test "${with_gcc+set}" = set; then
672 withval="$with_gcc"
674 case $withval in
675 no) CC=cc
676 without_gcc=yes;;
677 yes) CC=gcc
678 without_gcc=no;;
679 *) CC=$withval
680 without_gcc=$withval;;
681 esac
682 else
684 case $ac_sys_system in
685 AIX*) CC=cc_r
686 without_gcc=;;
687 BeOS*)
688 case $BE_HOST_CPU in
689 ppc)
690 CC=mwcc
691 without_gcc=yes
692 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
693 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
694 LDFLAGS="$LDFLAGS -nodup"
696 x86)
697 CC=gcc
698 without_gcc=no
699 OPT=-O
702 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
704 esac
705 AR="\$(srcdir)/Modules/ar_beos"
706 RANLIB=:
708 Monterey*)
709 RANLIB=:
710 without_gcc=;;
711 *) without_gcc=no;;
712 esac
715 echo "$ac_t""$without_gcc" 1>&6
719 MAINOBJ=python.o
720 echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
721 echo "configure:722: checking for --with-cxx=<compiler>" >&5
722 # Check whether --with-cxx or --without-cxx was given.
723 if test "${with_cxx+set}" = set; then
724 withval="$with_cxx"
726 check_cxx=no
727 case $withval in
728 no) CXX=
729 with_cxx=no;;
730 *) CXX=$withval
731 MAINOBJ=ccpython.o
732 with_cxx=$withval;;
733 esac
734 else
736 with_cxx=no
737 check_cxx=yes
741 echo "$ac_t""$with_cxx" 1>&6
743 if test "$with_cxx" = "yes"
744 then
745 { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; }
751 if test "$check_cxx" = "yes"
752 then
753 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
755 # Extract the first word of "$ac_prog", so it can be a program name with args.
756 set dummy $ac_prog; ac_word=$2
757 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
758 echo "configure:759: checking for $ac_word" >&5
759 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
761 else
762 if test -n "$CXX"; then
763 ac_cv_prog_CXX="$CXX" # Let the user override the test.
764 else
765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
766 ac_dummy="$PATH"
767 for ac_dir in $ac_dummy; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_CXX="$ac_prog"
771 break
773 done
774 IFS="$ac_save_ifs"
777 CXX="$ac_cv_prog_CXX"
778 if test -n "$CXX"; then
779 echo "$ac_t""$CXX" 1>&6
780 else
781 echo "$ac_t""no" 1>&6
784 test -n "$CXX" && break
785 done
786 test -n "$CXX" || CXX="notfound"
788 if test "$CXX" = "notfound"
789 then
790 CXX=
791 else
792 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
793 echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
795 ac_ext=C
796 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797 ac_cpp='$CXXCPP $CPPFLAGS'
798 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800 cross_compiling=$ac_cv_prog_cxx_cross
802 cat > conftest.$ac_ext << EOF
804 #line 805 "configure"
805 #include "confdefs.h"
807 int main(){return(0);}
809 if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
810 ac_cv_prog_cxx_works=yes
811 # If we can't run a trivial program, we are probably using a cross compiler.
812 if (./conftest; exit) 2>/dev/null; then
813 ac_cv_prog_cxx_cross=no
814 else
815 ac_cv_prog_cxx_cross=yes
817 else
818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 ac_cv_prog_cxx_works=no
822 rm -fr conftest*
823 ac_ext=c
824 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
825 ac_cpp='$CPP $CPPFLAGS'
826 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
827 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
828 cross_compiling=$ac_cv_prog_cc_cross
830 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
831 if test $ac_cv_prog_cxx_works = no; then
832 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
834 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
835 echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
836 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
837 cross_compiling=$ac_cv_prog_cxx_cross
842 # If the user switches compilers, we can't believe the cache
843 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
844 then
845 { echo "configure: error: cached CC is different -- throw away $cache_file
846 (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
849 # Extract the first word of "gcc", so it can be a program name with args.
850 set dummy gcc; ac_word=$2
851 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
852 echo "configure:853: checking for $ac_word" >&5
853 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
854 echo $ac_n "(cached) $ac_c" 1>&6
855 else
856 if test -n "$CC"; then
857 ac_cv_prog_CC="$CC" # Let the user override the test.
858 else
859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 ac_dummy="$PATH"
861 for ac_dir in $ac_dummy; do
862 test -z "$ac_dir" && ac_dir=.
863 if test -f $ac_dir/$ac_word; then
864 ac_cv_prog_CC="gcc"
865 break
867 done
868 IFS="$ac_save_ifs"
871 CC="$ac_cv_prog_CC"
872 if test -n "$CC"; then
873 echo "$ac_t""$CC" 1>&6
874 else
875 echo "$ac_t""no" 1>&6
878 if test -z "$CC"; then
879 # Extract the first word of "cc", so it can be a program name with args.
880 set dummy cc; ac_word=$2
881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
882 echo "configure:883: checking for $ac_word" >&5
883 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
884 echo $ac_n "(cached) $ac_c" 1>&6
885 else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888 else
889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
890 ac_prog_rejected=no
891 ac_dummy="$PATH"
892 for ac_dir in $ac_dummy; do
893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
896 ac_prog_rejected=yes
897 continue
899 ac_cv_prog_CC="cc"
900 break
902 done
903 IFS="$ac_save_ifs"
904 if test $ac_prog_rejected = yes; then
905 # We found a bogon in the path, so make sure we never use it.
906 set dummy $ac_cv_prog_CC
907 shift
908 if test $# -gt 0; then
909 # We chose a different compiler from the bogus one.
910 # However, it has the same basename, so the bogon will be chosen
911 # first if we set CC to just the basename; use the full file name.
912 shift
913 set dummy "$ac_dir/$ac_word" "$@"
914 shift
915 ac_cv_prog_CC="$@"
920 CC="$ac_cv_prog_CC"
921 if test -n "$CC"; then
922 echo "$ac_t""$CC" 1>&6
923 else
924 echo "$ac_t""no" 1>&6
927 if test -z "$CC"; then
928 case "`uname -s`" in
929 *win32* | *WIN32*)
930 # Extract the first word of "cl", so it can be a program name with args.
931 set dummy cl; ac_word=$2
932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
933 echo "configure:934: checking for $ac_word" >&5
934 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
935 echo $ac_n "(cached) $ac_c" 1>&6
936 else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939 else
940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="cl"
946 break
948 done
949 IFS="$ac_save_ifs"
952 CC="$ac_cv_prog_CC"
953 if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955 else
956 echo "$ac_t""no" 1>&6
959 esac
961 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
964 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
965 echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
967 ac_ext=c
968 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969 ac_cpp='$CPP $CPPFLAGS'
970 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
971 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
972 cross_compiling=$ac_cv_prog_cc_cross
974 cat > conftest.$ac_ext << EOF
976 #line 977 "configure"
977 #include "confdefs.h"
979 main(){return(0);}
981 if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
982 ac_cv_prog_cc_works=yes
983 # If we can't run a trivial program, we are probably using a cross compiler.
984 if (./conftest; exit) 2>/dev/null; then
985 ac_cv_prog_cc_cross=no
986 else
987 ac_cv_prog_cc_cross=yes
989 else
990 echo "configure: failed program was:" >&5
991 cat conftest.$ac_ext >&5
992 ac_cv_prog_cc_works=no
994 rm -fr conftest*
995 ac_ext=c
996 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
997 ac_cpp='$CPP $CPPFLAGS'
998 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
999 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1000 cross_compiling=$ac_cv_prog_cc_cross
1002 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003 if test $ac_cv_prog_cc_works = no; then
1004 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1006 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1007 echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1008 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009 cross_compiling=$ac_cv_prog_cc_cross
1011 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1012 echo "configure:1013: checking whether we are using GNU C" >&5
1013 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1014 echo $ac_n "(cached) $ac_c" 1>&6
1015 else
1016 cat > conftest.c <<EOF
1017 #ifdef __GNUC__
1018 yes;
1019 #endif
1021 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1022 ac_cv_prog_gcc=yes
1023 else
1024 ac_cv_prog_gcc=no
1028 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1030 if test $ac_cv_prog_gcc = yes; then
1031 GCC=yes
1032 else
1033 GCC=
1036 ac_test_CFLAGS="${CFLAGS+set}"
1037 ac_save_CFLAGS="$CFLAGS"
1038 CFLAGS=
1039 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1040 echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
1041 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1042 echo $ac_n "(cached) $ac_c" 1>&6
1043 else
1044 echo 'void f(){}' > conftest.c
1045 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1046 ac_cv_prog_cc_g=yes
1047 else
1048 ac_cv_prog_cc_g=no
1050 rm -f conftest*
1054 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1055 if test "$ac_test_CFLAGS" = set; then
1056 CFLAGS="$ac_save_CFLAGS"
1057 elif test $ac_cv_prog_cc_g = yes; then
1058 if test "$GCC" = yes; then
1059 CFLAGS="-g -O2"
1060 else
1061 CFLAGS="-g"
1063 else
1064 if test "$GCC" = yes; then
1065 CFLAGS="-O2"
1066 else
1067 CFLAGS=
1072 # checks for UNIX variants that set C preprocessor variables
1073 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1074 echo "configure:1075: checking how to run the C preprocessor" >&5
1075 # On Suns, sometimes $CPP names a directory.
1076 if test -n "$CPP" && test -d "$CPP"; then
1077 CPP=
1079 if test -z "$CPP"; then
1080 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
1082 else
1083 # This must be in double quotes, not single quotes, because CPP may get
1084 # substituted into the Makefile and "${CC-cc}" will confuse make.
1085 CPP="${CC-cc} -E"
1086 # On the NeXT, cc -E runs the code through the compiler's parser,
1087 # not just through cpp.
1088 cat > conftest.$ac_ext <<EOF
1089 #line 1090 "configure"
1090 #include "confdefs.h"
1091 #include <assert.h>
1092 Syntax Error
1094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1095 { (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1097 if test -z "$ac_err"; then
1099 else
1100 echo "$ac_err" >&5
1101 echo "configure: failed program was:" >&5
1102 cat conftest.$ac_ext >&5
1103 rm -rf conftest*
1104 CPP="${CC-cc} -E -traditional-cpp"
1105 cat > conftest.$ac_ext <<EOF
1106 #line 1107 "configure"
1107 #include "confdefs.h"
1108 #include <assert.h>
1109 Syntax Error
1111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1112 { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1114 if test -z "$ac_err"; then
1116 else
1117 echo "$ac_err" >&5
1118 echo "configure: failed program was:" >&5
1119 cat conftest.$ac_ext >&5
1120 rm -rf conftest*
1121 CPP="${CC-cc} -nologo -E"
1122 cat > conftest.$ac_ext <<EOF
1123 #line 1124 "configure"
1124 #include "confdefs.h"
1125 #include <assert.h>
1126 Syntax Error
1128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1129 { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1131 if test -z "$ac_err"; then
1133 else
1134 echo "$ac_err" >&5
1135 echo "configure: failed program was:" >&5
1136 cat conftest.$ac_ext >&5
1137 rm -rf conftest*
1138 CPP=/lib/cpp
1140 rm -f conftest*
1142 rm -f conftest*
1144 rm -f conftest*
1145 ac_cv_prog_CPP="$CPP"
1147 CPP="$ac_cv_prog_CPP"
1148 else
1149 ac_cv_prog_CPP="$CPP"
1151 echo "$ac_t""$CPP" 1>&6
1153 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1154 echo "configure:1155: checking for AIX" >&5
1155 cat > conftest.$ac_ext <<EOF
1156 #line 1157 "configure"
1157 #include "confdefs.h"
1158 #ifdef _AIX
1160 #endif
1163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1164 egrep "yes" >/dev/null 2>&1; then
1165 rm -rf conftest*
1166 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1167 #define _ALL_SOURCE 1
1170 else
1171 rm -rf conftest*
1172 echo "$ac_t""no" 1>&6
1174 rm -f conftest*
1177 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1178 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1179 echo "configure:1180: checking for minix/config.h" >&5
1180 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1181 echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183 cat > conftest.$ac_ext <<EOF
1184 #line 1185 "configure"
1185 #include "confdefs.h"
1186 #include <minix/config.h>
1188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189 { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191 if test -z "$ac_err"; then
1192 rm -rf conftest*
1193 eval "ac_cv_header_$ac_safe=yes"
1194 else
1195 echo "$ac_err" >&5
1196 echo "configure: failed program was:" >&5
1197 cat conftest.$ac_ext >&5
1198 rm -rf conftest*
1199 eval "ac_cv_header_$ac_safe=no"
1201 rm -f conftest*
1203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1204 echo "$ac_t""yes" 1>&6
1205 MINIX=yes
1206 else
1207 echo "$ac_t""no" 1>&6
1208 MINIX=
1211 if test "$MINIX" = yes; then
1212 cat >> confdefs.h <<\EOF
1213 #define _POSIX_SOURCE 1
1216 cat >> confdefs.h <<\EOF
1217 #define _POSIX_1_SOURCE 2
1220 cat >> confdefs.h <<\EOF
1221 #define _MINIX 1
1227 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1228 echo "configure:1229: checking for Cygwin environment" >&5
1229 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231 else
1232 cat > conftest.$ac_ext <<EOF
1233 #line 1234 "configure"
1234 #include "confdefs.h"
1236 int main() {
1238 #ifndef __CYGWIN__
1239 #define __CYGWIN__ __CYGWIN32__
1240 #endif
1241 return __CYGWIN__;
1242 ; return 0; }
1244 if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1245 rm -rf conftest*
1246 ac_cv_cygwin=yes
1247 else
1248 echo "configure: failed program was:" >&5
1249 cat conftest.$ac_ext >&5
1250 rm -rf conftest*
1251 ac_cv_cygwin=no
1253 rm -f conftest*
1254 rm -f conftest*
1257 echo "$ac_t""$ac_cv_cygwin" 1>&6
1258 CYGWIN=
1259 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1260 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1261 echo "configure:1262: checking for mingw32 environment" >&5
1262 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265 cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1269 int main() {
1270 return __MINGW32__;
1271 ; return 0; }
1273 if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1274 rm -rf conftest*
1275 ac_cv_mingw32=yes
1276 else
1277 echo "configure: failed program was:" >&5
1278 cat conftest.$ac_ext >&5
1279 rm -rf conftest*
1280 ac_cv_mingw32=no
1282 rm -f conftest*
1283 rm -f conftest*
1286 echo "$ac_t""$ac_cv_mingw32" 1>&6
1287 MINGW32=
1288 test "$ac_cv_mingw32" = yes && MINGW32=yes
1291 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1292 echo "configure:1293: checking for executable suffix" >&5
1293 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1297 ac_cv_exeext=.exe
1298 else
1299 rm -f conftest*
1300 echo 'int main () { return 0; }' > conftest.$ac_ext
1301 ac_cv_exeext=
1302 if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1303 for file in conftest.*; do
1304 case $file in
1305 *.c | *.o | *.obj) ;;
1306 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1307 esac
1308 done
1309 else
1310 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1312 rm -f conftest*
1313 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1317 EXEEXT=""
1318 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1319 echo "$ac_t""${ac_cv_exeext}" 1>&6
1320 ac_exeext=$EXEEXT
1322 echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
1323 echo "configure:1324: checking for --with-suffix" >&5
1324 # Check whether --with-suffix or --without-suffix was given.
1325 if test "${with_suffix+set}" = set; then
1326 withval="$with_suffix"
1328 case $withval in
1329 no) EXEEXT=;;
1330 yes) EXEEXT=.exe;;
1331 *) EXEEXT=$withval;;
1332 esac
1335 echo "$ac_t""$EXEEXT" 1>&6
1337 # Test whether we're running on a non-case-sensitive system, in which
1338 # case we give a warning if no ext is given
1340 echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6
1341 echo "configure:1342: checking for case-insensitive build directory" >&5
1342 if test -d "python"
1343 then
1344 echo "$ac_t""yes" 1>&6
1345 BUILDEXEEXT=.exe
1346 else
1347 echo "$ac_t""no" 1>&6
1348 BUILDEXEEXT=$EXEEXT
1351 case $MACHDEP in
1352 bsdos*)
1353 case $CC in
1354 gcc) CC="$CC -D_HAVE_BSDI";;
1355 esac;;
1356 esac
1358 case $ac_sys_system in
1359 hp*|HP*)
1360 case $CC in
1361 cc|*/cc) CC="$CC -Ae";;
1362 esac;;
1363 Monterey*)
1364 case $CC in
1365 cc) CC="$CC -Wl,-Bexport";;
1366 esac;;
1367 SunOS*)
1368 # Some functions have a prototype only with that define, e.g. confstr
1369 cat >> confdefs.h <<\EOF
1370 #define __EXTENSIONS__ 1
1374 esac
1378 echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
1379 echo "configure:1380: checking LIBRARY" >&5
1380 if test -z "$LIBRARY"
1381 then
1382 LIBRARY='libpython$(VERSION).a'
1384 echo "$ac_t""$LIBRARY" 1>&6
1386 # LDLIBRARY is the name of the library to link against (as opposed to the
1387 # name of the library into which to insert object files). BLDLIBRARY is also
1388 # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1389 # is blank as the main program is not linked directly against LDLIBRARY.
1390 # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1391 # systems without shared libraries, LDLIBRARY is the same as LIBRARY
1392 # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1393 # DLLLIBRARY is the shared (i.e., DLL) library.
1399 LDLIBRARY="$LIBRARY"
1400 BLDLIBRARY='$(LDLIBRARY)'
1401 DLLLIBRARY=''
1402 LDLIBRARYDIR=''
1404 # LINKCC is the command that links the python executable -- default is $(CC).
1405 # If CXX is set, and if it is needed to link a main function that was
1406 # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1407 # python might then depend on the C++ runtime
1408 # This is altered for AIX in order to build the export list before
1409 # linking.
1411 echo $ac_n "checking LINKCC""... $ac_c" 1>&6
1412 echo "configure:1413: checking LINKCC" >&5
1413 if test -z "$LINKCC"
1414 then
1415 if test -z "$CXX"; then
1416 LINKCC="\$(PURIFY) \$(CC)"
1417 else
1418 echo 'int main(){return 0;}' > conftest.$ac_ext
1419 $CXX -c conftest.$ac_ext 2>&5
1420 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1421 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1422 then
1423 LINKCC="\$(PURIFY) \$(CC)"
1424 else
1425 LINKCC="\$(PURIFY) \$(CXX)"
1427 rm -fr conftest*
1429 case $ac_sys_system in
1430 AIX*)
1431 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
1432 dgux*)
1433 LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";;
1434 Monterey64*)
1435 LINKCC="$(LINKCC) -L/usr/lib/ia64l64";;
1436 esac
1438 echo "$ac_t""$LINKCC" 1>&6
1440 echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1441 echo "configure:1442: checking LDLIBRARY" >&5
1443 # DG/UX requires some fancy ld contortions to produce a .so from an .a
1444 case $MACHDEP in
1445 dguxR4)
1446 LDLIBRARY='libpython$(VERSION).so'
1447 OPT="$OPT -pic"
1449 beos*)
1450 LDLIBRARY='libpython$(VERSION).so'
1452 cygwin*)
1453 LDLIBRARY='libpython$(VERSION).dll.a'
1454 DLLLIBRARY='libpython$(VERSION).dll'
1456 esac
1458 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1459 # library that we build, but we do not want to link against it (we
1460 # will find it with a -framework option). For this reason there is an
1461 # extra variable BLDLIBRARY against which Python and the extension
1462 # modules are linked, BLDLIBRARY. This is normally the same as
1463 # LDLIBRARY, but empty for MacOSX framework builds.
1464 if test "$enable_framework"
1465 then
1466 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1467 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1468 BLDLIBRARY=''
1469 else
1470 BLDLIBRARY='$(LDLIBRARY)'
1473 echo "$ac_t""$LDLIBRARY" 1>&6
1475 # Extract the first word of "ranlib", so it can be a program name with args.
1476 set dummy ranlib; ac_word=$2
1477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1478 echo "configure:1479: checking for $ac_word" >&5
1479 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
1481 else
1482 if test -n "$RANLIB"; then
1483 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1484 else
1485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1486 ac_dummy="$PATH"
1487 for ac_dir in $ac_dummy; do
1488 test -z "$ac_dir" && ac_dir=.
1489 if test -f $ac_dir/$ac_word; then
1490 ac_cv_prog_RANLIB="ranlib"
1491 break
1493 done
1494 IFS="$ac_save_ifs"
1495 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1498 RANLIB="$ac_cv_prog_RANLIB"
1499 if test -n "$RANLIB"; then
1500 echo "$ac_t""$RANLIB" 1>&6
1501 else
1502 echo "$ac_t""no" 1>&6
1506 for ac_prog in ar aal
1508 # Extract the first word of "$ac_prog", so it can be a program name with args.
1509 set dummy $ac_prog; ac_word=$2
1510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1511 echo "configure:1512: checking for $ac_word" >&5
1512 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1513 echo $ac_n "(cached) $ac_c" 1>&6
1514 else
1515 if test -n "$AR"; then
1516 ac_cv_prog_AR="$AR" # Let the user override the test.
1517 else
1518 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1519 ac_dummy="$PATH"
1520 for ac_dir in $ac_dummy; do
1521 test -z "$ac_dir" && ac_dir=.
1522 if test -f $ac_dir/$ac_word; then
1523 ac_cv_prog_AR="$ac_prog"
1524 break
1526 done
1527 IFS="$ac_save_ifs"
1530 AR="$ac_cv_prog_AR"
1531 if test -n "$AR"; then
1532 echo "$ac_t""$AR" 1>&6
1533 else
1534 echo "$ac_t""no" 1>&6
1537 test -n "$AR" && break
1538 done
1539 test -n "$AR" || AR="ar"
1542 case $MACHDEP in
1543 bsdos*|hp*|HP*)
1544 # install -d does not work on BSDI or HP-UX
1545 if test -z "$INSTALL"
1546 then
1547 INSTALL="${srcdir}/install-sh -c"
1549 esac
1550 ac_aux_dir=
1551 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1552 if test -f $ac_dir/install-sh; then
1553 ac_aux_dir=$ac_dir
1554 ac_install_sh="$ac_aux_dir/install-sh -c"
1555 break
1556 elif test -f $ac_dir/install.sh; then
1557 ac_aux_dir=$ac_dir
1558 ac_install_sh="$ac_aux_dir/install.sh -c"
1559 break
1561 done
1562 if test -z "$ac_aux_dir"; then
1563 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1565 ac_config_guess=$ac_aux_dir/config.guess
1566 ac_config_sub=$ac_aux_dir/config.sub
1567 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1569 # Find a good install program. We prefer a C program (faster),
1570 # so one script is as good as another. But avoid the broken or
1571 # incompatible versions:
1572 # SysV /etc/install, /usr/sbin/install
1573 # SunOS /usr/etc/install
1574 # IRIX /sbin/install
1575 # AIX /bin/install
1576 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1577 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1578 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1579 # ./install, which can be erroneously created by make from ./install.sh.
1580 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1581 echo "configure:1582: checking for a BSD compatible install" >&5
1582 if test -z "$INSTALL"; then
1583 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1587 for ac_dir in $PATH; do
1588 # Account for people who put trailing slashes in PATH elements.
1589 case "$ac_dir/" in
1590 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1592 # OSF1 and SCO ODT 3.0 have their own names for install.
1593 # Don't use installbsd from OSF since it installs stuff as root
1594 # by default.
1595 for ac_prog in ginstall scoinst install; do
1596 if test -f $ac_dir/$ac_prog; then
1597 if test $ac_prog = install &&
1598 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1599 # AIX install. It has an incompatible calling convention.
1601 else
1602 ac_cv_path_install="$ac_dir/$ac_prog -c"
1603 break 2
1606 done
1608 esac
1609 done
1610 IFS="$ac_save_IFS"
1613 if test "${ac_cv_path_install+set}" = set; then
1614 INSTALL="$ac_cv_path_install"
1615 else
1616 # As a last resort, use the slow shell script. We don't cache a
1617 # path for INSTALL within a source directory, because that will
1618 # break other packages using the cache if that directory is
1619 # removed, or if the path is relative.
1620 INSTALL="$ac_install_sh"
1623 echo "$ac_t""$INSTALL" 1>&6
1625 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1626 # It thinks the first close brace ends the variable substitution.
1627 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1629 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1631 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1634 # Not every filesystem supports hard links
1636 if test -z "$LN" ; then
1637 case $ac_sys_system in
1638 BeOS*) LN="ln -s";;
1639 CYGWIN*) LN="ln -s";;
1640 *) LN=ln;;
1641 esac
1644 # Check for --with-pydebug
1645 echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
1646 echo "configure:1647: checking for --with-pydebug" >&5
1647 # Check whether --with-pydebug or --without-pydebug was given.
1648 if test "${with_pydebug+set}" = set; then
1649 withval="$with_pydebug"
1651 if test "$withval" != no
1652 then cat >> confdefs.h <<\EOF
1653 #define Py_DEBUG 1
1655 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1656 else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1658 else
1659 echo "$ac_t""no" 1>&6
1663 # Optimizer/debugger flags
1665 if test -z "$OPT"
1666 then
1667 case $GCC in
1668 yes)
1669 case $ac_cv_prog_cc_g in
1670 yes)
1671 if test "$Py_DEBUG" = 'true' ; then
1672 # Optimization messes up debuggers, so turn it off for
1673 # debug builds.
1674 OPT="-g -Wall -Wstrict-prototypes"
1675 else
1676 OPT="-g -O3 -Wall -Wstrict-prototypes"
1677 fi;;
1679 OPT="-O3 -Wall -Wstrict-prototypes";;
1680 esac
1683 case $ac_sys_system in
1684 OpenUNIX*|UnixWare*)
1685 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1687 OPT="-O";;
1688 esac
1689 esac
1690 case $ac_sys_system in
1691 Darwin*)
1692 OPT="$OPT -no-cpp-precomp";;
1693 esac
1696 if test "$Py_DEBUG" = 'true'; then
1698 else
1699 OPT="-DNDEBUG $OPT"
1702 # The current (beta) Monterey compiler dies with optimizations
1703 case $ac_sys_system in
1704 Monterey*) OPT="";;
1705 esac
1707 if test "$ac_arch_flags"
1708 then
1709 OPT="$OPT $ac_arch_flags"
1712 echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
1713 echo "configure:1714: checking whether $CC accepts -OPT:Olimit=0" >&5
1714 if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1715 echo $ac_n "(cached) $ac_c" 1>&6
1716 else
1717 ac_save_cc="$CC"
1718 CC="$CC -OPT:Olimit=0"
1719 if test "$cross_compiling" = yes; then
1720 ac_cv_opt_olimit_ok=no
1721 else
1722 cat > conftest.$ac_ext <<EOF
1723 #line 1724 "configure"
1724 #include "confdefs.h"
1725 int main() { return 0; }
1727 if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1728 then
1729 ac_cv_opt_olimit_ok=yes
1730 else
1731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1733 rm -fr conftest*
1734 ac_cv_opt_olimit_ok=no
1736 rm -fr conftest*
1739 CC="$ac_save_cc"
1742 echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
1743 if test $ac_cv_opt_olimit_ok = yes; then
1744 case $ac_sys_system in
1745 Darwin*) OPT="$OPT" ;;
1746 *) OPT="$OPT -OPT:Olimit=0";;
1747 esac
1748 else
1749 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
1750 echo "configure:1751: checking whether $CC accepts -Olimit 1500" >&5
1751 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1752 echo $ac_n "(cached) $ac_c" 1>&6
1753 else
1754 ac_save_cc="$CC"
1755 CC="$CC -Olimit 1500"
1756 if test "$cross_compiling" = yes; then
1757 ac_cv_olimit_ok=no
1758 else
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 int main() { return 0; }
1764 if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1765 then
1766 ac_cv_olimit_ok=yes
1767 else
1768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 rm -fr conftest*
1771 ac_cv_olimit_ok=no
1773 rm -fr conftest*
1776 CC="$ac_save_cc"
1779 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1780 if test $ac_cv_olimit_ok = yes; then
1781 OPT="$OPT -Olimit 1500"
1785 # On some compilers, pthreads are available without further options
1786 # (e.g. MacOS X). On some of these systems, the compiler will not
1787 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1788 # So we have to see first whether pthreads are available without
1789 # options before we can check whether -Kpthread improves anything.
1790 echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
1791 echo "configure:1792: checking whether pthreads are available without options" >&5
1792 if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
1794 else
1795 if test "$cross_compiling" = yes; then
1796 ac_cv_pthread_is_default=no
1797 else
1798 cat > conftest.$ac_ext <<EOF
1799 #line 1800 "configure"
1800 #include "confdefs.h"
1802 #include <pthread.h>
1804 void* routine(void* p){return NULL;}
1806 int main(){
1807 pthread_t p;
1808 if(pthread_create(&p,NULL,routine,NULL)!=0)
1809 return 1;
1810 (void)pthread_detach(p);
1811 return 0;
1815 if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1816 then
1817 ac_cv_pthread_is_default=yes
1818 else
1819 echo "configure: failed program was:" >&5
1820 cat conftest.$ac_ext >&5
1821 rm -fr conftest*
1822 ac_cv_pthread_is_default=no
1824 rm -fr conftest*
1830 echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
1833 if test $ac_cv_pthread_is_default = yes
1834 then
1835 ac_cv_kpthread=no
1836 else
1837 # -Kpthread, if available, provides the right #defines
1838 # and linker options to make pthread_create available
1839 # Some compilers won't report that they do not support -Kpthread,
1840 # so we need to run a program to see whether it really made the
1841 # function available.
1842 echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
1843 echo "configure:1844: checking whether $CC accepts -Kpthread" >&5
1844 if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847 ac_save_cc="$CC"
1848 CC="$CC -Kpthread"
1849 if test "$cross_compiling" = yes; then
1850 ac_cv_kpthread=no
1851 else
1852 cat > conftest.$ac_ext <<EOF
1853 #line 1854 "configure"
1854 #include "confdefs.h"
1856 #include <pthread.h>
1858 void* routine(void* p){return NULL;}
1860 int main(){
1861 pthread_t p;
1862 if(pthread_create(&p,NULL,routine,NULL)!=0)
1863 return 1;
1864 (void)pthread_detach(p);
1865 return 0;
1869 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1870 then
1871 ac_cv_kpthread=yes
1872 else
1873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 rm -fr conftest*
1876 ac_cv_kpthread=no
1878 rm -fr conftest*
1881 CC="$ac_save_cc"
1884 echo "$ac_t""$ac_cv_kpthread" 1>&6
1888 # checks for header files
1889 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1890 echo "configure:1891: checking for ANSI C header files" >&5
1891 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1892 echo $ac_n "(cached) $ac_c" 1>&6
1893 else
1894 cat > conftest.$ac_ext <<EOF
1895 #line 1896 "configure"
1896 #include "confdefs.h"
1897 #include <stdlib.h>
1898 #include <stdarg.h>
1899 #include <string.h>
1900 #include <float.h>
1902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1903 { (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1905 if test -z "$ac_err"; then
1906 rm -rf conftest*
1907 ac_cv_header_stdc=yes
1908 else
1909 echo "$ac_err" >&5
1910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 rm -rf conftest*
1913 ac_cv_header_stdc=no
1915 rm -f conftest*
1917 if test $ac_cv_header_stdc = yes; then
1918 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1919 cat > conftest.$ac_ext <<EOF
1920 #line 1921 "configure"
1921 #include "confdefs.h"
1922 #include <string.h>
1924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1925 egrep "memchr" >/dev/null 2>&1; then
1927 else
1928 rm -rf conftest*
1929 ac_cv_header_stdc=no
1931 rm -f conftest*
1935 if test $ac_cv_header_stdc = yes; then
1936 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1937 cat > conftest.$ac_ext <<EOF
1938 #line 1939 "configure"
1939 #include "confdefs.h"
1940 #include <stdlib.h>
1942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1943 egrep "free" >/dev/null 2>&1; then
1945 else
1946 rm -rf conftest*
1947 ac_cv_header_stdc=no
1949 rm -f conftest*
1953 if test $ac_cv_header_stdc = yes; then
1954 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1955 if test "$cross_compiling" = yes; then
1957 else
1958 cat > conftest.$ac_ext <<EOF
1959 #line 1960 "configure"
1960 #include "confdefs.h"
1961 #include <ctype.h>
1962 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1963 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1964 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1965 int main () { int i; for (i = 0; i < 256; i++)
1966 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1967 exit (0); }
1970 if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1971 then
1973 else
1974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -fr conftest*
1977 ac_cv_header_stdc=no
1979 rm -fr conftest*
1985 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1986 if test $ac_cv_header_stdc = yes; then
1987 cat >> confdefs.h <<\EOF
1988 #define STDC_HEADERS 1
1993 for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
1994 ncurses.h poll.h pthread.h \
1995 signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
1996 sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
1997 sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
1998 sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
1999 ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
2001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_hdr" >&5
2004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007 cat > conftest.$ac_ext <<EOF
2008 #line 2009 "configure"
2009 #include "confdefs.h"
2010 #include <$ac_hdr>
2012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2013 { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015 if test -z "$ac_err"; then
2016 rm -rf conftest*
2017 eval "ac_cv_header_$ac_safe=yes"
2018 else
2019 echo "$ac_err" >&5
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
2022 rm -rf conftest*
2023 eval "ac_cv_header_$ac_safe=no"
2025 rm -f conftest*
2027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2028 echo "$ac_t""yes" 1>&6
2029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2030 cat >> confdefs.h <<EOF
2031 #define $ac_tr_hdr 1
2034 else
2035 echo "$ac_t""no" 1>&6
2037 done
2039 ac_header_dirent=no
2040 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2043 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2044 echo "configure:2045: checking for $ac_hdr that defines DIR" >&5
2045 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2046 echo $ac_n "(cached) $ac_c" 1>&6
2047 else
2048 cat > conftest.$ac_ext <<EOF
2049 #line 2050 "configure"
2050 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #include <$ac_hdr>
2053 int main() {
2054 DIR *dirp = 0;
2055 ; return 0; }
2057 if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2058 rm -rf conftest*
2059 eval "ac_cv_header_dirent_$ac_safe=yes"
2060 else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -rf conftest*
2064 eval "ac_cv_header_dirent_$ac_safe=no"
2066 rm -f conftest*
2068 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2069 echo "$ac_t""yes" 1>&6
2070 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2071 cat >> confdefs.h <<EOF
2072 #define $ac_tr_hdr 1
2074 ac_header_dirent=$ac_hdr; break
2075 else
2076 echo "$ac_t""no" 1>&6
2078 done
2079 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2080 if test $ac_header_dirent = dirent.h; then
2081 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2082 echo "configure:2083: checking for opendir in -ldir" >&5
2083 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2084 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087 ac_save_LIBS="$LIBS"
2088 LIBS="-ldir $LIBS"
2089 cat > conftest.$ac_ext <<EOF
2090 #line 2091 "configure"
2091 #include "confdefs.h"
2092 /* Override any gcc2 internal prototype to avoid an error. */
2093 /* We use char because int might match the return type of a gcc2
2094 builtin and then its argument prototype would still apply. */
2095 char opendir();
2097 int main() {
2098 opendir()
2099 ; return 0; }
2101 if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2102 rm -rf conftest*
2103 eval "ac_cv_lib_$ac_lib_var=yes"
2104 else
2105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 rm -rf conftest*
2108 eval "ac_cv_lib_$ac_lib_var=no"
2110 rm -f conftest*
2111 LIBS="$ac_save_LIBS"
2114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2115 echo "$ac_t""yes" 1>&6
2116 LIBS="$LIBS -ldir"
2117 else
2118 echo "$ac_t""no" 1>&6
2121 else
2122 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2123 echo "configure:2124: checking for opendir in -lx" >&5
2124 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2126 echo $ac_n "(cached) $ac_c" 1>&6
2127 else
2128 ac_save_LIBS="$LIBS"
2129 LIBS="-lx $LIBS"
2130 cat > conftest.$ac_ext <<EOF
2131 #line 2132 "configure"
2132 #include "confdefs.h"
2133 /* Override any gcc2 internal prototype to avoid an error. */
2134 /* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136 char opendir();
2138 int main() {
2139 opendir()
2140 ; return 0; }
2142 if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2143 rm -rf conftest*
2144 eval "ac_cv_lib_$ac_lib_var=yes"
2145 else
2146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 eval "ac_cv_lib_$ac_lib_var=no"
2151 rm -f conftest*
2152 LIBS="$ac_save_LIBS"
2155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2156 echo "$ac_t""yes" 1>&6
2157 LIBS="$LIBS -lx"
2158 else
2159 echo "$ac_t""no" 1>&6
2165 # checks for typedefs
2166 was_it_defined=no
2167 echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
2168 echo "configure:2169: checking for clock_t in time.h" >&5
2169 cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172 #include <time.h>
2174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2175 egrep "clock_t" >/dev/null 2>&1; then
2176 rm -rf conftest*
2177 was_it_defined=yes
2178 else
2179 rm -rf conftest*
2180 cat >> confdefs.h <<\EOF
2181 #define clock_t long
2185 rm -f conftest*
2187 echo "$ac_t""$was_it_defined" 1>&6
2189 # Two defines needed to enable largefile support on various platforms
2190 # These may affect some typedefs
2191 cat >> confdefs.h <<\EOF
2192 #define _LARGEFILE_SOURCE 1
2195 cat >> confdefs.h <<\EOF
2196 #define _FILE_OFFSET_BITS 64
2200 # Add some code to confdefs.h so that the test for off_t works on SCO
2201 cat >> confdefs.h <<\EOF
2202 #if defined(SCO_DS)
2203 #undef _OFF_T
2204 #endif
2207 # Type availability checks
2208 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2209 echo "configure:2210: checking for mode_t" >&5
2210 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
2212 else
2213 cat > conftest.$ac_ext <<EOF
2214 #line 2215 "configure"
2215 #include "confdefs.h"
2216 #include <sys/types.h>
2217 #if STDC_HEADERS
2218 #include <stdlib.h>
2219 #include <stddef.h>
2220 #endif
2222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2223 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2224 rm -rf conftest*
2225 ac_cv_type_mode_t=yes
2226 else
2227 rm -rf conftest*
2228 ac_cv_type_mode_t=no
2230 rm -f conftest*
2233 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2234 if test $ac_cv_type_mode_t = no; then
2235 cat >> confdefs.h <<\EOF
2236 #define mode_t int
2241 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2242 echo "configure:2243: checking for off_t" >&5
2243 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245 else
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249 #include <sys/types.h>
2250 #if STDC_HEADERS
2251 #include <stdlib.h>
2252 #include <stddef.h>
2253 #endif
2255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2256 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2257 rm -rf conftest*
2258 ac_cv_type_off_t=yes
2259 else
2260 rm -rf conftest*
2261 ac_cv_type_off_t=no
2263 rm -f conftest*
2266 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2267 if test $ac_cv_type_off_t = no; then
2268 cat >> confdefs.h <<\EOF
2269 #define off_t long
2274 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2275 echo "configure:2276: checking for pid_t" >&5
2276 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2277 echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279 cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <sys/types.h>
2283 #if STDC_HEADERS
2284 #include <stdlib.h>
2285 #include <stddef.h>
2286 #endif
2288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2289 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2290 rm -rf conftest*
2291 ac_cv_type_pid_t=yes
2292 else
2293 rm -rf conftest*
2294 ac_cv_type_pid_t=no
2296 rm -f conftest*
2299 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2300 if test $ac_cv_type_pid_t = no; then
2301 cat >> confdefs.h <<\EOF
2302 #define pid_t int
2307 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2308 echo "configure:2309: checking return type of signal handlers" >&5
2309 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312 cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 #include <sys/types.h>
2316 #include <signal.h>
2317 #ifdef signal
2318 #undef signal
2319 #endif
2320 #ifdef __cplusplus
2321 extern "C" void (*signal (int, void (*)(int)))(int);
2322 #else
2323 void (*signal ()) ();
2324 #endif
2326 int main() {
2327 int i;
2328 ; return 0; }
2330 if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2331 rm -rf conftest*
2332 ac_cv_type_signal=void
2333 else
2334 echo "configure: failed program was:" >&5
2335 cat conftest.$ac_ext >&5
2336 rm -rf conftest*
2337 ac_cv_type_signal=int
2339 rm -f conftest*
2342 echo "$ac_t""$ac_cv_type_signal" 1>&6
2343 cat >> confdefs.h <<EOF
2344 #define RETSIGTYPE $ac_cv_type_signal
2348 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2349 echo "configure:2350: checking for size_t" >&5
2350 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2351 echo $ac_n "(cached) $ac_c" 1>&6
2352 else
2353 cat > conftest.$ac_ext <<EOF
2354 #line 2355 "configure"
2355 #include "confdefs.h"
2356 #include <sys/types.h>
2357 #if STDC_HEADERS
2358 #include <stdlib.h>
2359 #include <stddef.h>
2360 #endif
2362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2364 rm -rf conftest*
2365 ac_cv_type_size_t=yes
2366 else
2367 rm -rf conftest*
2368 ac_cv_type_size_t=no
2370 rm -f conftest*
2373 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2374 if test $ac_cv_type_size_t = no; then
2375 cat >> confdefs.h <<\EOF
2376 #define size_t unsigned
2381 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2382 echo "configure:2383: checking for uid_t in sys/types.h" >&5
2383 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2384 echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386 cat > conftest.$ac_ext <<EOF
2387 #line 2388 "configure"
2388 #include "confdefs.h"
2389 #include <sys/types.h>
2391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2392 egrep "uid_t" >/dev/null 2>&1; then
2393 rm -rf conftest*
2394 ac_cv_type_uid_t=yes
2395 else
2396 rm -rf conftest*
2397 ac_cv_type_uid_t=no
2399 rm -f conftest*
2403 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2404 if test $ac_cv_type_uid_t = no; then
2405 cat >> confdefs.h <<\EOF
2406 #define uid_t int
2409 cat >> confdefs.h <<\EOF
2410 #define gid_t int
2416 # Sizes of various common basic types
2417 echo $ac_n "checking size of int""... $ac_c" 1>&6
2418 echo "configure:2419: checking size of int" >&5
2419 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
2421 else
2422 if test "$cross_compiling" = yes; then
2423 ac_cv_sizeof_int=4
2424 else
2425 cat > conftest.$ac_ext <<EOF
2426 #line 2427 "configure"
2427 #include "confdefs.h"
2428 #include <stdio.h>
2429 main()
2431 FILE *f=fopen("conftestval", "w");
2432 if (!f) exit(1);
2433 fprintf(f, "%d\n", sizeof(int));
2434 exit(0);
2437 if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2438 then
2439 ac_cv_sizeof_int=`cat conftestval`
2440 else
2441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2443 rm -fr conftest*
2444 ac_cv_sizeof_int=0
2446 rm -fr conftest*
2450 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2451 cat >> confdefs.h <<EOF
2452 #define SIZEOF_INT $ac_cv_sizeof_int
2456 echo $ac_n "checking size of long""... $ac_c" 1>&6
2457 echo "configure:2458: checking size of long" >&5
2458 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2459 echo $ac_n "(cached) $ac_c" 1>&6
2460 else
2461 if test "$cross_compiling" = yes; then
2462 ac_cv_sizeof_long=4
2463 else
2464 cat > conftest.$ac_ext <<EOF
2465 #line 2466 "configure"
2466 #include "confdefs.h"
2467 #include <stdio.h>
2468 main()
2470 FILE *f=fopen("conftestval", "w");
2471 if (!f) exit(1);
2472 fprintf(f, "%d\n", sizeof(long));
2473 exit(0);
2476 if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2477 then
2478 ac_cv_sizeof_long=`cat conftestval`
2479 else
2480 echo "configure: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
2482 rm -fr conftest*
2483 ac_cv_sizeof_long=0
2485 rm -fr conftest*
2489 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2490 cat >> confdefs.h <<EOF
2491 #define SIZEOF_LONG $ac_cv_sizeof_long
2495 echo $ac_n "checking size of void *""... $ac_c" 1>&6
2496 echo "configure:2497: checking size of void *" >&5
2497 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500 if test "$cross_compiling" = yes; then
2501 ac_cv_sizeof_void_p=4
2502 else
2503 cat > conftest.$ac_ext <<EOF
2504 #line 2505 "configure"
2505 #include "confdefs.h"
2506 #include <stdio.h>
2507 main()
2509 FILE *f=fopen("conftestval", "w");
2510 if (!f) exit(1);
2511 fprintf(f, "%d\n", sizeof(void *));
2512 exit(0);
2515 if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2516 then
2517 ac_cv_sizeof_void_p=`cat conftestval`
2518 else
2519 echo "configure: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521 rm -fr conftest*
2522 ac_cv_sizeof_void_p=0
2524 rm -fr conftest*
2528 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2529 cat >> confdefs.h <<EOF
2530 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2534 echo $ac_n "checking size of char""... $ac_c" 1>&6
2535 echo "configure:2536: checking size of char" >&5
2536 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539 if test "$cross_compiling" = yes; then
2540 ac_cv_sizeof_char=1
2541 else
2542 cat > conftest.$ac_ext <<EOF
2543 #line 2544 "configure"
2544 #include "confdefs.h"
2545 #include <stdio.h>
2546 main()
2548 FILE *f=fopen("conftestval", "w");
2549 if (!f) exit(1);
2550 fprintf(f, "%d\n", sizeof(char));
2551 exit(0);
2554 if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2555 then
2556 ac_cv_sizeof_char=`cat conftestval`
2557 else
2558 echo "configure: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560 rm -fr conftest*
2561 ac_cv_sizeof_char=0
2563 rm -fr conftest*
2567 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2568 cat >> confdefs.h <<EOF
2569 #define SIZEOF_CHAR $ac_cv_sizeof_char
2573 echo $ac_n "checking size of short""... $ac_c" 1>&6
2574 echo "configure:2575: checking size of short" >&5
2575 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2576 echo $ac_n "(cached) $ac_c" 1>&6
2577 else
2578 if test "$cross_compiling" = yes; then
2579 ac_cv_sizeof_short=2
2580 else
2581 cat > conftest.$ac_ext <<EOF
2582 #line 2583 "configure"
2583 #include "confdefs.h"
2584 #include <stdio.h>
2585 main()
2587 FILE *f=fopen("conftestval", "w");
2588 if (!f) exit(1);
2589 fprintf(f, "%d\n", sizeof(short));
2590 exit(0);
2593 if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2594 then
2595 ac_cv_sizeof_short=`cat conftestval`
2596 else
2597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2599 rm -fr conftest*
2600 ac_cv_sizeof_short=0
2602 rm -fr conftest*
2606 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2607 cat >> confdefs.h <<EOF
2608 #define SIZEOF_SHORT $ac_cv_sizeof_short
2612 echo $ac_n "checking size of float""... $ac_c" 1>&6
2613 echo "configure:2614: checking size of float" >&5
2614 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2615 echo $ac_n "(cached) $ac_c" 1>&6
2616 else
2617 if test "$cross_compiling" = yes; then
2618 ac_cv_sizeof_float=4
2619 else
2620 cat > conftest.$ac_ext <<EOF
2621 #line 2622 "configure"
2622 #include "confdefs.h"
2623 #include <stdio.h>
2624 main()
2626 FILE *f=fopen("conftestval", "w");
2627 if (!f) exit(1);
2628 fprintf(f, "%d\n", sizeof(float));
2629 exit(0);
2632 if { (eval echo configure:2633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2633 then
2634 ac_cv_sizeof_float=`cat conftestval`
2635 else
2636 echo "configure: failed program was:" >&5
2637 cat conftest.$ac_ext >&5
2638 rm -fr conftest*
2639 ac_cv_sizeof_float=0
2641 rm -fr conftest*
2645 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2646 cat >> confdefs.h <<EOF
2647 #define SIZEOF_FLOAT $ac_cv_sizeof_float
2651 echo $ac_n "checking size of double""... $ac_c" 1>&6
2652 echo "configure:2653: checking size of double" >&5
2653 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656 if test "$cross_compiling" = yes; then
2657 ac_cv_sizeof_double=8
2658 else
2659 cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <stdio.h>
2663 main()
2665 FILE *f=fopen("conftestval", "w");
2666 if (!f) exit(1);
2667 fprintf(f, "%d\n", sizeof(double));
2668 exit(0);
2671 if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2672 then
2673 ac_cv_sizeof_double=`cat conftestval`
2674 else
2675 echo "configure: failed program was:" >&5
2676 cat conftest.$ac_ext >&5
2677 rm -fr conftest*
2678 ac_cv_sizeof_double=0
2680 rm -fr conftest*
2684 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2685 cat >> confdefs.h <<EOF
2686 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
2690 echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
2691 echo "configure:2692: checking size of fpos_t" >&5
2692 if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695 if test "$cross_compiling" = yes; then
2696 ac_cv_sizeof_fpos_t=4
2697 else
2698 cat > conftest.$ac_ext <<EOF
2699 #line 2700 "configure"
2700 #include "confdefs.h"
2701 #include <stdio.h>
2702 main()
2704 FILE *f=fopen("conftestval", "w");
2705 if (!f) exit(1);
2706 fprintf(f, "%d\n", sizeof(fpos_t));
2707 exit(0);
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2711 then
2712 ac_cv_sizeof_fpos_t=`cat conftestval`
2713 else
2714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -fr conftest*
2717 ac_cv_sizeof_fpos_t=0
2719 rm -fr conftest*
2723 echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2724 cat >> confdefs.h <<EOF
2725 #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2730 echo $ac_n "checking for long long support""... $ac_c" 1>&6
2731 echo "configure:2732: checking for long long support" >&5
2732 have_long_long=no
2733 cat > conftest.$ac_ext <<EOF
2734 #line 2735 "configure"
2735 #include "confdefs.h"
2737 int main() {
2738 long long x; x = (long long)0;
2739 ; return 0; }
2741 if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2742 rm -rf conftest*
2743 cat >> confdefs.h <<\EOF
2744 #define HAVE_LONG_LONG 1
2746 have_long_long=yes
2747 else
2748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2751 rm -f conftest*
2752 echo "$ac_t""$have_long_long" 1>&6
2753 if test "$have_long_long" = yes ; then
2754 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2755 echo "configure:2756: checking size of long long" >&5
2756 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2757 echo $ac_n "(cached) $ac_c" 1>&6
2758 else
2759 if test "$cross_compiling" = yes; then
2760 ac_cv_sizeof_long_long=8
2761 else
2762 cat > conftest.$ac_ext <<EOF
2763 #line 2764 "configure"
2764 #include "confdefs.h"
2765 #include <stdio.h>
2766 main()
2768 FILE *f=fopen("conftestval", "w");
2769 if (!f) exit(1);
2770 fprintf(f, "%d\n", sizeof(long long));
2771 exit(0);
2774 if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2775 then
2776 ac_cv_sizeof_long_long=`cat conftestval`
2777 else
2778 echo "configure: failed program was:" >&5
2779 cat conftest.$ac_ext >&5
2780 rm -fr conftest*
2781 ac_cv_sizeof_long_long=0
2783 rm -fr conftest*
2787 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2788 cat >> confdefs.h <<EOF
2789 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2795 echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
2796 echo "configure:2797: checking for uintptr_t support" >&5
2797 have_uintptr_t=no
2798 cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2802 int main() {
2803 uintptr_t x; x = (uintptr_t)0;
2804 ; return 0; }
2806 if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2807 rm -rf conftest*
2808 cat >> confdefs.h <<\EOF
2809 #define HAVE_UINTPTR_T 1
2811 have_uintptr_t=yes
2812 else
2813 echo "configure: failed program was:" >&5
2814 cat conftest.$ac_ext >&5
2816 rm -f conftest*
2817 echo "$ac_t""$have_uintptr_t" 1>&6
2818 if test "$have_uintptr_t" = yes ; then
2819 echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
2820 echo "configure:2821: checking size of uintptr_t" >&5
2821 if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2822 echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824 if test "$cross_compiling" = yes; then
2825 ac_cv_sizeof_uintptr_t=4
2826 else
2827 cat > conftest.$ac_ext <<EOF
2828 #line 2829 "configure"
2829 #include "confdefs.h"
2830 #include <stdio.h>
2831 main()
2833 FILE *f=fopen("conftestval", "w");
2834 if (!f) exit(1);
2835 fprintf(f, "%d\n", sizeof(uintptr_t));
2836 exit(0);
2839 if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2840 then
2841 ac_cv_sizeof_uintptr_t=`cat conftestval`
2842 else
2843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 rm -fr conftest*
2846 ac_cv_sizeof_uintptr_t=0
2848 rm -fr conftest*
2852 echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2853 cat >> confdefs.h <<EOF
2854 #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2860 # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2861 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
2862 echo "configure:2863: checking size of off_t" >&5
2863 if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2864 echo $ac_n "(cached) $ac_c" 1>&6
2865 else
2866 if test "$cross_compiling" = yes; then
2867 ac_cv_sizeof_off_t=4
2868 else
2869 cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <stdio.h>
2873 #include <sys/types.h>
2874 main()
2876 FILE *f=fopen("conftestval", "w");
2877 if (!f) exit(1);
2878 fprintf(f, "%d\n", sizeof(off_t));
2879 exit(0);
2882 if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2883 then
2884 ac_cv_sizeof_off_t=`cat conftestval`
2885 else
2886 echo "configure: failed program was:" >&5
2887 cat conftest.$ac_ext >&5
2888 rm -fr conftest*
2889 ac_cv_sizeof_off_t=0
2891 rm -fr conftest*
2897 echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2898 cat >> confdefs.h <<EOF
2899 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2903 echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
2904 echo "configure:2905: checking whether to enable large file support" >&5
2905 if test "$have_long_long" = yes -a \
2906 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2907 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2908 cat >> confdefs.h <<\EOF
2909 #define HAVE_LARGEFILE_SUPPORT 1
2912 echo "$ac_t""yes" 1>&6
2913 else
2914 echo "$ac_t""no" 1>&6
2917 # AC_CHECK_SIZEOF() doesn't include <time.h>.
2918 echo $ac_n "checking size of time_t""... $ac_c" 1>&6
2919 echo "configure:2920: checking size of time_t" >&5
2920 if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2921 echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923 if test "$cross_compiling" = yes; then
2924 ac_cv_sizeof_time_t=4
2925 else
2926 cat > conftest.$ac_ext <<EOF
2927 #line 2928 "configure"
2928 #include "confdefs.h"
2929 #include <stdio.h>
2930 #include <time.h>
2931 main()
2933 FILE *f=fopen("conftestval", "w");
2934 if (!f) exit(1);
2935 fprintf(f, "%d\n", sizeof(time_t));
2936 exit(0);
2939 if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2940 then
2941 ac_cv_sizeof_time_t=`cat conftestval`
2942 else
2943 echo "configure: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
2945 rm -fr conftest*
2946 ac_cv_sizeof_time_t=0
2948 rm -fr conftest*
2954 echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2955 cat >> confdefs.h <<EOF
2956 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2961 # if have pthread_t then define SIZEOF_PTHREAD_T
2962 ac_save_cc="$CC"
2963 if test "$ac_cv_kpthread" = "yes"
2964 then CC="$CC -Kpthread"
2966 echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
2967 echo "configure:2968: checking for pthread_t" >&5
2968 have_pthread_t=no
2969 cat > conftest.$ac_ext <<EOF
2970 #line 2971 "configure"
2971 #include "confdefs.h"
2972 #include <pthread.h>
2973 int main() {
2974 pthread_t x; x = *(pthread_t*)0;
2975 ; return 0; }
2977 if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2978 rm -rf conftest*
2979 have_pthread_t=yes
2980 else
2981 echo "configure: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
2984 rm -f conftest*
2985 echo "$ac_t""$have_pthread_t" 1>&6
2986 if test "$have_pthread_t" = yes ; then
2987 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2988 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
2989 echo "configure:2990: checking size of pthread_t" >&5
2990 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2991 echo $ac_n "(cached) $ac_c" 1>&6
2992 else
2993 if test "$cross_compiling" = yes; then
2994 ac_cv_sizeof_pthread_t=4
2995 else
2996 cat > conftest.$ac_ext <<EOF
2997 #line 2998 "configure"
2998 #include "confdefs.h"
2999 #include <stdio.h>
3000 #include <pthread.h>
3001 main()
3003 FILE *f=fopen("conftestval", "w");
3004 if (!f) exit(1);
3005 fprintf(f, "%d\n", sizeof(pthread_t));
3006 exit(0);
3009 if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3010 then
3011 ac_cv_sizeof_pthread_t=`cat conftestval`
3012 else
3013 echo "configure: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 rm -fr conftest*
3016 ac_cv_sizeof_pthread_t=0
3018 rm -fr conftest*
3024 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3025 cat >> confdefs.h <<EOF
3026 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3030 CC="$ac_save_cc"
3032 echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
3033 echo "configure:3034: checking for --enable-toolbox-glue" >&5
3034 # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3035 if test "${enable_toolbox_glue+set}" = set; then
3036 enableval="$enable_toolbox_glue"
3041 if test -z "$enable_toolbox_glue"
3042 then
3043 case $ac_sys_system/$ac_sys_release in
3044 Darwin/*)
3045 enable_toolbox_glue="yes";;
3047 enable_toolbox_glue="no";;
3048 esac
3050 case "$enable_toolbox_glue" in
3051 yes)
3052 extra_frameworks="-framework CoreServices -framework Foundation"
3053 extra_machdep_objs="Python/mactoolboxglue.o"
3054 extra_undefs="-u __dummy -u _PyMac_Error"
3055 cat >> confdefs.h <<\EOF
3056 #define USE_TOOLBOX_OBJECT_GLUE 1
3061 extra_frameworks=""
3062 extra_machdep_objs=""
3063 extra_undefs=""
3065 esac
3066 echo "$ac_t""$enable_toolbox_glue" 1>&6
3069 case $ac_sys_system/$ac_sys_release in
3070 Darwin/1.3*)
3071 ns_undef_sym='_environ'
3072 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3073 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
3074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3075 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
3076 Darwin/*)
3077 ns_undef_sym='_environ'
3078 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3079 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
3080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3081 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
3082 esac
3084 echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
3085 echo "configure:3086: checking for --enable-framework" >&5
3086 if test "$enable_framework"
3087 then
3088 OPT="$OPT -fno-common -dynamic"
3089 # -U __environ is needed since bundles don't have access
3090 # to crt0 when built but will always be linked against it
3091 # -F. is needed to allow linking to the framework while
3092 # in the build location.
3094 case $ac_sys_system/$ac_sys_release in
3095 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3096 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
3097 esac
3098 cat >> confdefs.h <<\EOF
3099 #define WITH_NEXT_FRAMEWORK 1
3102 echo "$ac_t""yes" 1>&6
3103 else
3104 echo "$ac_t""no" 1>&6
3107 echo $ac_n "checking for dyld""... $ac_c" 1>&6
3108 echo "configure:3109: checking for dyld" >&5
3109 case $ac_sys_system/$ac_sys_release in
3110 Darwin/*)
3111 cat >> confdefs.h <<\EOF
3112 #define WITH_DYLD 1
3115 echo "$ac_t""always on for Darwin" 1>&6
3118 echo "$ac_t""no" 1>&6
3120 esac
3122 # Set info about shared libraries.
3128 # SO is the extension of shared libraries `(including the dot!)
3129 # -- usually .so, .sl on HP-UX, .dll on Cygwin
3130 echo $ac_n "checking SO""... $ac_c" 1>&6
3131 echo "configure:3132: checking SO" >&5
3132 if test -z "$SO"
3133 then
3134 case $ac_sys_system in
3135 hp*|HP*) SO=.sl;;
3136 CYGWIN*) SO=.dll;;
3137 *) SO=.so;;
3138 esac
3140 echo "$ac_t""$SO" 1>&6
3141 # LDSHARED is the ld *command* used to create shared library
3142 # -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
3143 # (Shared libraries in this instance are shared modules to be loaded into
3144 # Python, as opposed to building Python itself as a shared library.)
3145 echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
3146 echo "configure:3147: checking LDSHARED" >&5
3147 if test -z "$LDSHARED"
3148 then
3149 case $ac_sys_system/$ac_sys_release in
3150 AIX*)
3151 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3152 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
3154 BeOS*)
3155 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3156 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3158 IRIX/5*) LDSHARED="ld -shared";;
3159 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
3160 SunOS/4*) LDSHARED="ld";;
3161 SunOS/5*)
3162 if test "$GCC" = "yes"
3163 then LDSHARED='$(CC) -shared'
3164 else LDSHARED="$(CC) -G";
3165 fi ;;
3166 hp*|HP*) LDSHARED="ld -b";;
3167 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3168 DYNIX/ptx*) LDSHARED="ld -G";;
3169 Darwin/1.3*)
3170 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3171 if test "$enable_framework" ; then
3172 # Link against the framework. All externals should be defined.
3173 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3174 else
3175 # No framework. Ignore undefined symbols, assuming they come from Python
3176 LDSHARED="$LDSHARED -undefined suppress"
3177 fi ;;
3178 Darwin/*)
3179 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3180 if test "$enable_framework" ; then
3181 # Link against the framework. All externals should be defined.
3182 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3183 else
3184 # No framework, use the Python app as bundle-loader
3185 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
3186 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
3187 fi ;;
3188 Linux*) LDSHARED="gcc -shared";;
3189 dgux*) LDSHARED="ld -G";;
3190 BSD/OS*/4*) LDSHARED="gcc -shared";;
3191 OpenBSD*|NetBSD*|FreeBSD*)
3192 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3193 then
3194 LDSHARED="cc -shared ${LDFLAGS}"
3195 else
3196 LDSHARED="ld -Bshareable ${LDFLAGS}"
3197 fi;;
3198 OpenUNIX*|UnixWare*)
3199 if test "$GCC" = "yes"
3200 then LDSHARED="$(CC) -shared"
3201 else LDSHARED="$(CC) -G"
3202 fi;;
3203 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
3204 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
3205 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
3206 *) LDSHARED="ld";;
3207 esac
3209 echo "$ac_t""$LDSHARED" 1>&6
3210 BLDSHARED=${BLDSHARED-$LDSHARED}
3211 # CCSHARED are the C *flags* used to create objects to go into a shared
3212 # library (module) -- this is only needed for a few systems
3213 echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
3214 echo "configure:3215: checking CCSHARED" >&5
3215 if test -z "$CCSHARED"
3216 then
3217 case $ac_sys_system/$ac_sys_release in
3218 SunOS*) if test "$GCC" = yes;
3219 then CCSHARED="-fPIC";
3220 fi;;
3221 hp*|HP*) if test "$GCC" = yes;
3222 then CCSHARED="-fPIC";
3223 else CCSHARED="+z";
3224 fi;;
3225 Linux*) CCSHARED="-fPIC";;
3226 BSD/OS*/4*) CCSHARED="-fpic";;
3227 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
3228 OpenUNIX*|UnixWare*)
3229 if test "$GCC" = "yes"
3230 then CCSHARED="-fPIC"
3231 else CCSHARED="-KPIC"
3232 fi;;
3233 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
3234 Monterey*) CCSHARED="-G";;
3235 IRIX*/6*) case $CC in
3236 *gcc*) CCSHARED="-shared";;
3237 *) CCSHARED="";;
3238 esac;;
3239 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
3240 esac
3242 echo "$ac_t""$CCSHARED" 1>&6
3243 # LINKFORSHARED are the flags passed to the $(CC) command that links
3244 # the python executable -- this is only needed for a few systems
3245 echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
3246 echo "configure:3247: checking LINKFORSHARED" >&5
3247 if test -z "$LINKFORSHARED"
3248 then
3249 case $ac_sys_system/$ac_sys_release in
3250 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
3251 hp*|HP*)
3252 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
3253 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
3254 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
3255 # -u libsys_s pulls in all symbols in libsys
3256 Darwin/*)
3257 # -u __dummy makes the linker aware of the objc runtime
3258 # in System.framework; otherwise, __objcInit (referenced in
3259 # crt1.o) gets erroneously defined as common, which breaks dynamic
3260 # loading of any modules which reference it in System.framework.
3261 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3262 # not used by the core itself but which needs to be in the core so
3263 # that dynamically loaded extension modules have access to it.
3264 LINKFORSHARED="$extra_undefs -framework System"
3265 if test "$enable_framework"
3266 then
3267 LINKFORSHARED="$LINKFORSHARED -framework Python"
3269 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
3270 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
3271 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
3272 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
3273 FreeBSD*|NetBSD*|OpenBSD*)
3274 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3275 then
3276 LINKFORSHARED="-Wl,--export-dynamic"
3277 fi;;
3278 SunOS/5*) case $CC in
3279 *gcc*)
3280 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
3281 then
3282 LINKFORSHARED="-Xlinker --export-dynamic"
3283 fi;;
3284 esac;;
3285 esac
3287 echo "$ac_t""$LINKFORSHARED" 1>&6
3290 echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
3291 echo "configure:3292: checking CFLAGSFORSHARED" >&5
3292 if test ! "$LIBRARY" = "$LDLIBRARY"
3293 then
3294 case $ac_sys_system in
3295 CYGWIN*)
3296 # Cygwin needs CCSHARED when building extension DLLs
3297 # but not when building the interpreter DLL.
3298 CFLAGSFORSHARED='';;
3300 CFLAGSFORSHARED='$(CCSHARED)'
3301 esac
3303 echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3305 # checks for libraries
3306 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3307 echo "configure:3308: checking for dlopen in -ldl" >&5
3308 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3309 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3310 echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312 ac_save_LIBS="$LIBS"
3313 LIBS="-ldl $LIBS"
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 /* Override any gcc2 internal prototype to avoid an error. */
3318 /* We use char because int might match the return type of a gcc2
3319 builtin and then its argument prototype would still apply. */
3320 char dlopen();
3322 int main() {
3323 dlopen()
3324 ; return 0; }
3326 if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3327 rm -rf conftest*
3328 eval "ac_cv_lib_$ac_lib_var=yes"
3329 else
3330 echo "configure: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
3332 rm -rf conftest*
3333 eval "ac_cv_lib_$ac_lib_var=no"
3335 rm -f conftest*
3336 LIBS="$ac_save_LIBS"
3339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3340 echo "$ac_t""yes" 1>&6
3341 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3342 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3343 cat >> confdefs.h <<EOF
3344 #define $ac_tr_lib 1
3347 LIBS="-ldl $LIBS"
3349 else
3350 echo "$ac_t""no" 1>&6
3352 # Dynamic linking for SunOS/Solaris and SYSV
3353 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
3354 echo "configure:3355: checking for shl_load in -ldld" >&5
3355 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3356 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359 ac_save_LIBS="$LIBS"
3360 LIBS="-ldld $LIBS"
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 /* Override any gcc2 internal prototype to avoid an error. */
3365 /* We use char because int might match the return type of a gcc2
3366 builtin and then its argument prototype would still apply. */
3367 char shl_load();
3369 int main() {
3370 shl_load()
3371 ; return 0; }
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3374 rm -rf conftest*
3375 eval "ac_cv_lib_$ac_lib_var=yes"
3376 else
3377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 rm -rf conftest*
3380 eval "ac_cv_lib_$ac_lib_var=no"
3382 rm -f conftest*
3383 LIBS="$ac_save_LIBS"
3386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3387 echo "$ac_t""yes" 1>&6
3388 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3389 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3390 cat >> confdefs.h <<EOF
3391 #define $ac_tr_lib 1
3394 LIBS="-ldld $LIBS"
3396 else
3397 echo "$ac_t""no" 1>&6
3399 # Dynamic linking for HP-UX
3401 # checks for system dependent C++ extensions support
3402 case "$ac_sys_system" in
3403 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
3404 echo "configure:3405: checking for genuine AIX C++ extensions support" >&5
3405 cat > conftest.$ac_ext <<EOF
3406 #line 3407 "configure"
3407 #include "confdefs.h"
3408 #include "/usr/lpp/xlC/include/load.h"
3409 int main() {
3410 loadAndInit("", 0, "")
3411 ; return 0; }
3413 if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3414 rm -rf conftest*
3415 cat >> confdefs.h <<\EOF
3416 #define AIX_GENUINE_CPLUSPLUS 1
3419 echo "$ac_t""yes" 1>&6
3420 else
3421 echo "configure: failed program was:" >&5
3422 cat conftest.$ac_ext >&5
3423 rm -rf conftest*
3424 echo "$ac_t""no" 1>&6
3426 rm -f conftest*;;
3427 *) ;;
3428 esac
3430 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3431 # However on SGI IRIX, these exist but are broken.
3432 # BeOS' sockets are stashed in libnet.
3433 case "$ac_sys_system" in
3434 IRIX*) ;;
3436 echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
3437 echo "configure:3438: checking for t_open in -lnsl" >&5
3438 ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3440 echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442 ac_save_LIBS="$LIBS"
3443 LIBS="-lnsl $LIBS"
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 /* Override any gcc2 internal prototype to avoid an error. */
3448 /* We use char because int might match the return type of a gcc2
3449 builtin and then its argument prototype would still apply. */
3450 char t_open();
3452 int main() {
3453 t_open()
3454 ; return 0; }
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3457 rm -rf conftest*
3458 eval "ac_cv_lib_$ac_lib_var=yes"
3459 else
3460 echo "configure: failed program was:" >&5
3461 cat conftest.$ac_ext >&5
3462 rm -rf conftest*
3463 eval "ac_cv_lib_$ac_lib_var=no"
3465 rm -f conftest*
3466 LIBS="$ac_save_LIBS"
3469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3470 echo "$ac_t""yes" 1>&6
3471 LIBS="-lnsl $LIBS"
3472 else
3473 echo "$ac_t""no" 1>&6
3475 # SVR4
3476 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3477 echo "configure:3478: checking for socket in -lsocket" >&5
3478 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3479 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482 ac_save_LIBS="$LIBS"
3483 LIBS="-lsocket $LIBS $LIBS"
3484 cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 /* Override any gcc2 internal prototype to avoid an error. */
3488 /* We use char because int might match the return type of a gcc2
3489 builtin and then its argument prototype would still apply. */
3490 char socket();
3492 int main() {
3493 socket()
3494 ; return 0; }
3496 if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3497 rm -rf conftest*
3498 eval "ac_cv_lib_$ac_lib_var=yes"
3499 else
3500 echo "configure: failed program was:" >&5
3501 cat conftest.$ac_ext >&5
3502 rm -rf conftest*
3503 eval "ac_cv_lib_$ac_lib_var=no"
3505 rm -f conftest*
3506 LIBS="$ac_save_LIBS"
3509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3510 echo "$ac_t""yes" 1>&6
3511 LIBS="-lsocket $LIBS"
3512 else
3513 echo "$ac_t""no" 1>&6
3515 # SVR4 sockets
3517 esac
3518 case "$ac_sys_system" in
3519 BeOS*)
3520 echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3521 echo "configure:3522: checking for socket in -lnet" >&5
3522 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3523 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3524 echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526 ac_save_LIBS="$LIBS"
3527 LIBS="-lnet $LIBS $LIBS"
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 /* Override any gcc2 internal prototype to avoid an error. */
3532 /* We use char because int might match the return type of a gcc2
3533 builtin and then its argument prototype would still apply. */
3534 char socket();
3536 int main() {
3537 socket()
3538 ; return 0; }
3540 if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3541 rm -rf conftest*
3542 eval "ac_cv_lib_$ac_lib_var=yes"
3543 else
3544 echo "configure: failed program was:" >&5
3545 cat conftest.$ac_ext >&5
3546 rm -rf conftest*
3547 eval "ac_cv_lib_$ac_lib_var=no"
3549 rm -f conftest*
3550 LIBS="$ac_save_LIBS"
3553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3554 echo "$ac_t""yes" 1>&6
3555 LIBS="-lnet $LIBS"
3556 else
3557 echo "$ac_t""no" 1>&6
3559 # BeOS
3561 esac
3563 echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
3564 echo "configure:3565: checking for --with-libs" >&5
3565 # Check whether --with-libs or --without-libs was given.
3566 if test "${with_libs+set}" = set; then
3567 withval="$with_libs"
3569 echo "$ac_t""$withval" 1>&6
3570 LIBS="$withval $LIBS"
3572 else
3573 echo "$ac_t""no" 1>&6
3577 # Determine if signalmodule should be used.
3580 echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
3581 echo "configure:3582: checking for --with-signal-module" >&5
3582 # Check whether --with-signal-module or --without-signal-module was given.
3583 if test "${with_signal_module+set}" = set; then
3584 withval="$with_signal_module"
3589 if test -z "$with_signal_module"
3590 then with_signal_module="yes"
3592 echo "$ac_t""$with_signal_module" 1>&6
3594 if test "${with_signal_module}" = "yes"; then
3595 USE_SIGNAL_MODULE=""
3596 SIGNAL_OBJS=""
3597 else
3598 USE_SIGNAL_MODULE="#"
3599 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3602 # This is used to generate Setup.config
3604 USE_THREAD_MODULE=""
3606 echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
3607 echo "configure:3608: checking for --with-dec-threads" >&5
3609 # Check whether --with-dec-threads or --without-dec-threads was given.
3610 if test "${with_dec_threads+set}" = set; then
3611 withval="$with_dec_threads"
3613 echo "$ac_t""$withval" 1>&6
3614 LDLAST=-threads
3615 if test "${with_thread+set}" != set; then
3616 with_thread="$withval";
3618 else
3619 echo "$ac_t""no" 1>&6
3623 echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
3624 echo "configure:3625: checking for --with-threads" >&5
3625 # Check whether --with-threads or --without-threads was given.
3626 if test "${with_threads+set}" = set; then
3627 withval="$with_threads"
3632 # --with-thread is deprecated, but check for it anyway
3633 # Check whether --with-thread or --without-thread was given.
3634 if test "${with_thread+set}" = set; then
3635 withval="$with_thread"
3637 with_threads=$with_thread
3641 if test -z "$with_threads"
3642 then with_threads="yes"
3644 echo "$ac_t""$with_threads" 1>&6
3646 if test "$with_threads" = "no"
3647 then
3648 USE_THREAD_MODULE="#"
3649 elif test "$ac_cv_pthread_is_default" = yes
3650 then
3651 cat >> confdefs.h <<\EOF
3652 #define WITH_THREAD 1
3655 # Defining _REENTRANT on system with POSIX threads should not hurt.
3656 cat >> confdefs.h <<\EOF
3657 #define _REENTRANT 1
3660 posix_threads=yes
3661 LIBOBJS="$LIBOBJS thread.o"
3662 elif test "$ac_cv_kpthread" = "yes"
3663 then
3664 CC="$CC -Kpthread"
3665 cat >> confdefs.h <<\EOF
3666 #define WITH_THREAD 1
3669 posix_threads=yes
3670 LIBOBJS="$LIBOBJS thread.o"
3671 else
3672 if test ! -z "$with_threads" -a -d "$with_threads"
3673 then LDFLAGS="$LDFLAGS -L$with_threads"
3675 if test ! -z "$withval" -a -d "$withval"
3676 then LDFLAGS="$LDFLAGS -L$withval"
3679 # According to the POSIX spec, a pthreads implementation must
3680 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
3681 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
3682 echo "configure:3683: checking for _POSIX_THREADS in unistd.h" >&5
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #include <unistd.h>
3687 #ifdef _POSIX_THREADS
3689 #endif
3692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3693 egrep "yes" >/dev/null 2>&1; then
3694 rm -rf conftest*
3695 unistd_defines_pthreads=yes
3696 else
3697 rm -rf conftest*
3698 unistd_defines_pthreads=no
3700 rm -f conftest*
3702 echo "$ac_t""$unistd_defines_pthreads" 1>&6
3704 cat >> confdefs.h <<\EOF
3705 #define _REENTRANT 1
3708 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3709 echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
3710 echo "configure:3711: checking for mach/cthreads.h" >&5
3711 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3712 echo $ac_n "(cached) $ac_c" 1>&6
3713 else
3714 cat > conftest.$ac_ext <<EOF
3715 #line 3716 "configure"
3716 #include "confdefs.h"
3717 #include <mach/cthreads.h>
3719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3720 { (eval echo configure:3721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3722 if test -z "$ac_err"; then
3723 rm -rf conftest*
3724 eval "ac_cv_header_$ac_safe=yes"
3725 else
3726 echo "$ac_err" >&5
3727 echo "configure: failed program was:" >&5
3728 cat conftest.$ac_ext >&5
3729 rm -rf conftest*
3730 eval "ac_cv_header_$ac_safe=no"
3732 rm -f conftest*
3734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3735 echo "$ac_t""yes" 1>&6
3736 cat >> confdefs.h <<\EOF
3737 #define WITH_THREAD 1
3740 cat >> confdefs.h <<\EOF
3741 #define C_THREADS 1
3744 LIBOBJS="$LIBOBJS thread.o"
3745 else
3746 echo "$ac_t""no" 1>&6
3748 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
3749 echo "configure:3750: checking for --with-pth" >&5
3750 # Check whether --with-pth or --without-pth was given.
3751 if test "${with_pth+set}" = set; then
3752 withval="$with_pth"
3754 echo "$ac_t""$withval" 1>&6
3755 cat >> confdefs.h <<\EOF
3756 #define WITH_THREAD 1
3759 cat >> confdefs.h <<\EOF
3760 #define HAVE_PTH 1
3763 LIBS="-lpth $LIBS"
3764 LIBOBJS="$LIBOBJS thread.o"
3765 else
3767 echo "$ac_t""no" 1>&6
3769 # Just looking for pthread_create in libpthread is not enough:
3770 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3771 # So we really have to include pthread.h, and then link.
3772 _libs=$LIBS
3773 LIBS="$LIBS -lpthread"
3774 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
3775 echo "configure:3776: checking for pthread_create in -lpthread" >&5
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 #include <pthread.h>
3781 void * start_routine (void *arg) { exit (0); }
3782 int main() {
3784 pthread_create (NULL, NULL, start_routine, NULL)
3785 ; return 0; }
3787 if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3788 rm -rf conftest*
3790 echo "$ac_t""yes" 1>&6
3791 cat >> confdefs.h <<\EOF
3792 #define WITH_THREAD 1
3795 posix_threads=yes
3796 LIBOBJS="$LIBOBJS thread.o"
3797 else
3798 echo "configure: failed program was:" >&5
3799 cat conftest.$ac_ext >&5
3800 rm -rf conftest*
3802 LIBS=$_libs
3803 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
3804 echo "configure:3805: checking for pthread_detach" >&5
3805 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3806 echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808 cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 /* System header to define __stub macros and hopefully few prototypes,
3812 which can conflict with char pthread_detach(); below. */
3813 #include <assert.h>
3814 /* Override any gcc2 internal prototype to avoid an error. */
3815 /* We use char because int might match the return type of a gcc2
3816 builtin and then its argument prototype would still apply. */
3817 char pthread_detach();
3819 int main() {
3821 /* The GNU C library defines this for functions which it implements
3822 to always fail with ENOSYS. Some functions are actually named
3823 something starting with __ and the normal name is an alias. */
3824 #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
3825 choke me
3826 #else
3827 pthread_detach();
3828 #endif
3830 ; return 0; }
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3833 rm -rf conftest*
3834 eval "ac_cv_func_pthread_detach=yes"
3835 else
3836 echo "configure: failed program was:" >&5
3837 cat conftest.$ac_ext >&5
3838 rm -rf conftest*
3839 eval "ac_cv_func_pthread_detach=no"
3841 rm -f conftest*
3844 if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3845 echo "$ac_t""yes" 1>&6
3846 cat >> confdefs.h <<\EOF
3847 #define WITH_THREAD 1
3850 posix_threads=yes
3851 LIBOBJS="$LIBOBJS thread.o"
3852 else
3853 echo "$ac_t""no" 1>&6
3855 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3856 echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
3857 echo "configure:3858: checking for kernel/OS.h" >&5
3858 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3859 echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861 cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864 #include <kernel/OS.h>
3866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3867 { (eval echo configure:3868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3869 if test -z "$ac_err"; then
3870 rm -rf conftest*
3871 eval "ac_cv_header_$ac_safe=yes"
3872 else
3873 echo "$ac_err" >&5
3874 echo "configure: failed program was:" >&5
3875 cat conftest.$ac_ext >&5
3876 rm -rf conftest*
3877 eval "ac_cv_header_$ac_safe=no"
3879 rm -f conftest*
3881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3882 echo "$ac_t""yes" 1>&6
3883 cat >> confdefs.h <<\EOF
3884 #define WITH_THREAD 1
3887 cat >> confdefs.h <<\EOF
3888 #define BEOS_THREADS 1
3891 LIBOBJS="$LIBOBJS thread.o"
3892 else
3893 echo "$ac_t""no" 1>&6
3895 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
3896 echo "configure:3897: checking for pthread_create in -lpthreads" >&5
3897 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3898 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3899 echo $ac_n "(cached) $ac_c" 1>&6
3900 else
3901 ac_save_LIBS="$LIBS"
3902 LIBS="-lpthreads $LIBS"
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906 /* Override any gcc2 internal prototype to avoid an error. */
3907 /* We use char because int might match the return type of a gcc2
3908 builtin and then its argument prototype would still apply. */
3909 char pthread_create();
3911 int main() {
3912 pthread_create()
3913 ; return 0; }
3915 if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3916 rm -rf conftest*
3917 eval "ac_cv_lib_$ac_lib_var=yes"
3918 else
3919 echo "configure: failed program was:" >&5
3920 cat conftest.$ac_ext >&5
3921 rm -rf conftest*
3922 eval "ac_cv_lib_$ac_lib_var=no"
3924 rm -f conftest*
3925 LIBS="$ac_save_LIBS"
3928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3929 echo "$ac_t""yes" 1>&6
3930 cat >> confdefs.h <<\EOF
3931 #define WITH_THREAD 1
3934 posix_threads=yes
3935 LIBS="$LIBS -lpthreads"
3936 LIBOBJS="$LIBOBJS thread.o"
3937 else
3938 echo "$ac_t""no" 1>&6
3940 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
3941 echo "configure:3942: checking for pthread_create in -lc_r" >&5
3942 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3944 echo $ac_n "(cached) $ac_c" 1>&6
3945 else
3946 ac_save_LIBS="$LIBS"
3947 LIBS="-lc_r $LIBS"
3948 cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3951 /* Override any gcc2 internal prototype to avoid an error. */
3952 /* We use char because int might match the return type of a gcc2
3953 builtin and then its argument prototype would still apply. */
3954 char pthread_create();
3956 int main() {
3957 pthread_create()
3958 ; return 0; }
3960 if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3961 rm -rf conftest*
3962 eval "ac_cv_lib_$ac_lib_var=yes"
3963 else
3964 echo "configure: failed program was:" >&5
3965 cat conftest.$ac_ext >&5
3966 rm -rf conftest*
3967 eval "ac_cv_lib_$ac_lib_var=no"
3969 rm -f conftest*
3970 LIBS="$ac_save_LIBS"
3973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3974 echo "$ac_t""yes" 1>&6
3975 cat >> confdefs.h <<\EOF
3976 #define WITH_THREAD 1
3979 posix_threads=yes
3980 LIBS="$LIBS -lc_r"
3981 LIBOBJS="$LIBOBJS thread.o"
3982 else
3983 echo "$ac_t""no" 1>&6
3985 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
3986 echo "configure:3987: checking for __d6_pthread_create in -lthread" >&5
3987 ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
3988 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3989 echo $ac_n "(cached) $ac_c" 1>&6
3990 else
3991 ac_save_LIBS="$LIBS"
3992 LIBS="-lthread $LIBS"
3993 cat > conftest.$ac_ext <<EOF
3994 #line 3995 "configure"
3995 #include "confdefs.h"
3996 /* Override any gcc2 internal prototype to avoid an error. */
3997 /* We use char because int might match the return type of a gcc2
3998 builtin and then its argument prototype would still apply. */
3999 char __d6_pthread_create();
4001 int main() {
4002 __d6_pthread_create()
4003 ; return 0; }
4005 if { (eval echo configure:4006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4006 rm -rf conftest*
4007 eval "ac_cv_lib_$ac_lib_var=yes"
4008 else
4009 echo "configure: failed program was:" >&5
4010 cat conftest.$ac_ext >&5
4011 rm -rf conftest*
4012 eval "ac_cv_lib_$ac_lib_var=no"
4014 rm -f conftest*
4015 LIBS="$ac_save_LIBS"
4018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4019 echo "$ac_t""yes" 1>&6
4020 cat >> confdefs.h <<\EOF
4021 #define WITH_THREAD 1
4024 posix_threads=yes
4025 LIBS="$LIBS -lthread"
4026 LIBOBJS="$LIBOBJS thread.o"
4027 else
4028 echo "$ac_t""no" 1>&6
4030 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
4031 echo "configure:4032: checking for __pthread_create_system in -lpthread" >&5
4032 ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4034 echo $ac_n "(cached) $ac_c" 1>&6
4035 else
4036 ac_save_LIBS="$LIBS"
4037 LIBS="-lpthread $LIBS"
4038 cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041 /* Override any gcc2 internal prototype to avoid an error. */
4042 /* We use char because int might match the return type of a gcc2
4043 builtin and then its argument prototype would still apply. */
4044 char __pthread_create_system();
4046 int main() {
4047 __pthread_create_system()
4048 ; return 0; }
4050 if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4051 rm -rf conftest*
4052 eval "ac_cv_lib_$ac_lib_var=yes"
4053 else
4054 echo "configure: failed program was:" >&5
4055 cat conftest.$ac_ext >&5
4056 rm -rf conftest*
4057 eval "ac_cv_lib_$ac_lib_var=no"
4059 rm -f conftest*
4060 LIBS="$ac_save_LIBS"
4063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4064 echo "$ac_t""yes" 1>&6
4065 cat >> confdefs.h <<\EOF
4066 #define WITH_THREAD 1
4069 posix_threads=yes
4070 LIBS="$LIBS -lpthread"
4071 LIBOBJS="$LIBOBJS thread.o"
4072 else
4073 echo "$ac_t""no" 1>&6
4075 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
4076 echo "configure:4077: checking for pthread_create in -lcma" >&5
4077 ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4078 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4079 echo $ac_n "(cached) $ac_c" 1>&6
4080 else
4081 ac_save_LIBS="$LIBS"
4082 LIBS="-lcma $LIBS"
4083 cat > conftest.$ac_ext <<EOF
4084 #line 4085 "configure"
4085 #include "confdefs.h"
4086 /* Override any gcc2 internal prototype to avoid an error. */
4087 /* We use char because int might match the return type of a gcc2
4088 builtin and then its argument prototype would still apply. */
4089 char pthread_create();
4091 int main() {
4092 pthread_create()
4093 ; return 0; }
4095 if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4096 rm -rf conftest*
4097 eval "ac_cv_lib_$ac_lib_var=yes"
4098 else
4099 echo "configure: failed program was:" >&5
4100 cat conftest.$ac_ext >&5
4101 rm -rf conftest*
4102 eval "ac_cv_lib_$ac_lib_var=no"
4104 rm -f conftest*
4105 LIBS="$ac_save_LIBS"
4108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4109 echo "$ac_t""yes" 1>&6
4110 cat >> confdefs.h <<\EOF
4111 #define WITH_THREAD 1
4114 posix_threads=yes
4115 LIBS="$LIBS -lcma"
4116 LIBOBJS="$LIBOBJS thread.o"
4117 else
4118 echo "$ac_t""no" 1>&6
4120 USE_THREAD_MODULE="#"
4137 rm -f conftest*
4143 if test "$posix_threads" = "yes"; then
4144 if test "$unistd_defines_pthreads" = "no"; then
4145 cat >> confdefs.h <<\EOF
4146 #define _POSIX_THREADS 1
4151 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
4152 echo "configure:4153: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
4153 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4154 echo $ac_n "(cached) $ac_c" 1>&6
4155 else
4156 if test "$cross_compiling" = yes; then
4157 ac_cv_pthread_system_supported=no
4158 else
4159 cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #include <pthread.h>
4163 void *foo(void *parm) {
4164 return NULL;
4166 main() {
4167 pthread_attr_t attr;
4168 pthread_t id;
4169 if (pthread_attr_init(&attr)) exit(-1);
4170 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4171 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
4172 exit(0);
4175 if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4176 then
4177 ac_cv_pthread_system_supported=yes
4178 else
4179 echo "configure: failed program was:" >&5
4180 cat conftest.$ac_ext >&5
4181 rm -fr conftest*
4182 ac_cv_pthread_system_supported=no
4184 rm -fr conftest*
4190 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
4191 if test "$ac_cv_pthread_system_supported" = "yes"; then
4192 cat >> confdefs.h <<\EOF
4193 #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4197 for ac_func in pthread_sigmask
4199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4200 echo "configure:4201: checking for $ac_func" >&5
4201 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204 cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 /* System header to define __stub macros and hopefully few prototypes,
4208 which can conflict with char $ac_func(); below. */
4209 #include <assert.h>
4210 /* Override any gcc2 internal prototype to avoid an error. */
4211 /* We use char because int might match the return type of a gcc2
4212 builtin and then its argument prototype would still apply. */
4213 char $ac_func();
4215 int main() {
4217 /* The GNU C library defines this for functions which it implements
4218 to always fail with ENOSYS. Some functions are actually named
4219 something starting with __ and the normal name is an alias. */
4220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4221 choke me
4222 #else
4223 $ac_func();
4224 #endif
4226 ; return 0; }
4228 if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4229 rm -rf conftest*
4230 eval "ac_cv_func_$ac_func=yes"
4231 else
4232 echo "configure: failed program was:" >&5
4233 cat conftest.$ac_ext >&5
4234 rm -rf conftest*
4235 eval "ac_cv_func_$ac_func=no"
4237 rm -f conftest*
4240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4241 echo "$ac_t""yes" 1>&6
4242 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4243 cat >> confdefs.h <<EOF
4244 #define $ac_tr_func 1
4247 else
4248 echo "$ac_t""no" 1>&6
4250 done
4254 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
4255 echo "configure:4256: checking for usconfig in -lmpc" >&5
4256 ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4257 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4258 echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260 ac_save_LIBS="$LIBS"
4261 LIBS="-lmpc $LIBS"
4262 cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 /* Override any gcc2 internal prototype to avoid an error. */
4266 /* We use char because int might match the return type of a gcc2
4267 builtin and then its argument prototype would still apply. */
4268 char usconfig();
4270 int main() {
4271 usconfig()
4272 ; return 0; }
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4275 rm -rf conftest*
4276 eval "ac_cv_lib_$ac_lib_var=yes"
4277 else
4278 echo "configure: failed program was:" >&5
4279 cat conftest.$ac_ext >&5
4280 rm -rf conftest*
4281 eval "ac_cv_lib_$ac_lib_var=no"
4283 rm -f conftest*
4284 LIBS="$ac_save_LIBS"
4287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4288 echo "$ac_t""yes" 1>&6
4289 cat >> confdefs.h <<\EOF
4290 #define WITH_THREAD 1
4293 LIBS="$LIBS -lmpc"
4294 LIBOBJS="$LIBOBJS thread.o"
4295 USE_THREAD_MODULE=""
4296 else
4297 echo "$ac_t""no" 1>&6
4300 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
4301 echo "configure:4302: checking for thr_create in -lthread" >&5
4302 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4303 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4304 echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306 ac_save_LIBS="$LIBS"
4307 LIBS="-lthread $LIBS"
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 /* Override any gcc2 internal prototype to avoid an error. */
4312 /* We use char because int might match the return type of a gcc2
4313 builtin and then its argument prototype would still apply. */
4314 char thr_create();
4316 int main() {
4317 thr_create()
4318 ; return 0; }
4320 if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4321 rm -rf conftest*
4322 eval "ac_cv_lib_$ac_lib_var=yes"
4323 else
4324 echo "configure: failed program was:" >&5
4325 cat conftest.$ac_ext >&5
4326 rm -rf conftest*
4327 eval "ac_cv_lib_$ac_lib_var=no"
4329 rm -f conftest*
4330 LIBS="$ac_save_LIBS"
4333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4334 echo "$ac_t""yes" 1>&6
4335 cat >> confdefs.h <<\EOF
4336 #define WITH_THREAD 1
4339 LIBS="$LIBS -lthread"
4340 LIBOBJS="$LIBOBJS thread.o"
4341 USE_THREAD_MODULE=""
4342 else
4343 echo "$ac_t""no" 1>&6
4347 if test "$USE_THREAD_MODULE" != "#"
4348 then
4349 # If the above checks didn't disable threads, (at least) OSF1
4350 # needs this '-threads' argument during linking.
4351 case $ac_sys_system in
4352 OSF1) LDLAST=-threads;;
4353 esac
4357 # Check for enable-ipv6
4358 echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
4359 echo "configure:4360: checking if --enable-ipv6 is specified" >&5
4360 # Check whether --enable-ipv6 or --disable-ipv6 was given.
4361 if test "${enable_ipv6+set}" = set; then
4362 enableval="$enable_ipv6"
4363 case "$enableval" in
4365 echo "$ac_t""no" 1>&6
4366 ipv6=no
4368 *) echo "$ac_t""yes" 1>&6
4369 cat >> confdefs.h <<\EOF
4370 #define ENABLE_IPV6 1
4373 ipv6=yes
4375 esac
4376 else
4378 if test "$cross_compiling" = yes; then
4379 echo "$ac_t""no" 1>&6
4380 ipv6=no
4382 else
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4385 "configure"
4385 #include "confdefs.h"
4386 /* AF_INET6 available check */
4387 #include <sys/types.h>
4388 #include <sys/socket.h>
4389 main()
4391 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4392 exit(1);
4393 else
4394 exit(0);
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4399 then
4400 echo "$ac_t""yes" 1>&6
4401 ipv6=yes
4402 else
4403 echo "configure: failed program was:" >&5
4404 cat conftest.$ac_ext >&5
4405 rm -fr conftest*
4406 echo "$ac_t""no" 1>&6
4407 ipv6=no
4409 rm -fr conftest*
4413 if test "$ipv6" = "yes"; then
4414 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
4415 echo "configure:4416: checking if RFC2553 API is available" >&5
4416 cat > conftest.$ac_ext <<EOF
4417 #line 4418 "configure"
4418 #include "confdefs.h"
4419 #include <sys/types.h>
4420 #include <netinet/in.h>
4421 int main() {
4422 struct sockaddr_in6 x;
4423 x.sin6_scope_id;
4424 ; return 0; }
4426 if { (eval echo configure:4427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4427 rm -rf conftest*
4428 echo "$ac_t""yes" 1>&6
4429 ipv6=yes
4430 else
4431 echo "configure: failed program was:" >&5
4432 cat conftest.$ac_ext >&5
4433 rm -rf conftest*
4434 echo "$ac_t""no" 1>&6
4435 ipv6=no
4437 rm -f conftest*
4440 if test "$ipv6" = "yes"; then
4441 cat >> confdefs.h <<\EOF
4442 #define ENABLE_IPV6 1
4450 ipv6type=unknown
4451 ipv6lib=none
4452 ipv6trylibc=no
4454 if test "$ipv6" = "yes"; then
4455 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
4456 echo "configure:4457: checking ipv6 stack type" >&5
4457 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4459 case $i in
4460 inria)
4461 cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4465 #include <netinet/in.h>
4466 #ifdef IPV6_INRIA_VERSION
4468 #endif
4470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471 egrep "yes" >/dev/null 2>&1; then
4472 rm -rf conftest*
4473 ipv6type=$i
4475 rm -f conftest*
4478 kame)
4479 cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4483 #include <netinet/in.h>
4484 #ifdef __KAME__
4486 #endif
4488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4489 egrep "yes" >/dev/null 2>&1; then
4490 rm -rf conftest*
4491 ipv6type=$i;
4492 ipv6lib=inet6
4493 ipv6libdir=/usr/local/v6/lib
4494 ipv6trylibc=yes
4496 rm -f conftest*
4499 linux-glibc)
4500 cat > conftest.$ac_ext <<EOF
4501 #line 4502 "configure"
4502 #include "confdefs.h"
4504 #include <features.h>
4505 #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4507 #endif
4509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4510 egrep "yes" >/dev/null 2>&1; then
4511 rm -rf conftest*
4512 ipv6type=$i;
4513 ipv6trylibc=yes
4515 rm -f conftest*
4518 linux-inet6)
4519 if test -d /usr/inet6; then
4520 ipv6type=$i
4521 ipv6lib=inet6
4522 ipv6libdir=/usr/inet6/lib
4523 OPT="-I/usr/inet6/include $OPT"
4526 solaris)
4527 if test -f /etc/netconfig; then
4528 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4529 ipv6type=$i
4530 ipv6trylibc=yes
4534 toshiba)
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4539 #include <sys/param.h>
4540 #ifdef _TOSHIBA_INET6
4542 #endif
4544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4545 egrep "yes" >/dev/null 2>&1; then
4546 rm -rf conftest*
4547 ipv6type=$i;
4548 ipv6lib=inet6;
4549 ipv6libdir=/usr/local/v6/lib
4551 rm -f conftest*
4554 v6d)
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4559 #include </usr/local/v6/include/sys/v6config.h>
4560 #ifdef __V6D__
4562 #endif
4564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4565 egrep "yes" >/dev/null 2>&1; then
4566 rm -rf conftest*
4567 ipv6type=$i;
4568 ipv6lib=v6;
4569 ipv6libdir=/usr/local/v6/lib;
4570 OPT="-I/usr/local/v6/include $OPT"
4572 rm -f conftest*
4575 zeta)
4576 cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4580 #include <sys/param.h>
4581 #ifdef _ZETA_MINAMI_INET6
4583 #endif
4585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4586 egrep "yes" >/dev/null 2>&1; then
4587 rm -rf conftest*
4588 ipv6type=$i;
4589 ipv6lib=inet6;
4590 ipv6libdir=/usr/local/v6/lib
4592 rm -f conftest*
4595 esac
4596 if test "$ipv6type" != "unknown"; then
4597 break
4599 done
4600 echo "$ac_t""$ipv6type" 1>&6
4603 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4604 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4605 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4606 echo "using lib$ipv6lib"
4607 else
4608 if test $ipv6trylibc = "yes"; then
4609 echo "using libc"
4610 else
4611 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4612 echo "You need to fetch lib$ipv6lib.a from appropriate"
4613 echo 'ipv6 kit and compile beforehand.'
4614 exit 1
4619 # Check for GC support
4620 echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
4621 echo "configure:4622: checking for --with-cycle-gc" >&5
4622 # Check whether --with-cycle-gc or --without-cycle-gc was given.
4623 if test "${with_cycle_gc+set}" = set; then
4624 withval="$with_cycle_gc"
4629 if test -z "$with_cycle_gc"
4630 then with_cycle_gc="yes"
4632 if test "$with_cycle_gc" != "no"
4633 then
4634 cat >> confdefs.h <<\EOF
4635 #define WITH_CYCLE_GC 1
4639 echo "$ac_t""$with_cycle_gc" 1>&6
4641 # Check for Python-specific malloc support
4642 echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
4643 echo "configure:4644: checking for --with-pymalloc" >&5
4644 # Check whether --with-pymalloc or --without-pymalloc was given.
4645 if test "${with_pymalloc+set}" = set; then
4646 withval="$with_pymalloc"
4648 if test "$withval" != no
4649 then cat >> confdefs.h <<\EOF
4650 #define WITH_PYMALLOC 1
4652 echo "$ac_t""yes" 1>&6
4653 else echo "$ac_t""no" 1>&6
4655 else
4656 echo "$ac_t""no" 1>&6
4660 # Check for --with-wctype-functions
4661 echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
4662 echo "configure:4663: checking for --with-wctype-functions" >&5
4663 # Check whether --with-wctype-functions or --without-wctype-functions was given.
4664 if test "${with_wctype_functions+set}" = set; then
4665 withval="$with_wctype_functions"
4667 if test "$withval" != no
4668 then cat >> confdefs.h <<\EOF
4669 #define WANT_WCTYPE_FUNCTIONS 1
4671 echo "$ac_t""yes" 1>&6
4672 else echo "$ac_t""no" 1>&6
4674 else
4675 echo "$ac_t""no" 1>&6
4679 # -I${DLINCLDIR} is added to the compile rule for importdl.o
4681 DLINCLDIR=.
4683 echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
4684 echo "configure:4685: checking for --with-sgi-dl" >&5
4685 # Check whether --with-sgi-dl or --without-sgi-dl was given.
4686 if test "${with_sgi_dl+set}" = set; then
4687 withval="$with_sgi_dl"
4689 echo "$ac_t""$withval" 1>&6
4690 cat >> confdefs.h <<\EOF
4691 #define WITH_SGI_DL 1
4694 DYNLOADFILE="dynload_dl.o"
4695 dldir=$withval
4696 if test ! -z "$dldir" -a -d "$dldir"
4697 then LDFLAGS="$LDFLAGS -L$dldir"
4698 else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
4700 DLINCLDIR=${dldir}
4701 LIBS="$LIBS -ldl -lmld"
4702 else
4703 echo "$ac_t""no" 1>&6
4707 echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
4708 echo "configure:4709: checking for --with-dl-dld" >&5
4709 # Check whether --with-dl-dld or --without-dl-dld was given.
4710 if test "${with_dl_dld+set}" = set; then
4711 withval="$with_dl_dld"
4713 echo "$ac_t""$withval" 1>&6
4714 cat >> confdefs.h <<\EOF
4715 #define WITH_DL_DLD 1
4718 DYNLOADFILE="dynload_dl.o"
4719 dldir=`echo "$withval" | sed 's/,.*//'`
4720 dlddir=`echo "$withval" | sed 's/.*,//'`
4721 if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
4722 then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
4723 else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
4725 DLINCLDIR=${dldir}
4726 LIBS="$LIBS -ldl -ldld"
4727 else
4728 echo "$ac_t""no" 1>&6
4732 # the dlopen() function means we might want to use dynload_shlib.o. some
4733 # platforms, such as AIX, have dlopen(), but don't want to use it.
4734 for ac_func in dlopen
4736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4737 echo "configure:4738: checking for $ac_func" >&5
4738 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4739 echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 /* System header to define __stub macros and hopefully few prototypes,
4745 which can conflict with char $ac_func(); below. */
4746 #include <assert.h>
4747 /* Override any gcc2 internal prototype to avoid an error. */
4748 /* We use char because int might match the return type of a gcc2
4749 builtin and then its argument prototype would still apply. */
4750 char $ac_func();
4752 int main() {
4754 /* The GNU C library defines this for functions which it implements
4755 to always fail with ENOSYS. Some functions are actually named
4756 something starting with __ and the normal name is an alias. */
4757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4758 choke me
4759 #else
4760 $ac_func();
4761 #endif
4763 ; return 0; }
4765 if { (eval echo configure:4766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4766 rm -rf conftest*
4767 eval "ac_cv_func_$ac_func=yes"
4768 else
4769 echo "configure: failed program was:" >&5
4770 cat conftest.$ac_ext >&5
4771 rm -rf conftest*
4772 eval "ac_cv_func_$ac_func=no"
4774 rm -f conftest*
4777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4778 echo "$ac_t""yes" 1>&6
4779 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4780 cat >> confdefs.h <<EOF
4781 #define $ac_tr_func 1
4784 else
4785 echo "$ac_t""no" 1>&6
4787 done
4790 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4791 # loading of modules.
4793 echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
4794 echo "configure:4795: checking DYNLOADFILE" >&5
4795 if test -z "$DYNLOADFILE"
4796 then
4797 case $ac_sys_system/$ac_sys_release in
4798 AIX*) DYNLOADFILE="dynload_aix.o";;
4799 BeOS*) DYNLOADFILE="dynload_beos.o";;
4800 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
4801 Darwin/*) DYNLOADFILE="dynload_next.o";;
4803 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4804 # out any dynamic loading
4805 if test "$ac_cv_func_dlopen" = yes
4806 then DYNLOADFILE="dynload_shlib.o"
4807 else DYNLOADFILE="dynload_stub.o"
4810 esac
4812 echo "$ac_t""$DYNLOADFILE" 1>&6
4813 if test "$DYNLOADFILE" != "dynload_stub.o"
4814 then
4815 cat >> confdefs.h <<\EOF
4816 #define HAVE_DYNAMIC_LOADING 1
4821 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
4824 echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
4825 echo "configure:4826: checking MACHDEP_OBJS" >&5
4826 if test -z "$MACHDEP_OBJS"
4827 then
4828 MACHDEP_OBJS=$extra_machdep_objs
4829 else
4830 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
4832 echo "$ac_t""MACHDEP_OBJS" 1>&6
4834 # checks for library functions
4835 for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
4836 flock fork fsync fdatasync fpathconf ftime ftruncate \
4837 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
4838 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
4839 nice pathconf pause plock poll pthread_init \
4840 putenv readlink \
4841 select setegid seteuid setgid setgroups \
4842 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
4843 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
4844 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
4845 truncate uname unsetenv waitpid _getpty getpriority
4847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4848 echo "configure:4849: checking for $ac_func" >&5
4849 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4850 echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4852 cat > conftest.$ac_ext <<EOF
4853 #line 4854 "configure"
4854 #include "confdefs.h"
4855 /* System header to define __stub macros and hopefully few prototypes,
4856 which can conflict with char $ac_func(); below. */
4857 #include <assert.h>
4858 /* Override any gcc2 internal prototype to avoid an error. */
4859 /* We use char because int might match the return type of a gcc2
4860 builtin and then its argument prototype would still apply. */
4861 char $ac_func();
4863 int main() {
4865 /* The GNU C library defines this for functions which it implements
4866 to always fail with ENOSYS. Some functions are actually named
4867 something starting with __ and the normal name is an alias. */
4868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4869 choke me
4870 #else
4871 $ac_func();
4872 #endif
4874 ; return 0; }
4876 if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4877 rm -rf conftest*
4878 eval "ac_cv_func_$ac_func=yes"
4879 else
4880 echo "configure: failed program was:" >&5
4881 cat conftest.$ac_ext >&5
4882 rm -rf conftest*
4883 eval "ac_cv_func_$ac_func=no"
4885 rm -f conftest*
4888 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4889 echo "$ac_t""yes" 1>&6
4890 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4891 cat >> confdefs.h <<EOF
4892 #define $ac_tr_func 1
4895 else
4896 echo "$ac_t""no" 1>&6
4898 done
4901 # check for openpty and forkpty
4903 for ac_func in openpty
4905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4906 echo "configure:4907: checking for $ac_func" >&5
4907 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4908 echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910 cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4913 /* System header to define __stub macros and hopefully few prototypes,
4914 which can conflict with char $ac_func(); below. */
4915 #include <assert.h>
4916 /* Override any gcc2 internal prototype to avoid an error. */
4917 /* We use char because int might match the return type of a gcc2
4918 builtin and then its argument prototype would still apply. */
4919 char $ac_func();
4921 int main() {
4923 /* The GNU C library defines this for functions which it implements
4924 to always fail with ENOSYS. Some functions are actually named
4925 something starting with __ and the normal name is an alias. */
4926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4927 choke me
4928 #else
4929 $ac_func();
4930 #endif
4932 ; return 0; }
4934 if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4935 rm -rf conftest*
4936 eval "ac_cv_func_$ac_func=yes"
4937 else
4938 echo "configure: failed program was:" >&5
4939 cat conftest.$ac_ext >&5
4940 rm -rf conftest*
4941 eval "ac_cv_func_$ac_func=no"
4943 rm -f conftest*
4946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4947 echo "$ac_t""yes" 1>&6
4948 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4949 cat >> confdefs.h <<EOF
4950 #define $ac_tr_func 1
4953 else
4954 echo "$ac_t""no" 1>&6
4955 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
4956 echo "configure:4957: checking for openpty in -lutil" >&5
4957 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
4958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4959 echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961 ac_save_LIBS="$LIBS"
4962 LIBS="-lutil $LIBS"
4963 cat > conftest.$ac_ext <<EOF
4964 #line 4965 "configure"
4965 #include "confdefs.h"
4966 /* Override any gcc2 internal prototype to avoid an error. */
4967 /* We use char because int might match the return type of a gcc2
4968 builtin and then its argument prototype would still apply. */
4969 char openpty();
4971 int main() {
4972 openpty()
4973 ; return 0; }
4975 if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4976 rm -rf conftest*
4977 eval "ac_cv_lib_$ac_lib_var=yes"
4978 else
4979 echo "configure: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4981 rm -rf conftest*
4982 eval "ac_cv_lib_$ac_lib_var=no"
4984 rm -f conftest*
4985 LIBS="$ac_save_LIBS"
4988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4989 echo "$ac_t""yes" 1>&6
4990 cat >> confdefs.h <<\EOF
4991 #define HAVE_OPENPTY 1
4993 LIBS="$LIBS -lutil"
4994 else
4995 echo "$ac_t""no" 1>&6
4999 done
5001 for ac_func in forkpty
5003 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5004 echo "configure:5005: checking for $ac_func" >&5
5005 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5006 echo $ac_n "(cached) $ac_c" 1>&6
5007 else
5008 cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011 /* System header to define __stub macros and hopefully few prototypes,
5012 which can conflict with char $ac_func(); below. */
5013 #include <assert.h>
5014 /* Override any gcc2 internal prototype to avoid an error. */
5015 /* We use char because int might match the return type of a gcc2
5016 builtin and then its argument prototype would still apply. */
5017 char $ac_func();
5019 int main() {
5021 /* The GNU C library defines this for functions which it implements
5022 to always fail with ENOSYS. Some functions are actually named
5023 something starting with __ and the normal name is an alias. */
5024 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5025 choke me
5026 #else
5027 $ac_func();
5028 #endif
5030 ; return 0; }
5032 if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5033 rm -rf conftest*
5034 eval "ac_cv_func_$ac_func=yes"
5035 else
5036 echo "configure: failed program was:" >&5
5037 cat conftest.$ac_ext >&5
5038 rm -rf conftest*
5039 eval "ac_cv_func_$ac_func=no"
5041 rm -f conftest*
5044 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5045 echo "$ac_t""yes" 1>&6
5046 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5047 cat >> confdefs.h <<EOF
5048 #define $ac_tr_func 1
5051 else
5052 echo "$ac_t""no" 1>&6
5053 echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
5054 echo "configure:5055: checking for forkpty in -lutil" >&5
5055 ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5056 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5057 echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059 ac_save_LIBS="$LIBS"
5060 LIBS="-lutil $LIBS"
5061 cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064 /* Override any gcc2 internal prototype to avoid an error. */
5065 /* We use char because int might match the return type of a gcc2
5066 builtin and then its argument prototype would still apply. */
5067 char forkpty();
5069 int main() {
5070 forkpty()
5071 ; return 0; }
5073 if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5074 rm -rf conftest*
5075 eval "ac_cv_lib_$ac_lib_var=yes"
5076 else
5077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
5079 rm -rf conftest*
5080 eval "ac_cv_lib_$ac_lib_var=no"
5082 rm -f conftest*
5083 LIBS="$ac_save_LIBS"
5086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5087 echo "$ac_t""yes" 1>&6
5088 cat >> confdefs.h <<\EOF
5089 #define HAVE_FORKPTY 1
5091 LIBS="$LIBS -lutil"
5092 else
5093 echo "$ac_t""no" 1>&6
5097 done
5100 # check for long file support functions
5101 for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5104 echo "configure:5105: checking for $ac_func" >&5
5105 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5106 echo $ac_n "(cached) $ac_c" 1>&6
5107 else
5108 cat > conftest.$ac_ext <<EOF
5109 #line 5110 "configure"
5110 #include "confdefs.h"
5111 /* System header to define __stub macros and hopefully few prototypes,
5112 which can conflict with char $ac_func(); below. */
5113 #include <assert.h>
5114 /* Override any gcc2 internal prototype to avoid an error. */
5115 /* We use char because int might match the return type of a gcc2
5116 builtin and then its argument prototype would still apply. */
5117 char $ac_func();
5119 int main() {
5121 /* The GNU C library defines this for functions which it implements
5122 to always fail with ENOSYS. Some functions are actually named
5123 something starting with __ and the normal name is an alias. */
5124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5125 choke me
5126 #else
5127 $ac_func();
5128 #endif
5130 ; return 0; }
5132 if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5133 rm -rf conftest*
5134 eval "ac_cv_func_$ac_func=yes"
5135 else
5136 echo "configure: failed program was:" >&5
5137 cat conftest.$ac_ext >&5
5138 rm -rf conftest*
5139 eval "ac_cv_func_$ac_func=no"
5141 rm -f conftest*
5144 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5145 echo "$ac_t""yes" 1>&6
5146 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5147 cat >> confdefs.h <<EOF
5148 #define $ac_tr_func 1
5151 else
5152 echo "$ac_t""no" 1>&6
5154 done
5157 for ac_func in dup2 getcwd strdup strerror memmove
5159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5160 echo "configure:5161: checking for $ac_func" >&5
5161 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5162 echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164 cat > conftest.$ac_ext <<EOF
5165 #line 5166 "configure"
5166 #include "confdefs.h"
5167 /* System header to define __stub macros and hopefully few prototypes,
5168 which can conflict with char $ac_func(); below. */
5169 #include <assert.h>
5170 /* Override any gcc2 internal prototype to avoid an error. */
5171 /* We use char because int might match the return type of a gcc2
5172 builtin and then its argument prototype would still apply. */
5173 char $ac_func();
5175 int main() {
5177 /* The GNU C library defines this for functions which it implements
5178 to always fail with ENOSYS. Some functions are actually named
5179 something starting with __ and the normal name is an alias. */
5180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5181 choke me
5182 #else
5183 $ac_func();
5184 #endif
5186 ; return 0; }
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189 rm -rf conftest*
5190 eval "ac_cv_func_$ac_func=yes"
5191 else
5192 echo "configure: failed program was:" >&5
5193 cat conftest.$ac_ext >&5
5194 rm -rf conftest*
5195 eval "ac_cv_func_$ac_func=no"
5197 rm -f conftest*
5200 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5201 echo "$ac_t""yes" 1>&6
5202 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5203 cat >> confdefs.h <<EOF
5204 #define $ac_tr_func 1
5207 else
5208 echo "$ac_t""no" 1>&6
5209 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5211 done
5214 for ac_func in getpgrp
5216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5217 echo "configure:5218: checking for $ac_func" >&5
5218 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5219 echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221 cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224 /* System header to define __stub macros and hopefully few prototypes,
5225 which can conflict with char $ac_func(); below. */
5226 #include <assert.h>
5227 /* Override any gcc2 internal prototype to avoid an error. */
5228 /* We use char because int might match the return type of a gcc2
5229 builtin and then its argument prototype would still apply. */
5230 char $ac_func();
5232 int main() {
5234 /* The GNU C library defines this for functions which it implements
5235 to always fail with ENOSYS. Some functions are actually named
5236 something starting with __ and the normal name is an alias. */
5237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5238 choke me
5239 #else
5240 $ac_func();
5241 #endif
5243 ; return 0; }
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246 rm -rf conftest*
5247 eval "ac_cv_func_$ac_func=yes"
5248 else
5249 echo "configure: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 rm -rf conftest*
5252 eval "ac_cv_func_$ac_func=no"
5254 rm -f conftest*
5257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5258 echo "$ac_t""yes" 1>&6
5259 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5260 cat >> confdefs.h <<EOF
5261 #define $ac_tr_func 1
5263 cat > conftest.$ac_ext <<EOF
5264 #line 5265 "configure"
5265 #include "confdefs.h"
5266 #include <unistd.h>
5267 int main() {
5268 getpgrp(0);
5269 ; return 0; }
5271 if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5272 rm -rf conftest*
5273 cat >> confdefs.h <<\EOF
5274 #define GETPGRP_HAVE_ARG 1
5277 else
5278 echo "configure: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5281 rm -f conftest*
5282 else
5283 echo "$ac_t""no" 1>&6
5285 done
5287 for ac_func in setpgrp
5289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5290 echo "configure:5291: checking for $ac_func" >&5
5291 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5292 echo $ac_n "(cached) $ac_c" 1>&6
5293 else
5294 cat > conftest.$ac_ext <<EOF
5295 #line 5296 "configure"
5296 #include "confdefs.h"
5297 /* System header to define __stub macros and hopefully few prototypes,
5298 which can conflict with char $ac_func(); below. */
5299 #include <assert.h>
5300 /* Override any gcc2 internal prototype to avoid an error. */
5301 /* We use char because int might match the return type of a gcc2
5302 builtin and then its argument prototype would still apply. */
5303 char $ac_func();
5305 int main() {
5307 /* The GNU C library defines this for functions which it implements
5308 to always fail with ENOSYS. Some functions are actually named
5309 something starting with __ and the normal name is an alias. */
5310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5311 choke me
5312 #else
5313 $ac_func();
5314 #endif
5316 ; return 0; }
5318 if { (eval echo configure:5319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5319 rm -rf conftest*
5320 eval "ac_cv_func_$ac_func=yes"
5321 else
5322 echo "configure: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 rm -rf conftest*
5325 eval "ac_cv_func_$ac_func=no"
5327 rm -f conftest*
5330 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5331 echo "$ac_t""yes" 1>&6
5332 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5333 cat >> confdefs.h <<EOF
5334 #define $ac_tr_func 1
5336 cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 #include <unistd.h>
5340 int main() {
5341 setpgrp(0,0);
5342 ; return 0; }
5344 if { (eval echo configure:5345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5345 rm -rf conftest*
5346 cat >> confdefs.h <<\EOF
5347 #define SETPGRP_HAVE_ARG 1
5350 else
5351 echo "configure: failed program was:" >&5
5352 cat conftest.$ac_ext >&5
5354 rm -f conftest*
5355 else
5356 echo "$ac_t""no" 1>&6
5358 done
5360 for ac_func in gettimeofday
5362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5363 echo "configure:5364: checking for $ac_func" >&5
5364 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5365 echo $ac_n "(cached) $ac_c" 1>&6
5366 else
5367 cat > conftest.$ac_ext <<EOF
5368 #line 5369 "configure"
5369 #include "confdefs.h"
5370 /* System header to define __stub macros and hopefully few prototypes,
5371 which can conflict with char $ac_func(); below. */
5372 #include <assert.h>
5373 /* Override any gcc2 internal prototype to avoid an error. */
5374 /* We use char because int might match the return type of a gcc2
5375 builtin and then its argument prototype would still apply. */
5376 char $ac_func();
5378 int main() {
5380 /* The GNU C library defines this for functions which it implements
5381 to always fail with ENOSYS. Some functions are actually named
5382 something starting with __ and the normal name is an alias. */
5383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5384 choke me
5385 #else
5386 $ac_func();
5387 #endif
5389 ; return 0; }
5391 if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5392 rm -rf conftest*
5393 eval "ac_cv_func_$ac_func=yes"
5394 else
5395 echo "configure: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 rm -rf conftest*
5398 eval "ac_cv_func_$ac_func=no"
5400 rm -f conftest*
5403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5404 echo "$ac_t""yes" 1>&6
5405 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5406 cat >> confdefs.h <<EOF
5407 #define $ac_tr_func 1
5409 cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412 #include <sys/time.h>
5413 int main() {
5414 gettimeofday((struct timeval*)0,(struct timezone*)0);
5415 ; return 0; }
5417 if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5419 else
5420 echo "configure: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 rm -rf conftest*
5423 cat >> confdefs.h <<\EOF
5424 #define GETTIMEOFDAY_NO_TZ 1
5428 rm -f conftest*
5429 else
5430 echo "$ac_t""no" 1>&6
5432 done
5436 # On OSF/1 V5.1, getaddrinfo is available, but a define
5437 # for [no]getaddrinfo in netdb.h.
5438 echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
5439 echo "configure:5440: checking for getaddrinfo" >&5
5440 cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5444 #include <sys/types.h>
5445 #include <sys/socket.h>
5446 #include <netdb.h>
5447 #include <stdio.h>
5449 int main() {
5451 getaddrinfo(NULL, NULL, NULL, NULL);
5453 ; return 0; }
5455 if { (eval echo configure:5456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5456 rm -rf conftest*
5458 echo "$ac_t""yes" 1>&6
5459 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
5460 echo "configure:5461: checking getaddrinfo bug" >&5
5461 if test "$cross_compiling" = yes; then
5462 echo "$ac_t""buggy" 1>&6
5463 buggygetaddrinfo=yes
5464 else
5465 cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5469 #include <sys/types.h>
5470 #include <netdb.h>
5471 #include <string.h>
5472 #include <sys/socket.h>
5473 #include <netinet/in.h>
5475 main()
5477 int passive, gaierr, inet4 = 0, inet6 = 0;
5478 struct addrinfo hints, *ai, *aitop;
5479 char straddr[INET6_ADDRSTRLEN], strport[16];
5481 for (passive = 0; passive <= 1; passive++) {
5482 memset(&hints, 0, sizeof(hints));
5483 hints.ai_family = AF_UNSPEC;
5484 hints.ai_flags = passive ? AI_PASSIVE : 0;
5485 hints.ai_socktype = SOCK_STREAM;
5486 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5487 (void)gai_strerror(gaierr);
5488 goto bad;
5490 for (ai = aitop; ai; ai = ai->ai_next) {
5491 if (ai->ai_addr == NULL ||
5492 ai->ai_addrlen == 0 ||
5493 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5494 straddr, sizeof(straddr), strport, sizeof(strport),
5495 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5496 goto bad;
5498 switch (ai->ai_family) {
5499 case AF_INET:
5500 if (strcmp(strport, "54321") != 0) {
5501 goto bad;
5503 if (passive) {
5504 if (strcmp(straddr, "0.0.0.0") != 0) {
5505 goto bad;
5507 } else {
5508 if (strcmp(straddr, "127.0.0.1") != 0) {
5509 goto bad;
5512 inet4++;
5513 break;
5514 case AF_INET6:
5515 if (strcmp(strport, "54321") != 0) {
5516 goto bad;
5518 if (passive) {
5519 if (strcmp(straddr, "::") != 0) {
5520 goto bad;
5522 } else {
5523 if (strcmp(straddr, "::1") != 0) {
5524 goto bad;
5527 inet6++;
5528 break;
5529 case AF_UNSPEC:
5530 goto bad;
5531 break;
5532 default:
5533 /* another family support? */
5534 break;
5539 if (!(inet4 == 0 || inet4 == 2))
5540 goto bad;
5541 if (!(inet6 == 0 || inet6 == 2))
5542 goto bad;
5544 if (aitop)
5545 freeaddrinfo(aitop);
5546 exit(0);
5548 bad:
5549 if (aitop)
5550 freeaddrinfo(aitop);
5551 exit(1);
5555 if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5556 then
5557 echo "$ac_t""good" 1>&6
5558 buggygetaddrinfo=no
5559 else
5560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5562 rm -fr conftest*
5563 echo "$ac_t""buggy" 1>&6
5564 buggygetaddrinfo=yes
5566 rm -fr conftest*
5569 else
5570 echo "configure: failed program was:" >&5
5571 cat conftest.$ac_ext >&5
5572 rm -rf conftest*
5574 echo "$ac_t""no" 1>&6
5575 buggygetaddrinfo=yes
5578 rm -f conftest*
5580 if test "$buggygetaddrinfo" = "yes"; then
5581 if test "$ipv6" = "yes"; then
5582 echo 'Fatal: You must get working getaddrinfo() function.'
5583 echo ' or you can specify "--disable-ipv6"'.
5584 exit 1
5586 else
5587 cat >> confdefs.h <<\EOF
5588 #define HAVE_GETADDRINFO 1
5592 for ac_func in getnameinfo
5594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5595 echo "configure:5596: checking for $ac_func" >&5
5596 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5597 echo $ac_n "(cached) $ac_c" 1>&6
5598 else
5599 cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602 /* System header to define __stub macros and hopefully few prototypes,
5603 which can conflict with char $ac_func(); below. */
5604 #include <assert.h>
5605 /* Override any gcc2 internal prototype to avoid an error. */
5606 /* We use char because int might match the return type of a gcc2
5607 builtin and then its argument prototype would still apply. */
5608 char $ac_func();
5610 int main() {
5612 /* The GNU C library defines this for functions which it implements
5613 to always fail with ENOSYS. Some functions are actually named
5614 something starting with __ and the normal name is an alias. */
5615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5616 choke me
5617 #else
5618 $ac_func();
5619 #endif
5621 ; return 0; }
5623 if { (eval echo configure:5624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5624 rm -rf conftest*
5625 eval "ac_cv_func_$ac_func=yes"
5626 else
5627 echo "configure: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 rm -rf conftest*
5630 eval "ac_cv_func_$ac_func=no"
5632 rm -f conftest*
5635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5636 echo "$ac_t""yes" 1>&6
5637 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5638 cat >> confdefs.h <<EOF
5639 #define $ac_tr_func 1
5642 else
5643 echo "$ac_t""no" 1>&6
5645 done
5648 # checks for structures
5649 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5650 echo "configure:5651: checking whether time.h and sys/time.h may both be included" >&5
5651 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5652 echo $ac_n "(cached) $ac_c" 1>&6
5653 else
5654 cat > conftest.$ac_ext <<EOF
5655 #line 5656 "configure"
5656 #include "confdefs.h"
5657 #include <sys/types.h>
5658 #include <sys/time.h>
5659 #include <time.h>
5660 int main() {
5661 struct tm *tp;
5662 ; return 0; }
5664 if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5665 rm -rf conftest*
5666 ac_cv_header_time=yes
5667 else
5668 echo "configure: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5670 rm -rf conftest*
5671 ac_cv_header_time=no
5673 rm -f conftest*
5676 echo "$ac_t""$ac_cv_header_time" 1>&6
5677 if test $ac_cv_header_time = yes; then
5678 cat >> confdefs.h <<\EOF
5679 #define TIME_WITH_SYS_TIME 1
5684 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5685 echo "configure:5686: checking whether struct tm is in sys/time.h or time.h" >&5
5686 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5687 echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689 cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692 #include <sys/types.h>
5693 #include <time.h>
5694 int main() {
5695 struct tm *tp; tp->tm_sec;
5696 ; return 0; }
5698 if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5699 rm -rf conftest*
5700 ac_cv_struct_tm=time.h
5701 else
5702 echo "configure: failed program was:" >&5
5703 cat conftest.$ac_ext >&5
5704 rm -rf conftest*
5705 ac_cv_struct_tm=sys/time.h
5707 rm -f conftest*
5710 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5711 if test $ac_cv_struct_tm = sys/time.h; then
5712 cat >> confdefs.h <<\EOF
5713 #define TM_IN_SYS_TIME 1
5718 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5719 echo "configure:5720: checking for tm_zone in struct tm" >&5
5720 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5721 echo $ac_n "(cached) $ac_c" 1>&6
5722 else
5723 cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726 #include <sys/types.h>
5727 #include <$ac_cv_struct_tm>
5728 int main() {
5729 struct tm tm; tm.tm_zone;
5730 ; return 0; }
5732 if { (eval echo configure:5733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5733 rm -rf conftest*
5734 ac_cv_struct_tm_zone=yes
5735 else
5736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
5738 rm -rf conftest*
5739 ac_cv_struct_tm_zone=no
5741 rm -f conftest*
5744 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5745 if test "$ac_cv_struct_tm_zone" = yes; then
5746 cat >> confdefs.h <<\EOF
5747 #define HAVE_TM_ZONE 1
5750 else
5751 echo $ac_n "checking for tzname""... $ac_c" 1>&6
5752 echo "configure:5753: checking for tzname" >&5
5753 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755 else
5756 cat > conftest.$ac_ext <<EOF
5757 #line 5758 "configure"
5758 #include "confdefs.h"
5759 #include <time.h>
5760 #ifndef tzname /* For SGI. */
5761 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
5762 #endif
5763 int main() {
5764 atoi(*tzname);
5765 ; return 0; }
5767 if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5768 rm -rf conftest*
5769 ac_cv_var_tzname=yes
5770 else
5771 echo "configure: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 rm -rf conftest*
5774 ac_cv_var_tzname=no
5776 rm -f conftest*
5779 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5780 if test $ac_cv_var_tzname = yes; then
5781 cat >> confdefs.h <<\EOF
5782 #define HAVE_TZNAME 1
5788 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
5789 echo "configure:5790: checking for st_rdev in struct stat" >&5
5790 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5791 echo $ac_n "(cached) $ac_c" 1>&6
5792 else
5793 cat > conftest.$ac_ext <<EOF
5794 #line 5795 "configure"
5795 #include "confdefs.h"
5796 #include <sys/types.h>
5797 #include <sys/stat.h>
5798 int main() {
5799 struct stat s; s.st_rdev;
5800 ; return 0; }
5802 if { (eval echo configure:5803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5803 rm -rf conftest*
5804 ac_cv_struct_st_rdev=yes
5805 else
5806 echo "configure: failed program was:" >&5
5807 cat conftest.$ac_ext >&5
5808 rm -rf conftest*
5809 ac_cv_struct_st_rdev=no
5811 rm -f conftest*
5814 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5815 if test $ac_cv_struct_st_rdev = yes; then
5816 cat >> confdefs.h <<\EOF
5817 #define HAVE_ST_RDEV 1
5822 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
5823 echo "configure:5824: checking for st_blksize in struct stat" >&5
5824 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5825 echo $ac_n "(cached) $ac_c" 1>&6
5826 else
5827 cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 #include <sys/types.h>
5831 #include <sys/stat.h>
5832 int main() {
5833 struct stat s; s.st_blksize;
5834 ; return 0; }
5836 if { (eval echo configure:5837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5837 rm -rf conftest*
5838 ac_cv_struct_st_blksize=yes
5839 else
5840 echo "configure: failed program was:" >&5
5841 cat conftest.$ac_ext >&5
5842 rm -rf conftest*
5843 ac_cv_struct_st_blksize=no
5845 rm -f conftest*
5848 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5849 if test $ac_cv_struct_st_blksize = yes; then
5850 cat >> confdefs.h <<\EOF
5851 #define HAVE_ST_BLKSIZE 1
5856 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
5857 echo "configure:5858: checking for st_blocks in struct stat" >&5
5858 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5859 echo $ac_n "(cached) $ac_c" 1>&6
5860 else
5861 cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 #include <sys/types.h>
5865 #include <sys/stat.h>
5866 int main() {
5867 struct stat s; s.st_blocks;
5868 ; return 0; }
5870 if { (eval echo configure:5871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5871 rm -rf conftest*
5872 ac_cv_struct_st_blocks=yes
5873 else
5874 echo "configure: failed program was:" >&5
5875 cat conftest.$ac_ext >&5
5876 rm -rf conftest*
5877 ac_cv_struct_st_blocks=no
5879 rm -f conftest*
5882 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5883 if test $ac_cv_struct_st_blocks = yes; then
5884 cat >> confdefs.h <<\EOF
5885 #define HAVE_ST_BLOCKS 1
5888 else
5889 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
5893 echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
5894 echo "configure:5895: checking for time.h that defines altzone" >&5
5895 if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
5896 echo $ac_n "(cached) $ac_c" 1>&6
5897 else
5898 cat > conftest.$ac_ext <<EOF
5899 #line 5900 "configure"
5900 #include "confdefs.h"
5901 #include <time.h>
5902 int main() {
5903 return altzone;
5904 ; return 0; }
5906 if { (eval echo configure:5907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5907 rm -rf conftest*
5908 ac_cv_header_time_altzone=yes
5909 else
5910 echo "configure: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 rm -rf conftest*
5913 ac_cv_header_time_altzone=no
5915 rm -f conftest*
5918 echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
5919 if test $ac_cv_header_time_altzone = yes; then
5920 cat >> confdefs.h <<\EOF
5921 #define HAVE_ALTZONE 1
5926 was_it_defined=no
5927 echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
5928 echo "configure:5929: checking whether sys/select.h and sys/time.h may both be included" >&5
5929 cat > conftest.$ac_ext <<EOF
5930 #line 5931 "configure"
5931 #include "confdefs.h"
5933 #include <sys/types.h>
5934 #include <sys/select.h>
5935 #include <sys/time.h>
5937 int main() {
5939 ; return 0; }
5941 if { (eval echo configure:5942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5942 rm -rf conftest*
5943 cat >> confdefs.h <<\EOF
5944 #define SYS_SELECT_WITH_SYS_TIME 1
5946 was_it_defined=yes
5947 else
5948 echo "configure: failed program was:" >&5
5949 cat conftest.$ac_ext >&5
5951 rm -f conftest*
5952 echo "$ac_t""$was_it_defined" 1>&6
5954 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
5955 echo "configure:5956: checking for addrinfo" >&5
5956 if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5957 echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5963 # include <netdb.h>
5964 int main() {
5965 struct addrinfo a
5966 ; return 0; }
5968 if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5969 rm -rf conftest*
5970 ac_cv_struct_addrinfo=yes
5971 else
5972 echo "configure: failed program was:" >&5
5973 cat conftest.$ac_ext >&5
5974 rm -rf conftest*
5975 ac_cv_struct_addrinfo=no
5977 rm -f conftest*
5980 echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5981 if test $ac_cv_struct_addrinfo = yes; then
5982 cat >> confdefs.h <<\EOF
5983 #define HAVE_ADDRINFO 1
5988 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
5989 echo "configure:5990: checking for sockaddr_storage" >&5
5990 if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5991 echo $ac_n "(cached) $ac_c" 1>&6
5992 else
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5997 # include <sys/types.h>
5998 # include <sys/socket.h>
5999 int main() {
6000 struct sockaddr_storage s
6001 ; return 0; }
6003 if { (eval echo configure:6004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6004 rm -rf conftest*
6005 ac_cv_struct_sockaddr_storage=yes
6006 else
6007 echo "configure: failed program was:" >&5
6008 cat conftest.$ac_ext >&5
6009 rm -rf conftest*
6010 ac_cv_struct_sockaddr_storage=no
6012 rm -f conftest*
6015 echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
6016 if test $ac_cv_struct_sockaddr_storage = yes; then
6017 cat >> confdefs.h <<\EOF
6018 #define HAVE_SOCKADDR_STORAGE 1
6023 # checks for compiler characteristics
6025 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
6026 echo "configure:6027: checking whether char is unsigned" >&5
6027 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6028 echo $ac_n "(cached) $ac_c" 1>&6
6029 else
6030 if test "$GCC" = yes; then
6031 # GCC predefines this symbol on systems where it applies.
6032 cat > conftest.$ac_ext <<EOF
6033 #line 6034 "configure"
6034 #include "confdefs.h"
6035 #ifdef __CHAR_UNSIGNED__
6037 #endif
6040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6041 egrep "yes" >/dev/null 2>&1; then
6042 rm -rf conftest*
6043 ac_cv_c_char_unsigned=yes
6044 else
6045 rm -rf conftest*
6046 ac_cv_c_char_unsigned=no
6048 rm -f conftest*
6050 else
6051 if test "$cross_compiling" = yes; then
6052 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6053 else
6054 cat > conftest.$ac_ext <<EOF
6055 #line 6056 "configure"
6056 #include "confdefs.h"
6057 /* volatile prevents gcc2 from optimizing the test away on sparcs. */
6058 #if !defined(__STDC__) || __STDC__ != 1
6059 #define volatile
6060 #endif
6061 main() {
6062 volatile char c = 255; exit(c < 0);
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6066 then
6067 ac_cv_c_char_unsigned=yes
6068 else
6069 echo "configure: failed program was:" >&5
6070 cat conftest.$ac_ext >&5
6071 rm -fr conftest*
6072 ac_cv_c_char_unsigned=no
6074 rm -fr conftest*
6080 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
6081 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
6082 cat >> confdefs.h <<\EOF
6083 #define __CHAR_UNSIGNED__ 1
6088 echo $ac_n "checking for working const""... $ac_c" 1>&6
6089 echo "configure:6090: checking for working const" >&5
6090 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6091 echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093 cat > conftest.$ac_ext <<EOF
6094 #line 6095 "configure"
6095 #include "confdefs.h"
6097 int main() {
6099 /* Ultrix mips cc rejects this. */
6100 typedef int charset[2]; const charset x;
6101 /* SunOS 4.1.1 cc rejects this. */
6102 char const *const *ccp;
6103 char **p;
6104 /* NEC SVR4.0.2 mips cc rejects this. */
6105 struct point {int x, y;};
6106 static struct point const zero = {0,0};
6107 /* AIX XL C 1.02.0.0 rejects this.
6108 It does not let you subtract one const X* pointer from another in an arm
6109 of an if-expression whose if-part is not a constant expression */
6110 const char *g = "string";
6111 ccp = &g + (g ? g-g : 0);
6112 /* HPUX 7.0 cc rejects these. */
6113 ++ccp;
6114 p = (char**) ccp;
6115 ccp = (char const *const *) p;
6116 { /* SCO 3.2v4 cc rejects this. */
6117 char *t;
6118 char const *s = 0 ? (char *) 0 : (char const *) 0;
6120 *t++ = 0;
6122 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6123 int x[] = {25, 17};
6124 const int *foo = &x[0];
6125 ++foo;
6127 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6128 typedef const int *iptr;
6129 iptr p = 0;
6130 ++p;
6132 { /* AIX XL C 1.02.0.0 rejects this saying
6133 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6134 struct s { int j; const int *ap[3]; };
6135 struct s *b; b->j = 5;
6137 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6138 const int foo = 10;
6141 ; return 0; }
6143 if { (eval echo configure:6144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6144 rm -rf conftest*
6145 ac_cv_c_const=yes
6146 else
6147 echo "configure: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 rm -rf conftest*
6150 ac_cv_c_const=no
6152 rm -f conftest*
6155 echo "$ac_t""$ac_cv_c_const" 1>&6
6156 if test $ac_cv_c_const = no; then
6157 cat >> confdefs.h <<\EOF
6158 #define const
6164 works=no
6165 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
6166 echo "configure:6167: checking for working volatile" >&5
6167 cat > conftest.$ac_ext <<EOF
6168 #line 6169 "configure"
6169 #include "confdefs.h"
6171 int main() {
6172 volatile int x; x = 0;
6173 ; return 0; }
6175 if { (eval echo configure:6176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6176 rm -rf conftest*
6177 works=yes
6178 else
6179 echo "configure: failed program was:" >&5
6180 cat conftest.$ac_ext >&5
6181 rm -rf conftest*
6182 cat >> confdefs.h <<\EOF
6183 #define volatile
6187 rm -f conftest*
6188 echo "$ac_t""$works" 1>&6
6190 works=no
6191 echo $ac_n "checking for working signed char""... $ac_c" 1>&6
6192 echo "configure:6193: checking for working signed char" >&5
6193 cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6197 int main() {
6198 signed char c;
6199 ; return 0; }
6201 if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6202 rm -rf conftest*
6203 works=yes
6204 else
6205 echo "configure: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 rm -rf conftest*
6208 cat >> confdefs.h <<\EOF
6209 #define signed
6213 rm -f conftest*
6214 echo "$ac_t""$works" 1>&6
6216 have_prototypes=no
6217 echo $ac_n "checking for prototypes""... $ac_c" 1>&6
6218 echo "configure:6219: checking for prototypes" >&5
6219 cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 int foo(int x) { return 0; }
6223 int main() {
6224 return foo(10);
6225 ; return 0; }
6227 if { (eval echo configure:6228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6228 rm -rf conftest*
6229 cat >> confdefs.h <<\EOF
6230 #define HAVE_PROTOTYPES 1
6232 have_prototypes=yes
6233 else
6234 echo "configure: failed program was:" >&5
6235 cat conftest.$ac_ext >&5
6237 rm -f conftest*
6238 echo "$ac_t""$have_prototypes" 1>&6
6240 works=no
6241 echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
6242 echo "configure:6243: checking for variable length prototypes and stdarg.h" >&5
6243 cat > conftest.$ac_ext <<EOF
6244 #line 6245 "configure"
6245 #include "confdefs.h"
6247 #include <stdarg.h>
6248 int foo(int x, ...) {
6249 va_list va;
6250 va_start(va, x);
6251 va_arg(va, int);
6252 va_arg(va, char *);
6253 va_arg(va, double);
6254 return 0;
6257 int main() {
6258 return foo(10, "", 3.14);
6259 ; return 0; }
6261 if { (eval echo configure:6262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6262 rm -rf conftest*
6263 cat >> confdefs.h <<\EOF
6264 #define HAVE_STDARG_PROTOTYPES 1
6266 works=yes
6267 else
6268 echo "configure: failed program was:" >&5
6269 cat conftest.$ac_ext >&5
6271 rm -f conftest*
6272 echo "$ac_t""$works" 1>&6
6274 if test "$have_prototypes" = yes; then
6275 bad_prototypes=no
6276 echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
6277 echo "configure:6278: checking for bad exec* prototypes" >&5
6278 cat > conftest.$ac_ext <<EOF
6279 #line 6280 "configure"
6280 #include "confdefs.h"
6281 #include <unistd.h>
6282 int main() {
6283 char **t;execve("@",t,t);
6284 ; return 0; }
6286 if { (eval echo configure:6287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6288 else
6289 echo "configure: failed program was:" >&5
6290 cat conftest.$ac_ext >&5
6291 rm -rf conftest*
6292 cat >> confdefs.h <<\EOF
6293 #define BAD_EXEC_PROTOTYPES 1
6295 bad_prototypes=yes
6297 rm -f conftest*
6298 echo "$ac_t""$bad_prototypes" 1>&6
6301 # check if sockaddr has sa_len member
6302 echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
6303 echo "configure:6304: checking if sockaddr has sa_len member" >&5
6304 cat > conftest.$ac_ext <<EOF
6305 #line 6306 "configure"
6306 #include "confdefs.h"
6307 #include <sys/types.h>
6308 #include <sys/socket.h>
6309 int main() {
6310 struct sockaddr x;
6311 x.sa_len = 0;
6312 ; return 0; }
6314 if { (eval echo configure:6315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6315 rm -rf conftest*
6316 echo "$ac_t""yes" 1>&6
6317 cat >> confdefs.h <<\EOF
6318 #define HAVE_SOCKADDR_SA_LEN 1
6321 else
6322 echo "configure: failed program was:" >&5
6323 cat conftest.$ac_ext >&5
6324 rm -rf conftest*
6325 echo "$ac_t""no" 1>&6
6327 rm -f conftest*
6329 echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
6330 echo "configure:6331: checking for bad static forward" >&5
6331 if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6332 echo $ac_n "(cached) $ac_c" 1>&6
6333 else
6334 if test "$cross_compiling" = yes; then
6335 ac_cv_bad_static_forward=no
6336 else
6337 cat > conftest.$ac_ext <<EOF
6338 #line 6339 "configure"
6339 #include "confdefs.h"
6341 struct s { int a; int b; };
6342 static struct s foo;
6343 int foobar() {
6344 static int random;
6345 random = (int) &foo;
6346 return random;
6348 static struct s foo = { 1, 2 };
6349 main() {
6350 exit(!((int)&foo == foobar()));
6353 if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6354 then
6355 ac_cv_bad_static_forward=no
6356 else
6357 echo "configure: failed program was:" >&5
6358 cat conftest.$ac_ext >&5
6359 rm -fr conftest*
6360 ac_cv_bad_static_forward=yes
6362 rm -fr conftest*
6367 echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6368 if test "$ac_cv_bad_static_forward" = yes
6369 then
6370 cat >> confdefs.h <<\EOF
6371 #define BAD_STATIC_FORWARD 1
6376 va_list_is_array=no
6377 echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
6378 echo "configure:6379: checking whether va_list is an array" >&5
6379 cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6383 #ifdef HAVE_STDARG_PROTOTYPES
6384 #include <stdarg.h>
6385 #else
6386 #include <varargs.h>
6387 #endif
6389 int main() {
6390 va_list list1, list2; list1 = list2;
6391 ; return 0; }
6393 if { (eval echo configure:6394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6395 else
6396 echo "configure: failed program was:" >&5
6397 cat conftest.$ac_ext >&5
6398 rm -rf conftest*
6399 cat >> confdefs.h <<\EOF
6400 #define VA_LIST_IS_ARRAY 1
6402 va_list_is_array=yes
6404 rm -f conftest*
6405 echo "$ac_t""$va_list_is_array" 1>&6
6407 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6408 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
6409 echo "configure:6410: checking for gethostbyname_r" >&5
6410 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6411 echo $ac_n "(cached) $ac_c" 1>&6
6412 else
6413 cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416 /* System header to define __stub macros and hopefully few prototypes,
6417 which can conflict with char gethostbyname_r(); below. */
6418 #include <assert.h>
6419 /* Override any gcc2 internal prototype to avoid an error. */
6420 /* We use char because int might match the return type of a gcc2
6421 builtin and then its argument prototype would still apply. */
6422 char gethostbyname_r();
6424 int main() {
6426 /* The GNU C library defines this for functions which it implements
6427 to always fail with ENOSYS. Some functions are actually named
6428 something starting with __ and the normal name is an alias. */
6429 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6430 choke me
6431 #else
6432 gethostbyname_r();
6433 #endif
6435 ; return 0; }
6437 if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6438 rm -rf conftest*
6439 eval "ac_cv_func_gethostbyname_r=yes"
6440 else
6441 echo "configure: failed program was:" >&5
6442 cat conftest.$ac_ext >&5
6443 rm -rf conftest*
6444 eval "ac_cv_func_gethostbyname_r=no"
6446 rm -f conftest*
6449 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6450 echo "$ac_t""yes" 1>&6
6452 cat >> confdefs.h <<\EOF
6453 #define HAVE_GETHOSTBYNAME_R 1
6456 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
6457 echo "configure:6458: checking gethostbyname_r with 6 args" >&5
6458 OLD_CFLAGS=$CFLAGS
6459 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6460 cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6464 # include <netdb.h>
6466 int main() {
6468 char *name;
6469 struct hostent *he, *res;
6470 char buffer[2048];
6471 int buflen = 2048;
6472 int h_errnop;
6474 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6476 ; return 0; }
6478 if { (eval echo configure:6479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6479 rm -rf conftest*
6481 cat >> confdefs.h <<\EOF
6482 #define HAVE_GETHOSTBYNAME_R 1
6485 cat >> confdefs.h <<\EOF
6486 #define HAVE_GETHOSTBYNAME_R_6_ARG 1
6489 echo "$ac_t""yes" 1>&6
6491 else
6492 echo "configure: failed program was:" >&5
6493 cat conftest.$ac_ext >&5
6494 rm -rf conftest*
6496 echo "$ac_t""no" 1>&6
6497 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
6498 echo "configure:6499: checking gethostbyname_r with 5 args" >&5
6499 cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6503 # include <netdb.h>
6505 int main() {
6507 char *name;
6508 struct hostent *he;
6509 char buffer[2048];
6510 int buflen = 2048;
6511 int h_errnop;
6513 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6515 ; return 0; }
6517 if { (eval echo configure:6518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6518 rm -rf conftest*
6520 cat >> confdefs.h <<\EOF
6521 #define HAVE_GETHOSTBYNAME_R 1
6524 cat >> confdefs.h <<\EOF
6525 #define HAVE_GETHOSTBYNAME_R_5_ARG 1
6528 echo "$ac_t""yes" 1>&6
6530 else
6531 echo "configure: failed program was:" >&5
6532 cat conftest.$ac_ext >&5
6533 rm -rf conftest*
6535 echo "$ac_t""no" 1>&6
6536 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
6537 echo "configure:6538: checking gethostbyname_r with 3 args" >&5
6538 cat > conftest.$ac_ext <<EOF
6539 #line 6540 "configure"
6540 #include "confdefs.h"
6542 # include <netdb.h>
6544 int main() {
6546 char *name;
6547 struct hostent *he;
6548 struct hostent_data data;
6550 (void) gethostbyname_r(name, he, &data);
6552 ; return 0; }
6554 if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6555 rm -rf conftest*
6557 cat >> confdefs.h <<\EOF
6558 #define HAVE_GETHOSTBYNAME_R 1
6561 cat >> confdefs.h <<\EOF
6562 #define HAVE_GETHOSTBYNAME_R_3_ARG 1
6565 echo "$ac_t""yes" 1>&6
6567 else
6568 echo "configure: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 rm -rf conftest*
6572 echo "$ac_t""no" 1>&6
6575 rm -f conftest*
6578 rm -f conftest*
6581 rm -f conftest*
6582 CFLAGS=$OLD_CFLAGS
6584 else
6585 echo "$ac_t""no" 1>&6
6587 for ac_func in gethostbyname
6589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6590 echo "configure:6591: checking for $ac_func" >&5
6591 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6592 echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594 cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* System header to define __stub macros and hopefully few prototypes,
6598 which can conflict with char $ac_func(); below. */
6599 #include <assert.h>
6600 /* Override any gcc2 internal prototype to avoid an error. */
6601 /* We use char because int might match the return type of a gcc2
6602 builtin and then its argument prototype would still apply. */
6603 char $ac_func();
6605 int main() {
6607 /* The GNU C library defines this for functions which it implements
6608 to always fail with ENOSYS. Some functions are actually named
6609 something starting with __ and the normal name is an alias. */
6610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6611 choke me
6612 #else
6613 $ac_func();
6614 #endif
6616 ; return 0; }
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619 rm -rf conftest*
6620 eval "ac_cv_func_$ac_func=yes"
6621 else
6622 echo "configure: failed program was:" >&5
6623 cat conftest.$ac_ext >&5
6624 rm -rf conftest*
6625 eval "ac_cv_func_$ac_func=no"
6627 rm -f conftest*
6630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6631 echo "$ac_t""yes" 1>&6
6632 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6633 cat >> confdefs.h <<EOF
6634 #define $ac_tr_func 1
6637 else
6638 echo "$ac_t""no" 1>&6
6640 done
6651 # checks for system services
6652 # (none yet)
6654 # Linux requires this for correct f.p. operations
6655 echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
6656 echo "configure:6657: checking for __fpu_control" >&5
6657 if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6658 echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660 cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* System header to define __stub macros and hopefully few prototypes,
6664 which can conflict with char __fpu_control(); below. */
6665 #include <assert.h>
6666 /* Override any gcc2 internal prototype to avoid an error. */
6667 /* We use char because int might match the return type of a gcc2
6668 builtin and then its argument prototype would still apply. */
6669 char __fpu_control();
6671 int main() {
6673 /* The GNU C library defines this for functions which it implements
6674 to always fail with ENOSYS. Some functions are actually named
6675 something starting with __ and the normal name is an alias. */
6676 #if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6677 choke me
6678 #else
6679 __fpu_control();
6680 #endif
6682 ; return 0; }
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685 rm -rf conftest*
6686 eval "ac_cv_func___fpu_control=yes"
6687 else
6688 echo "configure: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690 rm -rf conftest*
6691 eval "ac_cv_func___fpu_control=no"
6693 rm -f conftest*
6696 if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6697 echo "$ac_t""yes" 1>&6
6699 else
6700 echo "$ac_t""no" 1>&6
6701 echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
6702 echo "configure:6703: checking for __fpu_control in -lieee" >&5
6703 ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6704 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6705 echo $ac_n "(cached) $ac_c" 1>&6
6706 else
6707 ac_save_LIBS="$LIBS"
6708 LIBS="-lieee $LIBS"
6709 cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 /* Override any gcc2 internal prototype to avoid an error. */
6713 /* We use char because int might match the return type of a gcc2
6714 builtin and then its argument prototype would still apply. */
6715 char __fpu_control();
6717 int main() {
6718 __fpu_control()
6719 ; return 0; }
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722 rm -rf conftest*
6723 eval "ac_cv_lib_$ac_lib_var=yes"
6724 else
6725 echo "configure: failed program was:" >&5
6726 cat conftest.$ac_ext >&5
6727 rm -rf conftest*
6728 eval "ac_cv_lib_$ac_lib_var=no"
6730 rm -f conftest*
6731 LIBS="$ac_save_LIBS"
6734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6735 echo "$ac_t""yes" 1>&6
6736 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6737 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6738 cat >> confdefs.h <<EOF
6739 #define $ac_tr_lib 1
6742 LIBS="-lieee $LIBS"
6744 else
6745 echo "$ac_t""no" 1>&6
6752 # Check for --with-fpectl
6753 echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
6754 echo "configure:6755: checking for --with-fpectl" >&5
6755 # Check whether --with-fpectl or --without-fpectl was given.
6756 if test "${with_fpectl+set}" = set; then
6757 withval="$with_fpectl"
6759 if test "$withval" != no
6760 then cat >> confdefs.h <<\EOF
6761 #define WANT_SIGFPE_HANDLER 1
6763 echo "$ac_t""yes" 1>&6
6764 else echo "$ac_t""no" 1>&6
6766 else
6767 echo "$ac_t""no" 1>&6
6771 # check for --with-libm=...
6773 case $ac_sys_system in
6774 Darwin) ;;
6775 BeOS) ;;
6776 *) LIBM=-lm
6777 esac
6778 echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
6779 echo "configure:6780: checking for --with-libm=STRING" >&5
6780 # Check whether --with-libm or --without-libm was given.
6781 if test "${with_libm+set}" = set; then
6782 withval="$with_libm"
6784 if test "$withval" = no
6785 then LIBM=
6786 echo "$ac_t""force LIBM empty" 1>&6
6787 elif test "$withval" != yes
6788 then LIBM=$withval
6789 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6790 else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
6792 else
6793 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6797 # check for --with-libc=...
6799 echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
6800 echo "configure:6801: checking for --with-libc=STRING" >&5
6801 # Check whether --with-libc or --without-libc was given.
6802 if test "${with_libc+set}" = set; then
6803 withval="$with_libc"
6805 if test "$withval" = no
6806 then LIBC=
6807 echo "$ac_t""force LIBC empty" 1>&6
6808 elif test "$withval" != yes
6809 then LIBC=$withval
6810 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6811 else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
6813 else
6814 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6818 # check for hypot() in math library
6819 LIBS_SAVE=$LIBS
6820 LIBS="$LIBS $LIBM"
6821 for ac_func in hypot
6823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6824 echo "configure:6825: checking for $ac_func" >&5
6825 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6826 echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828 cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832 which can conflict with char $ac_func(); below. */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error. */
6835 /* We use char because int might match the return type of a gcc2
6836 builtin and then its argument prototype would still apply. */
6837 char $ac_func();
6839 int main() {
6841 /* The GNU C library defines this for functions which it implements
6842 to always fail with ENOSYS. Some functions are actually named
6843 something starting with __ and the normal name is an alias. */
6844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6845 choke me
6846 #else
6847 $ac_func();
6848 #endif
6850 ; return 0; }
6852 if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6853 rm -rf conftest*
6854 eval "ac_cv_func_$ac_func=yes"
6855 else
6856 echo "configure: failed program was:" >&5
6857 cat conftest.$ac_ext >&5
6858 rm -rf conftest*
6859 eval "ac_cv_func_$ac_func=no"
6861 rm -f conftest*
6864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6865 echo "$ac_t""yes" 1>&6
6866 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6867 cat >> confdefs.h <<EOF
6868 #define $ac_tr_func 1
6871 else
6872 echo "$ac_t""no" 1>&6
6873 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6875 done
6878 LIBS=$LIBS_SAVE
6880 # check whether malloc(0) returns NULL or not
6881 echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
6882 echo "configure:6883: checking what malloc(0) returns" >&5
6883 if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6884 echo $ac_n "(cached) $ac_c" 1>&6
6885 else
6886 if test "$cross_compiling" = yes; then
6887 ac_cv_malloc_zero=nonnull
6888 else
6889 cat > conftest.$ac_ext <<EOF
6890 #line 6891 "configure"
6891 #include "confdefs.h"
6892 #include <stdio.h>
6893 #ifdef HAVE_STDLIB
6894 #include <stdlib.h>
6895 #else
6896 char *malloc(), *realloc();
6897 int *free();
6898 #endif
6899 main() {
6900 char *p;
6901 p = malloc(0);
6902 if (p == NULL) exit(1);
6903 p = realloc(p, 0);
6904 if (p == NULL) exit(1);
6905 free(p);
6906 exit(0);
6909 if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6910 then
6911 ac_cv_malloc_zero=nonnull
6912 else
6913 echo "configure: failed program was:" >&5
6914 cat conftest.$ac_ext >&5
6915 rm -fr conftest*
6916 ac_cv_malloc_zero=null
6918 rm -fr conftest*
6922 # XXX arm cross-compile?
6923 echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6924 if test "$ac_cv_malloc_zero" = null
6925 then
6926 cat >> confdefs.h <<\EOF
6927 #define MALLOC_ZERO_RETURNS_NULL 1
6932 # check for wchar.h
6933 ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6934 echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
6935 echo "configure:6936: checking for wchar.h" >&5
6936 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6937 echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939 cat > conftest.$ac_ext <<EOF
6940 #line 6941 "configure"
6941 #include "confdefs.h"
6942 #include <wchar.h>
6944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6945 { (eval echo configure:6946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6947 if test -z "$ac_err"; then
6948 rm -rf conftest*
6949 eval "ac_cv_header_$ac_safe=yes"
6950 else
6951 echo "$ac_err" >&5
6952 echo "configure: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6954 rm -rf conftest*
6955 eval "ac_cv_header_$ac_safe=no"
6957 rm -f conftest*
6959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6960 echo "$ac_t""yes" 1>&6
6961 cat >> confdefs.h <<\EOF
6962 #define HAVE_WCHAR_H 1
6964 wchar_h="yes"
6965 else
6966 echo "$ac_t""no" 1>&6
6967 wchar_h="no"
6972 # determine wchar_t size
6973 if test "$wchar_h" = yes
6974 then
6975 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
6976 echo "configure:6977: checking size of wchar_t" >&5
6977 if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6978 echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980 if test "$cross_compiling" = yes; then
6981 ac_cv_sizeof_wchar_t=4
6982 else
6983 cat > conftest.$ac_ext <<EOF
6984 #line 6985 "configure"
6985 #include "confdefs.h"
6986 #include <stdio.h>
6987 main()
6989 FILE *f=fopen("conftestval", "w");
6990 if (!f) exit(1);
6991 fprintf(f, "%d\n", sizeof(wchar_t));
6992 exit(0);
6995 if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6996 then
6997 ac_cv_sizeof_wchar_t=`cat conftestval`
6998 else
6999 echo "configure: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7001 rm -fr conftest*
7002 ac_cv_sizeof_wchar_t=0
7004 rm -fr conftest*
7008 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7009 cat >> confdefs.h <<EOF
7010 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7016 echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
7017 echo "configure:7018: checking what type to use for unicode" >&5
7018 # Check whether --enable-unicode or --disable-unicode was given.
7019 if test "${enable_unicode+set}" = set; then
7020 enableval="$enable_unicode"
7022 else
7023 enable_unicode=yes
7027 if test $enable_unicode = yes
7028 then
7029 # Without any arguments, Py_UNICODE defaults to two-byte mode
7030 enable_unicode="ucs2"
7033 case "$enable_unicode" in
7034 ucs2) unicode_size="2"
7035 cat >> confdefs.h <<\EOF
7036 #define Py_UNICODE_SIZE 2
7040 ucs4) unicode_size="4"
7041 cat >> confdefs.h <<\EOF
7042 #define Py_UNICODE_SIZE 4
7046 esac
7049 if test "$enable_unicode" = "no"
7050 then
7051 UNICODE_OBJS=""
7052 echo "$ac_t""not used" 1>&6
7053 else
7054 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
7055 cat >> confdefs.h <<\EOF
7056 #define Py_USING_UNICODE 1
7059 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7060 then
7061 PY_UNICODE_TYPE="wchar_t"
7062 cat >> confdefs.h <<\EOF
7063 #define HAVE_USABLE_WCHAR_T 1
7066 cat >> confdefs.h <<\EOF
7067 #define PY_UNICODE_TYPE wchar_t
7070 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7071 then
7072 PY_UNICODE_TYPE="unsigned short"
7073 cat >> confdefs.h <<\EOF
7074 #define PY_UNICODE_TYPE unsigned short
7077 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7078 then
7079 PY_UNICODE_TYPE="unsigned long"
7080 cat >> confdefs.h <<\EOF
7081 #define PY_UNICODE_TYPE unsigned long
7084 else
7085 PY_UNICODE_TYPE="no type found"
7087 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
7090 # check for endianness
7091 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
7092 echo "configure:7093: checking whether byte ordering is bigendian" >&5
7093 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7094 echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096 ac_cv_c_bigendian=unknown
7097 # See if sys/param.h defines the BYTE_ORDER macro.
7098 cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101 #include <sys/types.h>
7102 #include <sys/param.h>
7103 int main() {
7105 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7106 bogus endian macros
7107 #endif
7108 ; return 0; }
7110 if { (eval echo configure:7111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7111 rm -rf conftest*
7112 # It does; now see whether it defined to BIG_ENDIAN or not.
7113 cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 #include <sys/types.h>
7117 #include <sys/param.h>
7118 int main() {
7120 #if BYTE_ORDER != BIG_ENDIAN
7121 not big endian
7122 #endif
7123 ; return 0; }
7125 if { (eval echo configure:7126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7126 rm -rf conftest*
7127 ac_cv_c_bigendian=yes
7128 else
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 rm -rf conftest*
7132 ac_cv_c_bigendian=no
7134 rm -f conftest*
7135 else
7136 echo "configure: failed program was:" >&5
7137 cat conftest.$ac_ext >&5
7139 rm -f conftest*
7140 if test $ac_cv_c_bigendian = unknown; then
7141 if test "$cross_compiling" = yes; then
7142 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7143 else
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 main () {
7148 /* Are we little or big endian? From Harbison&Steele. */
7149 union
7151 long l;
7152 char c[sizeof (long)];
7153 } u;
7154 u.l = 1;
7155 exit (u.c[sizeof (long) - 1] == 1);
7158 if { (eval echo configure:7159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7159 then
7160 ac_cv_c_bigendian=no
7161 else
7162 echo "configure: failed program was:" >&5
7163 cat conftest.$ac_ext >&5
7164 rm -fr conftest*
7165 ac_cv_c_bigendian=yes
7167 rm -fr conftest*
7173 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7174 if test $ac_cv_c_bigendian = yes; then
7175 cat >> confdefs.h <<\EOF
7176 #define WORDS_BIGENDIAN 1
7182 # Check whether right shifting a negative integer extends the sign bit
7183 # or fills with zeros (like the Cray J90, according to Tim Peters).
7184 echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
7185 echo "configure:7186: checking whether right shift extends the sign bit" >&5
7186 if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7187 echo $ac_n "(cached) $ac_c" 1>&6
7188 else
7190 if test "$cross_compiling" = yes; then
7191 ac_cv_rshift_extends_sign=yes
7192 else
7193 cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7197 int main()
7199 exit(((-1)>>3 == -1) ? 0 : 1);
7203 if { (eval echo configure:7204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7204 then
7205 ac_cv_rshift_extends_sign=yes
7206 else
7207 echo "configure: failed program was:" >&5
7208 cat conftest.$ac_ext >&5
7209 rm -fr conftest*
7210 ac_cv_rshift_extends_sign=no
7212 rm -fr conftest*
7217 echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
7218 if test "$ac_cv_rshift_extends_sign" = no
7219 then
7220 cat >> confdefs.h <<\EOF
7221 #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7226 # check for getc_unlocked and related locking functions
7227 echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
7228 echo "configure:7229: checking for getc_unlocked() and friends" >&5
7229 if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7230 echo $ac_n "(cached) $ac_c" 1>&6
7231 else
7233 cat > conftest.$ac_ext <<EOF
7234 #line 7235 "configure"
7235 #include "confdefs.h"
7236 #include <stdio.h>
7237 int main() {
7239 FILE *f = fopen("/dev/null", "r");
7240 flockfile(f);
7241 getc_unlocked(f);
7242 funlockfile(f);
7244 ; return 0; }
7246 if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7247 rm -rf conftest*
7248 ac_cv_have_getc_unlocked=yes
7249 else
7250 echo "configure: failed program was:" >&5
7251 cat conftest.$ac_ext >&5
7252 rm -rf conftest*
7253 ac_cv_have_getc_unlocked=no
7255 rm -f conftest*
7258 echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
7259 if test "$ac_cv_have_getc_unlocked" = yes
7260 then
7261 cat >> confdefs.h <<\EOF
7262 #define HAVE_GETC_UNLOCKED 1
7267 # check for readline 4.0
7268 echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
7269 echo "configure:7270: checking for rl_pre_input_hook in -lreadline" >&5
7270 ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7272 echo $ac_n "(cached) $ac_c" 1>&6
7273 else
7274 ac_save_LIBS="$LIBS"
7275 LIBS="-lreadline -ltermcap $LIBS"
7276 cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 /* Override any gcc2 internal prototype to avoid an error. */
7280 /* We use char because int might match the return type of a gcc2
7281 builtin and then its argument prototype would still apply. */
7282 char rl_pre_input_hook();
7284 int main() {
7285 rl_pre_input_hook()
7286 ; return 0; }
7288 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7289 rm -rf conftest*
7290 eval "ac_cv_lib_$ac_lib_var=yes"
7291 else
7292 echo "configure: failed program was:" >&5
7293 cat conftest.$ac_ext >&5
7294 rm -rf conftest*
7295 eval "ac_cv_lib_$ac_lib_var=no"
7297 rm -f conftest*
7298 LIBS="$ac_save_LIBS"
7301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7302 echo "$ac_t""yes" 1>&6
7303 cat >> confdefs.h <<\EOF
7304 #define HAVE_RL_PRE_INPUT_HOOK 1
7307 else
7308 echo "$ac_t""no" 1>&6
7312 # check for readline 4.2
7313 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
7314 echo "configure:7315: checking for rl_completion_matches in -lreadline" >&5
7315 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7316 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7317 echo $ac_n "(cached) $ac_c" 1>&6
7318 else
7319 ac_save_LIBS="$LIBS"
7320 LIBS="-lreadline -ltermcap $LIBS"
7321 cat > conftest.$ac_ext <<EOF
7322 #line 7323 "configure"
7323 #include "confdefs.h"
7324 /* Override any gcc2 internal prototype to avoid an error. */
7325 /* We use char because int might match the return type of a gcc2
7326 builtin and then its argument prototype would still apply. */
7327 char rl_completion_matches();
7329 int main() {
7330 rl_completion_matches()
7331 ; return 0; }
7333 if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7334 rm -rf conftest*
7335 eval "ac_cv_lib_$ac_lib_var=yes"
7336 else
7337 echo "configure: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
7339 rm -rf conftest*
7340 eval "ac_cv_lib_$ac_lib_var=no"
7342 rm -f conftest*
7343 LIBS="$ac_save_LIBS"
7346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7347 echo "$ac_t""yes" 1>&6
7348 cat >> confdefs.h <<\EOF
7349 #define HAVE_RL_COMPLETION_MATCHES 1
7352 else
7353 echo "$ac_t""no" 1>&6
7357 echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
7358 echo "configure:7359: checking for broken nice()" >&5
7359 if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7360 echo $ac_n "(cached) $ac_c" 1>&6
7361 else
7363 if test "$cross_compiling" = yes; then
7364 ac_cv_broken_nice=no
7365 else
7366 cat > conftest.$ac_ext <<EOF
7367 #line 7368 "configure"
7368 #include "confdefs.h"
7370 int main()
7372 int val1 = nice(1);
7373 if (val1 != -1 && val1 == nice(2))
7374 exit(0);
7375 exit(1);
7379 if { (eval echo configure:7380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7380 then
7381 ac_cv_broken_nice=yes
7382 else
7383 echo "configure: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7385 rm -fr conftest*
7386 ac_cv_broken_nice=no
7388 rm -fr conftest*
7393 echo "$ac_t""$ac_cv_broken_nice" 1>&6
7394 if test "$ac_cv_broken_nice" = yes
7395 then
7396 cat >> confdefs.h <<\EOF
7397 #define HAVE_BROKEN_NICE 1
7402 # On HP/UX 11.0, mvwdelch is a block with a return statement
7403 echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
7404 echo "configure:7405: checking whether mvwdelch is an expression" >&5
7405 if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7406 echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408 cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 #include <curses.h>
7412 int main() {
7414 int rtn;
7415 rtn = mvwdelch(0,0,0);
7417 ; return 0; }
7419 if { (eval echo configure:7420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7420 rm -rf conftest*
7421 ac_cv_mvwdelch_is_expression=yes
7422 else
7423 echo "configure: failed program was:" >&5
7424 cat conftest.$ac_ext >&5
7425 rm -rf conftest*
7426 ac_cv_mvwdelch_is_expression=no
7428 rm -f conftest*
7431 echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
7433 if test "$ac_cv_mvwdelch_is_expression" = yes
7434 then
7435 cat >> confdefs.h <<\EOF
7436 #define MVWDELCH_IS_EXPRESSION 1
7441 echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
7442 echo "configure:7443: checking whether WINDOW has _flags" >&5
7443 if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7444 echo $ac_n "(cached) $ac_c" 1>&6
7445 else
7446 cat > conftest.$ac_ext <<EOF
7447 #line 7448 "configure"
7448 #include "confdefs.h"
7449 #include <curses.h>
7450 int main() {
7452 WINDOW *w;
7453 w->_flags = 0;
7455 ; return 0; }
7457 if { (eval echo configure:7458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7458 rm -rf conftest*
7459 ac_cv_window_has_flags=yes
7460 else
7461 echo "configure: failed program was:" >&5
7462 cat conftest.$ac_ext >&5
7463 rm -rf conftest*
7464 ac_cv_window_has_flags=no
7466 rm -f conftest*
7469 echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7472 if test "$ac_cv_window_has_flags" = yes
7473 then
7474 cat >> confdefs.h <<\EOF
7475 #define WINDOW_HAS_FLAGS 1
7480 # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7481 # Add sys/socket.h to confdefs.h
7482 cat >> confdefs.h <<\EOF
7483 #ifdef HAVE_SYS_SOCKET_H
7484 #include <sys/socket.h>
7485 #endif
7487 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
7488 echo "configure:7489: checking for socklen_t" >&5
7489 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7490 echo $ac_n "(cached) $ac_c" 1>&6
7491 else
7492 cat > conftest.$ac_ext <<EOF
7493 #line 7494 "configure"
7494 #include "confdefs.h"
7495 #include <sys/types.h>
7496 #if STDC_HEADERS
7497 #include <stdlib.h>
7498 #include <stddef.h>
7499 #endif
7501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7502 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7503 rm -rf conftest*
7504 ac_cv_type_socklen_t=yes
7505 else
7506 rm -rf conftest*
7507 ac_cv_type_socklen_t=no
7509 rm -f conftest*
7512 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7513 if test $ac_cv_type_socklen_t = no; then
7514 cat >> confdefs.h <<\EOF
7515 #define socklen_t int
7521 # Add Python/ prefix to LIBOBJS
7522 libobjs=$LIBOBJS
7523 LIBOBJS=
7524 for obj in $libobjs; do
7525 LIBOBJS="$LIBOBJS Python/$obj"
7526 done
7528 #AC_MSG_CHECKING(for Modules/Setup)
7529 #if test ! -f Modules/Setup ; then
7530 # if test ! -d Modules ; then
7531 # mkdir Modules
7532 # fi
7533 # cp "$srcdir/Modules/Setup.dist" Modules/Setup
7534 # AC_MSG_RESULT(creating)
7535 #else
7536 # AC_MSG_RESULT(already exists)
7541 for h in `(cd $srcdir;echo Python/thread_*.h)`
7543 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7544 done
7547 SRCDIRS="Parser Grammar Objects Python Modules"
7548 echo $ac_n "checking for build directories""... $ac_c" 1>&6
7549 echo "configure:7550: checking for build directories" >&5
7550 for dir in $SRCDIRS; do
7551 if test ! -d $dir; then
7552 mkdir $dir
7554 done
7555 echo "$ac_t""done" 1>&6
7557 # generate output files
7558 trap '' 1 2 15
7559 cat > confcache <<\EOF
7560 # This file is a shell script that caches the results of configure
7561 # tests run on this system so they can be shared between configure
7562 # scripts and configure runs. It is not useful on other systems.
7563 # If it contains results you don't want to keep, you may remove or edit it.
7565 # By default, configure uses ./config.cache as the cache file,
7566 # creating it if it does not exist already. You can give configure
7567 # the --cache-file=FILE option to use a different cache file; that is
7568 # what configure does when it calls configure scripts in
7569 # subdirectories, so they share the cache.
7570 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7571 # config.status only pays attention to the cache file if you give it the
7572 # --recheck option to rerun configure.
7575 # The following way of writing the cache mishandles newlines in values,
7576 # but we know of no workaround that is simple, portable, and efficient.
7577 # So, don't put newlines in cache variables' values.
7578 # Ultrix sh set writes to stderr and can't be redirected directly,
7579 # and sets the high bit in the cache file unless we assign to the vars.
7580 (set) 2>&1 |
7581 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7582 *ac_space=\ *)
7583 # `set' does not quote correctly, so add quotes (double-quote substitution
7584 # turns \\\\ into \\, and sed turns \\ into \).
7585 sed -n \
7586 -e "s/'/'\\\\''/g" \
7587 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7590 # `set' quotes correctly as required by POSIX, so do not add quotes.
7591 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7593 esac >> confcache
7594 if cmp -s $cache_file confcache; then
7596 else
7597 if test -w $cache_file; then
7598 echo "updating cache $cache_file"
7599 cat confcache > $cache_file
7600 else
7601 echo "not updating unwritable cache $cache_file"
7604 rm -f confcache
7606 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7608 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7609 # Let make expand exec_prefix.
7610 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7612 # Any assignment to VPATH causes Sun make to only execute
7613 # the first set of double-colon rules, so remove it if not needed.
7614 # If there is a colon in the path, we need to keep it.
7615 if test "x$srcdir" = x.; then
7616 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7619 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7621 DEFS=-DHAVE_CONFIG_H
7623 # Without the "./", some shells look in PATH for config.status.
7624 : ${CONFIG_STATUS=./config.status}
7626 echo creating $CONFIG_STATUS
7627 rm -f $CONFIG_STATUS
7628 cat > $CONFIG_STATUS <<EOF
7629 #! /bin/sh
7630 # Generated automatically by configure.
7631 # Run this file to recreate the current configuration.
7632 # This directory was configured as follows,
7633 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7635 # $0 $ac_configure_args
7637 # Compiler output produced by configure, useful for debugging
7638 # configure, is in ./config.log if it exists.
7640 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7641 for ac_option
7643 case "\$ac_option" in
7644 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7645 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7646 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7647 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7648 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7649 exit 0 ;;
7650 -help | --help | --hel | --he | --h)
7651 echo "\$ac_cs_usage"; exit 0 ;;
7652 *) echo "\$ac_cs_usage"; exit 1 ;;
7653 esac
7654 done
7656 ac_given_srcdir=$srcdir
7657 ac_given_INSTALL="$INSTALL"
7659 trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7661 cat >> $CONFIG_STATUS <<EOF
7663 # Protect against being on the right side of a sed subst in config.status.
7664 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7665 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7666 $ac_vpsub
7667 $extrasub
7668 s%@SHELL@%$SHELL%g
7669 s%@CFLAGS@%$CFLAGS%g
7670 s%@CPPFLAGS@%$CPPFLAGS%g
7671 s%@CXXFLAGS@%$CXXFLAGS%g
7672 s%@FFLAGS@%$FFLAGS%g
7673 s%@DEFS@%$DEFS%g
7674 s%@LDFLAGS@%$LDFLAGS%g
7675 s%@LIBS@%$LIBS%g
7676 s%@exec_prefix@%$exec_prefix%g
7677 s%@prefix@%$prefix%g
7678 s%@program_transform_name@%$program_transform_name%g
7679 s%@bindir@%$bindir%g
7680 s%@sbindir@%$sbindir%g
7681 s%@libexecdir@%$libexecdir%g
7682 s%@datadir@%$datadir%g
7683 s%@sysconfdir@%$sysconfdir%g
7684 s%@sharedstatedir@%$sharedstatedir%g
7685 s%@localstatedir@%$localstatedir%g
7686 s%@libdir@%$libdir%g
7687 s%@includedir@%$includedir%g
7688 s%@oldincludedir@%$oldincludedir%g
7689 s%@infodir@%$infodir%g
7690 s%@mandir@%$mandir%g
7691 s%@VERSION@%$VERSION%g
7692 s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7693 s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7694 s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7695 s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7696 s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7697 s%@MACHDEP@%$MACHDEP%g
7698 s%@SGI_ABI@%$SGI_ABI%g
7699 s%@CXX@%$CXX%g
7700 s%@MAINOBJ@%$MAINOBJ%g
7701 s%@CC@%$CC%g
7702 s%@CPP@%$CPP%g
7703 s%@EXEEXT@%$EXEEXT%g
7704 s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7705 s%@LIBRARY@%$LIBRARY%g
7706 s%@LDLIBRARY@%$LDLIBRARY%g
7707 s%@DLLLIBRARY@%$DLLLIBRARY%g
7708 s%@BLDLIBRARY@%$BLDLIBRARY%g
7709 s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7710 s%@LINKCC@%$LINKCC%g
7711 s%@RANLIB@%$RANLIB%g
7712 s%@AR@%$AR%g
7713 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7714 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7715 s%@INSTALL_DATA@%$INSTALL_DATA%g
7716 s%@LN@%$LN%g
7717 s%@OPT@%$OPT%g
7718 s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7719 s%@SO@%$SO%g
7720 s%@LDSHARED@%$LDSHARED%g
7721 s%@BLDSHARED@%$BLDSHARED%g
7722 s%@CCSHARED@%$CCSHARED%g
7723 s%@LINKFORSHARED@%$LINKFORSHARED%g
7724 s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7725 s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7726 s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7727 s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7728 s%@LDLAST@%$LDLAST%g
7729 s%@DLINCLDIR@%$DLINCLDIR%g
7730 s%@DYNLOADFILE@%$DYNLOADFILE%g
7731 s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7732 s%@LIBOBJS@%$LIBOBJS%g
7733 s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7734 s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7735 s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7736 s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7737 s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7738 s%@LIBM@%$LIBM%g
7739 s%@LIBC@%$LIBC%g
7740 s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7741 s%@THREADHEADERS@%$THREADHEADERS%g
7742 s%@SRCDIRS@%$SRCDIRS%g
7744 CEOF
7747 cat >> $CONFIG_STATUS <<\EOF
7749 # Split the substitutions into bite-sized pieces for seds with
7750 # small command number limits, like on Digital OSF/1 and HP-UX.
7751 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7752 ac_file=1 # Number of current file.
7753 ac_beg=1 # First line for current file.
7754 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7755 ac_more_lines=:
7756 ac_sed_cmds=""
7757 while $ac_more_lines; do
7758 if test $ac_beg -gt 1; then
7759 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7760 else
7761 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7763 if test ! -s conftest.s$ac_file; then
7764 ac_more_lines=false
7765 rm -f conftest.s$ac_file
7766 else
7767 if test -z "$ac_sed_cmds"; then
7768 ac_sed_cmds="sed -f conftest.s$ac_file"
7769 else
7770 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7772 ac_file=`expr $ac_file + 1`
7773 ac_beg=$ac_end
7774 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7776 done
7777 if test -z "$ac_sed_cmds"; then
7778 ac_sed_cmds=cat
7782 cat >> $CONFIG_STATUS <<EOF
7784 CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7786 cat >> $CONFIG_STATUS <<\EOF
7787 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7788 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7789 case "$ac_file" in
7790 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7791 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7792 *) ac_file_in="${ac_file}.in" ;;
7793 esac
7795 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7797 # Remove last slash and all that follows it. Not all systems have dirname.
7798 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7799 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7800 # The file is in a subdirectory.
7801 test ! -d "$ac_dir" && mkdir "$ac_dir"
7802 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7803 # A "../" for each directory in $ac_dir_suffix.
7804 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7805 else
7806 ac_dir_suffix= ac_dots=
7809 case "$ac_given_srcdir" in
7810 .) srcdir=.
7811 if test -z "$ac_dots"; then top_srcdir=.
7812 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7813 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7814 *) # Relative path.
7815 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7816 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7817 esac
7819 case "$ac_given_INSTALL" in
7820 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7821 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7822 esac
7824 echo creating "$ac_file"
7825 rm -f "$ac_file"
7826 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7827 case "$ac_file" in
7828 *Makefile*) ac_comsub="1i\\
7829 # $configure_input" ;;
7830 *) ac_comsub= ;;
7831 esac
7833 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7834 sed -e "$ac_comsub
7835 s%@configure_input@%$configure_input%g
7836 s%@srcdir@%$srcdir%g
7837 s%@top_srcdir@%$top_srcdir%g
7838 s%@INSTALL@%$INSTALL%g
7839 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7840 fi; done
7841 rm -f conftest.s*
7843 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7844 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7846 # ac_d sets the value in "#define NAME VALUE" lines.
7847 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7848 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7849 ac_dC='\3'
7850 ac_dD='%g'
7851 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7852 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7853 ac_uB='\([ ]\)%\1#\2define\3'
7854 ac_uC=' '
7855 ac_uD='\4%g'
7856 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7857 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7858 ac_eB='$%\1#\2define\3'
7859 ac_eC=' '
7860 ac_eD='%g'
7862 if test "${CONFIG_HEADERS+set}" != set; then
7864 cat >> $CONFIG_STATUS <<EOF
7865 CONFIG_HEADERS="pyconfig.h"
7867 cat >> $CONFIG_STATUS <<\EOF
7869 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7870 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7871 case "$ac_file" in
7872 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7873 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7874 *) ac_file_in="${ac_file}.in" ;;
7875 esac
7877 echo creating $ac_file
7879 rm -f conftest.frag conftest.in conftest.out
7880 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7881 cat $ac_file_inputs > conftest.in
7885 # Transform confdefs.h into a sed script conftest.vals that substitutes
7886 # the proper values into config.h.in to produce config.h. And first:
7887 # Protect against being on the right side of a sed subst in config.status.
7888 # Protect against being in an unquoted here document in config.status.
7889 rm -f conftest.vals
7890 cat > conftest.hdr <<\EOF
7891 s/[\\&%]/\\&/g
7892 s%[\\$`]%\\&%g
7893 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7894 s%ac_d%ac_u%gp
7895 s%ac_u%ac_e%gp
7897 sed -n -f conftest.hdr confdefs.h > conftest.vals
7898 rm -f conftest.hdr
7900 # This sed command replaces #undef with comments. This is necessary, for
7901 # example, in the case of _POSIX_SOURCE, which is predefined and required
7902 # on some systems where configure will not decide to define it.
7903 cat >> conftest.vals <<\EOF
7904 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7907 # Break up conftest.vals because some shells have a limit on
7908 # the size of here documents, and old seds have small limits too.
7910 rm -f conftest.tail
7911 while :
7913 ac_lines=`grep -c . conftest.vals`
7914 # grep -c gives empty output for an empty file on some AIX systems.
7915 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7916 # Write a limited-size here document to conftest.frag.
7917 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7918 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7919 echo 'CEOF
7920 sed -f conftest.frag conftest.in > conftest.out
7921 rm -f conftest.in
7922 mv conftest.out conftest.in
7923 ' >> $CONFIG_STATUS
7924 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7925 rm -f conftest.vals
7926 mv conftest.tail conftest.vals
7927 done
7928 rm -f conftest.vals
7930 cat >> $CONFIG_STATUS <<\EOF
7931 rm -f conftest.frag conftest.h
7932 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7933 cat conftest.in >> conftest.h
7934 rm -f conftest.in
7935 if cmp -s $ac_file conftest.h 2>/dev/null; then
7936 echo "$ac_file is unchanged"
7937 rm -f conftest.h
7938 else
7939 # Remove last slash and all that follows it. Not all systems have dirname.
7940 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7941 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7942 # The file is in a subdirectory.
7943 test ! -d "$ac_dir" && mkdir "$ac_dir"
7945 rm -f $ac_file
7946 mv conftest.h $ac_file
7948 fi; done
7951 cat >> $CONFIG_STATUS <<EOF
7954 cat >> $CONFIG_STATUS <<\EOF
7956 exit 0
7958 chmod +x $CONFIG_STATUS
7959 rm -fr confdefs* $ac_clean_files
7960 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7963 echo "creating Setup"
7964 if test ! -f Modules/Setup
7965 then
7966 cp $srcdir/Modules/Setup.dist Modules/Setup
7969 echo "creating Setup.local"
7970 if test ! -f Modules/Setup.local
7971 then
7972 echo "# Edit this file for local setup changes" >Modules/Setup.local
7975 echo "creating Makefile"
7976 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7977 -s Modules Modules/Setup.config \
7978 Modules/Setup.local Modules/Setup
7979 mv config.c Modules