Rewrite to use test_support's fine fcmp instead -- I didn't know that
[python/dscho.git] / configure
bloba599480a302cdbf5ec733735a0d3387a15c3e2c5
1 #! /bin/sh
3 # From configure.in Revision: 1.254
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 PYTHONFRAMEWORK=Python
587 PYTHONFRAMEWORKDIR=Python.framework
588 case $enableval in
589 yes)
590 enableval=/Library/Frameworks
591 PYTHONFRAMEWORKPREFIX=$enableval
594 PYTHONFRAMEWORKPREFIX=$enableval
595 esac
596 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
597 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
599 else
601 PYTHONFRAMEWORK=
602 PYTHONFRAMEWORKDIR=
603 PYTHONFRAMEWORKPREFIX=
604 PYTHONFRAMEWORKINSTALLDIR=
605 enable_framework=
614 ##AC_ARG_WITH(dyld,
615 ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
617 # Set name for machine-dependent library files
619 echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
620 echo "configure:621: checking MACHDEP" >&5
621 if test -z "$MACHDEP"
622 then
623 ac_sys_system=`uname -s`
624 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
625 ac_sys_release=`uname -v`
626 else
627 ac_sys_release=`uname -r`
629 ac_md_system=`echo $ac_sys_system |
630 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
631 ac_md_release=`echo $ac_sys_release |
632 tr -d '/ ' | sed 's/\..*//'`
633 MACHDEP="$ac_md_system$ac_md_release"
635 case $MACHDEP in
636 cygwin*) MACHDEP="cygwin";;
637 '') MACHDEP="unknown";;
638 esac
642 # SGI compilers allow the specification of the both the ABI and the
643 # ISA on the command line. Depending on the values of these switches,
644 # different and often incompatable code will be generated.
646 # The SGI_ABI variable can be used to modify the CC and LDFLAGS and
647 # thus supply support for various ABI/ISA combinations. The MACHDEP
648 # variable is also adjusted.
651 if test ! -z "$SGI_ABI"
652 then
653 CC="cc $SGI_ABI"
654 LDFLAGS="$SGI_ABI $LDFLAGS"
655 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
657 echo "$ac_t""$MACHDEP" 1>&6
659 # checks for alternative programs
660 echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
661 echo "configure:662: checking for --without-gcc" >&5
662 # Check whether --with-gcc or --without-gcc was given.
663 if test "${with_gcc+set}" = set; then
664 withval="$with_gcc"
666 case $withval in
667 no) CC=cc
668 without_gcc=yes;;
669 yes) CC=gcc
670 without_gcc=no;;
671 *) CC=$withval
672 without_gcc=$withval;;
673 esac
674 else
676 case $ac_sys_system in
677 AIX*) CC=cc_r
678 without_gcc=;;
679 BeOS*)
680 case $BE_HOST_CPU in
681 ppc)
682 CC=mwcc
683 without_gcc=yes
684 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
685 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
686 LDFLAGS="$LDFLAGS -nodup"
688 x86)
689 CC=gcc
690 without_gcc=no
691 OPT=-O
694 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
696 esac
697 AR="\$(srcdir)/Modules/ar_beos"
698 RANLIB=:
700 Monterey*)
701 RANLIB=:
702 without_gcc=;;
703 *) without_gcc=no;;
704 esac
707 echo "$ac_t""$without_gcc" 1>&6
711 MAINOBJ=python.o
712 echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
713 echo "configure:714: checking for --with-cxx=<compiler>" >&5
714 # Check whether --with-cxx or --without-cxx was given.
715 if test "${with_cxx+set}" = set; then
716 withval="$with_cxx"
718 check_cxx=no
719 case $withval in
720 no) CXX=
721 with_cxx=no;;
722 *) CXX=$withval
723 MAINOBJ=ccpython.o
724 with_cxx=$withval;;
725 esac
726 else
728 with_cxx=no
729 check_cxx=yes
733 echo "$ac_t""$with_cxx" 1>&6
736 if test "$check_cxx" = "yes"
737 then
738 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
740 # Extract the first word of "$ac_prog", so it can be a program name with args.
741 set dummy $ac_prog; ac_word=$2
742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
743 echo "configure:744: checking for $ac_word" >&5
744 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
745 echo $ac_n "(cached) $ac_c" 1>&6
746 else
747 if test -n "$CXX"; then
748 ac_cv_prog_CXX="$CXX" # Let the user override the test.
749 else
750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
751 ac_dummy="$PATH"
752 for ac_dir in $ac_dummy; do
753 test -z "$ac_dir" && ac_dir=.
754 if test -f $ac_dir/$ac_word; then
755 ac_cv_prog_CXX="$ac_prog"
756 break
758 done
759 IFS="$ac_save_ifs"
762 CXX="$ac_cv_prog_CXX"
763 if test -n "$CXX"; then
764 echo "$ac_t""$CXX" 1>&6
765 else
766 echo "$ac_t""no" 1>&6
769 test -n "$CXX" && break
770 done
771 test -n "$CXX" || CXX="notfound"
773 if test "$CXX" = "notfound"
774 then
775 CXX=
776 else
777 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
778 echo "configure:779: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
780 ac_ext=C
781 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
782 ac_cpp='$CXXCPP $CPPFLAGS'
783 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
784 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
785 cross_compiling=$ac_cv_prog_cxx_cross
787 cat > conftest.$ac_ext << EOF
789 #line 790 "configure"
790 #include "confdefs.h"
792 int main(){return(0);}
794 if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
795 ac_cv_prog_cxx_works=yes
796 # If we can't run a trivial program, we are probably using a cross compiler.
797 if (./conftest; exit) 2>/dev/null; then
798 ac_cv_prog_cxx_cross=no
799 else
800 ac_cv_prog_cxx_cross=yes
802 else
803 echo "configure: failed program was:" >&5
804 cat conftest.$ac_ext >&5
805 ac_cv_prog_cxx_works=no
807 rm -fr conftest*
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
815 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
816 if test $ac_cv_prog_cxx_works = no; then
817 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
819 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
820 echo "configure:821: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
821 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
822 cross_compiling=$ac_cv_prog_cxx_cross
827 # If the user switches compilers, we can't believe the cache
828 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
829 then
830 { echo "configure: error: cached CC is different -- throw away $cache_file
831 (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
834 # Extract the first word of "gcc", so it can be a program name with args.
835 set dummy gcc; ac_word=$2
836 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
837 echo "configure:838: checking for $ac_word" >&5
838 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
840 else
841 if test -n "$CC"; then
842 ac_cv_prog_CC="$CC" # Let the user override the test.
843 else
844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
845 ac_dummy="$PATH"
846 for ac_dir in $ac_dummy; do
847 test -z "$ac_dir" && ac_dir=.
848 if test -f $ac_dir/$ac_word; then
849 ac_cv_prog_CC="gcc"
850 break
852 done
853 IFS="$ac_save_ifs"
856 CC="$ac_cv_prog_CC"
857 if test -n "$CC"; then
858 echo "$ac_t""$CC" 1>&6
859 else
860 echo "$ac_t""no" 1>&6
863 if test -z "$CC"; then
864 # Extract the first word of "cc", so it can be a program name with args.
865 set dummy cc; ac_word=$2
866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
867 echo "configure:868: checking for $ac_word" >&5
868 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
869 echo $ac_n "(cached) $ac_c" 1>&6
870 else
871 if test -n "$CC"; then
872 ac_cv_prog_CC="$CC" # Let the user override the test.
873 else
874 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
875 ac_prog_rejected=no
876 ac_dummy="$PATH"
877 for ac_dir in $ac_dummy; do
878 test -z "$ac_dir" && ac_dir=.
879 if test -f $ac_dir/$ac_word; then
880 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
881 ac_prog_rejected=yes
882 continue
884 ac_cv_prog_CC="cc"
885 break
887 done
888 IFS="$ac_save_ifs"
889 if test $ac_prog_rejected = yes; then
890 # We found a bogon in the path, so make sure we never use it.
891 set dummy $ac_cv_prog_CC
892 shift
893 if test $# -gt 0; then
894 # We chose a different compiler from the bogus one.
895 # However, it has the same basename, so the bogon will be chosen
896 # first if we set CC to just the basename; use the full file name.
897 shift
898 set dummy "$ac_dir/$ac_word" "$@"
899 shift
900 ac_cv_prog_CC="$@"
905 CC="$ac_cv_prog_CC"
906 if test -n "$CC"; then
907 echo "$ac_t""$CC" 1>&6
908 else
909 echo "$ac_t""no" 1>&6
912 if test -z "$CC"; then
913 case "`uname -s`" in
914 *win32* | *WIN32*)
915 # Extract the first word of "cl", so it can be a program name with args.
916 set dummy cl; ac_word=$2
917 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
918 echo "configure:919: checking for $ac_word" >&5
919 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
920 echo $ac_n "(cached) $ac_c" 1>&6
921 else
922 if test -n "$CC"; then
923 ac_cv_prog_CC="$CC" # Let the user override the test.
924 else
925 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
926 ac_dummy="$PATH"
927 for ac_dir in $ac_dummy; do
928 test -z "$ac_dir" && ac_dir=.
929 if test -f $ac_dir/$ac_word; then
930 ac_cv_prog_CC="cl"
931 break
933 done
934 IFS="$ac_save_ifs"
937 CC="$ac_cv_prog_CC"
938 if test -n "$CC"; then
939 echo "$ac_t""$CC" 1>&6
940 else
941 echo "$ac_t""no" 1>&6
944 esac
946 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
949 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
950 echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
952 ac_ext=c
953 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
954 ac_cpp='$CPP $CPPFLAGS'
955 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
956 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
957 cross_compiling=$ac_cv_prog_cc_cross
959 cat > conftest.$ac_ext << EOF
961 #line 962 "configure"
962 #include "confdefs.h"
964 main(){return(0);}
966 if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
967 ac_cv_prog_cc_works=yes
968 # If we can't run a trivial program, we are probably using a cross compiler.
969 if (./conftest; exit) 2>/dev/null; then
970 ac_cv_prog_cc_cross=no
971 else
972 ac_cv_prog_cc_cross=yes
974 else
975 echo "configure: failed program was:" >&5
976 cat conftest.$ac_ext >&5
977 ac_cv_prog_cc_works=no
979 rm -fr conftest*
980 ac_ext=c
981 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
982 ac_cpp='$CPP $CPPFLAGS'
983 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
984 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
985 cross_compiling=$ac_cv_prog_cc_cross
987 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
988 if test $ac_cv_prog_cc_works = no; then
989 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
991 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
992 echo "configure:993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
993 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
994 cross_compiling=$ac_cv_prog_cc_cross
996 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
997 echo "configure:998: checking whether we are using GNU C" >&5
998 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
999 echo $ac_n "(cached) $ac_c" 1>&6
1000 else
1001 cat > conftest.c <<EOF
1002 #ifdef __GNUC__
1003 yes;
1004 #endif
1006 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1007 ac_cv_prog_gcc=yes
1008 else
1009 ac_cv_prog_gcc=no
1013 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1015 if test $ac_cv_prog_gcc = yes; then
1016 GCC=yes
1017 else
1018 GCC=
1021 ac_test_CFLAGS="${CFLAGS+set}"
1022 ac_save_CFLAGS="$CFLAGS"
1023 CFLAGS=
1024 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1025 echo "configure:1026: checking whether ${CC-cc} accepts -g" >&5
1026 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1027 echo $ac_n "(cached) $ac_c" 1>&6
1028 else
1029 echo 'void f(){}' > conftest.c
1030 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1031 ac_cv_prog_cc_g=yes
1032 else
1033 ac_cv_prog_cc_g=no
1035 rm -f conftest*
1039 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1040 if test "$ac_test_CFLAGS" = set; then
1041 CFLAGS="$ac_save_CFLAGS"
1042 elif test $ac_cv_prog_cc_g = yes; then
1043 if test "$GCC" = yes; then
1044 CFLAGS="-g -O2"
1045 else
1046 CFLAGS="-g"
1048 else
1049 if test "$GCC" = yes; then
1050 CFLAGS="-O2"
1051 else
1052 CFLAGS=
1057 # checks for UNIX variants that set C preprocessor variables
1058 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1059 echo "configure:1060: checking how to run the C preprocessor" >&5
1060 # On Suns, sometimes $CPP names a directory.
1061 if test -n "$CPP" && test -d "$CPP"; then
1062 CPP=
1064 if test -z "$CPP"; then
1065 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1066 echo $ac_n "(cached) $ac_c" 1>&6
1067 else
1068 # This must be in double quotes, not single quotes, because CPP may get
1069 # substituted into the Makefile and "${CC-cc}" will confuse make.
1070 CPP="${CC-cc} -E"
1071 # On the NeXT, cc -E runs the code through the compiler's parser,
1072 # not just through cpp.
1073 cat > conftest.$ac_ext <<EOF
1074 #line 1075 "configure"
1075 #include "confdefs.h"
1076 #include <assert.h>
1077 Syntax Error
1079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1080 { (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1082 if test -z "$ac_err"; then
1084 else
1085 echo "$ac_err" >&5
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 rm -rf conftest*
1089 CPP="${CC-cc} -E -traditional-cpp"
1090 cat > conftest.$ac_ext <<EOF
1091 #line 1092 "configure"
1092 #include "confdefs.h"
1093 #include <assert.h>
1094 Syntax Error
1096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1097 { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1099 if test -z "$ac_err"; then
1101 else
1102 echo "$ac_err" >&5
1103 echo "configure: failed program was:" >&5
1104 cat conftest.$ac_ext >&5
1105 rm -rf conftest*
1106 CPP="${CC-cc} -nologo -E"
1107 cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110 #include <assert.h>
1111 Syntax Error
1113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1114 { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1116 if test -z "$ac_err"; then
1118 else
1119 echo "$ac_err" >&5
1120 echo "configure: failed program was:" >&5
1121 cat conftest.$ac_ext >&5
1122 rm -rf conftest*
1123 CPP=/lib/cpp
1125 rm -f conftest*
1127 rm -f conftest*
1129 rm -f conftest*
1130 ac_cv_prog_CPP="$CPP"
1132 CPP="$ac_cv_prog_CPP"
1133 else
1134 ac_cv_prog_CPP="$CPP"
1136 echo "$ac_t""$CPP" 1>&6
1138 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1139 echo "configure:1140: checking for AIX" >&5
1140 cat > conftest.$ac_ext <<EOF
1141 #line 1142 "configure"
1142 #include "confdefs.h"
1143 #ifdef _AIX
1145 #endif
1148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1149 egrep "yes" >/dev/null 2>&1; then
1150 rm -rf conftest*
1151 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1152 #define _ALL_SOURCE 1
1155 else
1156 rm -rf conftest*
1157 echo "$ac_t""no" 1>&6
1159 rm -f conftest*
1162 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1163 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1164 echo "configure:1165: checking for minix/config.h" >&5
1165 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168 cat > conftest.$ac_ext <<EOF
1169 #line 1170 "configure"
1170 #include "confdefs.h"
1171 #include <minix/config.h>
1173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1174 { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1176 if test -z "$ac_err"; then
1177 rm -rf conftest*
1178 eval "ac_cv_header_$ac_safe=yes"
1179 else
1180 echo "$ac_err" >&5
1181 echo "configure: failed program was:" >&5
1182 cat conftest.$ac_ext >&5
1183 rm -rf conftest*
1184 eval "ac_cv_header_$ac_safe=no"
1186 rm -f conftest*
1188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1189 echo "$ac_t""yes" 1>&6
1190 MINIX=yes
1191 else
1192 echo "$ac_t""no" 1>&6
1193 MINIX=
1196 if test "$MINIX" = yes; then
1197 cat >> confdefs.h <<\EOF
1198 #define _POSIX_SOURCE 1
1201 cat >> confdefs.h <<\EOF
1202 #define _POSIX_1_SOURCE 2
1205 cat >> confdefs.h <<\EOF
1206 #define _MINIX 1
1212 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1213 echo "configure:1214: checking for Cygwin environment" >&5
1214 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1215 echo $ac_n "(cached) $ac_c" 1>&6
1216 else
1217 cat > conftest.$ac_ext <<EOF
1218 #line 1219 "configure"
1219 #include "confdefs.h"
1221 int main() {
1223 #ifndef __CYGWIN__
1224 #define __CYGWIN__ __CYGWIN32__
1225 #endif
1226 return __CYGWIN__;
1227 ; return 0; }
1229 if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1230 rm -rf conftest*
1231 ac_cv_cygwin=yes
1232 else
1233 echo "configure: failed program was:" >&5
1234 cat conftest.$ac_ext >&5
1235 rm -rf conftest*
1236 ac_cv_cygwin=no
1238 rm -f conftest*
1239 rm -f conftest*
1242 echo "$ac_t""$ac_cv_cygwin" 1>&6
1243 CYGWIN=
1244 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1245 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1246 echo "configure:1247: checking for mingw32 environment" >&5
1247 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1248 echo $ac_n "(cached) $ac_c" 1>&6
1249 else
1250 cat > conftest.$ac_ext <<EOF
1251 #line 1252 "configure"
1252 #include "confdefs.h"
1254 int main() {
1255 return __MINGW32__;
1256 ; return 0; }
1258 if { (eval echo configure:1259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1259 rm -rf conftest*
1260 ac_cv_mingw32=yes
1261 else
1262 echo "configure: failed program was:" >&5
1263 cat conftest.$ac_ext >&5
1264 rm -rf conftest*
1265 ac_cv_mingw32=no
1267 rm -f conftest*
1268 rm -f conftest*
1271 echo "$ac_t""$ac_cv_mingw32" 1>&6
1272 MINGW32=
1273 test "$ac_cv_mingw32" = yes && MINGW32=yes
1276 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1277 echo "configure:1278: checking for executable suffix" >&5
1278 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1279 echo $ac_n "(cached) $ac_c" 1>&6
1280 else
1281 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1282 ac_cv_exeext=.exe
1283 else
1284 rm -f conftest*
1285 echo 'int main () { return 0; }' > conftest.$ac_ext
1286 ac_cv_exeext=
1287 if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1288 for file in conftest.*; do
1289 case $file in
1290 *.c | *.o | *.obj) ;;
1291 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1292 esac
1293 done
1294 else
1295 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1297 rm -f conftest*
1298 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1302 EXEEXT=""
1303 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1304 echo "$ac_t""${ac_cv_exeext}" 1>&6
1305 ac_exeext=$EXEEXT
1307 echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
1308 echo "configure:1309: checking for --with-suffix" >&5
1309 # Check whether --with-suffix or --without-suffix was given.
1310 if test "${with_suffix+set}" = set; then
1311 withval="$with_suffix"
1313 case $withval in
1314 no) EXEEXT=;;
1315 yes) EXEEXT=.exe;;
1316 *) EXEEXT=$withval;;
1317 esac
1320 echo "$ac_t""$EXEEXT" 1>&6
1321 # Test whether we're running on a non-case-sensitive system, in which
1322 # case we give a warning if no ext is given
1323 if test -d "python" -a -z "$EXEEXT"
1324 then
1325 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1328 case $MACHDEP in
1329 bsdos*)
1330 case $CC in
1331 gcc) CC="$CC -D_HAVE_BSDI";;
1332 esac;;
1333 esac
1335 case $ac_sys_system in
1336 hp*|HP*)
1337 case $CC in
1338 cc|*/cc) CC="$CC -Ae";;
1339 esac;;
1340 Monterey*)
1341 case $CC in
1342 cc) CC="$CC -Wl,-Bexport";;
1343 esac;;
1344 SunOS*)
1345 # Some functions have a prototype only with that define, e.g. confstr
1346 cat >> confdefs.h <<\EOF
1347 #define __EXTENSIONS__ 1
1351 esac
1355 echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
1356 echo "configure:1357: checking LIBRARY" >&5
1357 if test -z "$LIBRARY"
1358 then
1359 LIBRARY='libpython$(VERSION).a'
1361 echo "$ac_t""$LIBRARY" 1>&6
1363 # LDLIBRARY is the name of the library to link against (as opposed to the
1364 # name of the library into which to insert object files). BLDLIBRARY is also
1365 # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1366 # is blank as the main program is not linked directly against LDLIBRARY.
1367 # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1368 # systems without shared libraries, LDLIBRARY is the same as LIBRARY
1369 # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1370 # DLLLIBRARY is the shared (i.e., DLL) library.
1376 LDLIBRARY="$LIBRARY"
1377 BLDLIBRARY='$(LDLIBRARY)'
1378 DLLLIBRARY=''
1379 LDLIBRARYDIR=''
1381 # LINKCC is the command that links the python executable -- default is $(CC).
1382 # This is altered for AIX in order to build the export list before
1383 # linking.
1385 echo $ac_n "checking LINKCC""... $ac_c" 1>&6
1386 echo "configure:1387: checking LINKCC" >&5
1387 if test -z "$LINKCC"
1388 then
1389 case $ac_sys_system in
1390 AIX*)
1391 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
1392 dgux*)
1393 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
1394 Monterey64*)
1395 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
1396 *) LINKCC="\$(PURIFY) \$(CC)";;
1397 esac
1399 echo "$ac_t""$LINKCC" 1>&6
1401 echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1402 echo "configure:1403: checking LDLIBRARY" >&5
1404 # DG/UX requires some fancy ld contortions to produce a .so from an .a
1405 case $MACHDEP in
1406 dguxR4)
1407 LDLIBRARY='libpython$(VERSION).so'
1408 OPT="$OPT -pic"
1410 beos*)
1411 LDLIBRARY='libpython$(VERSION).so'
1413 cygwin*)
1414 LDLIBRARY='libpython$(VERSION).dll.a'
1415 DLLLIBRARY='libpython$(VERSION).dll'
1417 esac
1419 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1420 # library that we build, but we do not want to link against it (we
1421 # will find it with a -framework option). For this reason there is an
1422 # extra variable BLDLIBRARY against which Python and the extension
1423 # modules are linked, BLDLIBRARY. This is normally the same as
1424 # LDLIBRARY, but empty for MacOSX framework builds.
1425 if test "$enable_framework"
1426 then
1427 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1428 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1429 BLDLIBRARY=''
1430 else
1431 BLDLIBRARY='$(LDLIBRARY)'
1434 echo "$ac_t""$LDLIBRARY" 1>&6
1436 # Extract the first word of "ranlib", so it can be a program name with args.
1437 set dummy ranlib; ac_word=$2
1438 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1439 echo "configure:1440: checking for $ac_word" >&5
1440 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1441 echo $ac_n "(cached) $ac_c" 1>&6
1442 else
1443 if test -n "$RANLIB"; then
1444 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1445 else
1446 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1447 ac_dummy="$PATH"
1448 for ac_dir in $ac_dummy; do
1449 test -z "$ac_dir" && ac_dir=.
1450 if test -f $ac_dir/$ac_word; then
1451 ac_cv_prog_RANLIB="ranlib"
1452 break
1454 done
1455 IFS="$ac_save_ifs"
1456 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1459 RANLIB="$ac_cv_prog_RANLIB"
1460 if test -n "$RANLIB"; then
1461 echo "$ac_t""$RANLIB" 1>&6
1462 else
1463 echo "$ac_t""no" 1>&6
1467 for ac_prog in ar aal
1469 # Extract the first word of "$ac_prog", so it can be a program name with args.
1470 set dummy $ac_prog; ac_word=$2
1471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1472 echo "configure:1473: checking for $ac_word" >&5
1473 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476 if test -n "$AR"; then
1477 ac_cv_prog_AR="$AR" # Let the user override the test.
1478 else
1479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1480 ac_dummy="$PATH"
1481 for ac_dir in $ac_dummy; do
1482 test -z "$ac_dir" && ac_dir=.
1483 if test -f $ac_dir/$ac_word; then
1484 ac_cv_prog_AR="$ac_prog"
1485 break
1487 done
1488 IFS="$ac_save_ifs"
1491 AR="$ac_cv_prog_AR"
1492 if test -n "$AR"; then
1493 echo "$ac_t""$AR" 1>&6
1494 else
1495 echo "$ac_t""no" 1>&6
1498 test -n "$AR" && break
1499 done
1500 test -n "$AR" || AR="ar"
1503 case $MACHDEP in
1504 bsdos*)
1505 # install -d does not work on BSDI
1506 if test -z "$INSTALL"
1507 then
1508 INSTALL="${srcdir}/install-sh -c"
1510 esac
1511 ac_aux_dir=
1512 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1513 if test -f $ac_dir/install-sh; then
1514 ac_aux_dir=$ac_dir
1515 ac_install_sh="$ac_aux_dir/install-sh -c"
1516 break
1517 elif test -f $ac_dir/install.sh; then
1518 ac_aux_dir=$ac_dir
1519 ac_install_sh="$ac_aux_dir/install.sh -c"
1520 break
1522 done
1523 if test -z "$ac_aux_dir"; then
1524 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1526 ac_config_guess=$ac_aux_dir/config.guess
1527 ac_config_sub=$ac_aux_dir/config.sub
1528 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1530 # Find a good install program. We prefer a C program (faster),
1531 # so one script is as good as another. But avoid the broken or
1532 # incompatible versions:
1533 # SysV /etc/install, /usr/sbin/install
1534 # SunOS /usr/etc/install
1535 # IRIX /sbin/install
1536 # AIX /bin/install
1537 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1538 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1539 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1540 # ./install, which can be erroneously created by make from ./install.sh.
1541 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1542 echo "configure:1543: checking for a BSD compatible install" >&5
1543 if test -z "$INSTALL"; then
1544 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1546 else
1547 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1548 for ac_dir in $PATH; do
1549 # Account for people who put trailing slashes in PATH elements.
1550 case "$ac_dir/" in
1551 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1553 # OSF1 and SCO ODT 3.0 have their own names for install.
1554 # Don't use installbsd from OSF since it installs stuff as root
1555 # by default.
1556 for ac_prog in ginstall scoinst install; do
1557 if test -f $ac_dir/$ac_prog; then
1558 if test $ac_prog = install &&
1559 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1560 # AIX install. It has an incompatible calling convention.
1562 else
1563 ac_cv_path_install="$ac_dir/$ac_prog -c"
1564 break 2
1567 done
1569 esac
1570 done
1571 IFS="$ac_save_IFS"
1574 if test "${ac_cv_path_install+set}" = set; then
1575 INSTALL="$ac_cv_path_install"
1576 else
1577 # As a last resort, use the slow shell script. We don't cache a
1578 # path for INSTALL within a source directory, because that will
1579 # break other packages using the cache if that directory is
1580 # removed, or if the path is relative.
1581 INSTALL="$ac_install_sh"
1584 echo "$ac_t""$INSTALL" 1>&6
1586 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1587 # It thinks the first close brace ends the variable substitution.
1588 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1590 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1592 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1595 # Not every filesystem supports hard links
1597 if test -z "$LN" ; then
1598 case $ac_sys_system in
1599 BeOS*) LN="ln -s";;
1600 CYGWIN*) LN="ln -s";;
1601 *) LN=ln;;
1602 esac
1605 # Check for --with-pydebug
1606 echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
1607 echo "configure:1608: checking for --with-pydebug" >&5
1608 # Check whether --with-pydebug or --without-pydebug was given.
1609 if test "${with_pydebug+set}" = set; then
1610 withval="$with_pydebug"
1612 if test "$withval" != no
1613 then cat >> confdefs.h <<\EOF
1614 #define Py_DEBUG 1
1616 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1617 else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1619 else
1620 echo "$ac_t""no" 1>&6
1624 # Optimizer/debugger flags
1626 if test -z "$OPT"
1627 then
1628 case $GCC in
1629 yes)
1630 case $ac_cv_prog_cc_g in
1631 yes)
1632 if test "$Py_DEBUG" = 'true' ; then
1633 # Optimization messes up debuggers, so turn it off for
1634 # debug builds.
1635 OPT="-g -Wall -Wstrict-prototypes"
1636 else
1637 OPT="-g -O3 -Wall -Wstrict-prototypes"
1638 fi;;
1640 OPT="-O3 -Wall -Wstrict-prototypes";;
1641 esac
1644 case $ac_sys_system in
1645 UnixWare*)
1646 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1648 OPT="-O";;
1649 esac
1650 esac
1651 case $ac_sys_system in
1652 Darwin*)
1653 OPT="$OPT -no-cpp-precomp";;
1654 esac
1657 # The current (beta) Monterey compiler dies with optimizations
1658 case $ac_sys_system in
1659 Monterey*) OPT="";;
1660 esac
1662 if test "$ac_arch_flags"
1663 then
1664 OPT="$OPT $ac_arch_flags"
1667 echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
1668 echo "configure:1669: checking whether $CC accepts -OPT:Olimit=0" >&5
1669 if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1670 echo $ac_n "(cached) $ac_c" 1>&6
1671 else
1672 ac_save_cc="$CC"
1673 CC="$CC -OPT:Olimit=0"
1674 if test "$cross_compiling" = yes; then
1675 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1676 else
1677 cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680 int main() { return 0; }
1682 if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1683 then
1684 ac_cv_opt_olimit_ok=yes
1685 else
1686 echo "configure: failed program was:" >&5
1687 cat conftest.$ac_ext >&5
1688 rm -fr conftest*
1689 ac_cv_opt_olimit_ok=no
1691 rm -fr conftest*
1694 CC="$ac_save_cc"
1697 echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
1698 if test $ac_cv_opt_olimit_ok = yes; then
1699 case $ac_sys_system in
1700 Darwin*) OPT="$OPT" ;;
1701 *) OPT="$OPT -OPT:Olimit=0";;
1702 esac
1703 else
1704 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
1705 echo "configure:1706: checking whether $CC accepts -Olimit 1500" >&5
1706 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1707 echo $ac_n "(cached) $ac_c" 1>&6
1708 else
1709 ac_save_cc="$CC"
1710 CC="$CC -Olimit 1500"
1711 if test "$cross_compiling" = yes; then
1712 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1713 else
1714 cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717 int main() { return 0; }
1719 if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1720 then
1721 ac_cv_olimit_ok=yes
1722 else
1723 echo "configure: failed program was:" >&5
1724 cat conftest.$ac_ext >&5
1725 rm -fr conftest*
1726 ac_cv_olimit_ok=no
1728 rm -fr conftest*
1731 CC="$ac_save_cc"
1734 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1735 if test $ac_cv_olimit_ok = yes; then
1736 OPT="$OPT -Olimit 1500"
1740 # -Kpthread, if available, provides the right #defines
1741 # and linker options to make pthread_create available
1742 echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
1743 echo "configure:1744: checking whether $CC accepts -Kpthread" >&5
1744 if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1745 echo $ac_n "(cached) $ac_c" 1>&6
1746 else
1747 ac_save_cc="$CC"
1748 CC="$CC -Kpthread"
1749 cat > conftest.$ac_ext <<EOF
1750 #line 1751 "configure"
1751 #include "confdefs.h"
1752 #include <pthread.h>
1753 int main() {
1754 pthread_create(0,0,0,0)
1755 ; return 0; }
1757 if { (eval echo configure:1758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1758 rm -rf conftest*
1759 ac_cv_kpthread=yes
1760 else
1761 echo "configure: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 rm -rf conftest*
1764 ac_cv_kpthread=no
1766 rm -f conftest*
1767 CC="$ac_save_cc"
1771 # GCC does not reject -Kpthread as an illegal option, it merely complains that
1772 # it is unrecognized
1773 if test "$GCC" = "yes"
1774 then ac_cv_kpthread="no, we have gcc"
1776 echo "$ac_t""$ac_cv_kpthread" 1>&6
1779 # checks for header files
1780 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1781 echo "configure:1782: checking for ANSI C header files" >&5
1782 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785 cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 #include <stdlib.h>
1789 #include <stdarg.h>
1790 #include <string.h>
1791 #include <float.h>
1793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1794 { (eval echo configure:1795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1796 if test -z "$ac_err"; then
1797 rm -rf conftest*
1798 ac_cv_header_stdc=yes
1799 else
1800 echo "$ac_err" >&5
1801 echo "configure: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 rm -rf conftest*
1804 ac_cv_header_stdc=no
1806 rm -f conftest*
1808 if test $ac_cv_header_stdc = yes; then
1809 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1810 cat > conftest.$ac_ext <<EOF
1811 #line 1812 "configure"
1812 #include "confdefs.h"
1813 #include <string.h>
1815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1816 egrep "memchr" >/dev/null 2>&1; then
1818 else
1819 rm -rf conftest*
1820 ac_cv_header_stdc=no
1822 rm -f conftest*
1826 if test $ac_cv_header_stdc = yes; then
1827 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1828 cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 #include <stdlib.h>
1833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1834 egrep "free" >/dev/null 2>&1; then
1836 else
1837 rm -rf conftest*
1838 ac_cv_header_stdc=no
1840 rm -f conftest*
1844 if test $ac_cv_header_stdc = yes; then
1845 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1846 if test "$cross_compiling" = yes; then
1848 else
1849 cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 #include <ctype.h>
1853 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1854 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1855 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1856 int main () { int i; for (i = 0; i < 256; i++)
1857 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1858 exit (0); }
1861 if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1862 then
1864 else
1865 echo "configure: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1867 rm -fr conftest*
1868 ac_cv_header_stdc=no
1870 rm -fr conftest*
1876 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1877 if test $ac_cv_header_stdc = yes; then
1878 cat >> confdefs.h <<\EOF
1879 #define STDC_HEADERS 1
1884 for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1885 ncurses.h poll.h pthread.h \
1886 signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
1887 sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
1888 sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
1889 sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1890 ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
1892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1894 echo "configure:1895: checking for $ac_hdr" >&5
1895 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
1897 else
1898 cat > conftest.$ac_ext <<EOF
1899 #line 1900 "configure"
1900 #include "confdefs.h"
1901 #include <$ac_hdr>
1903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1904 { (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1906 if test -z "$ac_err"; then
1907 rm -rf conftest*
1908 eval "ac_cv_header_$ac_safe=yes"
1909 else
1910 echo "$ac_err" >&5
1911 echo "configure: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 rm -rf conftest*
1914 eval "ac_cv_header_$ac_safe=no"
1916 rm -f conftest*
1918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1919 echo "$ac_t""yes" 1>&6
1920 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1921 cat >> confdefs.h <<EOF
1922 #define $ac_tr_hdr 1
1925 else
1926 echo "$ac_t""no" 1>&6
1928 done
1930 ac_header_dirent=no
1931 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1934 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1935 echo "configure:1936: checking for $ac_hdr that defines DIR" >&5
1936 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1937 echo $ac_n "(cached) $ac_c" 1>&6
1938 else
1939 cat > conftest.$ac_ext <<EOF
1940 #line 1941 "configure"
1941 #include "confdefs.h"
1942 #include <sys/types.h>
1943 #include <$ac_hdr>
1944 int main() {
1945 DIR *dirp = 0;
1946 ; return 0; }
1948 if { (eval echo configure:1949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1949 rm -rf conftest*
1950 eval "ac_cv_header_dirent_$ac_safe=yes"
1951 else
1952 echo "configure: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 rm -rf conftest*
1955 eval "ac_cv_header_dirent_$ac_safe=no"
1957 rm -f conftest*
1959 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1960 echo "$ac_t""yes" 1>&6
1961 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1962 cat >> confdefs.h <<EOF
1963 #define $ac_tr_hdr 1
1965 ac_header_dirent=$ac_hdr; break
1966 else
1967 echo "$ac_t""no" 1>&6
1969 done
1970 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1971 if test $ac_header_dirent = dirent.h; then
1972 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1973 echo "configure:1974: checking for opendir in -ldir" >&5
1974 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1976 echo $ac_n "(cached) $ac_c" 1>&6
1977 else
1978 ac_save_LIBS="$LIBS"
1979 LIBS="-ldir $LIBS"
1980 cat > conftest.$ac_ext <<EOF
1981 #line 1982 "configure"
1982 #include "confdefs.h"
1983 /* Override any gcc2 internal prototype to avoid an error. */
1984 /* We use char because int might match the return type of a gcc2
1985 builtin and then its argument prototype would still apply. */
1986 char opendir();
1988 int main() {
1989 opendir()
1990 ; return 0; }
1992 if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993 rm -rf conftest*
1994 eval "ac_cv_lib_$ac_lib_var=yes"
1995 else
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1998 rm -rf conftest*
1999 eval "ac_cv_lib_$ac_lib_var=no"
2001 rm -f conftest*
2002 LIBS="$ac_save_LIBS"
2005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2006 echo "$ac_t""yes" 1>&6
2007 LIBS="$LIBS -ldir"
2008 else
2009 echo "$ac_t""no" 1>&6
2012 else
2013 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2014 echo "configure:2015: checking for opendir in -lx" >&5
2015 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2016 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2017 echo $ac_n "(cached) $ac_c" 1>&6
2018 else
2019 ac_save_LIBS="$LIBS"
2020 LIBS="-lx $LIBS"
2021 cat > conftest.$ac_ext <<EOF
2022 #line 2023 "configure"
2023 #include "confdefs.h"
2024 /* Override any gcc2 internal prototype to avoid an error. */
2025 /* We use char because int might match the return type of a gcc2
2026 builtin and then its argument prototype would still apply. */
2027 char opendir();
2029 int main() {
2030 opendir()
2031 ; return 0; }
2033 if { (eval echo configure:2034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2034 rm -rf conftest*
2035 eval "ac_cv_lib_$ac_lib_var=yes"
2036 else
2037 echo "configure: failed program was:" >&5
2038 cat conftest.$ac_ext >&5
2039 rm -rf conftest*
2040 eval "ac_cv_lib_$ac_lib_var=no"
2042 rm -f conftest*
2043 LIBS="$ac_save_LIBS"
2046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2047 echo "$ac_t""yes" 1>&6
2048 LIBS="$LIBS -lx"
2049 else
2050 echo "$ac_t""no" 1>&6
2056 # checks for typedefs
2057 was_it_defined=no
2058 echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
2059 echo "configure:2060: checking for clock_t in time.h" >&5
2060 cat > conftest.$ac_ext <<EOF
2061 #line 2062 "configure"
2062 #include "confdefs.h"
2063 #include <time.h>
2065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2066 egrep "clock_t" >/dev/null 2>&1; then
2067 rm -rf conftest*
2068 was_it_defined=yes
2069 else
2070 rm -rf conftest*
2071 cat >> confdefs.h <<\EOF
2072 #define clock_t long
2076 rm -f conftest*
2078 echo "$ac_t""$was_it_defined" 1>&6
2080 # Add some code to confdefs.h so that the test for off_t works on SCO
2081 cat >> confdefs.h <<\EOF
2082 #if defined(SCO_DS)
2083 #undef _OFF_T
2084 #endif
2087 # Type availability checks
2088 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2089 echo "configure:2090: checking for mode_t" >&5
2090 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2091 echo $ac_n "(cached) $ac_c" 1>&6
2092 else
2093 cat > conftest.$ac_ext <<EOF
2094 #line 2095 "configure"
2095 #include "confdefs.h"
2096 #include <sys/types.h>
2097 #if STDC_HEADERS
2098 #include <stdlib.h>
2099 #include <stddef.h>
2100 #endif
2102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2103 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2104 rm -rf conftest*
2105 ac_cv_type_mode_t=yes
2106 else
2107 rm -rf conftest*
2108 ac_cv_type_mode_t=no
2110 rm -f conftest*
2113 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2114 if test $ac_cv_type_mode_t = no; then
2115 cat >> confdefs.h <<\EOF
2116 #define mode_t int
2121 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2122 echo "configure:2123: checking for off_t" >&5
2123 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126 cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 #include <sys/types.h>
2130 #if STDC_HEADERS
2131 #include <stdlib.h>
2132 #include <stddef.h>
2133 #endif
2135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2136 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2137 rm -rf conftest*
2138 ac_cv_type_off_t=yes
2139 else
2140 rm -rf conftest*
2141 ac_cv_type_off_t=no
2143 rm -f conftest*
2146 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2147 if test $ac_cv_type_off_t = no; then
2148 cat >> confdefs.h <<\EOF
2149 #define off_t long
2154 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2155 echo "configure:2156: checking for pid_t" >&5
2156 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2157 echo $ac_n "(cached) $ac_c" 1>&6
2158 else
2159 cat > conftest.$ac_ext <<EOF
2160 #line 2161 "configure"
2161 #include "confdefs.h"
2162 #include <sys/types.h>
2163 #if STDC_HEADERS
2164 #include <stdlib.h>
2165 #include <stddef.h>
2166 #endif
2168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2169 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2170 rm -rf conftest*
2171 ac_cv_type_pid_t=yes
2172 else
2173 rm -rf conftest*
2174 ac_cv_type_pid_t=no
2176 rm -f conftest*
2179 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2180 if test $ac_cv_type_pid_t = no; then
2181 cat >> confdefs.h <<\EOF
2182 #define pid_t int
2187 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2188 echo "configure:2189: checking return type of signal handlers" >&5
2189 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2190 echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192 cat > conftest.$ac_ext <<EOF
2193 #line 2194 "configure"
2194 #include "confdefs.h"
2195 #include <sys/types.h>
2196 #include <signal.h>
2197 #ifdef signal
2198 #undef signal
2199 #endif
2200 #ifdef __cplusplus
2201 extern "C" void (*signal (int, void (*)(int)))(int);
2202 #else
2203 void (*signal ()) ();
2204 #endif
2206 int main() {
2207 int i;
2208 ; return 0; }
2210 if { (eval echo configure:2211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2211 rm -rf conftest*
2212 ac_cv_type_signal=void
2213 else
2214 echo "configure: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2216 rm -rf conftest*
2217 ac_cv_type_signal=int
2219 rm -f conftest*
2222 echo "$ac_t""$ac_cv_type_signal" 1>&6
2223 cat >> confdefs.h <<EOF
2224 #define RETSIGTYPE $ac_cv_type_signal
2228 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2229 echo "configure:2230: checking for size_t" >&5
2230 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2231 echo $ac_n "(cached) $ac_c" 1>&6
2232 else
2233 cat > conftest.$ac_ext <<EOF
2234 #line 2235 "configure"
2235 #include "confdefs.h"
2236 #include <sys/types.h>
2237 #if STDC_HEADERS
2238 #include <stdlib.h>
2239 #include <stddef.h>
2240 #endif
2242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2243 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2244 rm -rf conftest*
2245 ac_cv_type_size_t=yes
2246 else
2247 rm -rf conftest*
2248 ac_cv_type_size_t=no
2250 rm -f conftest*
2253 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2254 if test $ac_cv_type_size_t = no; then
2255 cat >> confdefs.h <<\EOF
2256 #define size_t unsigned
2261 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2262 echo "configure:2263: checking for uid_t in sys/types.h" >&5
2263 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2264 echo $ac_n "(cached) $ac_c" 1>&6
2265 else
2266 cat > conftest.$ac_ext <<EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2269 #include <sys/types.h>
2271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2272 egrep "uid_t" >/dev/null 2>&1; then
2273 rm -rf conftest*
2274 ac_cv_type_uid_t=yes
2275 else
2276 rm -rf conftest*
2277 ac_cv_type_uid_t=no
2279 rm -f conftest*
2283 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2284 if test $ac_cv_type_uid_t = no; then
2285 cat >> confdefs.h <<\EOF
2286 #define uid_t int
2289 cat >> confdefs.h <<\EOF
2290 #define gid_t int
2296 # Sizes of various common basic types
2297 echo $ac_n "checking size of int""... $ac_c" 1>&6
2298 echo "configure:2299: checking size of int" >&5
2299 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2300 echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302 if test "$cross_compiling" = yes; then
2303 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2304 else
2305 cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <stdio.h>
2309 main()
2311 FILE *f=fopen("conftestval", "w");
2312 if (!f) exit(1);
2313 fprintf(f, "%d\n", sizeof(int));
2314 exit(0);
2317 if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2318 then
2319 ac_cv_sizeof_int=`cat conftestval`
2320 else
2321 echo "configure: failed program was:" >&5
2322 cat conftest.$ac_ext >&5
2323 rm -fr conftest*
2324 ac_cv_sizeof_int=0
2326 rm -fr conftest*
2330 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2331 cat >> confdefs.h <<EOF
2332 #define SIZEOF_INT $ac_cv_sizeof_int
2336 echo $ac_n "checking size of long""... $ac_c" 1>&6
2337 echo "configure:2338: checking size of long" >&5
2338 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2339 echo $ac_n "(cached) $ac_c" 1>&6
2340 else
2341 if test "$cross_compiling" = yes; then
2342 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2343 else
2344 cat > conftest.$ac_ext <<EOF
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347 #include <stdio.h>
2348 main()
2350 FILE *f=fopen("conftestval", "w");
2351 if (!f) exit(1);
2352 fprintf(f, "%d\n", sizeof(long));
2353 exit(0);
2356 if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2357 then
2358 ac_cv_sizeof_long=`cat conftestval`
2359 else
2360 echo "configure: failed program was:" >&5
2361 cat conftest.$ac_ext >&5
2362 rm -fr conftest*
2363 ac_cv_sizeof_long=0
2365 rm -fr conftest*
2369 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2370 cat >> confdefs.h <<EOF
2371 #define SIZEOF_LONG $ac_cv_sizeof_long
2375 echo $ac_n "checking size of void *""... $ac_c" 1>&6
2376 echo "configure:2377: checking size of void *" >&5
2377 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2378 echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380 if test "$cross_compiling" = yes; then
2381 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2382 else
2383 cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #include <stdio.h>
2387 main()
2389 FILE *f=fopen("conftestval", "w");
2390 if (!f) exit(1);
2391 fprintf(f, "%d\n", sizeof(void *));
2392 exit(0);
2395 if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2396 then
2397 ac_cv_sizeof_void_p=`cat conftestval`
2398 else
2399 echo "configure: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 rm -fr conftest*
2402 ac_cv_sizeof_void_p=0
2404 rm -fr conftest*
2408 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2409 cat >> confdefs.h <<EOF
2410 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2414 echo $ac_n "checking size of char""... $ac_c" 1>&6
2415 echo "configure:2416: checking size of char" >&5
2416 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418 else
2419 if test "$cross_compiling" = yes; then
2420 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2421 else
2422 cat > conftest.$ac_ext <<EOF
2423 #line 2424 "configure"
2424 #include "confdefs.h"
2425 #include <stdio.h>
2426 main()
2428 FILE *f=fopen("conftestval", "w");
2429 if (!f) exit(1);
2430 fprintf(f, "%d\n", sizeof(char));
2431 exit(0);
2434 if { (eval echo configure:2435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2435 then
2436 ac_cv_sizeof_char=`cat conftestval`
2437 else
2438 echo "configure: failed program was:" >&5
2439 cat conftest.$ac_ext >&5
2440 rm -fr conftest*
2441 ac_cv_sizeof_char=0
2443 rm -fr conftest*
2447 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2448 cat >> confdefs.h <<EOF
2449 #define SIZEOF_CHAR $ac_cv_sizeof_char
2453 echo $ac_n "checking size of short""... $ac_c" 1>&6
2454 echo "configure:2455: checking size of short" >&5
2455 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2456 echo $ac_n "(cached) $ac_c" 1>&6
2457 else
2458 if test "$cross_compiling" = yes; then
2459 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2460 else
2461 cat > conftest.$ac_ext <<EOF
2462 #line 2463 "configure"
2463 #include "confdefs.h"
2464 #include <stdio.h>
2465 main()
2467 FILE *f=fopen("conftestval", "w");
2468 if (!f) exit(1);
2469 fprintf(f, "%d\n", sizeof(short));
2470 exit(0);
2473 if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2474 then
2475 ac_cv_sizeof_short=`cat conftestval`
2476 else
2477 echo "configure: failed program was:" >&5
2478 cat conftest.$ac_ext >&5
2479 rm -fr conftest*
2480 ac_cv_sizeof_short=0
2482 rm -fr conftest*
2486 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2487 cat >> confdefs.h <<EOF
2488 #define SIZEOF_SHORT $ac_cv_sizeof_short
2492 echo $ac_n "checking size of float""... $ac_c" 1>&6
2493 echo "configure:2494: checking size of float" >&5
2494 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2495 echo $ac_n "(cached) $ac_c" 1>&6
2496 else
2497 if test "$cross_compiling" = yes; then
2498 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2499 else
2500 cat > conftest.$ac_ext <<EOF
2501 #line 2502 "configure"
2502 #include "confdefs.h"
2503 #include <stdio.h>
2504 main()
2506 FILE *f=fopen("conftestval", "w");
2507 if (!f) exit(1);
2508 fprintf(f, "%d\n", sizeof(float));
2509 exit(0);
2512 if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2513 then
2514 ac_cv_sizeof_float=`cat conftestval`
2515 else
2516 echo "configure: failed program was:" >&5
2517 cat conftest.$ac_ext >&5
2518 rm -fr conftest*
2519 ac_cv_sizeof_float=0
2521 rm -fr conftest*
2525 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2526 cat >> confdefs.h <<EOF
2527 #define SIZEOF_FLOAT $ac_cv_sizeof_float
2531 echo $ac_n "checking size of double""... $ac_c" 1>&6
2532 echo "configure:2533: checking size of double" >&5
2533 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2534 echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536 if test "$cross_compiling" = yes; then
2537 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2538 else
2539 cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542 #include <stdio.h>
2543 main()
2545 FILE *f=fopen("conftestval", "w");
2546 if (!f) exit(1);
2547 fprintf(f, "%d\n", sizeof(double));
2548 exit(0);
2551 if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2552 then
2553 ac_cv_sizeof_double=`cat conftestval`
2554 else
2555 echo "configure: failed program was:" >&5
2556 cat conftest.$ac_ext >&5
2557 rm -fr conftest*
2558 ac_cv_sizeof_double=0
2560 rm -fr conftest*
2564 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2565 cat >> confdefs.h <<EOF
2566 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
2570 echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
2571 echo "configure:2572: checking size of fpos_t" >&5
2572 if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575 if test "$cross_compiling" = yes; then
2576 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2577 else
2578 cat > conftest.$ac_ext <<EOF
2579 #line 2580 "configure"
2580 #include "confdefs.h"
2581 #include <stdio.h>
2582 main()
2584 FILE *f=fopen("conftestval", "w");
2585 if (!f) exit(1);
2586 fprintf(f, "%d\n", sizeof(fpos_t));
2587 exit(0);
2590 if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2591 then
2592 ac_cv_sizeof_fpos_t=`cat conftestval`
2593 else
2594 echo "configure: failed program was:" >&5
2595 cat conftest.$ac_ext >&5
2596 rm -fr conftest*
2597 ac_cv_sizeof_fpos_t=0
2599 rm -fr conftest*
2603 echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2604 cat >> confdefs.h <<EOF
2605 #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2610 echo $ac_n "checking for long long support""... $ac_c" 1>&6
2611 echo "configure:2612: checking for long long support" >&5
2612 have_long_long=no
2613 cat > conftest.$ac_ext <<EOF
2614 #line 2615 "configure"
2615 #include "confdefs.h"
2617 int main() {
2618 long long x; x = (long long)0;
2619 ; return 0; }
2621 if { (eval echo configure:2622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2622 rm -rf conftest*
2623 cat >> confdefs.h <<\EOF
2624 #define HAVE_LONG_LONG 1
2626 have_long_long=yes
2627 else
2628 echo "configure: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2631 rm -f conftest*
2632 echo "$ac_t""$have_long_long" 1>&6
2633 if test "$have_long_long" = yes ; then
2634 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2635 echo "configure:2636: checking size of long long" >&5
2636 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2637 echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639 if test "$cross_compiling" = yes; then
2640 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2641 else
2642 cat > conftest.$ac_ext <<EOF
2643 #line 2644 "configure"
2644 #include "confdefs.h"
2645 #include <stdio.h>
2646 main()
2648 FILE *f=fopen("conftestval", "w");
2649 if (!f) exit(1);
2650 fprintf(f, "%d\n", sizeof(long long));
2651 exit(0);
2654 if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2655 then
2656 ac_cv_sizeof_long_long=`cat conftestval`
2657 else
2658 echo "configure: failed program was:" >&5
2659 cat conftest.$ac_ext >&5
2660 rm -fr conftest*
2661 ac_cv_sizeof_long_long=0
2663 rm -fr conftest*
2667 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2668 cat >> confdefs.h <<EOF
2669 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2675 echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
2676 echo "configure:2677: checking for uintptr_t support" >&5
2677 have_uintptr_t=no
2678 cat > conftest.$ac_ext <<EOF
2679 #line 2680 "configure"
2680 #include "confdefs.h"
2682 int main() {
2683 uintptr_t x; x = (uintptr_t)0;
2684 ; return 0; }
2686 if { (eval echo configure:2687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2687 rm -rf conftest*
2688 cat >> confdefs.h <<\EOF
2689 #define HAVE_UINTPTR_T 1
2691 have_uintptr_t=yes
2692 else
2693 echo "configure: failed program was:" >&5
2694 cat conftest.$ac_ext >&5
2696 rm -f conftest*
2697 echo "$ac_t""$have_uintptr_t" 1>&6
2698 if test "$have_uintptr_t" = yes ; then
2699 echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
2700 echo "configure:2701: checking size of uintptr_t" >&5
2701 if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2702 echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704 if test "$cross_compiling" = yes; then
2705 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2706 else
2707 cat > conftest.$ac_ext <<EOF
2708 #line 2709 "configure"
2709 #include "confdefs.h"
2710 #include <stdio.h>
2711 main()
2713 FILE *f=fopen("conftestval", "w");
2714 if (!f) exit(1);
2715 fprintf(f, "%d\n", sizeof(uintptr_t));
2716 exit(0);
2719 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2720 then
2721 ac_cv_sizeof_uintptr_t=`cat conftestval`
2722 else
2723 echo "configure: failed program was:" >&5
2724 cat conftest.$ac_ext >&5
2725 rm -fr conftest*
2726 ac_cv_sizeof_uintptr_t=0
2728 rm -fr conftest*
2732 echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2733 cat >> confdefs.h <<EOF
2734 #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2740 # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2741 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
2742 echo "configure:2743: checking size of off_t" >&5
2743 if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2744 echo $ac_n "(cached) $ac_c" 1>&6
2745 else
2746 if test "$cross_compiling" = yes; then
2747 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2748 else
2749 cat > conftest.$ac_ext <<EOF
2750 #line 2751 "configure"
2751 #include "confdefs.h"
2752 #include <stdio.h>
2753 #include <sys/types.h>
2754 main()
2756 FILE *f=fopen("conftestval", "w");
2757 if (!f) exit(1);
2758 fprintf(f, "%d\n", sizeof(off_t));
2759 exit(0);
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2763 then
2764 ac_cv_sizeof_off_t=`cat conftestval`
2765 else
2766 echo "configure: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 rm -fr conftest*
2769 ac_cv_sizeof_off_t=0
2771 rm -fr conftest*
2777 echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2778 cat >> confdefs.h <<EOF
2779 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2783 echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
2784 echo "configure:2785: checking whether to enable large file support" >&5
2785 if test "$have_long_long" = yes -a \
2786 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2787 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
2788 cat >> confdefs.h <<\EOF
2789 #define HAVE_LARGEFILE_SUPPORT 1
2792 echo "$ac_t""yes" 1>&6
2793 else
2794 echo "$ac_t""no" 1>&6
2797 # AC_CHECK_SIZEOF() doesn't include <time.h>.
2798 echo $ac_n "checking size of time_t""... $ac_c" 1>&6
2799 echo "configure:2800: checking size of time_t" >&5
2800 if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2801 echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803 if test "$cross_compiling" = yes; then
2804 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2805 else
2806 cat > conftest.$ac_ext <<EOF
2807 #line 2808 "configure"
2808 #include "confdefs.h"
2809 #include <stdio.h>
2810 #include <time.h>
2811 main()
2813 FILE *f=fopen("conftestval", "w");
2814 if (!f) exit(1);
2815 fprintf(f, "%d\n", sizeof(time_t));
2816 exit(0);
2819 if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2820 then
2821 ac_cv_sizeof_time_t=`cat conftestval`
2822 else
2823 echo "configure: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 rm -fr conftest*
2826 ac_cv_sizeof_time_t=0
2828 rm -fr conftest*
2834 echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2835 cat >> confdefs.h <<EOF
2836 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2841 # if have pthread_t then define SIZEOF_PTHREAD_T
2842 ac_save_cc="$CC"
2843 if test "$ac_cv_kpthread" = "yes"
2844 then CC="$CC -Kpthread"
2846 echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
2847 echo "configure:2848: checking for pthread_t" >&5
2848 have_pthread_t=no
2849 cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 #include <pthread.h>
2853 int main() {
2854 pthread_t x; x = *(pthread_t*)0;
2855 ; return 0; }
2857 if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2858 rm -rf conftest*
2859 have_pthread_t=yes
2860 else
2861 echo "configure: failed program was:" >&5
2862 cat conftest.$ac_ext >&5
2864 rm -f conftest*
2865 echo "$ac_t""$have_pthread_t" 1>&6
2866 if test "$have_pthread_t" = yes ; then
2867 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2868 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
2869 echo "configure:2870: checking size of pthread_t" >&5
2870 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2871 echo $ac_n "(cached) $ac_c" 1>&6
2872 else
2873 if test "$cross_compiling" = yes; then
2874 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2875 else
2876 cat > conftest.$ac_ext <<EOF
2877 #line 2878 "configure"
2878 #include "confdefs.h"
2879 #include <stdio.h>
2880 #include <pthread.h>
2881 main()
2883 FILE *f=fopen("conftestval", "w");
2884 if (!f) exit(1);
2885 fprintf(f, "%d\n", sizeof(pthread_t));
2886 exit(0);
2889 if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2890 then
2891 ac_cv_sizeof_pthread_t=`cat conftestval`
2892 else
2893 echo "configure: failed program was:" >&5
2894 cat conftest.$ac_ext >&5
2895 rm -fr conftest*
2896 ac_cv_sizeof_pthread_t=0
2898 rm -fr conftest*
2904 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2905 cat >> confdefs.h <<EOF
2906 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2910 CC="$ac_save_cc"
2912 echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
2913 echo "configure:2914: checking for --enable-toolbox-glue" >&5
2914 # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2915 if test "${enable_toolbox_glue+set}" = set; then
2916 enableval="$enable_toolbox_glue"
2921 if test -z "$enable_toolbox_glue"
2922 then
2923 case $ac_sys_system/$ac_sys_release in
2924 Darwin/*)
2925 enable_toolbox_glue="yes";;
2927 enable_toolbox_glue="no";;
2928 esac
2930 case "$enable_toolbox_glue" in
2931 yes)
2932 extra_frameworks="-framework Carbon -framework Foundation"
2933 extra_machdep_objs="Python/mactoolboxglue.o"
2934 extra_undefs="-u __dummy -u _PyMac_Error"
2935 cat >> confdefs.h <<\EOF
2936 #define USE_TOOLBOX_OBJECT_GLUE 1
2941 extra_frameworks=""
2942 extra_machdep_objs=""
2943 extra_undefs=""
2945 esac
2946 echo "$ac_t""$enable_toolbox_glue" 1>&6
2949 case $ac_sys_system/$ac_sys_release in
2950 Darwin/*)
2951 ns_undef_sym='_environ'
2952 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
2953 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2955 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
2956 esac
2958 echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
2959 echo "configure:2960: checking for --enable-framework" >&5
2960 if test "$enable_framework"
2961 then
2962 OPT="$OPT -fno-common -dynamic"
2963 # -U __environ is needed since bundles don't have access
2964 # to crt0 when built but will always be linked against it
2965 # -F. is needed to allow linking to the framework while
2966 # in the build location.
2968 LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym"
2969 cat >> confdefs.h <<\EOF
2970 #define WITH_NEXT_FRAMEWORK 1
2973 echo "$ac_t""yes" 1>&6
2974 else
2975 echo "$ac_t""no" 1>&6
2978 echo $ac_n "checking for dyld""... $ac_c" 1>&6
2979 echo "configure:2980: checking for dyld" >&5
2980 case $ac_sys_system/$ac_sys_release in
2981 Darwin/*)
2982 cat >> confdefs.h <<\EOF
2983 #define WITH_DYLD 1
2986 echo "$ac_t""always on for Darwin" 1>&6
2989 echo "$ac_t""no" 1>&6
2991 esac
2993 # Set info about shared libraries.
2999 # SO is the extension of shared libraries `(including the dot!)
3000 # -- usually .so, .sl on HP-UX, .dll on Cygwin
3001 echo $ac_n "checking SO""... $ac_c" 1>&6
3002 echo "configure:3003: checking SO" >&5
3003 if test -z "$SO"
3004 then
3005 case $ac_sys_system in
3006 hp*|HP*) SO=.sl;;
3007 CYGWIN*) SO=.dll;;
3008 *) SO=.so;;
3009 esac
3011 echo "$ac_t""$SO" 1>&6
3012 # LDSHARED is the ld *command* used to create shared library
3013 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
3014 # (Shared libraries in this instance are shared modules to be loaded into
3015 # Python, as opposed to building Python itself as a shared library.)
3016 echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
3017 echo "configure:3018: checking LDSHARED" >&5
3018 if test -z "$LDSHARED"
3019 then
3020 case $ac_sys_system/$ac_sys_release in
3021 AIX*)
3022 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3023 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3025 BeOS*)
3026 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3027 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3029 IRIX/5*) LDSHARED="ld -shared";;
3030 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
3031 SunOS/4*) LDSHARED="ld";;
3032 SunOS/5*)
3033 if test "$GCC" = "yes"
3034 then LDSHARED='$(CC) -shared'
3035 else LDSHARED="ld -G";
3036 fi ;;
3037 hp*|HP*) LDSHARED="ld -b";;
3038 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3039 DYNIX/ptx*) LDSHARED="ld -G";;
3040 Darwin/*)
3041 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3042 if test "$enable_framework" ; then
3043 # Link against the framework. All externals should be defined.
3044 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3045 else
3046 # No framework. Ignore undefined symbols, assuming they come from Python
3047 LDSHARED="$LDSHARED -undefined suppress"
3048 fi ;;
3049 Linux*) LDSHARED="gcc -shared";;
3050 dgux*) LDSHARED="ld -G";;
3051 BSD/OS*/4*) LDSHARED="gcc -shared";;
3052 OpenBSD*|NetBSD*|FreeBSD*)
3053 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3054 then
3055 LDSHARED="cc -shared ${LDFLAGS}"
3056 else
3057 LDSHARED="ld -Bshareable ${LDFLAGS}"
3058 fi;;
3059 UnixWare*)
3060 if test "$GCC" = "yes"
3061 then LDSHARED="$(CC) -shared"
3062 else LDSHARED="$(CC) -G"
3063 fi;;
3064 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
3065 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
3066 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
3067 *) LDSHARED="ld";;
3068 esac
3070 echo "$ac_t""$LDSHARED" 1>&6
3071 BLDSHARED=${BLDSHARED-$LDSHARED}
3072 # CCSHARED are the C *flags* used to create objects to go into a shared
3073 # library (module) -- this is only needed for a few systems
3074 echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
3075 echo "configure:3076: checking CCSHARED" >&5
3076 if test -z "$CCSHARED"
3077 then
3078 case $ac_sys_system/$ac_sys_release in
3079 SunOS*) if test "$GCC" = yes;
3080 then CCSHARED="-fPIC";
3081 fi;;
3082 hp*|HP*) if test "$GCC" = yes;
3083 then CCSHARED="-fPIC";
3084 else CCSHARED="+z";
3085 fi;;
3086 Linux*) CCSHARED="-fPIC";;
3087 BSD/OS*/4*) CCSHARED="-fpic";;
3088 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
3089 UnixWare*)
3090 if test "$GCC" = "yes"
3091 then CCSHARED="-fPIC"
3092 else CCSHARED="-KPIC"
3093 fi;;
3094 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
3095 Monterey*) CCSHARED="-G";;
3096 IRIX*/6*) case $CC in
3097 *gcc*) CCSHARED="-shared";;
3098 *) CCSHARED="";;
3099 esac;;
3100 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
3101 esac
3103 echo "$ac_t""$CCSHARED" 1>&6
3104 # LINKFORSHARED are the flags passed to the $(CC) command that links
3105 # the python executable -- this is only needed for a few systems
3106 echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
3107 echo "configure:3108: checking LINKFORSHARED" >&5
3108 if test -z "$LINKFORSHARED"
3109 then
3110 case $ac_sys_system/$ac_sys_release in
3111 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
3112 hp*|HP*)
3113 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
3114 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
3115 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
3116 # -u libsys_s pulls in all symbols in libsys
3117 Darwin/*)
3118 # -u __dummy makes the linker aware of the objc runtime
3119 # in System.framework; otherwise, __objcInit (referenced in
3120 # crt1.o) gets erroneously defined as common, which breaks dynamic
3121 # loading of any modules which reference it in System.framework.
3122 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3123 # not used by the core itself but which needs to be in the core so
3124 # that dynamically loaded extension modules have access to it.
3125 LINKFORSHARED="$extra_undefs -framework System"
3126 if test "$enable_framework"
3127 then
3128 LINKFORSHARED="$LINKFORSHARED -framework Python"
3130 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
3131 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
3132 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
3133 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
3134 FreeBSD*|NetBSD*|OpenBSD*)
3135 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3136 then
3137 LINKFORSHARED="-Wl,--export-dynamic"
3138 fi;;
3139 SunOS/5*) case $CC in
3140 *gcc*)
3141 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
3142 then
3143 LINKFORSHARED="-Xlinker --export-dynamic"
3144 fi;;
3145 esac;;
3146 esac
3148 echo "$ac_t""$LINKFORSHARED" 1>&6
3151 echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
3152 echo "configure:3153: checking CFLAGSFORSHARED" >&5
3153 if test ! "$LIBRARY" = "$LDLIBRARY"
3154 then
3155 case $ac_sys_system in
3156 CYGWIN*)
3157 # Cygwin needs CCSHARED when building extension DLLs
3158 # but not when building the interpreter DLL.
3159 CFLAGSFORSHARED='';;
3161 CFLAGSFORSHARED='$(CCSHARED)'
3162 esac
3164 echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3166 # checks for libraries
3167 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3168 echo "configure:3169: checking for dlopen in -ldl" >&5
3169 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3171 echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173 ac_save_LIBS="$LIBS"
3174 LIBS="-ldl $LIBS"
3175 cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178 /* Override any gcc2 internal prototype to avoid an error. */
3179 /* We use char because int might match the return type of a gcc2
3180 builtin and then its argument prototype would still apply. */
3181 char dlopen();
3183 int main() {
3184 dlopen()
3185 ; return 0; }
3187 if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3188 rm -rf conftest*
3189 eval "ac_cv_lib_$ac_lib_var=yes"
3190 else
3191 echo "configure: failed program was:" >&5
3192 cat conftest.$ac_ext >&5
3193 rm -rf conftest*
3194 eval "ac_cv_lib_$ac_lib_var=no"
3196 rm -f conftest*
3197 LIBS="$ac_save_LIBS"
3200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3201 echo "$ac_t""yes" 1>&6
3202 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3203 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3204 cat >> confdefs.h <<EOF
3205 #define $ac_tr_lib 1
3208 LIBS="-ldl $LIBS"
3210 else
3211 echo "$ac_t""no" 1>&6
3213 # Dynamic linking for SunOS/Solaris and SYSV
3214 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
3215 echo "configure:3216: checking for shl_load in -ldld" >&5
3216 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3217 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3218 echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220 ac_save_LIBS="$LIBS"
3221 LIBS="-ldld $LIBS"
3222 cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 /* Override any gcc2 internal prototype to avoid an error. */
3226 /* We use char because int might match the return type of a gcc2
3227 builtin and then its argument prototype would still apply. */
3228 char shl_load();
3230 int main() {
3231 shl_load()
3232 ; return 0; }
3234 if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3235 rm -rf conftest*
3236 eval "ac_cv_lib_$ac_lib_var=yes"
3237 else
3238 echo "configure: failed program was:" >&5
3239 cat conftest.$ac_ext >&5
3240 rm -rf conftest*
3241 eval "ac_cv_lib_$ac_lib_var=no"
3243 rm -f conftest*
3244 LIBS="$ac_save_LIBS"
3247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3248 echo "$ac_t""yes" 1>&6
3249 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3250 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3251 cat >> confdefs.h <<EOF
3252 #define $ac_tr_lib 1
3255 LIBS="-ldld $LIBS"
3257 else
3258 echo "$ac_t""no" 1>&6
3260 # Dynamic linking for HP-UX
3262 # checks for system dependent C++ extensions support
3263 case "$ac_sys_system" in
3264 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
3265 echo "configure:3266: checking for genuine AIX C++ extensions support" >&5
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include "/usr/lpp/xlC/include/load.h"
3270 int main() {
3271 loadAndInit("", 0, "")
3272 ; return 0; }
3274 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3275 rm -rf conftest*
3276 cat >> confdefs.h <<\EOF
3277 #define AIX_GENUINE_CPLUSPLUS 1
3280 echo "$ac_t""yes" 1>&6
3281 else
3282 echo "configure: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 rm -rf conftest*
3285 echo "$ac_t""no" 1>&6
3287 rm -f conftest*;;
3288 *) ;;
3289 esac
3291 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3292 # However on SGI IRIX, these exist but are broken.
3293 # BeOS' sockets are stashed in libnet.
3294 case "$ac_sys_system" in
3295 IRIX*) ;;
3297 echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
3298 echo "configure:3299: checking for t_open in -lnsl" >&5
3299 ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3301 echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303 ac_save_LIBS="$LIBS"
3304 LIBS="-lnsl $LIBS"
3305 cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 /* Override any gcc2 internal prototype to avoid an error. */
3309 /* We use char because int might match the return type of a gcc2
3310 builtin and then its argument prototype would still apply. */
3311 char t_open();
3313 int main() {
3314 t_open()
3315 ; return 0; }
3317 if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3318 rm -rf conftest*
3319 eval "ac_cv_lib_$ac_lib_var=yes"
3320 else
3321 echo "configure: failed program was:" >&5
3322 cat conftest.$ac_ext >&5
3323 rm -rf conftest*
3324 eval "ac_cv_lib_$ac_lib_var=no"
3326 rm -f conftest*
3327 LIBS="$ac_save_LIBS"
3330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3331 echo "$ac_t""yes" 1>&6
3332 LIBS="-lnsl $LIBS"
3333 else
3334 echo "$ac_t""no" 1>&6
3336 # SVR4
3337 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3338 echo "configure:3339: checking for socket in -lsocket" >&5
3339 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3341 echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343 ac_save_LIBS="$LIBS"
3344 LIBS="-lsocket $LIBS $LIBS"
3345 cat > conftest.$ac_ext <<EOF
3346 #line 3347 "configure"
3347 #include "confdefs.h"
3348 /* Override any gcc2 internal prototype to avoid an error. */
3349 /* We use char because int might match the return type of a gcc2
3350 builtin and then its argument prototype would still apply. */
3351 char socket();
3353 int main() {
3354 socket()
3355 ; return 0; }
3357 if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3358 rm -rf conftest*
3359 eval "ac_cv_lib_$ac_lib_var=yes"
3360 else
3361 echo "configure: failed program was:" >&5
3362 cat conftest.$ac_ext >&5
3363 rm -rf conftest*
3364 eval "ac_cv_lib_$ac_lib_var=no"
3366 rm -f conftest*
3367 LIBS="$ac_save_LIBS"
3370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3371 echo "$ac_t""yes" 1>&6
3372 LIBS="-lsocket $LIBS"
3373 else
3374 echo "$ac_t""no" 1>&6
3376 # SVR4 sockets
3378 esac
3379 case "$ac_sys_system" in
3380 BeOS*)
3381 echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3382 echo "configure:3383: checking for socket in -lnet" >&5
3383 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3384 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3385 echo $ac_n "(cached) $ac_c" 1>&6
3386 else
3387 ac_save_LIBS="$LIBS"
3388 LIBS="-lnet $LIBS $LIBS"
3389 cat > conftest.$ac_ext <<EOF
3390 #line 3391 "configure"
3391 #include "confdefs.h"
3392 /* Override any gcc2 internal prototype to avoid an error. */
3393 /* We use char because int might match the return type of a gcc2
3394 builtin and then its argument prototype would still apply. */
3395 char socket();
3397 int main() {
3398 socket()
3399 ; return 0; }
3401 if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3402 rm -rf conftest*
3403 eval "ac_cv_lib_$ac_lib_var=yes"
3404 else
3405 echo "configure: failed program was:" >&5
3406 cat conftest.$ac_ext >&5
3407 rm -rf conftest*
3408 eval "ac_cv_lib_$ac_lib_var=no"
3410 rm -f conftest*
3411 LIBS="$ac_save_LIBS"
3414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3415 echo "$ac_t""yes" 1>&6
3416 LIBS="-lnet $LIBS"
3417 else
3418 echo "$ac_t""no" 1>&6
3420 # BeOS
3422 esac
3424 echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
3425 echo "configure:3426: checking for --with-libs" >&5
3426 # Check whether --with-libs or --without-libs was given.
3427 if test "${with_libs+set}" = set; then
3428 withval="$with_libs"
3430 echo "$ac_t""$withval" 1>&6
3431 LIBS="$withval $LIBS"
3433 else
3434 echo "$ac_t""no" 1>&6
3438 # Determine if signalmodule should be used.
3441 echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
3442 echo "configure:3443: checking for --with-signal-module" >&5
3443 # Check whether --with-signal-module or --without-signal-module was given.
3444 if test "${with_signal_module+set}" = set; then
3445 withval="$with_signal_module"
3450 if test -z "$with_signal_module"
3451 then with_signal_module="yes"
3453 echo "$ac_t""$with_signal_module" 1>&6
3455 if test "${with_signal_module}" = "yes"; then
3456 USE_SIGNAL_MODULE=""
3457 SIGNAL_OBJS=""
3458 else
3459 USE_SIGNAL_MODULE="#"
3460 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3463 # This is used to generate Setup.config
3465 USE_THREAD_MODULE=""
3467 echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
3468 echo "configure:3469: checking for --with-dec-threads" >&5
3470 # Check whether --with-dec-threads or --without-dec-threads was given.
3471 if test "${with_dec_threads+set}" = set; then
3472 withval="$with_dec_threads"
3474 echo "$ac_t""$withval" 1>&6
3475 LDLAST=-threads
3476 if test "${with_thread+set}" != set; then
3477 with_thread="$withval";
3479 else
3480 echo "$ac_t""no" 1>&6
3484 echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
3485 echo "configure:3486: checking for --with-threads" >&5
3486 # Check whether --with-threads or --without-threads was given.
3487 if test "${with_threads+set}" = set; then
3488 withval="$with_threads"
3493 # --with-thread is deprecated, but check for it anyway
3494 # Check whether --with-thread or --without-thread was given.
3495 if test "${with_thread+set}" = set; then
3496 withval="$with_thread"
3498 with_threads=$with_thread
3502 if test -z "$with_threads"
3503 then with_threads="yes"
3505 echo "$ac_t""$with_threads" 1>&6
3507 if test "$with_threads" = "no"
3508 then
3509 USE_THREAD_MODULE="#"
3510 elif test "$ac_cv_kpthread" = "yes"
3511 then
3512 CC="$CC -Kpthread"
3513 cat >> confdefs.h <<\EOF
3514 #define WITH_THREAD 1
3517 cat >> confdefs.h <<\EOF
3518 #define _POSIX_THREADS 1
3521 LIBOBJS="$LIBOBJS thread.o"
3522 else
3523 if test ! -z "$with_threads" -a -d "$with_threads"
3524 then LDFLAGS="$LDFLAGS -L$with_threads"
3526 if test ! -z "$withval" -a -d "$withval"
3527 then LDFLAGS="$LDFLAGS -L$withval"
3529 cat >> confdefs.h <<\EOF
3530 #define _REENTRANT 1
3533 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3534 echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
3535 echo "configure:3536: checking for mach/cthreads.h" >&5
3536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3537 echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539 cat > conftest.$ac_ext <<EOF
3540 #line 3541 "configure"
3541 #include "confdefs.h"
3542 #include <mach/cthreads.h>
3544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3545 { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3547 if test -z "$ac_err"; then
3548 rm -rf conftest*
3549 eval "ac_cv_header_$ac_safe=yes"
3550 else
3551 echo "$ac_err" >&5
3552 echo "configure: failed program was:" >&5
3553 cat conftest.$ac_ext >&5
3554 rm -rf conftest*
3555 eval "ac_cv_header_$ac_safe=no"
3557 rm -f conftest*
3559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3560 echo "$ac_t""yes" 1>&6
3561 cat >> confdefs.h <<\EOF
3562 #define WITH_THREAD 1
3565 cat >> confdefs.h <<\EOF
3566 #define C_THREADS 1
3569 LIBOBJS="$LIBOBJS thread.o"
3570 else
3571 echo "$ac_t""no" 1>&6
3573 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
3574 echo "configure:3575: checking for --with-pth" >&5
3575 # Check whether --with-pth or --without-pth was given.
3576 if test "${with_pth+set}" = set; then
3577 withval="$with_pth"
3579 echo "$ac_t""$withval" 1>&6
3580 cat >> confdefs.h <<\EOF
3581 #define WITH_THREAD 1
3584 cat >> confdefs.h <<\EOF
3585 #define HAVE_PTH 1
3588 LIBS="-lpth $LIBS"
3589 LIBOBJS="$LIBOBJS thread.o"
3590 else
3592 echo "$ac_t""no" 1>&6
3593 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
3594 echo "configure:3595: checking for pthread_create in -lpthread" >&5
3595 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
3596 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3597 echo $ac_n "(cached) $ac_c" 1>&6
3598 else
3599 ac_save_LIBS="$LIBS"
3600 LIBS="-lpthread $LIBS"
3601 cat > conftest.$ac_ext <<EOF
3602 #line 3603 "configure"
3603 #include "confdefs.h"
3604 /* Override any gcc2 internal prototype to avoid an error. */
3605 /* We use char because int might match the return type of a gcc2
3606 builtin and then its argument prototype would still apply. */
3607 char pthread_create();
3609 int main() {
3610 pthread_create()
3611 ; return 0; }
3613 if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3614 rm -rf conftest*
3615 eval "ac_cv_lib_$ac_lib_var=yes"
3616 else
3617 echo "configure: failed program was:" >&5
3618 cat conftest.$ac_ext >&5
3619 rm -rf conftest*
3620 eval "ac_cv_lib_$ac_lib_var=no"
3622 rm -f conftest*
3623 LIBS="$ac_save_LIBS"
3626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3627 echo "$ac_t""yes" 1>&6
3628 cat >> confdefs.h <<\EOF
3629 #define WITH_THREAD 1
3632 case $ac_sys_system in
3633 Darwin*) ;;
3634 *) cat >> confdefs.h <<\EOF
3635 #define _POSIX_THREADS 1
3638 esac
3639 LIBS="-lpthread $LIBS"
3640 LIBOBJS="$LIBOBJS thread.o"
3641 else
3642 echo "$ac_t""no" 1>&6
3644 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
3645 echo "configure:3646: checking for pthread_detach" >&5
3646 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3647 echo $ac_n "(cached) $ac_c" 1>&6
3648 else
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 /* System header to define __stub macros and hopefully few prototypes,
3653 which can conflict with char pthread_detach(); below. */
3654 #include <assert.h>
3655 /* Override any gcc2 internal prototype to avoid an error. */
3656 /* We use char because int might match the return type of a gcc2
3657 builtin and then its argument prototype would still apply. */
3658 char pthread_detach();
3660 int main() {
3662 /* The GNU C library defines this for functions which it implements
3663 to always fail with ENOSYS. Some functions are actually named
3664 something starting with __ and the normal name is an alias. */
3665 #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
3666 choke me
3667 #else
3668 pthread_detach();
3669 #endif
3671 ; return 0; }
3673 if { (eval echo configure:3674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3674 rm -rf conftest*
3675 eval "ac_cv_func_pthread_detach=yes"
3676 else
3677 echo "configure: failed program was:" >&5
3678 cat conftest.$ac_ext >&5
3679 rm -rf conftest*
3680 eval "ac_cv_func_pthread_detach=no"
3682 rm -f conftest*
3685 if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3686 echo "$ac_t""yes" 1>&6
3687 cat >> confdefs.h <<\EOF
3688 #define WITH_THREAD 1
3691 case $ac_sys_system in
3692 Darwin*) ;;
3693 *) cat >> confdefs.h <<\EOF
3694 #define _POSIX_THREADS 1
3697 esac
3698 LIBOBJS="$LIBOBJS thread.o"
3699 else
3700 echo "$ac_t""no" 1>&6
3702 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3703 echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
3704 echo "configure:3705: checking for kernel/OS.h" >&5
3705 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3706 echo $ac_n "(cached) $ac_c" 1>&6
3707 else
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <kernel/OS.h>
3713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3714 { (eval echo configure:3715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3716 if test -z "$ac_err"; then
3717 rm -rf conftest*
3718 eval "ac_cv_header_$ac_safe=yes"
3719 else
3720 echo "$ac_err" >&5
3721 echo "configure: failed program was:" >&5
3722 cat conftest.$ac_ext >&5
3723 rm -rf conftest*
3724 eval "ac_cv_header_$ac_safe=no"
3726 rm -f conftest*
3728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3729 echo "$ac_t""yes" 1>&6
3730 cat >> confdefs.h <<\EOF
3731 #define WITH_THREAD 1
3734 cat >> confdefs.h <<\EOF
3735 #define BEOS_THREADS 1
3738 LIBOBJS="$LIBOBJS thread.o"
3739 else
3740 echo "$ac_t""no" 1>&6
3742 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
3743 echo "configure:3744: checking for pthread_create in -lpthreads" >&5
3744 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3746 echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748 ac_save_LIBS="$LIBS"
3749 LIBS="-lpthreads $LIBS"
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 /* Override any gcc2 internal prototype to avoid an error. */
3754 /* We use char because int might match the return type of a gcc2
3755 builtin and then its argument prototype would still apply. */
3756 char pthread_create();
3758 int main() {
3759 pthread_create()
3760 ; return 0; }
3762 if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3763 rm -rf conftest*
3764 eval "ac_cv_lib_$ac_lib_var=yes"
3765 else
3766 echo "configure: failed program was:" >&5
3767 cat conftest.$ac_ext >&5
3768 rm -rf conftest*
3769 eval "ac_cv_lib_$ac_lib_var=no"
3771 rm -f conftest*
3772 LIBS="$ac_save_LIBS"
3775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3776 echo "$ac_t""yes" 1>&6
3777 cat >> confdefs.h <<\EOF
3778 #define WITH_THREAD 1
3781 cat >> confdefs.h <<\EOF
3782 #define _POSIX_THREADS 1
3785 LIBS="$LIBS -lpthreads"
3786 LIBOBJS="$LIBOBJS thread.o"
3787 else
3788 echo "$ac_t""no" 1>&6
3790 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
3791 echo "configure:3792: checking for pthread_create in -lc_r" >&5
3792 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3794 echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796 ac_save_LIBS="$LIBS"
3797 LIBS="-lc_r $LIBS"
3798 cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 /* Override any gcc2 internal prototype to avoid an error. */
3802 /* We use char because int might match the return type of a gcc2
3803 builtin and then its argument prototype would still apply. */
3804 char pthread_create();
3806 int main() {
3807 pthread_create()
3808 ; return 0; }
3810 if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3811 rm -rf conftest*
3812 eval "ac_cv_lib_$ac_lib_var=yes"
3813 else
3814 echo "configure: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
3816 rm -rf conftest*
3817 eval "ac_cv_lib_$ac_lib_var=no"
3819 rm -f conftest*
3820 LIBS="$ac_save_LIBS"
3823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3824 echo "$ac_t""yes" 1>&6
3825 cat >> confdefs.h <<\EOF
3826 #define WITH_THREAD 1
3829 cat >> confdefs.h <<\EOF
3830 #define _POSIX_THREADS 1
3833 LIBS="$LIBS -lc_r"
3834 LIBOBJS="$LIBOBJS thread.o"
3835 else
3836 echo "$ac_t""no" 1>&6
3838 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
3839 echo "configure:3840: checking for __d6_pthread_create in -lthread" >&5
3840 ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
3841 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3842 echo $ac_n "(cached) $ac_c" 1>&6
3843 else
3844 ac_save_LIBS="$LIBS"
3845 LIBS="-lthread $LIBS"
3846 cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849 /* Override any gcc2 internal prototype to avoid an error. */
3850 /* We use char because int might match the return type of a gcc2
3851 builtin and then its argument prototype would still apply. */
3852 char __d6_pthread_create();
3854 int main() {
3855 __d6_pthread_create()
3856 ; return 0; }
3858 if { (eval echo configure:3859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3859 rm -rf conftest*
3860 eval "ac_cv_lib_$ac_lib_var=yes"
3861 else
3862 echo "configure: failed program was:" >&5
3863 cat conftest.$ac_ext >&5
3864 rm -rf conftest*
3865 eval "ac_cv_lib_$ac_lib_var=no"
3867 rm -f conftest*
3868 LIBS="$ac_save_LIBS"
3871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3872 echo "$ac_t""yes" 1>&6
3873 cat >> confdefs.h <<\EOF
3874 #define WITH_THREAD 1
3877 cat >> confdefs.h <<\EOF
3878 #define _POSIX_THREADS 1
3881 LIBS="$LIBS -lthread"
3882 LIBOBJS="$LIBOBJS thread.o"
3883 else
3884 echo "$ac_t""no" 1>&6
3886 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
3887 echo "configure:3888: checking for __pthread_create_system in -lpthread" >&5
3888 ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3889 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3890 echo $ac_n "(cached) $ac_c" 1>&6
3891 else
3892 ac_save_LIBS="$LIBS"
3893 LIBS="-lpthread $LIBS"
3894 cat > conftest.$ac_ext <<EOF
3895 #line 3896 "configure"
3896 #include "confdefs.h"
3897 /* Override any gcc2 internal prototype to avoid an error. */
3898 /* We use char because int might match the return type of a gcc2
3899 builtin and then its argument prototype would still apply. */
3900 char __pthread_create_system();
3902 int main() {
3903 __pthread_create_system()
3904 ; return 0; }
3906 if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3907 rm -rf conftest*
3908 eval "ac_cv_lib_$ac_lib_var=yes"
3909 else
3910 echo "configure: failed program was:" >&5
3911 cat conftest.$ac_ext >&5
3912 rm -rf conftest*
3913 eval "ac_cv_lib_$ac_lib_var=no"
3915 rm -f conftest*
3916 LIBS="$ac_save_LIBS"
3919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3920 echo "$ac_t""yes" 1>&6
3921 cat >> confdefs.h <<\EOF
3922 #define WITH_THREAD 1
3925 cat >> confdefs.h <<\EOF
3926 #define _POSIX_THREADS 1
3929 LIBS="$LIBS -lpthread"
3930 LIBOBJS="$LIBOBJS thread.o"
3931 else
3932 echo "$ac_t""no" 1>&6
3934 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
3935 echo "configure:3936: checking for pthread_create in -lcma" >&5
3936 ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
3937 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3938 echo $ac_n "(cached) $ac_c" 1>&6
3939 else
3940 ac_save_LIBS="$LIBS"
3941 LIBS="-lcma $LIBS"
3942 cat > conftest.$ac_ext <<EOF
3943 #line 3944 "configure"
3944 #include "confdefs.h"
3945 /* Override any gcc2 internal prototype to avoid an error. */
3946 /* We use char because int might match the return type of a gcc2
3947 builtin and then its argument prototype would still apply. */
3948 char pthread_create();
3950 int main() {
3951 pthread_create()
3952 ; return 0; }
3954 if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3955 rm -rf conftest*
3956 eval "ac_cv_lib_$ac_lib_var=yes"
3957 else
3958 echo "configure: failed program was:" >&5
3959 cat conftest.$ac_ext >&5
3960 rm -rf conftest*
3961 eval "ac_cv_lib_$ac_lib_var=no"
3963 rm -f conftest*
3964 LIBS="$ac_save_LIBS"
3967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3968 echo "$ac_t""yes" 1>&6
3969 cat >> confdefs.h <<\EOF
3970 #define WITH_THREAD 1
3973 cat >> confdefs.h <<\EOF
3974 #define _POSIX_THREADS 1
3977 LIBS="$LIBS -lcma"
3978 LIBOBJS="$LIBOBJS thread.o"
3979 else
3980 echo "$ac_t""no" 1>&6
3982 USE_THREAD_MODULE="#"
4005 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
4006 echo "configure:4007: checking for usconfig in -lmpc" >&5
4007 ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4009 echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011 ac_save_LIBS="$LIBS"
4012 LIBS="-lmpc $LIBS"
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 /* Override any gcc2 internal prototype to avoid an error. */
4017 /* We use char because int might match the return type of a gcc2
4018 builtin and then its argument prototype would still apply. */
4019 char usconfig();
4021 int main() {
4022 usconfig()
4023 ; return 0; }
4025 if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4026 rm -rf conftest*
4027 eval "ac_cv_lib_$ac_lib_var=yes"
4028 else
4029 echo "configure: failed program was:" >&5
4030 cat conftest.$ac_ext >&5
4031 rm -rf conftest*
4032 eval "ac_cv_lib_$ac_lib_var=no"
4034 rm -f conftest*
4035 LIBS="$ac_save_LIBS"
4038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4039 echo "$ac_t""yes" 1>&6
4040 cat >> confdefs.h <<\EOF
4041 #define WITH_THREAD 1
4044 LIBS="$LIBS -lmpc"
4045 LIBOBJS="$LIBOBJS thread.o"
4046 USE_THREAD_MODULE=""
4047 else
4048 echo "$ac_t""no" 1>&6
4051 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
4052 echo "configure:4053: checking for thr_create in -lthread" >&5
4053 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4054 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4055 echo $ac_n "(cached) $ac_c" 1>&6
4056 else
4057 ac_save_LIBS="$LIBS"
4058 LIBS="-lthread $LIBS"
4059 cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062 /* Override any gcc2 internal prototype to avoid an error. */
4063 /* We use char because int might match the return type of a gcc2
4064 builtin and then its argument prototype would still apply. */
4065 char thr_create();
4067 int main() {
4068 thr_create()
4069 ; return 0; }
4071 if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4072 rm -rf conftest*
4073 eval "ac_cv_lib_$ac_lib_var=yes"
4074 else
4075 echo "configure: failed program was:" >&5
4076 cat conftest.$ac_ext >&5
4077 rm -rf conftest*
4078 eval "ac_cv_lib_$ac_lib_var=no"
4080 rm -f conftest*
4081 LIBS="$ac_save_LIBS"
4084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4085 echo "$ac_t""yes" 1>&6
4086 cat >> confdefs.h <<\EOF
4087 #define WITH_THREAD 1
4090 LIBS="$LIBS -lthread"
4091 LIBOBJS="$LIBOBJS thread.o"
4092 USE_THREAD_MODULE=""
4093 else
4094 echo "$ac_t""no" 1>&6
4098 if test "$USE_THREAD_MODULE" != "#"
4099 then
4100 # If the above checks didn't disable threads, (at least) OSF1
4101 # needs this '-threads' argument during linking.
4102 case $ac_sys_system in
4103 OSF1) LDLAST=-threads;;
4104 esac
4108 # Check for enable-ipv6
4109 echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
4110 echo "configure:4111: checking if --enable-ipv6 is specified" >&5
4111 # Check whether --enable-ipv6 or --disable-ipv6 was given.
4112 if test "${enable_ipv6+set}" = set; then
4113 enableval="$enable_ipv6"
4114 case "$enableval" in
4116 echo "$ac_t""no" 1>&6
4117 ipv6=no
4119 *) echo "$ac_t""yes" 1>&6
4120 cat >> confdefs.h <<\EOF
4121 #define ENABLE_IPV6 1
4124 ipv6=yes
4126 esac
4127 else
4129 if test "$cross_compiling" = yes; then
4130 echo "$ac_t""no" 1>&6
4131 ipv6=no
4133 else
4134 cat > conftest.$ac_ext <<EOF
4135 #line 4136 "configure"
4136 #include "confdefs.h"
4137 /* AF_INET6 available check */
4138 #include <sys/types.h>
4139 #include <sys/socket.h>
4140 main()
4142 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4143 exit(1);
4144 else
4145 exit(0);
4149 if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4150 then
4151 echo "$ac_t""yes" 1>&6
4152 ipv6=yes
4153 else
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4156 rm -fr conftest*
4157 echo "$ac_t""no" 1>&6
4158 ipv6=no
4160 rm -fr conftest*
4164 if test "$ipv6" = "yes"; then
4165 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
4166 echo "configure:4167: checking if RFC2553 API is available" >&5
4167 cat > conftest.$ac_ext <<EOF
4168 #line 4169 "configure"
4169 #include "confdefs.h"
4170 #include <sys/types.h>
4171 #include <netinet/in.h>
4172 int main() {
4173 struct sockaddr_in6 x;
4174 x.sin6_scope_id;
4175 ; return 0; }
4177 if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4178 rm -rf conftest*
4179 echo "$ac_t""yes" 1>&6
4180 ipv6=yes
4181 else
4182 echo "configure: failed program was:" >&5
4183 cat conftest.$ac_ext >&5
4184 rm -rf conftest*
4185 echo "$ac_t""no" 1>&6
4186 ipv6=no
4188 rm -f conftest*
4191 if test "$ipv6" = "yes"; then
4192 cat >> confdefs.h <<\EOF
4193 #define ENABLE_IPV6 1
4201 ipv6type=unknown
4202 ipv6lib=none
4203 ipv6trylibc=no
4205 if test "$ipv6" = "yes"; then
4206 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
4207 echo "configure:4208: checking ipv6 stack type" >&5
4208 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4210 case $i in
4211 inria)
4212 cat > conftest.$ac_ext <<EOF
4213 #line 4214 "configure"
4214 #include "confdefs.h"
4216 #include <netinet/in.h>
4217 #ifdef IPV6_INRIA_VERSION
4219 #endif
4221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4222 egrep "yes" >/dev/null 2>&1; then
4223 rm -rf conftest*
4224 ipv6type=$i;
4225 OPT="-DINET6 $OPT"
4227 rm -f conftest*
4230 kame)
4231 cat > conftest.$ac_ext <<EOF
4232 #line 4233 "configure"
4233 #include "confdefs.h"
4235 #include <netinet/in.h>
4236 #ifdef __KAME__
4238 #endif
4240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4241 egrep "yes" >/dev/null 2>&1; then
4242 rm -rf conftest*
4243 ipv6type=$i;
4244 ipv6lib=inet6
4245 ipv6libdir=/usr/local/v6/lib
4246 ipv6trylibc=yes
4247 OPT="-DINET6 $OPT"
4249 rm -f conftest*
4252 linux-glibc)
4253 cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4257 #include <features.h>
4258 #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4260 #endif
4262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4263 egrep "yes" >/dev/null 2>&1; then
4264 rm -rf conftest*
4265 ipv6type=$i;
4266 ipv6trylibc=yes
4267 OPT="-DINET6 $OPT"
4269 rm -f conftest*
4272 linux-inet6)
4273 if test -d /usr/inet6; then
4274 ipv6type=$i
4275 ipv6lib=inet6
4276 ipv6libdir=/usr/inet6/lib
4277 OPT="-DINET6 -I/usr/inet6/include $OPT"
4280 solaris)
4281 if test -f /etc/netconfig; then
4282 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4283 ipv6type=$i
4284 ipv6trylibc=yes
4285 OPT="-DINET6 $OPT"
4289 toshiba)
4290 cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4294 #include <sys/param.h>
4295 #ifdef _TOSHIBA_INET6
4297 #endif
4299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4300 egrep "yes" >/dev/null 2>&1; then
4301 rm -rf conftest*
4302 ipv6type=$i;
4303 ipv6lib=inet6;
4304 ipv6libdir=/usr/local/v6/lib;
4305 OPT="-DINET6 $OPT"
4307 rm -f conftest*
4310 v6d)
4311 cat > conftest.$ac_ext <<EOF
4312 #line 4313 "configure"
4313 #include "confdefs.h"
4315 #include </usr/local/v6/include/sys/v6config.h>
4316 #ifdef __V6D__
4318 #endif
4320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4321 egrep "yes" >/dev/null 2>&1; then
4322 rm -rf conftest*
4323 ipv6type=$i;
4324 ipv6lib=v6;
4325 ipv6libdir=/usr/local/v6/lib;
4326 OPT="-I/usr/local/v6/include $OPT"
4328 rm -f conftest*
4331 zeta)
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4336 #include <sys/param.h>
4337 #ifdef _ZETA_MINAMI_INET6
4339 #endif
4341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4342 egrep "yes" >/dev/null 2>&1; then
4343 rm -rf conftest*
4344 ipv6type=$i;
4345 ipv6lib=inet6;
4346 ipv6libdir=/usr/local/v6/lib;
4347 OPT="-DINET6 $OPT"
4349 rm -f conftest*
4352 esac
4353 if test "$ipv6type" != "unknown"; then
4354 break
4356 done
4357 echo "$ac_t""$ipv6type" 1>&6
4360 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4361 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4362 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4363 echo "using lib$ipv6lib"
4364 else
4365 if test $ipv6trylibc = "yes"; then
4366 echo "using libc"
4367 else
4368 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4369 echo "You need to fetch lib$ipv6lib.a from appropriate"
4370 echo 'ipv6 kit and compile beforehand.'
4371 exit 1
4376 # Check for GC support
4377 echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
4378 echo "configure:4379: checking for --with-cycle-gc" >&5
4379 # Check whether --with-cycle-gc or --without-cycle-gc was given.
4380 if test "${with_cycle_gc+set}" = set; then
4381 withval="$with_cycle_gc"
4386 if test -z "$with_cycle_gc"
4387 then with_cycle_gc="yes"
4389 if test "$with_cycle_gc" != "no"
4390 then
4391 cat >> confdefs.h <<\EOF
4392 #define WITH_CYCLE_GC 1
4396 echo "$ac_t""$with_cycle_gc" 1>&6
4398 # Check for Python-specific malloc support
4399 echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
4400 echo "configure:4401: checking for --with-pymalloc" >&5
4401 # Check whether --with-pymalloc or --without-pymalloc was given.
4402 if test "${with_pymalloc+set}" = set; then
4403 withval="$with_pymalloc"
4405 if test "$withval" != no
4406 then cat >> confdefs.h <<\EOF
4407 #define WITH_PYMALLOC 1
4409 echo "$ac_t""yes" 1>&6
4410 else echo "$ac_t""no" 1>&6
4412 else
4413 echo "$ac_t""no" 1>&6
4417 # Check for --with-wctype-functions
4418 echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
4419 echo "configure:4420: checking for --with-wctype-functions" >&5
4420 # Check whether --with-wctype-functions or --without-wctype-functions was given.
4421 if test "${with_wctype_functions+set}" = set; then
4422 withval="$with_wctype_functions"
4424 if test "$withval" != no
4425 then cat >> confdefs.h <<\EOF
4426 #define WANT_WCTYPE_FUNCTIONS 1
4428 echo "$ac_t""yes" 1>&6
4429 else echo "$ac_t""no" 1>&6
4431 else
4432 echo "$ac_t""no" 1>&6
4436 # -I${DLINCLDIR} is added to the compile rule for importdl.o
4438 DLINCLDIR=.
4440 echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
4441 echo "configure:4442: checking for --with-sgi-dl" >&5
4442 # Check whether --with-sgi-dl or --without-sgi-dl was given.
4443 if test "${with_sgi_dl+set}" = set; then
4444 withval="$with_sgi_dl"
4446 echo "$ac_t""$withval" 1>&6
4447 cat >> confdefs.h <<\EOF
4448 #define WITH_SGI_DL 1
4451 DYNLOADFILE="dynload_dl.o"
4452 dldir=$withval
4453 if test ! -z "$dldir" -a -d "$dldir"
4454 then LDFLAGS="$LDFLAGS -L$dldir"
4455 else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
4457 DLINCLDIR=${dldir}
4458 LIBS="$LIBS -ldl -lmld"
4459 else
4460 echo "$ac_t""no" 1>&6
4464 echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
4465 echo "configure:4466: checking for --with-dl-dld" >&5
4466 # Check whether --with-dl-dld or --without-dl-dld was given.
4467 if test "${with_dl_dld+set}" = set; then
4468 withval="$with_dl_dld"
4470 echo "$ac_t""$withval" 1>&6
4471 cat >> confdefs.h <<\EOF
4472 #define WITH_DL_DLD 1
4475 DYNLOADFILE="dynload_dl.o"
4476 dldir=`echo "$withval" | sed 's/,.*//'`
4477 dlddir=`echo "$withval" | sed 's/.*,//'`
4478 if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
4479 then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
4480 else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
4482 DLINCLDIR=${dldir}
4483 LIBS="$LIBS -ldl -ldld"
4484 else
4485 echo "$ac_t""no" 1>&6
4489 # the dlopen() function means we might want to use dynload_shlib.o. some
4490 # platforms, such as AIX, have dlopen(), but don't want to use it.
4491 for ac_func in dlopen
4493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4494 echo "configure:4495: checking for $ac_func" >&5
4495 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4496 echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501 /* System header to define __stub macros and hopefully few prototypes,
4502 which can conflict with char $ac_func(); below. */
4503 #include <assert.h>
4504 /* Override any gcc2 internal prototype to avoid an error. */
4505 /* We use char because int might match the return type of a gcc2
4506 builtin and then its argument prototype would still apply. */
4507 char $ac_func();
4509 int main() {
4511 /* The GNU C library defines this for functions which it implements
4512 to always fail with ENOSYS. Some functions are actually named
4513 something starting with __ and the normal name is an alias. */
4514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4515 choke me
4516 #else
4517 $ac_func();
4518 #endif
4520 ; return 0; }
4522 if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4523 rm -rf conftest*
4524 eval "ac_cv_func_$ac_func=yes"
4525 else
4526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 rm -rf conftest*
4529 eval "ac_cv_func_$ac_func=no"
4531 rm -f conftest*
4534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4535 echo "$ac_t""yes" 1>&6
4536 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4537 cat >> confdefs.h <<EOF
4538 #define $ac_tr_func 1
4541 else
4542 echo "$ac_t""no" 1>&6
4544 done
4547 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4548 # loading of modules.
4550 echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
4551 echo "configure:4552: checking DYNLOADFILE" >&5
4552 if test -z "$DYNLOADFILE"
4553 then
4554 case $ac_sys_system/$ac_sys_release in
4555 AIX*) DYNLOADFILE="dynload_aix.o";;
4556 BeOS*) DYNLOADFILE="dynload_beos.o";;
4557 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
4558 Darwin/*) DYNLOADFILE="dynload_next.o";;
4560 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4561 # out any dynamic loading
4562 if test "$ac_cv_func_dlopen" = yes
4563 then DYNLOADFILE="dynload_shlib.o"
4564 else DYNLOADFILE="dynload_stub.o"
4567 esac
4569 echo "$ac_t""$DYNLOADFILE" 1>&6
4570 if test "$DYNLOADFILE" != "dynload_stub.o"
4571 then
4572 cat >> confdefs.h <<\EOF
4573 #define HAVE_DYNAMIC_LOADING 1
4578 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
4581 echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
4582 echo "configure:4583: checking MACHDEP_OBJS" >&5
4583 if test -z "$MACHDEP_OBJS"
4584 then
4585 MACHDEP_OBJS=$extra_machdep_objs
4586 else
4587 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
4589 echo "$ac_t""MACHDEP_OBJS" 1>&6
4591 # checks for library functions
4592 for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
4593 flock fork fsync fdatasync fpathconf ftime ftruncate \
4594 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
4595 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
4596 nice pathconf pause plock poll pthread_init \
4597 putenv readlink \
4598 select setegid seteuid setgid \
4599 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
4600 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
4601 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
4602 truncate uname waitpid _getpty getpriority
4604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4605 echo "configure:4606: checking for $ac_func" >&5
4606 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4607 echo $ac_n "(cached) $ac_c" 1>&6
4608 else
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 /* System header to define __stub macros and hopefully few prototypes,
4613 which can conflict with char $ac_func(); below. */
4614 #include <assert.h>
4615 /* Override any gcc2 internal prototype to avoid an error. */
4616 /* We use char because int might match the return type of a gcc2
4617 builtin and then its argument prototype would still apply. */
4618 char $ac_func();
4620 int main() {
4622 /* The GNU C library defines this for functions which it implements
4623 to always fail with ENOSYS. Some functions are actually named
4624 something starting with __ and the normal name is an alias. */
4625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4626 choke me
4627 #else
4628 $ac_func();
4629 #endif
4631 ; return 0; }
4633 if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4634 rm -rf conftest*
4635 eval "ac_cv_func_$ac_func=yes"
4636 else
4637 echo "configure: failed program was:" >&5
4638 cat conftest.$ac_ext >&5
4639 rm -rf conftest*
4640 eval "ac_cv_func_$ac_func=no"
4642 rm -f conftest*
4645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4646 echo "$ac_t""yes" 1>&6
4647 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4648 cat >> confdefs.h <<EOF
4649 #define $ac_tr_func 1
4652 else
4653 echo "$ac_t""no" 1>&6
4655 done
4658 # check for openpty and forkpty
4660 for ac_func in openpty
4662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4663 echo "configure:4664: checking for $ac_func" >&5
4664 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4665 echo $ac_n "(cached) $ac_c" 1>&6
4666 else
4667 cat > conftest.$ac_ext <<EOF
4668 #line 4669 "configure"
4669 #include "confdefs.h"
4670 /* System header to define __stub macros and hopefully few prototypes,
4671 which can conflict with char $ac_func(); below. */
4672 #include <assert.h>
4673 /* Override any gcc2 internal prototype to avoid an error. */
4674 /* We use char because int might match the return type of a gcc2
4675 builtin and then its argument prototype would still apply. */
4676 char $ac_func();
4678 int main() {
4680 /* The GNU C library defines this for functions which it implements
4681 to always fail with ENOSYS. Some functions are actually named
4682 something starting with __ and the normal name is an alias. */
4683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4684 choke me
4685 #else
4686 $ac_func();
4687 #endif
4689 ; return 0; }
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692 rm -rf conftest*
4693 eval "ac_cv_func_$ac_func=yes"
4694 else
4695 echo "configure: failed program was:" >&5
4696 cat conftest.$ac_ext >&5
4697 rm -rf conftest*
4698 eval "ac_cv_func_$ac_func=no"
4700 rm -f conftest*
4703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4704 echo "$ac_t""yes" 1>&6
4705 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4706 cat >> confdefs.h <<EOF
4707 #define $ac_tr_func 1
4710 else
4711 echo "$ac_t""no" 1>&6
4712 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
4713 echo "configure:4714: checking for openpty in -lutil" >&5
4714 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
4715 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4716 echo $ac_n "(cached) $ac_c" 1>&6
4717 else
4718 ac_save_LIBS="$LIBS"
4719 LIBS="-lutil $LIBS"
4720 cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4723 /* Override any gcc2 internal prototype to avoid an error. */
4724 /* We use char because int might match the return type of a gcc2
4725 builtin and then its argument prototype would still apply. */
4726 char openpty();
4728 int main() {
4729 openpty()
4730 ; return 0; }
4732 if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733 rm -rf conftest*
4734 eval "ac_cv_lib_$ac_lib_var=yes"
4735 else
4736 echo "configure: failed program was:" >&5
4737 cat conftest.$ac_ext >&5
4738 rm -rf conftest*
4739 eval "ac_cv_lib_$ac_lib_var=no"
4741 rm -f conftest*
4742 LIBS="$ac_save_LIBS"
4745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4746 echo "$ac_t""yes" 1>&6
4747 cat >> confdefs.h <<\EOF
4748 #define HAVE_OPENPTY 1
4750 LIBS="$LIBS -lutil"
4751 else
4752 echo "$ac_t""no" 1>&6
4756 done
4758 for ac_func in forkpty
4760 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4761 echo "configure:4762: checking for $ac_func" >&5
4762 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4763 echo $ac_n "(cached) $ac_c" 1>&6
4764 else
4765 cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 /* System header to define __stub macros and hopefully few prototypes,
4769 which can conflict with char $ac_func(); below. */
4770 #include <assert.h>
4771 /* Override any gcc2 internal prototype to avoid an error. */
4772 /* We use char because int might match the return type of a gcc2
4773 builtin and then its argument prototype would still apply. */
4774 char $ac_func();
4776 int main() {
4778 /* The GNU C library defines this for functions which it implements
4779 to always fail with ENOSYS. Some functions are actually named
4780 something starting with __ and the normal name is an alias. */
4781 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4782 choke me
4783 #else
4784 $ac_func();
4785 #endif
4787 ; return 0; }
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790 rm -rf conftest*
4791 eval "ac_cv_func_$ac_func=yes"
4792 else
4793 echo "configure: failed program was:" >&5
4794 cat conftest.$ac_ext >&5
4795 rm -rf conftest*
4796 eval "ac_cv_func_$ac_func=no"
4798 rm -f conftest*
4801 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4802 echo "$ac_t""yes" 1>&6
4803 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4804 cat >> confdefs.h <<EOF
4805 #define $ac_tr_func 1
4808 else
4809 echo "$ac_t""no" 1>&6
4810 echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
4811 echo "configure:4812: checking for forkpty in -lutil" >&5
4812 ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
4813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4814 echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816 ac_save_LIBS="$LIBS"
4817 LIBS="-lutil $LIBS"
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 /* Override any gcc2 internal prototype to avoid an error. */
4822 /* We use char because int might match the return type of a gcc2
4823 builtin and then its argument prototype would still apply. */
4824 char forkpty();
4826 int main() {
4827 forkpty()
4828 ; return 0; }
4830 if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831 rm -rf conftest*
4832 eval "ac_cv_lib_$ac_lib_var=yes"
4833 else
4834 echo "configure: failed program was:" >&5
4835 cat conftest.$ac_ext >&5
4836 rm -rf conftest*
4837 eval "ac_cv_lib_$ac_lib_var=no"
4839 rm -f conftest*
4840 LIBS="$ac_save_LIBS"
4843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4844 echo "$ac_t""yes" 1>&6
4845 cat >> confdefs.h <<\EOF
4846 #define HAVE_FORKPTY 1
4848 LIBS="$LIBS -lutil"
4849 else
4850 echo "$ac_t""no" 1>&6
4854 done
4857 # Try defining symbols to enable large file support.
4858 # The particular combination of symbols used here is known to work
4859 # on Linux and Solaris [2.]7.
4860 echo $ac_n "checking for CFLAGS to enable large files""... $ac_c" 1>&6
4861 echo "configure:4862: checking for CFLAGS to enable large files" >&5
4862 OLD_CFLAGS="$CFLAGS"
4863 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
4864 if test "$cross_compiling" = yes; then
4865 echo "$ac_t""no (cross-compiling)" 1>&6
4866 else
4867 cat > conftest.$ac_ext <<EOF
4868 #line 4869 "configure"
4869 #include "confdefs.h"
4871 #include <sys/types.h>
4872 #include <stdio.h>
4873 main() {
4874 FILE *fp;
4875 off_t seek = 0x80000000ul;
4876 off_t tell = 0;
4877 fp = fopen("conftestval", "wb");
4878 if (fp == NULL) {
4879 perror("conftestval");
4880 exit(1);
4882 if (fseeko(fp, seek, 0) < 0)
4883 perror("fseeko");
4884 else
4885 tell = ftello(fp);
4886 fclose(fp);
4887 unlink("conftestval");
4888 if (tell == seek) {
4889 fprintf(stderr, "seek to 2**31 worked\n");
4890 exit(0);
4892 else {
4893 exit(1);
4894 fprintf(stderr, "seek to 2**31 didn't work\n");
4899 if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4900 then
4901 echo "$ac_t""yes" 1>&6
4902 cat >> confdefs.h <<\EOF
4903 #define _LARGEFILE_SOURCE 1
4906 cat >> confdefs.h <<\EOF
4907 #define _FILE_OFFSET_BITS 64
4910 else
4911 echo "configure: failed program was:" >&5
4912 cat conftest.$ac_ext >&5
4913 rm -fr conftest*
4914 echo "$ac_t""no" 1>&6
4916 rm -fr conftest*
4919 CFLAGS="$OLD_CFLAGS"
4921 # check for long file support functions
4922 for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4925 echo "configure:4926: checking for $ac_func" >&5
4926 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4927 echo $ac_n "(cached) $ac_c" 1>&6
4928 else
4929 cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4932 /* System header to define __stub macros and hopefully few prototypes,
4933 which can conflict with char $ac_func(); below. */
4934 #include <assert.h>
4935 /* Override any gcc2 internal prototype to avoid an error. */
4936 /* We use char because int might match the return type of a gcc2
4937 builtin and then its argument prototype would still apply. */
4938 char $ac_func();
4940 int main() {
4942 /* The GNU C library defines this for functions which it implements
4943 to always fail with ENOSYS. Some functions are actually named
4944 something starting with __ and the normal name is an alias. */
4945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4946 choke me
4947 #else
4948 $ac_func();
4949 #endif
4951 ; return 0; }
4953 if { (eval echo configure:4954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4954 rm -rf conftest*
4955 eval "ac_cv_func_$ac_func=yes"
4956 else
4957 echo "configure: failed program was:" >&5
4958 cat conftest.$ac_ext >&5
4959 rm -rf conftest*
4960 eval "ac_cv_func_$ac_func=no"
4962 rm -f conftest*
4965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4966 echo "$ac_t""yes" 1>&6
4967 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4968 cat >> confdefs.h <<EOF
4969 #define $ac_tr_func 1
4972 else
4973 echo "$ac_t""no" 1>&6
4975 done
4978 for ac_func in dup2 getcwd strdup strerror memmove
4980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4981 echo "configure:4982: checking for $ac_func" >&5
4982 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4983 echo $ac_n "(cached) $ac_c" 1>&6
4984 else
4985 cat > conftest.$ac_ext <<EOF
4986 #line 4987 "configure"
4987 #include "confdefs.h"
4988 /* System header to define __stub macros and hopefully few prototypes,
4989 which can conflict with char $ac_func(); below. */
4990 #include <assert.h>
4991 /* Override any gcc2 internal prototype to avoid an error. */
4992 /* We use char because int might match the return type of a gcc2
4993 builtin and then its argument prototype would still apply. */
4994 char $ac_func();
4996 int main() {
4998 /* The GNU C library defines this for functions which it implements
4999 to always fail with ENOSYS. Some functions are actually named
5000 something starting with __ and the normal name is an alias. */
5001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5002 choke me
5003 #else
5004 $ac_func();
5005 #endif
5007 ; return 0; }
5009 if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010 rm -rf conftest*
5011 eval "ac_cv_func_$ac_func=yes"
5012 else
5013 echo "configure: failed program was:" >&5
5014 cat conftest.$ac_ext >&5
5015 rm -rf conftest*
5016 eval "ac_cv_func_$ac_func=no"
5018 rm -f conftest*
5021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5022 echo "$ac_t""yes" 1>&6
5023 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5024 cat >> confdefs.h <<EOF
5025 #define $ac_tr_func 1
5028 else
5029 echo "$ac_t""no" 1>&6
5030 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5032 done
5035 for ac_func in getpgrp
5037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5038 echo "configure:5039: checking for $ac_func" >&5
5039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5040 echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042 cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045 /* System header to define __stub macros and hopefully few prototypes,
5046 which can conflict with char $ac_func(); below. */
5047 #include <assert.h>
5048 /* Override any gcc2 internal prototype to avoid an error. */
5049 /* We use char because int might match the return type of a gcc2
5050 builtin and then its argument prototype would still apply. */
5051 char $ac_func();
5053 int main() {
5055 /* The GNU C library defines this for functions which it implements
5056 to always fail with ENOSYS. Some functions are actually named
5057 something starting with __ and the normal name is an alias. */
5058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5059 choke me
5060 #else
5061 $ac_func();
5062 #endif
5064 ; return 0; }
5066 if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5067 rm -rf conftest*
5068 eval "ac_cv_func_$ac_func=yes"
5069 else
5070 echo "configure: failed program was:" >&5
5071 cat conftest.$ac_ext >&5
5072 rm -rf conftest*
5073 eval "ac_cv_func_$ac_func=no"
5075 rm -f conftest*
5078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5079 echo "$ac_t""yes" 1>&6
5080 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5081 cat >> confdefs.h <<EOF
5082 #define $ac_tr_func 1
5084 cat > conftest.$ac_ext <<EOF
5085 #line 5086 "configure"
5086 #include "confdefs.h"
5087 #include <unistd.h>
5088 int main() {
5089 getpgrp(0);
5090 ; return 0; }
5092 if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5093 rm -rf conftest*
5094 cat >> confdefs.h <<\EOF
5095 #define GETPGRP_HAVE_ARG 1
5098 else
5099 echo "configure: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5102 rm -f conftest*
5103 else
5104 echo "$ac_t""no" 1>&6
5106 done
5108 for ac_func in setpgrp
5110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5111 echo "configure:5112: checking for $ac_func" >&5
5112 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5113 echo $ac_n "(cached) $ac_c" 1>&6
5114 else
5115 cat > conftest.$ac_ext <<EOF
5116 #line 5117 "configure"
5117 #include "confdefs.h"
5118 /* System header to define __stub macros and hopefully few prototypes,
5119 which can conflict with char $ac_func(); below. */
5120 #include <assert.h>
5121 /* Override any gcc2 internal prototype to avoid an error. */
5122 /* We use char because int might match the return type of a gcc2
5123 builtin and then its argument prototype would still apply. */
5124 char $ac_func();
5126 int main() {
5128 /* The GNU C library defines this for functions which it implements
5129 to always fail with ENOSYS. Some functions are actually named
5130 something starting with __ and the normal name is an alias. */
5131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5132 choke me
5133 #else
5134 $ac_func();
5135 #endif
5137 ; return 0; }
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140 rm -rf conftest*
5141 eval "ac_cv_func_$ac_func=yes"
5142 else
5143 echo "configure: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 rm -rf conftest*
5146 eval "ac_cv_func_$ac_func=no"
5148 rm -f conftest*
5151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5152 echo "$ac_t""yes" 1>&6
5153 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5154 cat >> confdefs.h <<EOF
5155 #define $ac_tr_func 1
5157 cat > conftest.$ac_ext <<EOF
5158 #line 5159 "configure"
5159 #include "confdefs.h"
5160 #include <unistd.h>
5161 int main() {
5162 setpgrp(0,0);
5163 ; return 0; }
5165 if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5166 rm -rf conftest*
5167 cat >> confdefs.h <<\EOF
5168 #define SETPGRP_HAVE_ARG 1
5171 else
5172 echo "configure: failed program was:" >&5
5173 cat conftest.$ac_ext >&5
5175 rm -f conftest*
5176 else
5177 echo "$ac_t""no" 1>&6
5179 done
5181 for ac_func in gettimeofday
5183 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5184 echo "configure:5185: checking for $ac_func" >&5
5185 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5186 echo $ac_n "(cached) $ac_c" 1>&6
5187 else
5188 cat > conftest.$ac_ext <<EOF
5189 #line 5190 "configure"
5190 #include "confdefs.h"
5191 /* System header to define __stub macros and hopefully few prototypes,
5192 which can conflict with char $ac_func(); below. */
5193 #include <assert.h>
5194 /* Override any gcc2 internal prototype to avoid an error. */
5195 /* We use char because int might match the return type of a gcc2
5196 builtin and then its argument prototype would still apply. */
5197 char $ac_func();
5199 int main() {
5201 /* The GNU C library defines this for functions which it implements
5202 to always fail with ENOSYS. Some functions are actually named
5203 something starting with __ and the normal name is an alias. */
5204 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5205 choke me
5206 #else
5207 $ac_func();
5208 #endif
5210 ; return 0; }
5212 if { (eval echo configure:5213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5213 rm -rf conftest*
5214 eval "ac_cv_func_$ac_func=yes"
5215 else
5216 echo "configure: failed program was:" >&5
5217 cat conftest.$ac_ext >&5
5218 rm -rf conftest*
5219 eval "ac_cv_func_$ac_func=no"
5221 rm -f conftest*
5224 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5225 echo "$ac_t""yes" 1>&6
5226 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5227 cat >> confdefs.h <<EOF
5228 #define $ac_tr_func 1
5230 cat > conftest.$ac_ext <<EOF
5231 #line 5232 "configure"
5232 #include "confdefs.h"
5233 #include <sys/time.h>
5234 int main() {
5235 gettimeofday((struct timeval*)0,(struct timezone*)0);
5236 ; return 0; }
5238 if { (eval echo configure:5239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5240 else
5241 echo "configure: failed program was:" >&5
5242 cat conftest.$ac_ext >&5
5243 rm -rf conftest*
5244 cat >> confdefs.h <<\EOF
5245 #define GETTIMEOFDAY_NO_TZ 1
5249 rm -f conftest*
5250 else
5251 echo "$ac_t""no" 1>&6
5253 done
5256 for ac_func in getaddrinfo
5258 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5259 echo "configure:5260: checking for $ac_func" >&5
5260 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5261 echo $ac_n "(cached) $ac_c" 1>&6
5262 else
5263 cat > conftest.$ac_ext <<EOF
5264 #line 5265 "configure"
5265 #include "confdefs.h"
5266 /* System header to define __stub macros and hopefully few prototypes,
5267 which can conflict with char $ac_func(); below. */
5268 #include <assert.h>
5269 /* Override any gcc2 internal prototype to avoid an error. */
5270 /* We use char because int might match the return type of a gcc2
5271 builtin and then its argument prototype would still apply. */
5272 char $ac_func();
5274 int main() {
5276 /* The GNU C library defines this for functions which it implements
5277 to always fail with ENOSYS. Some functions are actually named
5278 something starting with __ and the normal name is an alias. */
5279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5280 choke me
5281 #else
5282 $ac_func();
5283 #endif
5285 ; return 0; }
5287 if { (eval echo configure:5288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5288 rm -rf conftest*
5289 eval "ac_cv_func_$ac_func=yes"
5290 else
5291 echo "configure: failed program was:" >&5
5292 cat conftest.$ac_ext >&5
5293 rm -rf conftest*
5294 eval "ac_cv_func_$ac_func=no"
5296 rm -f conftest*
5299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5300 echo "$ac_t""yes" 1>&6
5301 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5302 cat >> confdefs.h <<EOF
5303 #define $ac_tr_func 1
5305 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
5306 echo "configure:5307: checking getaddrinfo bug" >&5
5307 if test "$cross_compiling" = yes; then
5308 echo "$ac_t""buggy" 1>&6
5309 buggygetaddrinfo=yes
5310 else
5311 cat > conftest.$ac_ext <<EOF
5312 #line 5313 "configure"
5313 #include "confdefs.h"
5315 #include <sys/types.h>
5316 #include <netdb.h>
5317 #include <string.h>
5318 #include <sys/socket.h>
5319 #include <netinet/in.h>
5321 main()
5323 int passive, gaierr, inet4 = 0, inet6 = 0;
5324 struct addrinfo hints, *ai, *aitop;
5325 char straddr[INET6_ADDRSTRLEN], strport[16];
5327 for (passive = 0; passive <= 1; passive++) {
5328 memset(&hints, 0, sizeof(hints));
5329 hints.ai_family = AF_UNSPEC;
5330 hints.ai_flags = passive ? AI_PASSIVE : 0;
5331 hints.ai_socktype = SOCK_STREAM;
5332 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5333 (void)gai_strerror(gaierr);
5334 goto bad;
5336 for (ai = aitop; ai; ai = ai->ai_next) {
5337 if (ai->ai_addr == NULL ||
5338 ai->ai_addrlen == 0 ||
5339 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5340 straddr, sizeof(straddr), strport, sizeof(strport),
5341 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5342 goto bad;
5344 switch (ai->ai_family) {
5345 case AF_INET:
5346 if (strcmp(strport, "54321") != 0) {
5347 goto bad;
5349 if (passive) {
5350 if (strcmp(straddr, "0.0.0.0") != 0) {
5351 goto bad;
5353 } else {
5354 if (strcmp(straddr, "127.0.0.1") != 0) {
5355 goto bad;
5358 inet4++;
5359 break;
5360 case AF_INET6:
5361 if (strcmp(strport, "54321") != 0) {
5362 goto bad;
5364 if (passive) {
5365 if (strcmp(straddr, "::") != 0) {
5366 goto bad;
5368 } else {
5369 if (strcmp(straddr, "::1") != 0) {
5370 goto bad;
5373 inet6++;
5374 break;
5375 case AF_UNSPEC:
5376 goto bad;
5377 break;
5378 default:
5379 /* another family support? */
5380 break;
5385 if (!(inet4 == 0 || inet4 == 2))
5386 goto bad;
5387 if (!(inet6 == 0 || inet6 == 2))
5388 goto bad;
5390 if (aitop)
5391 freeaddrinfo(aitop);
5392 exit(0);
5394 bad:
5395 if (aitop)
5396 freeaddrinfo(aitop);
5397 exit(1);
5401 if { (eval echo configure:5402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5402 then
5403 echo "$ac_t""good" 1>&6
5404 buggygetaddrinfo=no
5405 else
5406 echo "configure: failed program was:" >&5
5407 cat conftest.$ac_ext >&5
5408 rm -fr conftest*
5409 echo "$ac_t""buggy" 1>&6
5410 buggygetaddrinfo=yes
5412 rm -fr conftest*
5415 else
5416 echo "$ac_t""no" 1>&6
5417 buggygetaddrinfo=yes
5419 done
5422 if test "$buggygetaddrinfo" = "yes"; then
5423 if test "$ipv6" = "yes"; then
5424 echo 'Fatal: You must get working getaddrinfo() function.'
5425 echo ' or you can specify "--disable-ipv6"'.
5426 exit 1
5429 for ac_func in getnameinfo
5431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5432 echo "configure:5433: checking for $ac_func" >&5
5433 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5434 echo $ac_n "(cached) $ac_c" 1>&6
5435 else
5436 cat > conftest.$ac_ext <<EOF
5437 #line 5438 "configure"
5438 #include "confdefs.h"
5439 /* System header to define __stub macros and hopefully few prototypes,
5440 which can conflict with char $ac_func(); below. */
5441 #include <assert.h>
5442 /* Override any gcc2 internal prototype to avoid an error. */
5443 /* We use char because int might match the return type of a gcc2
5444 builtin and then its argument prototype would still apply. */
5445 char $ac_func();
5447 int main() {
5449 /* The GNU C library defines this for functions which it implements
5450 to always fail with ENOSYS. Some functions are actually named
5451 something starting with __ and the normal name is an alias. */
5452 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5453 choke me
5454 #else
5455 $ac_func();
5456 #endif
5458 ; return 0; }
5460 if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5461 rm -rf conftest*
5462 eval "ac_cv_func_$ac_func=yes"
5463 else
5464 echo "configure: failed program was:" >&5
5465 cat conftest.$ac_ext >&5
5466 rm -rf conftest*
5467 eval "ac_cv_func_$ac_func=no"
5469 rm -f conftest*
5472 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5473 echo "$ac_t""yes" 1>&6
5474 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5475 cat >> confdefs.h <<EOF
5476 #define $ac_tr_func 1
5479 else
5480 echo "$ac_t""no" 1>&6
5482 done
5485 # checks for structures
5486 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5487 echo "configure:5488: checking whether time.h and sys/time.h may both be included" >&5
5488 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5489 echo $ac_n "(cached) $ac_c" 1>&6
5490 else
5491 cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494 #include <sys/types.h>
5495 #include <sys/time.h>
5496 #include <time.h>
5497 int main() {
5498 struct tm *tp;
5499 ; return 0; }
5501 if { (eval echo configure:5502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5502 rm -rf conftest*
5503 ac_cv_header_time=yes
5504 else
5505 echo "configure: failed program was:" >&5
5506 cat conftest.$ac_ext >&5
5507 rm -rf conftest*
5508 ac_cv_header_time=no
5510 rm -f conftest*
5513 echo "$ac_t""$ac_cv_header_time" 1>&6
5514 if test $ac_cv_header_time = yes; then
5515 cat >> confdefs.h <<\EOF
5516 #define TIME_WITH_SYS_TIME 1
5521 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5522 echo "configure:5523: checking whether struct tm is in sys/time.h or time.h" >&5
5523 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5524 echo $ac_n "(cached) $ac_c" 1>&6
5525 else
5526 cat > conftest.$ac_ext <<EOF
5527 #line 5528 "configure"
5528 #include "confdefs.h"
5529 #include <sys/types.h>
5530 #include <time.h>
5531 int main() {
5532 struct tm *tp; tp->tm_sec;
5533 ; return 0; }
5535 if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5536 rm -rf conftest*
5537 ac_cv_struct_tm=time.h
5538 else
5539 echo "configure: failed program was:" >&5
5540 cat conftest.$ac_ext >&5
5541 rm -rf conftest*
5542 ac_cv_struct_tm=sys/time.h
5544 rm -f conftest*
5547 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5548 if test $ac_cv_struct_tm = sys/time.h; then
5549 cat >> confdefs.h <<\EOF
5550 #define TM_IN_SYS_TIME 1
5555 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5556 echo "configure:5557: checking for tm_zone in struct tm" >&5
5557 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5558 echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 #include <sys/types.h>
5564 #include <$ac_cv_struct_tm>
5565 int main() {
5566 struct tm tm; tm.tm_zone;
5567 ; return 0; }
5569 if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5570 rm -rf conftest*
5571 ac_cv_struct_tm_zone=yes
5572 else
5573 echo "configure: failed program was:" >&5
5574 cat conftest.$ac_ext >&5
5575 rm -rf conftest*
5576 ac_cv_struct_tm_zone=no
5578 rm -f conftest*
5581 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5582 if test "$ac_cv_struct_tm_zone" = yes; then
5583 cat >> confdefs.h <<\EOF
5584 #define HAVE_TM_ZONE 1
5587 else
5588 echo $ac_n "checking for tzname""... $ac_c" 1>&6
5589 echo "configure:5590: checking for tzname" >&5
5590 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5591 echo $ac_n "(cached) $ac_c" 1>&6
5592 else
5593 cat > conftest.$ac_ext <<EOF
5594 #line 5595 "configure"
5595 #include "confdefs.h"
5596 #include <time.h>
5597 #ifndef tzname /* For SGI. */
5598 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
5599 #endif
5600 int main() {
5601 atoi(*tzname);
5602 ; return 0; }
5604 if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5605 rm -rf conftest*
5606 ac_cv_var_tzname=yes
5607 else
5608 echo "configure: failed program was:" >&5
5609 cat conftest.$ac_ext >&5
5610 rm -rf conftest*
5611 ac_cv_var_tzname=no
5613 rm -f conftest*
5616 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5617 if test $ac_cv_var_tzname = yes; then
5618 cat >> confdefs.h <<\EOF
5619 #define HAVE_TZNAME 1
5626 echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
5627 echo "configure:5628: checking for time.h that defines altzone" >&5
5628 if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
5629 echo $ac_n "(cached) $ac_c" 1>&6
5630 else
5631 cat > conftest.$ac_ext <<EOF
5632 #line 5633 "configure"
5633 #include "confdefs.h"
5634 #include <time.h>
5635 int main() {
5636 return altzone;
5637 ; return 0; }
5639 if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5640 rm -rf conftest*
5641 ac_cv_header_time_altzone=yes
5642 else
5643 echo "configure: failed program was:" >&5
5644 cat conftest.$ac_ext >&5
5645 rm -rf conftest*
5646 ac_cv_header_time_altzone=no
5648 rm -f conftest*
5651 echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
5652 if test $ac_cv_header_time_altzone = yes; then
5653 cat >> confdefs.h <<\EOF
5654 #define HAVE_ALTZONE 1
5659 was_it_defined=no
5660 echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
5661 echo "configure:5662: checking whether sys/select.h and sys/time.h may both be included" >&5
5662 cat > conftest.$ac_ext <<EOF
5663 #line 5664 "configure"
5664 #include "confdefs.h"
5666 #include <sys/types.h>
5667 #include <sys/select.h>
5668 #include <sys/time.h>
5670 int main() {
5672 ; return 0; }
5674 if { (eval echo configure:5675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5675 rm -rf conftest*
5676 cat >> confdefs.h <<\EOF
5677 #define SYS_SELECT_WITH_SYS_TIME 1
5679 was_it_defined=yes
5680 else
5681 echo "configure: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5684 rm -f conftest*
5685 echo "$ac_t""$was_it_defined" 1>&6
5687 echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
5688 echo "configure:5689: checking for addrinfo" >&5
5689 if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5690 echo $ac_n "(cached) $ac_c" 1>&6
5691 else
5692 cat > conftest.$ac_ext <<EOF
5693 #line 5694 "configure"
5694 #include "confdefs.h"
5696 # include <netdb.h>
5697 int main() {
5698 struct addrinfo a
5699 ; return 0; }
5701 if { (eval echo configure:5702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5702 rm -rf conftest*
5703 ac_cv_struct_addrinfo=yes
5704 else
5705 echo "configure: failed program was:" >&5
5706 cat conftest.$ac_ext >&5
5707 rm -rf conftest*
5708 ac_cv_struct_addrinfo=no
5710 rm -f conftest*
5713 echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5714 if test $ac_cv_struct_addrinfo = yes; then
5715 cat >> confdefs.h <<\EOF
5716 #define HAVE_ADDRINFO 1
5721 echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
5722 echo "configure:5723: checking for sockaddr_storage" >&5
5723 if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5724 echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726 cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5730 # include <sys/types.h>
5731 # include <sys/socket.h>
5732 int main() {
5733 struct sockaddr_storage s
5734 ; return 0; }
5736 if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5737 rm -rf conftest*
5738 ac_cv_struct_sockaddr_storage=yes
5739 else
5740 echo "configure: failed program was:" >&5
5741 cat conftest.$ac_ext >&5
5742 rm -rf conftest*
5743 ac_cv_struct_sockaddr_storage=no
5745 rm -f conftest*
5748 echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5749 if test $ac_cv_struct_sockaddr_storage = yes; then
5750 cat >> confdefs.h <<\EOF
5751 #define HAVE_SOCKADDR_STORAGE 1
5756 # checks for compiler characteristics
5758 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
5759 echo "configure:5760: checking whether char is unsigned" >&5
5760 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
5761 echo $ac_n "(cached) $ac_c" 1>&6
5762 else
5763 if test "$GCC" = yes; then
5764 # GCC predefines this symbol on systems where it applies.
5765 cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 #ifdef __CHAR_UNSIGNED__
5770 #endif
5773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5774 egrep "yes" >/dev/null 2>&1; then
5775 rm -rf conftest*
5776 ac_cv_c_char_unsigned=yes
5777 else
5778 rm -rf conftest*
5779 ac_cv_c_char_unsigned=no
5781 rm -f conftest*
5783 else
5784 if test "$cross_compiling" = yes; then
5785 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5786 else
5787 cat > conftest.$ac_ext <<EOF
5788 #line 5789 "configure"
5789 #include "confdefs.h"
5790 /* volatile prevents gcc2 from optimizing the test away on sparcs. */
5791 #if !defined(__STDC__) || __STDC__ != 1
5792 #define volatile
5793 #endif
5794 main() {
5795 volatile char c = 255; exit(c < 0);
5798 if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5799 then
5800 ac_cv_c_char_unsigned=yes
5801 else
5802 echo "configure: failed program was:" >&5
5803 cat conftest.$ac_ext >&5
5804 rm -fr conftest*
5805 ac_cv_c_char_unsigned=no
5807 rm -fr conftest*
5813 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
5814 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5815 cat >> confdefs.h <<\EOF
5816 #define __CHAR_UNSIGNED__ 1
5821 echo $ac_n "checking for working const""... $ac_c" 1>&6
5822 echo "configure:5823: checking for working const" >&5
5823 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5824 echo $ac_n "(cached) $ac_c" 1>&6
5825 else
5826 cat > conftest.$ac_ext <<EOF
5827 #line 5828 "configure"
5828 #include "confdefs.h"
5830 int main() {
5832 /* Ultrix mips cc rejects this. */
5833 typedef int charset[2]; const charset x;
5834 /* SunOS 4.1.1 cc rejects this. */
5835 char const *const *ccp;
5836 char **p;
5837 /* NEC SVR4.0.2 mips cc rejects this. */
5838 struct point {int x, y;};
5839 static struct point const zero = {0,0};
5840 /* AIX XL C 1.02.0.0 rejects this.
5841 It does not let you subtract one const X* pointer from another in an arm
5842 of an if-expression whose if-part is not a constant expression */
5843 const char *g = "string";
5844 ccp = &g + (g ? g-g : 0);
5845 /* HPUX 7.0 cc rejects these. */
5846 ++ccp;
5847 p = (char**) ccp;
5848 ccp = (char const *const *) p;
5849 { /* SCO 3.2v4 cc rejects this. */
5850 char *t;
5851 char const *s = 0 ? (char *) 0 : (char const *) 0;
5853 *t++ = 0;
5855 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5856 int x[] = {25, 17};
5857 const int *foo = &x[0];
5858 ++foo;
5860 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5861 typedef const int *iptr;
5862 iptr p = 0;
5863 ++p;
5865 { /* AIX XL C 1.02.0.0 rejects this saying
5866 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5867 struct s { int j; const int *ap[3]; };
5868 struct s *b; b->j = 5;
5870 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5871 const int foo = 10;
5874 ; return 0; }
5876 if { (eval echo configure:5877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5877 rm -rf conftest*
5878 ac_cv_c_const=yes
5879 else
5880 echo "configure: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 rm -rf conftest*
5883 ac_cv_c_const=no
5885 rm -f conftest*
5888 echo "$ac_t""$ac_cv_c_const" 1>&6
5889 if test $ac_cv_c_const = no; then
5890 cat >> confdefs.h <<\EOF
5891 #define const
5897 works=no
5898 echo $ac_n "checking for working volatile""... $ac_c" 1>&6
5899 echo "configure:5900: checking for working volatile" >&5
5900 cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5904 int main() {
5905 volatile int x; x = 0;
5906 ; return 0; }
5908 if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5909 rm -rf conftest*
5910 works=yes
5911 else
5912 echo "configure: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 rm -rf conftest*
5915 cat >> confdefs.h <<\EOF
5916 #define volatile
5920 rm -f conftest*
5921 echo "$ac_t""$works" 1>&6
5923 works=no
5924 echo $ac_n "checking for working signed char""... $ac_c" 1>&6
5925 echo "configure:5926: checking for working signed char" >&5
5926 cat > conftest.$ac_ext <<EOF
5927 #line 5928 "configure"
5928 #include "confdefs.h"
5930 int main() {
5931 signed char c;
5932 ; return 0; }
5934 if { (eval echo configure:5935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5935 rm -rf conftest*
5936 works=yes
5937 else
5938 echo "configure: failed program was:" >&5
5939 cat conftest.$ac_ext >&5
5940 rm -rf conftest*
5941 cat >> confdefs.h <<\EOF
5942 #define signed
5946 rm -f conftest*
5947 echo "$ac_t""$works" 1>&6
5949 have_prototypes=no
5950 echo $ac_n "checking for prototypes""... $ac_c" 1>&6
5951 echo "configure:5952: checking for prototypes" >&5
5952 cat > conftest.$ac_ext <<EOF
5953 #line 5954 "configure"
5954 #include "confdefs.h"
5955 int foo(int x) { return 0; }
5956 int main() {
5957 return foo(10);
5958 ; return 0; }
5960 if { (eval echo configure:5961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5961 rm -rf conftest*
5962 cat >> confdefs.h <<\EOF
5963 #define HAVE_PROTOTYPES 1
5965 have_prototypes=yes
5966 else
5967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5970 rm -f conftest*
5971 echo "$ac_t""$have_prototypes" 1>&6
5973 works=no
5974 echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
5975 echo "configure:5976: checking for variable length prototypes and stdarg.h" >&5
5976 cat > conftest.$ac_ext <<EOF
5977 #line 5978 "configure"
5978 #include "confdefs.h"
5980 #include <stdarg.h>
5981 int foo(int x, ...) {
5982 va_list va;
5983 va_start(va, x);
5984 va_arg(va, int);
5985 va_arg(va, char *);
5986 va_arg(va, double);
5987 return 0;
5990 int main() {
5991 return foo(10, "", 3.14);
5992 ; return 0; }
5994 if { (eval echo configure:5995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5995 rm -rf conftest*
5996 cat >> confdefs.h <<\EOF
5997 #define HAVE_STDARG_PROTOTYPES 1
5999 works=yes
6000 else
6001 echo "configure: failed program was:" >&5
6002 cat conftest.$ac_ext >&5
6004 rm -f conftest*
6005 echo "$ac_t""$works" 1>&6
6007 if test "$have_prototypes" = yes; then
6008 bad_prototypes=no
6009 echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
6010 echo "configure:6011: checking for bad exec* prototypes" >&5
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014 #include <unistd.h>
6015 int main() {
6016 char **t;execve("@",t,t);
6017 ; return 0; }
6019 if { (eval echo configure:6020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6021 else
6022 echo "configure: failed program was:" >&5
6023 cat conftest.$ac_ext >&5
6024 rm -rf conftest*
6025 cat >> confdefs.h <<\EOF
6026 #define BAD_EXEC_PROTOTYPES 1
6028 bad_prototypes=yes
6030 rm -f conftest*
6031 echo "$ac_t""$bad_prototypes" 1>&6
6034 # check if sockaddr has sa_len member
6035 echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
6036 echo "configure:6037: checking if sockaddr has sa_len member" >&5
6037 cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040 #include <sys/types.h>
6041 #include <sys/socket.h>
6042 int main() {
6043 struct sockaddr x;
6044 x.sa_len = 0;
6045 ; return 0; }
6047 if { (eval echo configure:6048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6048 rm -rf conftest*
6049 echo "$ac_t""yes" 1>&6
6050 cat >> confdefs.h <<\EOF
6051 #define HAVE_SOCKADDR_SA_LEN 1
6054 else
6055 echo "configure: failed program was:" >&5
6056 cat conftest.$ac_ext >&5
6057 rm -rf conftest*
6058 echo "$ac_t""no" 1>&6
6060 rm -f conftest*
6062 echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
6063 echo "configure:6064: checking for bad static forward" >&5
6064 if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6065 echo $ac_n "(cached) $ac_c" 1>&6
6066 else
6067 if test "$cross_compiling" = yes; then
6068 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6069 else
6070 cat > conftest.$ac_ext <<EOF
6071 #line 6072 "configure"
6072 #include "confdefs.h"
6074 struct s { int a; int b; };
6075 static struct s foo;
6076 int foobar() {
6077 static int random;
6078 random = (int) &foo;
6079 return random;
6081 static struct s foo = { 1, 2 };
6082 main() {
6083 exit(!((int)&foo == foobar()));
6086 if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6087 then
6088 ac_cv_bad_static_forward=no
6089 else
6090 echo "configure: failed program was:" >&5
6091 cat conftest.$ac_ext >&5
6092 rm -fr conftest*
6093 ac_cv_bad_static_forward=yes
6095 rm -fr conftest*
6100 echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6101 if test "$ac_cv_bad_static_forward" = yes
6102 then
6103 cat >> confdefs.h <<\EOF
6104 #define BAD_STATIC_FORWARD 1
6109 va_list_is_array=no
6110 echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
6111 echo "configure:6112: checking whether va_list is an array" >&5
6112 cat > conftest.$ac_ext <<EOF
6113 #line 6114 "configure"
6114 #include "confdefs.h"
6116 #ifdef HAVE_STDARG_PROTOTYPES
6117 #include <stdarg.h>
6118 #else
6119 #include <varargs.h>
6120 #endif
6122 int main() {
6123 va_list list1, list2; list1 = list2;
6124 ; return 0; }
6126 if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6128 else
6129 echo "configure: failed program was:" >&5
6130 cat conftest.$ac_ext >&5
6131 rm -rf conftest*
6132 cat >> confdefs.h <<\EOF
6133 #define VA_LIST_IS_ARRAY 1
6135 va_list_is_array=yes
6137 rm -f conftest*
6138 echo "$ac_t""$va_list_is_array" 1>&6
6140 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6141 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
6142 echo "configure:6143: checking for gethostbyname_r" >&5
6143 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6144 echo $ac_n "(cached) $ac_c" 1>&6
6145 else
6146 cat > conftest.$ac_ext <<EOF
6147 #line 6148 "configure"
6148 #include "confdefs.h"
6149 /* System header to define __stub macros and hopefully few prototypes,
6150 which can conflict with char gethostbyname_r(); below. */
6151 #include <assert.h>
6152 /* Override any gcc2 internal prototype to avoid an error. */
6153 /* We use char because int might match the return type of a gcc2
6154 builtin and then its argument prototype would still apply. */
6155 char gethostbyname_r();
6157 int main() {
6159 /* The GNU C library defines this for functions which it implements
6160 to always fail with ENOSYS. Some functions are actually named
6161 something starting with __ and the normal name is an alias. */
6162 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6163 choke me
6164 #else
6165 gethostbyname_r();
6166 #endif
6168 ; return 0; }
6170 if { (eval echo configure:6171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6171 rm -rf conftest*
6172 eval "ac_cv_func_gethostbyname_r=yes"
6173 else
6174 echo "configure: failed program was:" >&5
6175 cat conftest.$ac_ext >&5
6176 rm -rf conftest*
6177 eval "ac_cv_func_gethostbyname_r=no"
6179 rm -f conftest*
6182 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6183 echo "$ac_t""yes" 1>&6
6185 cat >> confdefs.h <<\EOF
6186 #define HAVE_GETHOSTBYNAME_R 1
6189 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
6190 echo "configure:6191: checking gethostbyname_r with 6 args" >&5
6191 OLD_CFLAGS=$CFLAGS
6192 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6193 cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6197 # include <netdb.h>
6199 int main() {
6201 char *name;
6202 struct hostent *he, *res;
6203 char buffer[2048];
6204 int buflen = 2048;
6205 int h_errnop;
6207 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6209 ; return 0; }
6211 if { (eval echo configure:6212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6212 rm -rf conftest*
6214 cat >> confdefs.h <<\EOF
6215 #define HAVE_GETHOSTBYNAME_R 1
6218 cat >> confdefs.h <<\EOF
6219 #define HAVE_GETHOSTBYNAME_R_6_ARG 1
6222 echo "$ac_t""yes" 1>&6
6224 else
6225 echo "configure: failed program was:" >&5
6226 cat conftest.$ac_ext >&5
6227 rm -rf conftest*
6229 echo "$ac_t""no" 1>&6
6230 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
6231 echo "configure:6232: checking gethostbyname_r with 5 args" >&5
6232 cat > conftest.$ac_ext <<EOF
6233 #line 6234 "configure"
6234 #include "confdefs.h"
6236 # include <netdb.h>
6238 int main() {
6240 char *name;
6241 struct hostent *he;
6242 char buffer[2048];
6243 int buflen = 2048;
6244 int h_errnop;
6246 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6248 ; return 0; }
6250 if { (eval echo configure:6251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6251 rm -rf conftest*
6253 cat >> confdefs.h <<\EOF
6254 #define HAVE_GETHOSTBYNAME_R 1
6257 cat >> confdefs.h <<\EOF
6258 #define HAVE_GETHOSTBYNAME_R_5_ARG 1
6261 echo "$ac_t""yes" 1>&6
6263 else
6264 echo "configure: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6266 rm -rf conftest*
6268 echo "$ac_t""no" 1>&6
6269 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
6270 echo "configure:6271: checking gethostbyname_r with 3 args" >&5
6271 cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6275 # include <netdb.h>
6277 int main() {
6279 char *name;
6280 struct hostent *he;
6281 struct hostent_data data;
6283 (void) gethostbyname_r(name, he, &data);
6285 ; return 0; }
6287 if { (eval echo configure:6288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6288 rm -rf conftest*
6290 cat >> confdefs.h <<\EOF
6291 #define HAVE_GETHOSTBYNAME_R 1
6294 cat >> confdefs.h <<\EOF
6295 #define HAVE_GETHOSTBYNAME_R_3_ARG 1
6298 echo "$ac_t""yes" 1>&6
6300 else
6301 echo "configure: failed program was:" >&5
6302 cat conftest.$ac_ext >&5
6303 rm -rf conftest*
6305 echo "$ac_t""no" 1>&6
6308 rm -f conftest*
6311 rm -f conftest*
6314 rm -f conftest*
6315 CFLAGS=$OLD_CFLAGS
6317 else
6318 echo "$ac_t""no" 1>&6
6320 for ac_func in gethostbyname
6322 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6323 echo "configure:6324: checking for $ac_func" >&5
6324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6325 echo $ac_n "(cached) $ac_c" 1>&6
6326 else
6327 cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330 /* System header to define __stub macros and hopefully few prototypes,
6331 which can conflict with char $ac_func(); below. */
6332 #include <assert.h>
6333 /* Override any gcc2 internal prototype to avoid an error. */
6334 /* We use char because int might match the return type of a gcc2
6335 builtin and then its argument prototype would still apply. */
6336 char $ac_func();
6338 int main() {
6340 /* The GNU C library defines this for functions which it implements
6341 to always fail with ENOSYS. Some functions are actually named
6342 something starting with __ and the normal name is an alias. */
6343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6344 choke me
6345 #else
6346 $ac_func();
6347 #endif
6349 ; return 0; }
6351 if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6352 rm -rf conftest*
6353 eval "ac_cv_func_$ac_func=yes"
6354 else
6355 echo "configure: failed program was:" >&5
6356 cat conftest.$ac_ext >&5
6357 rm -rf conftest*
6358 eval "ac_cv_func_$ac_func=no"
6360 rm -f conftest*
6363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6364 echo "$ac_t""yes" 1>&6
6365 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6366 cat >> confdefs.h <<EOF
6367 #define $ac_tr_func 1
6370 else
6371 echo "$ac_t""no" 1>&6
6373 done
6384 # checks for system services
6385 # (none yet)
6387 # Linux requires this for correct f.p. operations
6388 echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
6389 echo "configure:6390: checking for __fpu_control" >&5
6390 if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6391 echo $ac_n "(cached) $ac_c" 1>&6
6392 else
6393 cat > conftest.$ac_ext <<EOF
6394 #line 6395 "configure"
6395 #include "confdefs.h"
6396 /* System header to define __stub macros and hopefully few prototypes,
6397 which can conflict with char __fpu_control(); below. */
6398 #include <assert.h>
6399 /* Override any gcc2 internal prototype to avoid an error. */
6400 /* We use char because int might match the return type of a gcc2
6401 builtin and then its argument prototype would still apply. */
6402 char __fpu_control();
6404 int main() {
6406 /* The GNU C library defines this for functions which it implements
6407 to always fail with ENOSYS. Some functions are actually named
6408 something starting with __ and the normal name is an alias. */
6409 #if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6410 choke me
6411 #else
6412 __fpu_control();
6413 #endif
6415 ; return 0; }
6417 if { (eval echo configure:6418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6418 rm -rf conftest*
6419 eval "ac_cv_func___fpu_control=yes"
6420 else
6421 echo "configure: failed program was:" >&5
6422 cat conftest.$ac_ext >&5
6423 rm -rf conftest*
6424 eval "ac_cv_func___fpu_control=no"
6426 rm -f conftest*
6429 if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6430 echo "$ac_t""yes" 1>&6
6432 else
6433 echo "$ac_t""no" 1>&6
6434 echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
6435 echo "configure:6436: checking for __fpu_control in -lieee" >&5
6436 ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6437 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6438 echo $ac_n "(cached) $ac_c" 1>&6
6439 else
6440 ac_save_LIBS="$LIBS"
6441 LIBS="-lieee $LIBS"
6442 cat > conftest.$ac_ext <<EOF
6443 #line 6444 "configure"
6444 #include "confdefs.h"
6445 /* Override any gcc2 internal prototype to avoid an error. */
6446 /* We use char because int might match the return type of a gcc2
6447 builtin and then its argument prototype would still apply. */
6448 char __fpu_control();
6450 int main() {
6451 __fpu_control()
6452 ; return 0; }
6454 if { (eval echo configure:6455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6455 rm -rf conftest*
6456 eval "ac_cv_lib_$ac_lib_var=yes"
6457 else
6458 echo "configure: failed program was:" >&5
6459 cat conftest.$ac_ext >&5
6460 rm -rf conftest*
6461 eval "ac_cv_lib_$ac_lib_var=no"
6463 rm -f conftest*
6464 LIBS="$ac_save_LIBS"
6467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6468 echo "$ac_t""yes" 1>&6
6469 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6470 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6471 cat >> confdefs.h <<EOF
6472 #define $ac_tr_lib 1
6475 LIBS="-lieee $LIBS"
6477 else
6478 echo "$ac_t""no" 1>&6
6485 # Check for --with-fpectl
6486 echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
6487 echo "configure:6488: checking for --with-fpectl" >&5
6488 # Check whether --with-fpectl or --without-fpectl was given.
6489 if test "${with_fpectl+set}" = set; then
6490 withval="$with_fpectl"
6492 if test "$withval" != no
6493 then cat >> confdefs.h <<\EOF
6494 #define WANT_SIGFPE_HANDLER 1
6496 echo "$ac_t""yes" 1>&6
6497 else echo "$ac_t""no" 1>&6
6499 else
6500 echo "$ac_t""no" 1>&6
6504 # check for --with-libm=...
6506 case $ac_sys_system in
6507 Darwin) ;;
6508 BeOS) ;;
6509 *) LIBM=-lm
6510 esac
6511 echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
6512 echo "configure:6513: checking for --with-libm=STRING" >&5
6513 # Check whether --with-libm or --without-libm was given.
6514 if test "${with_libm+set}" = set; then
6515 withval="$with_libm"
6517 if test "$withval" = no
6518 then LIBM=
6519 echo "$ac_t""force LIBM empty" 1>&6
6520 elif test "$withval" != yes
6521 then LIBM=$withval
6522 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6523 else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
6525 else
6526 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6530 # check for --with-libc=...
6532 echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
6533 echo "configure:6534: checking for --with-libc=STRING" >&5
6534 # Check whether --with-libc or --without-libc was given.
6535 if test "${with_libc+set}" = set; then
6536 withval="$with_libc"
6538 if test "$withval" = no
6539 then LIBC=
6540 echo "$ac_t""force LIBC empty" 1>&6
6541 elif test "$withval" != yes
6542 then LIBC=$withval
6543 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6544 else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
6546 else
6547 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6551 # check for hypot() in math library
6552 LIBS_SAVE=$LIBS
6553 LIBS="$LIBS $LIBM"
6554 for ac_func in hypot
6556 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6557 echo "configure:6558: checking for $ac_func" >&5
6558 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6559 echo $ac_n "(cached) $ac_c" 1>&6
6560 else
6561 cat > conftest.$ac_ext <<EOF
6562 #line 6563 "configure"
6563 #include "confdefs.h"
6564 /* System header to define __stub macros and hopefully few prototypes,
6565 which can conflict with char $ac_func(); below. */
6566 #include <assert.h>
6567 /* Override any gcc2 internal prototype to avoid an error. */
6568 /* We use char because int might match the return type of a gcc2
6569 builtin and then its argument prototype would still apply. */
6570 char $ac_func();
6572 int main() {
6574 /* The GNU C library defines this for functions which it implements
6575 to always fail with ENOSYS. Some functions are actually named
6576 something starting with __ and the normal name is an alias. */
6577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6578 choke me
6579 #else
6580 $ac_func();
6581 #endif
6583 ; return 0; }
6585 if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6586 rm -rf conftest*
6587 eval "ac_cv_func_$ac_func=yes"
6588 else
6589 echo "configure: failed program was:" >&5
6590 cat conftest.$ac_ext >&5
6591 rm -rf conftest*
6592 eval "ac_cv_func_$ac_func=no"
6594 rm -f conftest*
6597 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6598 echo "$ac_t""yes" 1>&6
6599 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6600 cat >> confdefs.h <<EOF
6601 #define $ac_tr_func 1
6604 else
6605 echo "$ac_t""no" 1>&6
6606 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
6608 done
6611 LIBS=$LIBS_SAVE
6613 # check whether malloc(0) returns NULL or not
6614 echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
6615 echo "configure:6616: checking what malloc(0) returns" >&5
6616 if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6617 echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619 if test "$cross_compiling" = yes; then
6620 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6621 else
6622 cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 #include <stdio.h>
6626 #ifdef HAVE_STDLIB
6627 #include <stdlib.h>
6628 #else
6629 char *malloc(), *realloc();
6630 int *free();
6631 #endif
6632 main() {
6633 char *p;
6634 p = malloc(0);
6635 if (p == NULL) exit(1);
6636 p = realloc(p, 0);
6637 if (p == NULL) exit(1);
6638 free(p);
6639 exit(0);
6642 if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6643 then
6644 ac_cv_malloc_zero=nonnull
6645 else
6646 echo "configure: failed program was:" >&5
6647 cat conftest.$ac_ext >&5
6648 rm -fr conftest*
6649 ac_cv_malloc_zero=null
6651 rm -fr conftest*
6656 echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6657 if test "$ac_cv_malloc_zero" = null
6658 then
6659 cat >> confdefs.h <<\EOF
6660 #define MALLOC_ZERO_RETURNS_NULL 1
6665 # check for wchar.h
6666 ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6667 echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
6668 echo "configure:6669: checking for wchar.h" >&5
6669 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6670 echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672 cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 #include <wchar.h>
6677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6678 { (eval echo configure:6679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6680 if test -z "$ac_err"; then
6681 rm -rf conftest*
6682 eval "ac_cv_header_$ac_safe=yes"
6683 else
6684 echo "$ac_err" >&5
6685 echo "configure: failed program was:" >&5
6686 cat conftest.$ac_ext >&5
6687 rm -rf conftest*
6688 eval "ac_cv_header_$ac_safe=no"
6690 rm -f conftest*
6692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6693 echo "$ac_t""yes" 1>&6
6694 cat >> confdefs.h <<\EOF
6695 #define HAVE_WCHAR_H 1
6697 wchar_h="yes"
6698 else
6699 echo "$ac_t""no" 1>&6
6700 wchar_h="no"
6705 # determine wchar_t size
6706 if test "$wchar_h" = yes
6707 then
6708 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
6709 echo "configure:6710: checking size of wchar_t" >&5
6710 if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6711 echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713 if test "$cross_compiling" = yes; then
6714 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6715 else
6716 cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 #include <stdio.h>
6720 main()
6722 FILE *f=fopen("conftestval", "w");
6723 if (!f) exit(1);
6724 fprintf(f, "%d\n", sizeof(wchar_t));
6725 exit(0);
6728 if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6729 then
6730 ac_cv_sizeof_wchar_t=`cat conftestval`
6731 else
6732 echo "configure: failed program was:" >&5
6733 cat conftest.$ac_ext >&5
6734 rm -fr conftest*
6735 ac_cv_sizeof_wchar_t=0
6737 rm -fr conftest*
6741 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6742 cat >> confdefs.h <<EOF
6743 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6749 echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
6750 echo "configure:6751: checking what type to use for unicode" >&5
6751 # Check whether --enable-unicode or --disable-unicode was given.
6752 if test "${enable_unicode+set}" = set; then
6753 enableval="$enable_unicode"
6755 else
6756 enable_unicode=yes
6760 if test $enable_unicode = yes
6761 then
6762 # Without any arguments, Py_UNICODE defaults to two-byte mode
6763 enable_unicode="ucs2"
6766 case "$enable_unicode" in
6767 ucs2) unicode_size="2"
6768 cat >> confdefs.h <<\EOF
6769 #define Py_UNICODE_SIZE 2
6773 ucs4) unicode_size="4"
6774 cat >> confdefs.h <<\EOF
6775 #define Py_UNICODE_SIZE 4
6779 esac
6782 if test "$enable_unicode" = "no"
6783 then
6784 UNICODE_OBJS=""
6785 echo "$ac_t""not used" 1>&6
6786 else
6787 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
6788 cat >> confdefs.h <<\EOF
6789 #define Py_USING_UNICODE 1
6792 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6793 then
6794 PY_UNICODE_TYPE="wchar_t"
6795 cat >> confdefs.h <<\EOF
6796 #define HAVE_USABLE_WCHAR_T 1
6799 cat >> confdefs.h <<\EOF
6800 #define PY_UNICODE_TYPE wchar_t
6803 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6804 then
6805 PY_UNICODE_TYPE="unsigned short"
6806 cat >> confdefs.h <<\EOF
6807 #define PY_UNICODE_TYPE unsigned short
6810 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6811 then
6812 PY_UNICODE_TYPE="unsigned long"
6813 cat >> confdefs.h <<\EOF
6814 #define PY_UNICODE_TYPE unsigned long
6817 else
6818 PY_UNICODE_TYPE="no type found"
6820 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6823 # check for endianness
6824 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
6825 echo "configure:6826: checking whether byte ordering is bigendian" >&5
6826 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
6827 echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829 ac_cv_c_bigendian=unknown
6830 # See if sys/param.h defines the BYTE_ORDER macro.
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 #include <sys/types.h>
6835 #include <sys/param.h>
6836 int main() {
6838 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6839 bogus endian macros
6840 #endif
6841 ; return 0; }
6843 if { (eval echo configure:6844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6844 rm -rf conftest*
6845 # It does; now see whether it defined to BIG_ENDIAN or not.
6846 cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 #include <sys/types.h>
6850 #include <sys/param.h>
6851 int main() {
6853 #if BYTE_ORDER != BIG_ENDIAN
6854 not big endian
6855 #endif
6856 ; return 0; }
6858 if { (eval echo configure:6859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6859 rm -rf conftest*
6860 ac_cv_c_bigendian=yes
6861 else
6862 echo "configure: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864 rm -rf conftest*
6865 ac_cv_c_bigendian=no
6867 rm -f conftest*
6868 else
6869 echo "configure: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6872 rm -f conftest*
6873 if test $ac_cv_c_bigendian = unknown; then
6874 if test "$cross_compiling" = yes; then
6875 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6876 else
6877 cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880 main () {
6881 /* Are we little or big endian? From Harbison&Steele. */
6882 union
6884 long l;
6885 char c[sizeof (long)];
6886 } u;
6887 u.l = 1;
6888 exit (u.c[sizeof (long) - 1] == 1);
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6892 then
6893 ac_cv_c_bigendian=no
6894 else
6895 echo "configure: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6897 rm -fr conftest*
6898 ac_cv_c_bigendian=yes
6900 rm -fr conftest*
6906 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6907 if test $ac_cv_c_bigendian = yes; then
6908 cat >> confdefs.h <<\EOF
6909 #define WORDS_BIGENDIAN 1
6915 # Check whether right shifting a negative integer extends the sign bit
6916 # or fills with zeros (like the Cray J90, according to Tim Peters).
6917 echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
6918 echo "configure:6919: checking whether right shift extends the sign bit" >&5
6919 if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
6920 echo $ac_n "(cached) $ac_c" 1>&6
6921 else
6923 if test "$cross_compiling" = yes; then
6924 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6925 else
6926 cat > conftest.$ac_ext <<EOF
6927 #line 6928 "configure"
6928 #include "confdefs.h"
6930 int main()
6932 exit(((-1)>>3 == -1) ? 0 : 1);
6936 if { (eval echo configure:6937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6937 then
6938 ac_cv_rshift_extends_sign=yes
6939 else
6940 echo "configure: failed program was:" >&5
6941 cat conftest.$ac_ext >&5
6942 rm -fr conftest*
6943 ac_cv_rshift_extends_sign=no
6945 rm -fr conftest*
6950 echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6951 if test "$ac_cv_rshift_extends_sign" = no
6952 then
6953 cat >> confdefs.h <<\EOF
6954 #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6959 # check for getc_unlocked and related locking functions
6960 echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
6961 echo "configure:6962: checking for getc_unlocked() and friends" >&5
6962 if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6963 echo $ac_n "(cached) $ac_c" 1>&6
6964 else
6966 cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969 #include <stdio.h>
6970 int main() {
6972 FILE *f = fopen("/dev/null", "r");
6973 flockfile(f);
6974 getc_unlocked(f);
6975 funlockfile(f);
6977 ; return 0; }
6979 if { (eval echo configure:6980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6980 rm -rf conftest*
6981 ac_cv_have_getc_unlocked=yes
6982 else
6983 echo "configure: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 rm -rf conftest*
6986 ac_cv_have_getc_unlocked=no
6988 rm -f conftest*
6991 echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6992 if test "$ac_cv_have_getc_unlocked" = yes
6993 then
6994 cat >> confdefs.h <<\EOF
6995 #define HAVE_GETC_UNLOCKED 1
7000 # check for readline 4.2
7001 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
7002 echo "configure:7003: checking for rl_completion_matches in -lreadline" >&5
7003 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7004 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7005 echo $ac_n "(cached) $ac_c" 1>&6
7006 else
7007 ac_save_LIBS="$LIBS"
7008 LIBS="-lreadline -ltermcap $LIBS"
7009 cat > conftest.$ac_ext <<EOF
7010 #line 7011 "configure"
7011 #include "confdefs.h"
7012 /* Override any gcc2 internal prototype to avoid an error. */
7013 /* We use char because int might match the return type of a gcc2
7014 builtin and then its argument prototype would still apply. */
7015 char rl_completion_matches();
7017 int main() {
7018 rl_completion_matches()
7019 ; return 0; }
7021 if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7022 rm -rf conftest*
7023 eval "ac_cv_lib_$ac_lib_var=yes"
7024 else
7025 echo "configure: failed program was:" >&5
7026 cat conftest.$ac_ext >&5
7027 rm -rf conftest*
7028 eval "ac_cv_lib_$ac_lib_var=no"
7030 rm -f conftest*
7031 LIBS="$ac_save_LIBS"
7034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7035 echo "$ac_t""yes" 1>&6
7036 cat >> confdefs.h <<\EOF
7037 #define HAVE_RL_COMPLETION_MATCHES 1
7040 else
7041 echo "$ac_t""no" 1>&6
7045 echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
7046 echo "configure:7047: checking for broken nice()" >&5
7047 if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7048 echo $ac_n "(cached) $ac_c" 1>&6
7049 else
7051 if test "$cross_compiling" = yes; then
7052 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7053 else
7054 cat > conftest.$ac_ext <<EOF
7055 #line 7056 "configure"
7056 #include "confdefs.h"
7058 int main()
7060 int val1 = nice(1);
7061 if (val1 != -1 && val1 == nice(2))
7062 exit(0);
7063 exit(1);
7067 if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7068 then
7069 ac_cv_broken_nice=yes
7070 else
7071 echo "configure: failed program was:" >&5
7072 cat conftest.$ac_ext >&5
7073 rm -fr conftest*
7074 ac_cv_broken_nice=no
7076 rm -fr conftest*
7081 echo "$ac_t""$ac_cv_broken_nice" 1>&6
7082 if test "$ac_cv_broken_nice" = yes
7083 then
7084 cat >> confdefs.h <<\EOF
7085 #define HAVE_BROKEN_NICE 1
7090 # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7091 # Add sys/socket.h to confdefs.h
7092 cat >> confdefs.h <<\EOF
7093 #ifdef HAVE_SYS_SOCKET_H
7094 #include <sys/socket.h>
7095 #endif
7097 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
7098 echo "configure:7099: checking for socklen_t" >&5
7099 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7100 echo $ac_n "(cached) $ac_c" 1>&6
7101 else
7102 cat > conftest.$ac_ext <<EOF
7103 #line 7104 "configure"
7104 #include "confdefs.h"
7105 #include <sys/types.h>
7106 #if STDC_HEADERS
7107 #include <stdlib.h>
7108 #include <stddef.h>
7109 #endif
7111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7112 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7113 rm -rf conftest*
7114 ac_cv_type_socklen_t=yes
7115 else
7116 rm -rf conftest*
7117 ac_cv_type_socklen_t=no
7119 rm -f conftest*
7122 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7123 if test $ac_cv_type_socklen_t = no; then
7124 cat >> confdefs.h <<\EOF
7125 #define socklen_t int
7131 # Add Python/ prefix to LIBOBJS
7132 libobjs=$LIBOBJS
7133 LIBOBJS=
7134 for obj in $libobjs; do
7135 LIBOBJS="$LIBOBJS Python/$obj"
7136 done
7138 #AC_MSG_CHECKING(for Modules/Setup)
7139 #if test ! -f Modules/Setup ; then
7140 # if test ! -d Modules ; then
7141 # mkdir Modules
7142 # fi
7143 # cp "$srcdir/Modules/Setup.dist" Modules/Setup
7144 # AC_MSG_RESULT(creating)
7145 #else
7146 # AC_MSG_RESULT(already exists)
7150 SRCDIRS="Parser Grammar Objects Python Modules"
7151 echo $ac_n "checking for build directories""... $ac_c" 1>&6
7152 echo "configure:7153: checking for build directories" >&5
7153 for dir in $SRCDIRS; do
7154 if test ! -d $dir; then
7155 mkdir $dir
7157 done
7158 echo "$ac_t""done" 1>&6
7160 # generate output files
7161 trap '' 1 2 15
7162 cat > confcache <<\EOF
7163 # This file is a shell script that caches the results of configure
7164 # tests run on this system so they can be shared between configure
7165 # scripts and configure runs. It is not useful on other systems.
7166 # If it contains results you don't want to keep, you may remove or edit it.
7168 # By default, configure uses ./config.cache as the cache file,
7169 # creating it if it does not exist already. You can give configure
7170 # the --cache-file=FILE option to use a different cache file; that is
7171 # what configure does when it calls configure scripts in
7172 # subdirectories, so they share the cache.
7173 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7174 # config.status only pays attention to the cache file if you give it the
7175 # --recheck option to rerun configure.
7178 # The following way of writing the cache mishandles newlines in values,
7179 # but we know of no workaround that is simple, portable, and efficient.
7180 # So, don't put newlines in cache variables' values.
7181 # Ultrix sh set writes to stderr and can't be redirected directly,
7182 # and sets the high bit in the cache file unless we assign to the vars.
7183 (set) 2>&1 |
7184 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7185 *ac_space=\ *)
7186 # `set' does not quote correctly, so add quotes (double-quote substitution
7187 # turns \\\\ into \\, and sed turns \\ into \).
7188 sed -n \
7189 -e "s/'/'\\\\''/g" \
7190 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7193 # `set' quotes correctly as required by POSIX, so do not add quotes.
7194 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7196 esac >> confcache
7197 if cmp -s $cache_file confcache; then
7199 else
7200 if test -w $cache_file; then
7201 echo "updating cache $cache_file"
7202 cat confcache > $cache_file
7203 else
7204 echo "not updating unwritable cache $cache_file"
7207 rm -f confcache
7209 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7211 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7212 # Let make expand exec_prefix.
7213 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7215 # Any assignment to VPATH causes Sun make to only execute
7216 # the first set of double-colon rules, so remove it if not needed.
7217 # If there is a colon in the path, we need to keep it.
7218 if test "x$srcdir" = x.; then
7219 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7222 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7224 DEFS=-DHAVE_CONFIG_H
7226 # Without the "./", some shells look in PATH for config.status.
7227 : ${CONFIG_STATUS=./config.status}
7229 echo creating $CONFIG_STATUS
7230 rm -f $CONFIG_STATUS
7231 cat > $CONFIG_STATUS <<EOF
7232 #! /bin/sh
7233 # Generated automatically by configure.
7234 # Run this file to recreate the current configuration.
7235 # This directory was configured as follows,
7236 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7238 # $0 $ac_configure_args
7240 # Compiler output produced by configure, useful for debugging
7241 # configure, is in ./config.log if it exists.
7243 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7244 for ac_option
7246 case "\$ac_option" in
7247 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7248 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7249 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7250 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7251 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7252 exit 0 ;;
7253 -help | --help | --hel | --he | --h)
7254 echo "\$ac_cs_usage"; exit 0 ;;
7255 *) echo "\$ac_cs_usage"; exit 1 ;;
7256 esac
7257 done
7259 ac_given_srcdir=$srcdir
7260 ac_given_INSTALL="$INSTALL"
7262 trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7264 cat >> $CONFIG_STATUS <<EOF
7266 # Protect against being on the right side of a sed subst in config.status.
7267 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7268 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7269 $ac_vpsub
7270 $extrasub
7271 s%@SHELL@%$SHELL%g
7272 s%@CFLAGS@%$CFLAGS%g
7273 s%@CPPFLAGS@%$CPPFLAGS%g
7274 s%@CXXFLAGS@%$CXXFLAGS%g
7275 s%@FFLAGS@%$FFLAGS%g
7276 s%@DEFS@%$DEFS%g
7277 s%@LDFLAGS@%$LDFLAGS%g
7278 s%@LIBS@%$LIBS%g
7279 s%@exec_prefix@%$exec_prefix%g
7280 s%@prefix@%$prefix%g
7281 s%@program_transform_name@%$program_transform_name%g
7282 s%@bindir@%$bindir%g
7283 s%@sbindir@%$sbindir%g
7284 s%@libexecdir@%$libexecdir%g
7285 s%@datadir@%$datadir%g
7286 s%@sysconfdir@%$sysconfdir%g
7287 s%@sharedstatedir@%$sharedstatedir%g
7288 s%@localstatedir@%$localstatedir%g
7289 s%@libdir@%$libdir%g
7290 s%@includedir@%$includedir%g
7291 s%@oldincludedir@%$oldincludedir%g
7292 s%@infodir@%$infodir%g
7293 s%@mandir@%$mandir%g
7294 s%@VERSION@%$VERSION%g
7295 s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7296 s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7297 s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7298 s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7299 s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7300 s%@MACHDEP@%$MACHDEP%g
7301 s%@SGI_ABI@%$SGI_ABI%g
7302 s%@CXX@%$CXX%g
7303 s%@MAINOBJ@%$MAINOBJ%g
7304 s%@CC@%$CC%g
7305 s%@CPP@%$CPP%g
7306 s%@EXEEXT@%$EXEEXT%g
7307 s%@LIBRARY@%$LIBRARY%g
7308 s%@LDLIBRARY@%$LDLIBRARY%g
7309 s%@DLLLIBRARY@%$DLLLIBRARY%g
7310 s%@BLDLIBRARY@%$BLDLIBRARY%g
7311 s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7312 s%@LINKCC@%$LINKCC%g
7313 s%@RANLIB@%$RANLIB%g
7314 s%@AR@%$AR%g
7315 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7316 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7317 s%@INSTALL_DATA@%$INSTALL_DATA%g
7318 s%@LN@%$LN%g
7319 s%@OPT@%$OPT%g
7320 s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7321 s%@SO@%$SO%g
7322 s%@LDSHARED@%$LDSHARED%g
7323 s%@BLDSHARED@%$BLDSHARED%g
7324 s%@CCSHARED@%$CCSHARED%g
7325 s%@LINKFORSHARED@%$LINKFORSHARED%g
7326 s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7327 s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7328 s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7329 s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7330 s%@LDLAST@%$LDLAST%g
7331 s%@DLINCLDIR@%$DLINCLDIR%g
7332 s%@DYNLOADFILE@%$DYNLOADFILE%g
7333 s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7334 s%@LIBOBJS@%$LIBOBJS%g
7335 s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7336 s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7337 s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7338 s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7339 s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7340 s%@LIBM@%$LIBM%g
7341 s%@LIBC@%$LIBC%g
7342 s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7343 s%@SRCDIRS@%$SRCDIRS%g
7345 CEOF
7348 cat >> $CONFIG_STATUS <<\EOF
7350 # Split the substitutions into bite-sized pieces for seds with
7351 # small command number limits, like on Digital OSF/1 and HP-UX.
7352 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7353 ac_file=1 # Number of current file.
7354 ac_beg=1 # First line for current file.
7355 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7356 ac_more_lines=:
7357 ac_sed_cmds=""
7358 while $ac_more_lines; do
7359 if test $ac_beg -gt 1; then
7360 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7361 else
7362 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7364 if test ! -s conftest.s$ac_file; then
7365 ac_more_lines=false
7366 rm -f conftest.s$ac_file
7367 else
7368 if test -z "$ac_sed_cmds"; then
7369 ac_sed_cmds="sed -f conftest.s$ac_file"
7370 else
7371 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7373 ac_file=`expr $ac_file + 1`
7374 ac_beg=$ac_end
7375 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7377 done
7378 if test -z "$ac_sed_cmds"; then
7379 ac_sed_cmds=cat
7383 cat >> $CONFIG_STATUS <<EOF
7385 CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7387 cat >> $CONFIG_STATUS <<\EOF
7388 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7389 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7390 case "$ac_file" in
7391 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7392 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7393 *) ac_file_in="${ac_file}.in" ;;
7394 esac
7396 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7398 # Remove last slash and all that follows it. Not all systems have dirname.
7399 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7400 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7401 # The file is in a subdirectory.
7402 test ! -d "$ac_dir" && mkdir "$ac_dir"
7403 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7404 # A "../" for each directory in $ac_dir_suffix.
7405 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7406 else
7407 ac_dir_suffix= ac_dots=
7410 case "$ac_given_srcdir" in
7411 .) srcdir=.
7412 if test -z "$ac_dots"; then top_srcdir=.
7413 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7414 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7415 *) # Relative path.
7416 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7417 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7418 esac
7420 case "$ac_given_INSTALL" in
7421 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7422 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7423 esac
7425 echo creating "$ac_file"
7426 rm -f "$ac_file"
7427 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7428 case "$ac_file" in
7429 *Makefile*) ac_comsub="1i\\
7430 # $configure_input" ;;
7431 *) ac_comsub= ;;
7432 esac
7434 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7435 sed -e "$ac_comsub
7436 s%@configure_input@%$configure_input%g
7437 s%@srcdir@%$srcdir%g
7438 s%@top_srcdir@%$top_srcdir%g
7439 s%@INSTALL@%$INSTALL%g
7440 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7441 fi; done
7442 rm -f conftest.s*
7444 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7445 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7447 # ac_d sets the value in "#define NAME VALUE" lines.
7448 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7449 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7450 ac_dC='\3'
7451 ac_dD='%g'
7452 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7453 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7454 ac_uB='\([ ]\)%\1#\2define\3'
7455 ac_uC=' '
7456 ac_uD='\4%g'
7457 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7458 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7459 ac_eB='$%\1#\2define\3'
7460 ac_eC=' '
7461 ac_eD='%g'
7463 if test "${CONFIG_HEADERS+set}" != set; then
7465 cat >> $CONFIG_STATUS <<EOF
7466 CONFIG_HEADERS="pyconfig.h"
7468 cat >> $CONFIG_STATUS <<\EOF
7470 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7471 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7472 case "$ac_file" in
7473 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7474 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7475 *) ac_file_in="${ac_file}.in" ;;
7476 esac
7478 echo creating $ac_file
7480 rm -f conftest.frag conftest.in conftest.out
7481 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7482 cat $ac_file_inputs > conftest.in
7486 # Transform confdefs.h into a sed script conftest.vals that substitutes
7487 # the proper values into config.h.in to produce config.h. And first:
7488 # Protect against being on the right side of a sed subst in config.status.
7489 # Protect against being in an unquoted here document in config.status.
7490 rm -f conftest.vals
7491 cat > conftest.hdr <<\EOF
7492 s/[\\&%]/\\&/g
7493 s%[\\$`]%\\&%g
7494 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7495 s%ac_d%ac_u%gp
7496 s%ac_u%ac_e%gp
7498 sed -n -f conftest.hdr confdefs.h > conftest.vals
7499 rm -f conftest.hdr
7501 # This sed command replaces #undef with comments. This is necessary, for
7502 # example, in the case of _POSIX_SOURCE, which is predefined and required
7503 # on some systems where configure will not decide to define it.
7504 cat >> conftest.vals <<\EOF
7505 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7508 # Break up conftest.vals because some shells have a limit on
7509 # the size of here documents, and old seds have small limits too.
7511 rm -f conftest.tail
7512 while :
7514 ac_lines=`grep -c . conftest.vals`
7515 # grep -c gives empty output for an empty file on some AIX systems.
7516 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7517 # Write a limited-size here document to conftest.frag.
7518 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7519 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7520 echo 'CEOF
7521 sed -f conftest.frag conftest.in > conftest.out
7522 rm -f conftest.in
7523 mv conftest.out conftest.in
7524 ' >> $CONFIG_STATUS
7525 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7526 rm -f conftest.vals
7527 mv conftest.tail conftest.vals
7528 done
7529 rm -f conftest.vals
7531 cat >> $CONFIG_STATUS <<\EOF
7532 rm -f conftest.frag conftest.h
7533 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7534 cat conftest.in >> conftest.h
7535 rm -f conftest.in
7536 if cmp -s $ac_file conftest.h 2>/dev/null; then
7537 echo "$ac_file is unchanged"
7538 rm -f conftest.h
7539 else
7540 # Remove last slash and all that follows it. Not all systems have dirname.
7541 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7542 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7543 # The file is in a subdirectory.
7544 test ! -d "$ac_dir" && mkdir "$ac_dir"
7546 rm -f $ac_file
7547 mv conftest.h $ac_file
7549 fi; done
7552 cat >> $CONFIG_STATUS <<EOF
7555 cat >> $CONFIG_STATUS <<\EOF
7557 exit 0
7559 chmod +x $CONFIG_STATUS
7560 rm -fr confdefs* $ac_clean_files
7561 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7564 echo "creating Setup"
7565 if test ! -f Modules/Setup
7566 then
7567 cp $srcdir/Modules/Setup.dist Modules/Setup
7570 echo "creating Setup.local"
7571 if test ! -f Modules/Setup.local
7572 then
7573 echo "# Edit this file for local setup changes" >Modules/Setup.local
7576 echo "creating Makefile"
7577 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7578 -s Modules Modules/Setup.config \
7579 Modules/Setup.local Modules/Setup
7580 mv config.c Modules