]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/configure
Added execut bit for configure
[wxWidgets.git] / wxPython / wxSWIG / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-lang=LANG Set SWIG target language (TCL,TCL8,PYTHON,PERL5,PERL4,GUILE)"
16 ac_help="$ac_help
17 --with-doc=DOC Set SWIG target documentation method (ASCII,LATEX,HTML,NODOC)"
18 ac_help="$ac_help
19 --without-yacc Try to compile without yacc/bison"
20 ac_help="$ac_help
21 --with-libm=STRING math library"
22 ac_help="$ac_help
23 --with-libc=STRING C library"
24 ac_help="$ac_help
25 --with-x use the X Window System"
26 ac_help="$ac_help
27 --with-tcl=path Set location of Tcl package"
28 ac_help="$ac_help
29 --with-tclincl=path Set location of Tcl include directory"
30 ac_help="$ac_help
31 --with-tcllib=path Set location of Tcl library directory"
32 ac_help="$ac_help
33 --with-py=path Set location of Python"
34 ac_help="$ac_help
35 --with-pyincl=path Set location of Python include directory"
36 ac_help="$ac_help
37 --with-pylib=path Set location of Python library directory"
38 ac_help="$ac_help
39 --with-perl5=path Set location of Perl5 executable"
40
41 # Initialize some variables set by options.
42 # The variables have the same names as the options, with
43 # dashes changed to underlines.
44 build=NONE
45 cache_file=./config.cache
46 exec_prefix=NONE
47 host=NONE
48 no_create=
49 nonopt=NONE
50 no_recursion=
51 prefix=NONE
52 program_prefix=NONE
53 program_suffix=NONE
54 program_transform_name=s,x,x,
55 silent=
56 site=
57 srcdir=
58 target=NONE
59 verbose=
60 x_includes=NONE
61 x_libraries=NONE
62 bindir='${exec_prefix}/bin'
63 sbindir='${exec_prefix}/sbin'
64 libexecdir='${exec_prefix}/libexec'
65 datadir='${prefix}/share'
66 sysconfdir='${prefix}/etc'
67 sharedstatedir='${prefix}/com'
68 localstatedir='${prefix}/var'
69 libdir='${exec_prefix}/lib'
70 includedir='${prefix}/include'
71 oldincludedir='/usr/include'
72 infodir='${prefix}/info'
73 mandir='${prefix}/man'
74
75 # Initialize some other variables.
76 subdirs=
77 MFLAGS= MAKEFLAGS=
78 # Maximum number of lines to put in a shell here document.
79 ac_max_here_lines=12
80
81 ac_prev=
82 for ac_option
83 do
84
85 # If the previous option needs an argument, assign it.
86 if test -n "$ac_prev"; then
87 eval "$ac_prev=\$ac_option"
88 ac_prev=
89 continue
90 fi
91
92 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
96
97 # Accept the important Cygnus configure options, so we can diagnose typos.
98
99 case "$ac_option" in
100
101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
105
106 -build | --build | --buil | --bui | --bu)
107 ac_prev=build ;;
108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
109 build="$ac_optarg" ;;
110
111 -cache-file | --cache-file | --cache-fil | --cache-fi \
112 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113 ac_prev=cache_file ;;
114 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116 cache_file="$ac_optarg" ;;
117
118 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 ac_prev=datadir ;;
120 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 | --da=*)
122 datadir="$ac_optarg" ;;
123
124 -disable-* | --disable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
126 # Reject names that are not valid shell variable names.
127 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
132
133 -enable-* | --enable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
135 # Reject names that are not valid shell variable names.
136 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
137 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138 fi
139 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 case "$ac_option" in
141 *=*) ;;
142 *) ac_optarg=yes ;;
143 esac
144 eval "enable_${ac_feature}='$ac_optarg'" ;;
145
146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148 | --exec | --exe | --ex)
149 ac_prev=exec_prefix ;;
150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152 | --exec=* | --exe=* | --ex=*)
153 exec_prefix="$ac_optarg" ;;
154
155 -gas | --gas | --ga | --g)
156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
158
159 -help | --help | --hel | --he)
160 # Omit some internal or obsolete options to make the list less imposing.
161 # This message is too long to be a string in the A/UX 3.1 sh.
162 cat << EOF
163 Usage: configure [options] [host]
164 Options: [defaults in brackets after descriptions]
165 Configuration:
166 --cache-file=FILE cache test results in FILE
167 --help print this message
168 --no-create do not create output files
169 --quiet, --silent do not print \`checking...' messages
170 --version print the version of autoconf that created configure
171 Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
175 [same as prefix]
176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195 EOF
196 cat << EOF
197 Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201 Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
208 EOF
209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
257 -nfp | --nfp | --nf)
258 # Obsolete; use --without-fp.
259 with_fp=no ;;
260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
268
269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
344
345 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346 | --syscon | --sysco | --sysc | --sys | --sy)
347 ac_prev=sysconfdir ;;
348 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350 sysconfdir="$ac_optarg" ;;
351
352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
356
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
359
360 -version | --version | --versio | --versi | --vers)
361 echo "configure generated by autoconf version 2.12"
362 exit 0 ;;
363
364 -with-* | --with-*)
365 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 case "$ac_option" in
372 *=*) ;;
373 *) ac_optarg=yes ;;
374 esac
375 eval "with_${ac_package}='$ac_optarg'" ;;
376
377 -without-* | --without-*)
378 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
379 # Reject names that are not valid shell variable names.
380 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 eval "with_${ac_package}=no" ;;
385
386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
389
390 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391 | --x-incl | --x-inc | --x-in | --x-i)
392 ac_prev=x_includes ;;
393 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395 x_includes="$ac_optarg" ;;
396
397 -x-libraries | --x-libraries | --x-librarie | --x-librari \
398 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399 ac_prev=x_libraries ;;
400 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402 x_libraries="$ac_optarg" ;;
403
404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
405 ;;
406
407 *)
408 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
409 echo "configure: warning: $ac_option: invalid host type" 1>&2
410 fi
411 if test "x$nonopt" != xNONE; then
412 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
413 fi
414 nonopt="$ac_option"
415 ;;
416
417 esac
418 done
419
420 if test -n "$ac_prev"; then
421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
422 fi
423
424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
425
426 # File descriptor usage:
427 # 0 standard input
428 # 1 file creation
429 # 2 errors and warnings
430 # 3 some systems may open it to /dev/tty
431 # 4 used on the Kubota Titan
432 # 6 checking for... messages and results
433 # 5 compiler messages saved in config.log
434 if test "$silent" = yes; then
435 exec 6>/dev/null
436 else
437 exec 6>&1
438 fi
439 exec 5>./config.log
440
441 echo "\
442 This file contains any messages produced by compilers while
443 running configure, to aid debugging if configure makes a mistake.
444 " 1>&5
445
446 # Strip out --no-create and --no-recursion so they do not pile up.
447 # Also quote any args containing shell metacharacters.
448 ac_configure_args=
449 for ac_arg
450 do
451 case "$ac_arg" in
452 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453 | --no-cr | --no-c) ;;
454 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
459 esac
460 done
461
462 # NLS nuisances.
463 # Only set these to C if already set. These must not be set unconditionally
464 # because not all systems understand e.g. LANG=C (notably SCO).
465 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466 # Non-C LC_CTYPE values break the ctype check.
467 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
468 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
471
472 # confdefs.h avoids OS command line length limits that DEFS can exceed.
473 rm -rf conftest* confdefs.h
474 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
475 echo > confdefs.h
476
477 # A filename unique to this package, relative to the directory that
478 # configure is in, which we can look for to find out if srcdir is correct.
479 ac_unique_file=Include/swig.h
480
481 # Find the source files, if location was not specified.
482 if test -z "$srcdir"; then
483 ac_srcdir_defaulted=yes
484 # Try the directory containing this script, then its parent.
485 ac_prog=$0
486 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 srcdir=$ac_confdir
489 if test ! -r $srcdir/$ac_unique_file; then
490 srcdir=..
491 fi
492 else
493 ac_srcdir_defaulted=no
494 fi
495 if test ! -r $srcdir/$ac_unique_file; then
496 if test "$ac_srcdir_defaulted" = yes; then
497 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
498 else
499 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
500 fi
501 fi
502 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504 # Prefer explicitly selected file to automatically selected ones.
505 if test -z "$CONFIG_SITE"; then
506 if test "x$prefix" != xNONE; then
507 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 else
509 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510 fi
511 fi
512 for ac_site_file in $CONFIG_SITE; do
513 if test -r "$ac_site_file"; then
514 echo "loading site script $ac_site_file"
515 . "$ac_site_file"
516 fi
517 done
518
519 if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522 else
523 echo "creating cache $cache_file"
524 > $cache_file
525 fi
526
527 ac_ext=c
528 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
529 ac_cpp='$CPP $CPPFLAGS'
530 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532 cross_compiling=$ac_cv_prog_cc_cross
533
534 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
535 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
536 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
537 ac_n= ac_c='
538 ' ac_t=' '
539 else
540 ac_n=-n ac_c= ac_t=
541 fi
542 else
543 ac_n= ac_c='\c' ac_t=
544 fi
545
546
547
548
549 # Set name for machine-dependent library files
550
551 echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
552 echo "configure:553: checking MACHDEP" >&5
553 if test -z "$MACHDEP"
554 then
555 if test -f /usr/lib/NextStep/software_version; then
556 set X `hostinfo | grep 'NeXT Mach.*:' | \
557 sed -e 's/://' -e 's/\./_/'` && \
558 ac_sys_system=next && ac_sys_release=$4
559 MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
560 else
561 ac_sys_system=`uname -s`
562 if test "$ac_sys_system" = "AIX" ; then
563 ac_sys_release=`uname -v`
564 else
565 ac_sys_release=`uname -r`
566 fi
567 ac_md_system=`echo $ac_sys_system |
568 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
569 ac_md_release=`echo $ac_sys_release |
570 tr -d '/ ' | sed 's/\..*//'`
571 MACHDEP="$ac_md_system$ac_md_release"
572 fi
573 case MACHDEP in
574 '') MACHDEP=unknown;;
575 esac
576 fi
577 echo "$ac_t""$MACHDEP" 1>&6
578
579 ac_ext=C
580 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
581 ac_cpp='$CXXCPP $CPPFLAGS'
582 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
583 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
584 cross_compiling=$ac_cv_prog_cxx_cross
585
586
587 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
588 do
589 # Extract the first word of "$ac_prog", so it can be a program name with args.
590 set dummy $ac_prog; ac_word=$2
591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
592 echo "configure:593: checking for $ac_word" >&5
593 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
594 echo $ac_n "(cached) $ac_c" 1>&6
595 else
596 if test -n "$CXX"; then
597 ac_cv_prog_CXX="$CXX" # Let the user override the test.
598 else
599 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
600 for ac_dir in $PATH; do
601 test -z "$ac_dir" && ac_dir=.
602 if test -f $ac_dir/$ac_word; then
603 ac_cv_prog_CXX="$ac_prog"
604 break
605 fi
606 done
607 IFS="$ac_save_ifs"
608 fi
609 fi
610 CXX="$ac_cv_prog_CXX"
611 if test -n "$CXX"; then
612 echo "$ac_t""$CXX" 1>&6
613 else
614 echo "$ac_t""no" 1>&6
615 fi
616
617 test -n "$CXX" && break
618 done
619 test -n "$CXX" || CXX="gcc"
620
621
622 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
623 echo "configure:624: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
624
625 ac_ext=C
626 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
627 ac_cpp='$CXXCPP $CPPFLAGS'
628 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
629 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
630 cross_compiling=$ac_cv_prog_cxx_cross
631
632 cat > conftest.$ac_ext <<EOF
633 #line 634 "configure"
634 #include "confdefs.h"
635 main(){return(0);}
636 EOF
637 if { (eval echo configure:638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
638 ac_cv_prog_cxx_works=yes
639 # If we can't run a trivial program, we are probably using a cross compiler.
640 if (./conftest; exit) 2>/dev/null; then
641 ac_cv_prog_cxx_cross=no
642 else
643 ac_cv_prog_cxx_cross=yes
644 fi
645 else
646 echo "configure: failed program was:" >&5
647 cat conftest.$ac_ext >&5
648 ac_cv_prog_cxx_works=no
649 fi
650 rm -fr conftest*
651
652 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
653 if test $ac_cv_prog_cxx_works = no; then
654 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
655 fi
656 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
657 echo "configure:658: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
658 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
659 cross_compiling=$ac_cv_prog_cxx_cross
660
661 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
662 echo "configure:663: checking whether we are using GNU C++" >&5
663 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
664 echo $ac_n "(cached) $ac_c" 1>&6
665 else
666 cat > conftest.C <<EOF
667 #ifdef __GNUC__
668 yes;
669 #endif
670 EOF
671 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
672 ac_cv_prog_gxx=yes
673 else
674 ac_cv_prog_gxx=no
675 fi
676 fi
677
678 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
679
680 if test $ac_cv_prog_gxx = yes; then
681 GXX=yes
682 ac_test_CXXFLAGS="${CXXFLAGS+set}"
683 ac_save_CXXFLAGS="$CXXFLAGS"
684 CXXFLAGS=
685 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
686 echo "configure:687: checking whether ${CXX-g++} accepts -g" >&5
687 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
688 echo $ac_n "(cached) $ac_c" 1>&6
689 else
690 echo 'void f(){}' > conftest.cc
691 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
692 ac_cv_prog_cxx_g=yes
693 else
694 ac_cv_prog_cxx_g=no
695 fi
696 rm -f conftest*
697
698 fi
699
700 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
701 if test "$ac_test_CXXFLAGS" = set; then
702 CXXFLAGS="$ac_save_CXXFLAGS"
703 elif test $ac_cv_prog_cxx_g = yes; then
704 CXXFLAGS="-g -O2"
705 else
706 CXXFLAGS="-O2"
707 fi
708 else
709 GXX=
710 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
711 fi
712
713 # Extract the first word of "gcc", so it can be a program name with args.
714 set dummy gcc; ac_word=$2
715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
716 echo "configure:717: checking for $ac_word" >&5
717 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
718 echo $ac_n "(cached) $ac_c" 1>&6
719 else
720 if test -n "$CC"; then
721 ac_cv_prog_CC="$CC" # Let the user override the test.
722 else
723 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
724 for ac_dir in $PATH; do
725 test -z "$ac_dir" && ac_dir=.
726 if test -f $ac_dir/$ac_word; then
727 ac_cv_prog_CC="gcc"
728 break
729 fi
730 done
731 IFS="$ac_save_ifs"
732 fi
733 fi
734 CC="$ac_cv_prog_CC"
735 if test -n "$CC"; then
736 echo "$ac_t""$CC" 1>&6
737 else
738 echo "$ac_t""no" 1>&6
739 fi
740
741 if test -z "$CC"; then
742 # Extract the first word of "cc", so it can be a program name with args.
743 set dummy cc; ac_word=$2
744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
745 echo "configure:746: checking for $ac_word" >&5
746 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
747 echo $ac_n "(cached) $ac_c" 1>&6
748 else
749 if test -n "$CC"; then
750 ac_cv_prog_CC="$CC" # Let the user override the test.
751 else
752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
753 ac_prog_rejected=no
754 for ac_dir in $PATH; do
755 test -z "$ac_dir" && ac_dir=.
756 if test -f $ac_dir/$ac_word; then
757 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
758 ac_prog_rejected=yes
759 continue
760 fi
761 ac_cv_prog_CC="cc"
762 break
763 fi
764 done
765 IFS="$ac_save_ifs"
766 if test $ac_prog_rejected = yes; then
767 # We found a bogon in the path, so make sure we never use it.
768 set dummy $ac_cv_prog_CC
769 shift
770 if test $# -gt 0; then
771 # We chose a different compiler from the bogus one.
772 # However, it has the same basename, so the bogon will be chosen
773 # first if we set CC to just the basename; use the full file name.
774 shift
775 set dummy "$ac_dir/$ac_word" "$@"
776 shift
777 ac_cv_prog_CC="$@"
778 fi
779 fi
780 fi
781 fi
782 CC="$ac_cv_prog_CC"
783 if test -n "$CC"; then
784 echo "$ac_t""$CC" 1>&6
785 else
786 echo "$ac_t""no" 1>&6
787 fi
788
789 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
790 fi
791
792 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
793 echo "configure:794: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
794
795 ac_ext=c
796 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797 ac_cpp='$CPP $CPPFLAGS'
798 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800 cross_compiling=$ac_cv_prog_cc_cross
801
802 cat > conftest.$ac_ext <<EOF
803 #line 804 "configure"
804 #include "confdefs.h"
805 main(){return(0);}
806 EOF
807 if { (eval echo configure:808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
808 ac_cv_prog_cc_works=yes
809 # If we can't run a trivial program, we are probably using a cross compiler.
810 if (./conftest; exit) 2>/dev/null; then
811 ac_cv_prog_cc_cross=no
812 else
813 ac_cv_prog_cc_cross=yes
814 fi
815 else
816 echo "configure: failed program was:" >&5
817 cat conftest.$ac_ext >&5
818 ac_cv_prog_cc_works=no
819 fi
820 rm -fr conftest*
821 ac_ext=C
822 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
823 ac_cpp='$CXXCPP $CPPFLAGS'
824 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
825 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
826 cross_compiling=$ac_cv_prog_cxx_cross
827
828 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
829 if test $ac_cv_prog_cc_works = no; then
830 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
831 fi
832 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
833 echo "configure:834: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
834 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
835 cross_compiling=$ac_cv_prog_cc_cross
836
837 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
838 echo "configure:839: checking whether we are using GNU C" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
840 echo $ac_n "(cached) $ac_c" 1>&6
841 else
842 cat > conftest.c <<EOF
843 #ifdef __GNUC__
844 yes;
845 #endif
846 EOF
847 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
848 ac_cv_prog_gcc=yes
849 else
850 ac_cv_prog_gcc=no
851 fi
852 fi
853
854 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
855
856 if test $ac_cv_prog_gcc = yes; then
857 GCC=yes
858 ac_test_CFLAGS="${CFLAGS+set}"
859 ac_save_CFLAGS="$CFLAGS"
860 CFLAGS=
861 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
862 echo "configure:863: checking whether ${CC-cc} accepts -g" >&5
863 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
864 echo $ac_n "(cached) $ac_c" 1>&6
865 else
866 echo 'void f(){}' > conftest.c
867 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
868 ac_cv_prog_cc_g=yes
869 else
870 ac_cv_prog_cc_g=no
871 fi
872 rm -f conftest*
873
874 fi
875
876 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
877 if test "$ac_test_CFLAGS" = set; then
878 CFLAGS="$ac_save_CFLAGS"
879 elif test $ac_cv_prog_cc_g = yes; then
880 CFLAGS="-g -O2"
881 else
882 CFLAGS="-O2"
883 fi
884 else
885 GCC=
886 test "${CFLAGS+set}" = set || CFLAGS="-g"
887 fi
888
889 # Extract the first word of "ranlib", so it can be a program name with args.
890 set dummy ranlib; ac_word=$2
891 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
892 echo "configure:893: checking for $ac_word" >&5
893 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
894 echo $ac_n "(cached) $ac_c" 1>&6
895 else
896 if test -n "$RANLIB"; then
897 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
898 else
899 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
900 for ac_dir in $PATH; do
901 test -z "$ac_dir" && ac_dir=.
902 if test -f $ac_dir/$ac_word; then
903 ac_cv_prog_RANLIB="ranlib"
904 break
905 fi
906 done
907 IFS="$ac_save_ifs"
908 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
909 fi
910 fi
911 RANLIB="$ac_cv_prog_RANLIB"
912 if test -n "$RANLIB"; then
913 echo "$ac_t""$RANLIB" 1>&6
914 else
915 echo "$ac_t""no" 1>&6
916 fi
917
918
919
920 for ac_prog in ar aal
921 do
922 # Extract the first word of "$ac_prog", so it can be a program name with args.
923 set dummy $ac_prog; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
927 echo $ac_n "(cached) $ac_c" 1>&6
928 else
929 if test -n "$AR"; then
930 ac_cv_prog_AR="$AR" # Let the user override the test.
931 else
932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
933 for ac_dir in $PATH; do
934 test -z "$ac_dir" && ac_dir=.
935 if test -f $ac_dir/$ac_word; then
936 ac_cv_prog_AR="$ac_prog"
937 break
938 fi
939 done
940 IFS="$ac_save_ifs"
941 fi
942 fi
943 AR="$ac_cv_prog_AR"
944 if test -n "$AR"; then
945 echo "$ac_t""$AR" 1>&6
946 else
947 echo "$ac_t""no" 1>&6
948 fi
949
950 test -n "$AR" && break
951 done
952 test -n "$AR" || AR="ar"
953
954
955 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
956 echo "configure:957: checking how to run the C++ preprocessor" >&5
957 if test -z "$CXXCPP"; then
958 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
959 echo $ac_n "(cached) $ac_c" 1>&6
960 else
961 ac_ext=C
962 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
963 ac_cpp='$CXXCPP $CPPFLAGS'
964 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
965 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
966 cross_compiling=$ac_cv_prog_cxx_cross
967 CXXCPP="${CXX-g++} -E"
968 cat > conftest.$ac_ext <<EOF
969 #line 970 "configure"
970 #include "confdefs.h"
971 #include <stdlib.h>
972 EOF
973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
974 { (eval echo configure:975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
975 ac_err=`grep -v '^ *+' conftest.out`
976 if test -z "$ac_err"; then
977 :
978 else
979 echo "$ac_err" >&5
980 echo "configure: failed program was:" >&5
981 cat conftest.$ac_ext >&5
982 rm -rf conftest*
983 CXXCPP=/lib/cpp
984 fi
985 rm -f conftest*
986 ac_cv_prog_CXXCPP="$CXXCPP"
987 fi
988 fi
989 CXXCPP="$ac_cv_prog_CXXCPP"
990 echo "$ac_t""$CXXCPP" 1>&6
991
992 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
993 echo "configure:994: checking for ANSI C header files" >&5
994 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
995 echo $ac_n "(cached) $ac_c" 1>&6
996 else
997 cat > conftest.$ac_ext <<EOF
998 #line 999 "configure"
999 #include "confdefs.h"
1000 #include <stdlib.h>
1001 #include <stdarg.h>
1002 #include <string.h>
1003 #include <float.h>
1004 EOF
1005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1006 { (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1007 ac_err=`grep -v '^ *+' conftest.out`
1008 if test -z "$ac_err"; then
1009 rm -rf conftest*
1010 ac_cv_header_stdc=yes
1011 else
1012 echo "$ac_err" >&5
1013 echo "configure: failed program was:" >&5
1014 cat conftest.$ac_ext >&5
1015 rm -rf conftest*
1016 ac_cv_header_stdc=no
1017 fi
1018 rm -f conftest*
1019
1020 if test $ac_cv_header_stdc = yes; then
1021 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1022 cat > conftest.$ac_ext <<EOF
1023 #line 1024 "configure"
1024 #include "confdefs.h"
1025 #include <string.h>
1026 EOF
1027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1028 egrep "memchr" >/dev/null 2>&1; then
1029 :
1030 else
1031 rm -rf conftest*
1032 ac_cv_header_stdc=no
1033 fi
1034 rm -f conftest*
1035
1036 fi
1037
1038 if test $ac_cv_header_stdc = yes; then
1039 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1040 cat > conftest.$ac_ext <<EOF
1041 #line 1042 "configure"
1042 #include "confdefs.h"
1043 #include <stdlib.h>
1044 EOF
1045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1046 egrep "free" >/dev/null 2>&1; then
1047 :
1048 else
1049 rm -rf conftest*
1050 ac_cv_header_stdc=no
1051 fi
1052 rm -f conftest*
1053
1054 fi
1055
1056 if test $ac_cv_header_stdc = yes; then
1057 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1058 if test "$cross_compiling" = yes; then
1059 :
1060 else
1061 cat > conftest.$ac_ext <<EOF
1062 #line 1063 "configure"
1063 #include "confdefs.h"
1064 #ifdef __cplusplus
1065 extern "C" void exit(int);
1066 #endif
1067 #include <ctype.h>
1068 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1069 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1070 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1071 int main () { int i; for (i = 0; i < 256; i++)
1072 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1073 exit (0); }
1074
1075 EOF
1076 if { (eval echo configure:1077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1077 then
1078 :
1079 else
1080 echo "configure: failed program was:" >&5
1081 cat conftest.$ac_ext >&5
1082 rm -fr conftest*
1083 ac_cv_header_stdc=no
1084 fi
1085 rm -fr conftest*
1086 fi
1087
1088 fi
1089 fi
1090
1091 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1092 if test $ac_cv_header_stdc = yes; then
1093 cat >> confdefs.h <<\EOF
1094 #define STDC_HEADERS 1
1095 EOF
1096
1097 fi
1098
1099
1100 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1101 # for constant arguments. Useless!
1102 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1103 echo "configure:1104: checking for working alloca.h" >&5
1104 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1105 echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107 cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110 #include <alloca.h>
1111 int main() {
1112 char *p = alloca(2 * sizeof(int));
1113 ; return 0; }
1114 EOF
1115 if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1116 rm -rf conftest*
1117 ac_cv_header_alloca_h=yes
1118 else
1119 echo "configure: failed program was:" >&5
1120 cat conftest.$ac_ext >&5
1121 rm -rf conftest*
1122 ac_cv_header_alloca_h=no
1123 fi
1124 rm -f conftest*
1125 fi
1126
1127 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1128 if test $ac_cv_header_alloca_h = yes; then
1129 cat >> confdefs.h <<\EOF
1130 #define HAVE_ALLOCA_H 1
1131 EOF
1132
1133 fi
1134
1135 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1136 echo "configure:1137: checking for alloca" >&5
1137 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140 cat > conftest.$ac_ext <<EOF
1141 #line 1142 "configure"
1142 #include "confdefs.h"
1143
1144 #ifdef __GNUC__
1145 # define alloca __builtin_alloca
1146 #else
1147 # if HAVE_ALLOCA_H
1148 # include <alloca.h>
1149 # else
1150 # ifdef _AIX
1151 #pragma alloca
1152 # else
1153 # ifndef alloca /* predefined by HP cc +Olibcalls */
1154 char *alloca ();
1155 # endif
1156 # endif
1157 # endif
1158 #endif
1159
1160 int main() {
1161 char *p = (char *) alloca(1);
1162 ; return 0; }
1163 EOF
1164 if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1165 rm -rf conftest*
1166 ac_cv_func_alloca_works=yes
1167 else
1168 echo "configure: failed program was:" >&5
1169 cat conftest.$ac_ext >&5
1170 rm -rf conftest*
1171 ac_cv_func_alloca_works=no
1172 fi
1173 rm -f conftest*
1174 fi
1175
1176 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1177 if test $ac_cv_func_alloca_works = yes; then
1178 cat >> confdefs.h <<\EOF
1179 #define HAVE_ALLOCA 1
1180 EOF
1181
1182 fi
1183
1184 if test $ac_cv_func_alloca_works = no; then
1185 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1186 # that cause trouble. Some versions do not even contain alloca or
1187 # contain a buggy version. If you still want to use their alloca,
1188 # use ar to extract alloca.o from them instead of compiling alloca.c.
1189 ALLOCA=alloca.o
1190 cat >> confdefs.h <<\EOF
1191 #define C_ALLOCA 1
1192 EOF
1193
1194
1195 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether alloca needs Cray hooks" >&5
1197 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1198 echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200 cat > conftest.$ac_ext <<EOF
1201 #line 1202 "configure"
1202 #include "confdefs.h"
1203 #if defined(CRAY) && ! defined(CRAY2)
1204 webecray
1205 #else
1206 wenotbecray
1207 #endif
1208
1209 EOF
1210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1211 egrep "webecray" >/dev/null 2>&1; then
1212 rm -rf conftest*
1213 ac_cv_os_cray=yes
1214 else
1215 rm -rf conftest*
1216 ac_cv_os_cray=no
1217 fi
1218 rm -f conftest*
1219
1220 fi
1221
1222 echo "$ac_t""$ac_cv_os_cray" 1>&6
1223 if test $ac_cv_os_cray = yes; then
1224 for ac_func in _getb67 GETB67 getb67; do
1225 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1226 echo "configure:1227: checking for $ac_func" >&5
1227 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1228 echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230 cat > conftest.$ac_ext <<EOF
1231 #line 1232 "configure"
1232 #include "confdefs.h"
1233 /* System header to define __stub macros and hopefully few prototypes,
1234 which can conflict with char $ac_func(); below. */
1235 #include <assert.h>
1236 /* Override any gcc2 internal prototype to avoid an error. */
1237 #ifdef __cplusplus
1238 extern "C"
1239 #endif
1240 /* We use char because int might match the return type of a gcc2
1241 builtin and then its argument prototype would still apply. */
1242 char $ac_func();
1243
1244 int main() {
1245
1246 /* The GNU C library defines this for functions which it implements
1247 to always fail with ENOSYS. Some functions are actually named
1248 something starting with __ and the normal name is an alias. */
1249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1250 choke me
1251 #else
1252 $ac_func();
1253 #endif
1254
1255 ; return 0; }
1256 EOF
1257 if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1258 rm -rf conftest*
1259 eval "ac_cv_func_$ac_func=yes"
1260 else
1261 echo "configure: failed program was:" >&5
1262 cat conftest.$ac_ext >&5
1263 rm -rf conftest*
1264 eval "ac_cv_func_$ac_func=no"
1265 fi
1266 rm -f conftest*
1267 fi
1268
1269 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1270 echo "$ac_t""yes" 1>&6
1271 cat >> confdefs.h <<EOF
1272 #define CRAY_STACKSEG_END $ac_func
1273 EOF
1274
1275 break
1276 else
1277 echo "$ac_t""no" 1>&6
1278 fi
1279
1280 done
1281 fi
1282
1283 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1284 echo "configure:1285: checking stack direction for C alloca" >&5
1285 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1287 else
1288 if test "$cross_compiling" = yes; then
1289 ac_cv_c_stack_direction=0
1290 else
1291 cat > conftest.$ac_ext <<EOF
1292 #line 1293 "configure"
1293 #include "confdefs.h"
1294 #ifdef __cplusplus
1295 extern "C" void exit(int);
1296 #endif
1297 find_stack_direction ()
1298 {
1299 static char *addr = 0;
1300 auto char dummy;
1301 if (addr == 0)
1302 {
1303 addr = &dummy;
1304 return find_stack_direction ();
1305 }
1306 else
1307 return (&dummy > addr) ? 1 : -1;
1308 }
1309 main ()
1310 {
1311 exit (find_stack_direction() < 0);
1312 }
1313 EOF
1314 if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1315 then
1316 ac_cv_c_stack_direction=1
1317 else
1318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
1320 rm -fr conftest*
1321 ac_cv_c_stack_direction=-1
1322 fi
1323 rm -fr conftest*
1324 fi
1325
1326 fi
1327
1328 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1329 cat >> confdefs.h <<EOF
1330 #define STACK_DIRECTION $ac_cv_c_stack_direction
1331 EOF
1332
1333 fi
1334
1335 # Check whether --with-lang or --without-lang was given.
1336 if test "${with_lang+set}" = set; then
1337 withval="$with_lang"
1338
1339 cat >> confdefs.h <<EOF
1340 #define SWIG_LANG $withval
1341 EOF
1342
1343 else
1344 cat >> confdefs.h <<\EOF
1345 #define SWIG_LANG TCL
1346 EOF
1347
1348 fi
1349
1350
1351 # Check whether --with-doc or --without-doc was given.
1352 if test "${with_doc+set}" = set; then
1353 withval="$with_doc"
1354
1355 cat >> confdefs.h <<EOF
1356 #define SWIG_DOC $withval
1357 EOF
1358
1359 else
1360 cat >> confdefs.h <<\EOF
1361 #define SWIG_DOC ASCII
1362 EOF
1363
1364 fi
1365
1366
1367 # Check whether --with-yacc or --without-yacc was given.
1368 if test "${with_yacc+set}" = set; then
1369 withval="$with_yacc"
1370
1371 YACC="cp parser.cxx.no y.tab.c; cp parser.h.no y.tab.h"
1372
1373 YACCFLAGS=""
1374
1375
1376 else
1377 for ac_prog in 'bison -y' byacc
1378 do
1379 # Extract the first word of "$ac_prog", so it can be a program name with args.
1380 set dummy $ac_prog; ac_word=$2
1381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1382 echo "configure:1383: checking for $ac_word" >&5
1383 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1385 else
1386 if test -n "$YACC"; then
1387 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1388 else
1389 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1390 for ac_dir in $PATH; do
1391 test -z "$ac_dir" && ac_dir=.
1392 if test -f $ac_dir/$ac_word; then
1393 ac_cv_prog_YACC="$ac_prog"
1394 break
1395 fi
1396 done
1397 IFS="$ac_save_ifs"
1398 fi
1399 fi
1400 YACC="$ac_cv_prog_YACC"
1401 if test -n "$YACC"; then
1402 echo "$ac_t""$YACC" 1>&6
1403 else
1404 echo "$ac_t""no" 1>&6
1405 fi
1406
1407 test -n "$YACC" && break
1408 done
1409 test -n "$YACC" || YACC="yacc"
1410
1411 YACCFLAGS="-d parser.y"
1412
1413 fi
1414
1415
1416 # This borrowed from the Python configuration file
1417 # Set info about shared libraries.
1418
1419
1420
1421
1422
1423 # SO is the extension of shared libraries `(including the dot!)
1424 # -- usually .so, .sl on HP-UX
1425 echo $ac_n "checking SO""... $ac_c" 1>&6
1426 echo "configure:1427: checking SO" >&5
1427 if test -z "$SO"
1428 then
1429 case $ac_sys_system in
1430 hp*|HP*) SO=.sl;;
1431 NeXT|next) SO=.a;; # no shared libs on NeXT 3.3 and less
1432 *) SO=.so;;
1433 esac
1434 fi
1435 echo "$ac_t""$SO" 1>&6
1436 # LDSHARED is the ld *command* used to create shared library
1437 # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
1438 echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
1439 echo "configure:1440: checking LDSHARED" >&5
1440 if test -z "$LDSHARED"
1441 then
1442 case $ac_sys_system/$ac_sys_release in
1443 AIX*) LDSHARED="ld_so_aix";;
1444 IRIX*) LDSHARED="ld -shared";;
1445 SunOS/4*) LDSHARED="ld";;
1446 SunOS/5*) LDSHARED="ld -G";;
1447 hp*|HP*) LDSHARED="ld -b";;
1448 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1449 DYNIX/ptx*) LDSHARED="ld -G";;
1450 Linux*) LDSHARED="gcc -shared";;
1451 FreeBSD*) LDSHARED="ld -Bshareable";;
1452 NeXT|next/3*) LDSHARED="ld -u libsys_s";;
1453 *) LDSHARED="ld";;
1454 esac
1455 fi
1456 echo "$ac_t""$LDSHARED" 1>&6
1457 # CCSHARED are the C *flags* used to create objects to go into a shared
1458 # library -- this is only needed for a few systems
1459 echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
1460 echo "configure:1461: checking CCSHARED" >&5
1461 if test -z "$CCSHARED"
1462 then
1463 case $ac_sys_system in
1464 hp*|HP*) if test "$GCC" = yes;
1465 then CCSHARED="-fpic";
1466 else CCSHARED="+z";
1467 fi;;
1468 Linux*) CCSHARED="-fpic";;
1469 FreeBSD*) CCSHARED="-fpic";;
1470 esac
1471 fi
1472 echo "$ac_t""$CCSHARED" 1>&6
1473
1474 # LINKFORSHARED are the flags passed to the $(CC) command that links
1475 # the a few executables -- this is only needed for a few systems
1476
1477 echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
1478 echo "configure:1479: checking LINKFORSHARED" >&5
1479 if test -z "$LINKFORSHARED"
1480 then
1481 case $ac_sys_system/$ac_sys_release in
1482 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
1483 hp*|HP*)
1484 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
1485 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
1486 next/*) LINKFORSHARED="-u libsys_s";;
1487 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
1488 IRIX*/6*) LINKFORSHARED="-all";;
1489 esac
1490 fi
1491 echo "$ac_t""$LINKFORSHARED" 1>&6
1492
1493 echo ""
1494 echo "Checking for installed packages."
1495 echo "Note : None of the following packages are required to compile SWIG"
1496 echo ""
1497
1498 # Check for specific libraries. Used for SWIG examples
1499 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1500 echo "configure:1501: checking for dlopen in -ldl" >&5
1501 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1502 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1503 echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505 ac_save_LIBS="$LIBS"
1506 LIBS="-ldl $LIBS"
1507 cat > conftest.$ac_ext <<EOF
1508 #line 1509 "configure"
1509 #include "confdefs.h"
1510 /* Override any gcc2 internal prototype to avoid an error. */
1511 #ifdef __cplusplus
1512 extern "C"
1513 #endif
1514 /* We use char because int might match the return type of a gcc2
1515 builtin and then its argument prototype would still apply. */
1516 char dlopen();
1517
1518 int main() {
1519 dlopen()
1520 ; return 0; }
1521 EOF
1522 if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1523 rm -rf conftest*
1524 eval "ac_cv_lib_$ac_lib_var=yes"
1525 else
1526 echo "configure: failed program was:" >&5
1527 cat conftest.$ac_ext >&5
1528 rm -rf conftest*
1529 eval "ac_cv_lib_$ac_lib_var=no"
1530 fi
1531 rm -f conftest*
1532 LIBS="$ac_save_LIBS"
1533
1534 fi
1535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1536 echo "$ac_t""yes" 1>&6
1537 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1538 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1539 cat >> confdefs.h <<EOF
1540 #define $ac_tr_lib 1
1541 EOF
1542
1543 LIBS="-ldl $LIBS"
1544
1545 else
1546 echo "$ac_t""no" 1>&6
1547 fi
1548 # Dynamic linking for SunOS/Solaris and SYSV
1549 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1550 echo "configure:1551: checking for shl_load in -ldld" >&5
1551 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1553 echo $ac_n "(cached) $ac_c" 1>&6
1554 else
1555 ac_save_LIBS="$LIBS"
1556 LIBS="-ldld $LIBS"
1557 cat > conftest.$ac_ext <<EOF
1558 #line 1559 "configure"
1559 #include "confdefs.h"
1560 /* Override any gcc2 internal prototype to avoid an error. */
1561 #ifdef __cplusplus
1562 extern "C"
1563 #endif
1564 /* We use char because int might match the return type of a gcc2
1565 builtin and then its argument prototype would still apply. */
1566 char shl_load();
1567
1568 int main() {
1569 shl_load()
1570 ; return 0; }
1571 EOF
1572 if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1573 rm -rf conftest*
1574 eval "ac_cv_lib_$ac_lib_var=yes"
1575 else
1576 echo "configure: failed program was:" >&5
1577 cat conftest.$ac_ext >&5
1578 rm -rf conftest*
1579 eval "ac_cv_lib_$ac_lib_var=no"
1580 fi
1581 rm -f conftest*
1582 LIBS="$ac_save_LIBS"
1583
1584 fi
1585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1586 echo "$ac_t""yes" 1>&6
1587 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1588 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1589 cat >> confdefs.h <<EOF
1590 #define $ac_tr_lib 1
1591 EOF
1592
1593 LIBS="-ldld $LIBS"
1594
1595 else
1596 echo "$ac_t""no" 1>&6
1597 fi
1598 # Dynamic linking for HP-UX
1599
1600 # The following three (nsl,inet,socket) are needed on Sequent;
1601 # the order of checking must be this. Most SVR4 platforms will
1602 # need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1603 # broken. I see no elegant solution (probably CHECK_LIB should be
1604 # fixed to only add the library if the given entry point is not
1605 # satisfied without it).
1606 if test "`uname -s`" != IRIX
1607 then
1608 echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
1609 echo "configure:1610: checking for t_open in -lnsl" >&5
1610 ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
1611 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1612 echo $ac_n "(cached) $ac_c" 1>&6
1613 else
1614 ac_save_LIBS="$LIBS"
1615 LIBS="-lnsl $LIBS"
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 /* Override any gcc2 internal prototype to avoid an error. */
1620 #ifdef __cplusplus
1621 extern "C"
1622 #endif
1623 /* We use char because int might match the return type of a gcc2
1624 builtin and then its argument prototype would still apply. */
1625 char t_open();
1626
1627 int main() {
1628 t_open()
1629 ; return 0; }
1630 EOF
1631 if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1632 rm -rf conftest*
1633 eval "ac_cv_lib_$ac_lib_var=yes"
1634 else
1635 echo "configure: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
1637 rm -rf conftest*
1638 eval "ac_cv_lib_$ac_lib_var=no"
1639 fi
1640 rm -f conftest*
1641 LIBS="$ac_save_LIBS"
1642
1643 fi
1644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1645 echo "$ac_t""yes" 1>&6
1646 LIBS="-lnsl $LIBS"
1647 else
1648 echo "$ac_t""no" 1>&6
1649 fi
1650 # SVR4
1651 echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
1652 echo "configure:1653: checking for gethostbyname in -linet" >&5
1653 ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
1654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1655 echo $ac_n "(cached) $ac_c" 1>&6
1656 else
1657 ac_save_LIBS="$LIBS"
1658 LIBS="-linet -lnsl $LIBS"
1659 cat > conftest.$ac_ext <<EOF
1660 #line 1661 "configure"
1661 #include "confdefs.h"
1662 /* Override any gcc2 internal prototype to avoid an error. */
1663 #ifdef __cplusplus
1664 extern "C"
1665 #endif
1666 /* We use char because int might match the return type of a gcc2
1667 builtin and then its argument prototype would still apply. */
1668 char gethostbyname();
1669
1670 int main() {
1671 gethostbyname()
1672 ; return 0; }
1673 EOF
1674 if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1675 rm -rf conftest*
1676 eval "ac_cv_lib_$ac_lib_var=yes"
1677 else
1678 echo "configure: failed program was:" >&5
1679 cat conftest.$ac_ext >&5
1680 rm -rf conftest*
1681 eval "ac_cv_lib_$ac_lib_var=no"
1682 fi
1683 rm -f conftest*
1684 LIBS="$ac_save_LIBS"
1685
1686 fi
1687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1688 echo "$ac_t""yes" 1>&6
1689 LIBS="-linet $LIBS"
1690 else
1691 echo "$ac_t""no" 1>&6
1692 fi
1693 # Sequent
1694 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1695 echo "configure:1696: checking for socket in -lsocket" >&5
1696 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1697 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1698 echo $ac_n "(cached) $ac_c" 1>&6
1699 else
1700 ac_save_LIBS="$LIBS"
1701 LIBS="-lsocket $LIBS $LIBS"
1702 cat > conftest.$ac_ext <<EOF
1703 #line 1704 "configure"
1704 #include "confdefs.h"
1705 /* Override any gcc2 internal prototype to avoid an error. */
1706 #ifdef __cplusplus
1707 extern "C"
1708 #endif
1709 /* We use char because int might match the return type of a gcc2
1710 builtin and then its argument prototype would still apply. */
1711 char socket();
1712
1713 int main() {
1714 socket()
1715 ; return 0; }
1716 EOF
1717 if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1718 rm -rf conftest*
1719 eval "ac_cv_lib_$ac_lib_var=yes"
1720 else
1721 echo "configure: failed program was:" >&5
1722 cat conftest.$ac_ext >&5
1723 rm -rf conftest*
1724 eval "ac_cv_lib_$ac_lib_var=no"
1725 fi
1726 rm -f conftest*
1727 LIBS="$ac_save_LIBS"
1728
1729 fi
1730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1731 echo "$ac_t""yes" 1>&6
1732 LIBS="-lsocket $LIBS"
1733 else
1734 echo "$ac_t""no" 1>&6
1735 fi
1736 # SVR4 sockets
1737 fi
1738
1739 # check for --with-libm=...
1740
1741 LIBM=-lm
1742 # Check whether --with-libm or --without-libm was given.
1743 if test "${with_libm+set}" = set; then
1744 withval="$with_libm"
1745
1746 if test "$withval" != yes
1747 then LIBM=$withval
1748 else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
1749 fi
1750 fi
1751
1752 echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
1753 echo "configure:1754: checking for main in -lieee" >&5
1754 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
1755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757 else
1758 ac_save_LIBS="$LIBS"
1759 LIBS="-lieee $LIBS"
1760 cat > conftest.$ac_ext <<EOF
1761 #line 1762 "configure"
1762 #include "confdefs.h"
1763
1764 int main() {
1765 main()
1766 ; return 0; }
1767 EOF
1768 if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1769 rm -rf conftest*
1770 eval "ac_cv_lib_$ac_lib_var=yes"
1771 else
1772 echo "configure: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
1774 rm -rf conftest*
1775 eval "ac_cv_lib_$ac_lib_var=no"
1776 fi
1777 rm -f conftest*
1778 LIBS="$ac_save_LIBS"
1779
1780 fi
1781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1782 echo "$ac_t""yes" 1>&6
1783 LIBM="-lieee $LIBM"
1784 else
1785 echo "$ac_t""no" 1>&6
1786 fi
1787
1788 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1789 echo "configure:1790: checking for crypt in -lcrypt" >&5
1790 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1792 echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794 ac_save_LIBS="$LIBS"
1795 LIBS="-lcrypt $LIBS"
1796 cat > conftest.$ac_ext <<EOF
1797 #line 1798 "configure"
1798 #include "confdefs.h"
1799 /* Override any gcc2 internal prototype to avoid an error. */
1800 #ifdef __cplusplus
1801 extern "C"
1802 #endif
1803 /* We use char because int might match the return type of a gcc2
1804 builtin and then its argument prototype would still apply. */
1805 char crypt();
1806
1807 int main() {
1808 crypt()
1809 ; return 0; }
1810 EOF
1811 if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1812 rm -rf conftest*
1813 eval "ac_cv_lib_$ac_lib_var=yes"
1814 else
1815 echo "configure: failed program was:" >&5
1816 cat conftest.$ac_ext >&5
1817 rm -rf conftest*
1818 eval "ac_cv_lib_$ac_lib_var=no"
1819 fi
1820 rm -f conftest*
1821 LIBS="$ac_save_LIBS"
1822
1823 fi
1824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1825 echo "$ac_t""yes" 1>&6
1826 LIBCRYPT="-lcrypt"
1827 else
1828 echo "$ac_t""no" 1>&6
1829 fi
1830
1831
1832
1833 # check for --with-libc=...
1834
1835 # Check whether --with-libc or --without-libc was given.
1836 if test "${with_libc+set}" = set; then
1837 withval="$with_libc"
1838
1839 if test "$withval" != yes
1840 then LIBC=$withval
1841 else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
1842 fi
1843 fi
1844
1845
1846 #--------------------------------------------------------------------
1847 # Locate the X11 header files and the X11 library archive. Try
1848 # the ac_path_x macro first, but if it doesn't find the X stuff
1849 # (e.g. because there's no xmkmf program) then check through
1850 # a list of possible directories. Under some conditions the
1851 # autoconf macro will return an include directory that contains
1852 # no include files, so double-check its result just to be safe.
1853 #--------------------------------------------------------------------
1854
1855 # If we find X, set shell vars x_includes and x_libraries to the
1856 # paths, otherwise set no_x=yes.
1857 # Uses ac_ vars as temps to allow command line to override cache and checks.
1858 # --without-x overrides everything else, but does not touch the cache.
1859 echo $ac_n "checking for X""... $ac_c" 1>&6
1860 echo "configure:1861: checking for X" >&5
1861
1862 # Check whether --with-x or --without-x was given.
1863 if test "${with_x+set}" = set; then
1864 withval="$with_x"
1865 :
1866 fi
1867
1868 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1869 if test "x$with_x" = xno; then
1870 # The user explicitly disabled X.
1871 have_x=disabled
1872 else
1873 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1874 # Both variables are already set.
1875 have_x=yes
1876 else
1877 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1878 echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880 # One or both of the vars are not set, and there is no cached value.
1881 ac_x_includes=NO ac_x_libraries=NO
1882 rm -fr conftestdir
1883 if mkdir conftestdir; then
1884 cd conftestdir
1885 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1886 cat > Imakefile <<'EOF'
1887 acfindx:
1888 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1889 EOF
1890 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1891 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1892 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1893 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1894 for ac_extension in a so sl; do
1895 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1896 test -f $ac_im_libdir/libX11.$ac_extension; then
1897 ac_im_usrlibdir=$ac_im_libdir; break
1898 fi
1899 done
1900 # Screen out bogus values from the imake configuration. They are
1901 # bogus both because they are the default anyway, and because
1902 # using them would break gcc on systems where it needs fixed includes.
1903 case "$ac_im_incroot" in
1904 /usr/include) ;;
1905 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1906 esac
1907 case "$ac_im_usrlibdir" in
1908 /usr/lib | /lib) ;;
1909 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1910 esac
1911 fi
1912 cd ..
1913 rm -fr conftestdir
1914 fi
1915
1916 if test "$ac_x_includes" = NO; then
1917 # Guess where to find include files, by looking for this one X11 .h file.
1918 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1919
1920 # First, try using that file with no special directory specified.
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 #include <$x_direct_test_include>
1925 EOF
1926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1927 { (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1928 ac_err=`grep -v '^ *+' conftest.out`
1929 if test -z "$ac_err"; then
1930 rm -rf conftest*
1931 # We can compile using X headers with no special include directory.
1932 ac_x_includes=
1933 else
1934 echo "$ac_err" >&5
1935 echo "configure: failed program was:" >&5
1936 cat conftest.$ac_ext >&5
1937 rm -rf conftest*
1938 # Look for the header file in a standard set of common directories.
1939 # Check X11 before X11Rn because it is often a symlink to the current release.
1940 for ac_dir in \
1941 /usr/X11/include \
1942 /usr/X11R6/include \
1943 /usr/X11R5/include \
1944 /usr/X11R4/include \
1945 \
1946 /usr/include/X11 \
1947 /usr/include/X11R6 \
1948 /usr/include/X11R5 \
1949 /usr/include/X11R4 \
1950 \
1951 /usr/local/X11/include \
1952 /usr/local/X11R6/include \
1953 /usr/local/X11R5/include \
1954 /usr/local/X11R4/include \
1955 \
1956 /usr/local/include/X11 \
1957 /usr/local/include/X11R6 \
1958 /usr/local/include/X11R5 \
1959 /usr/local/include/X11R4 \
1960 \
1961 /usr/X386/include \
1962 /usr/x386/include \
1963 /usr/XFree86/include/X11 \
1964 \
1965 /usr/include \
1966 /usr/local/include \
1967 /usr/unsupported/include \
1968 /usr/athena/include \
1969 /usr/local/x11r5/include \
1970 /usr/lpp/Xamples/include \
1971 \
1972 /usr/openwin/include \
1973 /usr/openwin/share/include \
1974 ; \
1975 do
1976 if test -r "$ac_dir/$x_direct_test_include"; then
1977 ac_x_includes=$ac_dir
1978 break
1979 fi
1980 done
1981 fi
1982 rm -f conftest*
1983 fi # $ac_x_includes = NO
1984
1985 if test "$ac_x_libraries" = NO; then
1986 # Check for the libraries.
1987
1988 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1989 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1990
1991 # See if we find them without any special options.
1992 # Don't add to $LIBS permanently.
1993 ac_save_LIBS="$LIBS"
1994 LIBS="-l$x_direct_test_library $LIBS"
1995 cat > conftest.$ac_ext <<EOF
1996 #line 1997 "configure"
1997 #include "confdefs.h"
1998
1999 int main() {
2000 ${x_direct_test_function}()
2001 ; return 0; }
2002 EOF
2003 if { (eval echo configure:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2004 rm -rf conftest*
2005 LIBS="$ac_save_LIBS"
2006 # We can link X programs with no special library path.
2007 ac_x_libraries=
2008 else
2009 echo "configure: failed program was:" >&5
2010 cat conftest.$ac_ext >&5
2011 rm -rf conftest*
2012 LIBS="$ac_save_LIBS"
2013 # First see if replacing the include by lib works.
2014 # Check X11 before X11Rn because it is often a symlink to the current release.
2015 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2016 /usr/X11/lib \
2017 /usr/X11R6/lib \
2018 /usr/X11R5/lib \
2019 /usr/X11R4/lib \
2020 \
2021 /usr/lib/X11 \
2022 /usr/lib/X11R6 \
2023 /usr/lib/X11R5 \
2024 /usr/lib/X11R4 \
2025 \
2026 /usr/local/X11/lib \
2027 /usr/local/X11R6/lib \
2028 /usr/local/X11R5/lib \
2029 /usr/local/X11R4/lib \
2030 \
2031 /usr/local/lib/X11 \
2032 /usr/local/lib/X11R6 \
2033 /usr/local/lib/X11R5 \
2034 /usr/local/lib/X11R4 \
2035 \
2036 /usr/X386/lib \
2037 /usr/x386/lib \
2038 /usr/XFree86/lib/X11 \
2039 \
2040 /usr/lib \
2041 /usr/local/lib \
2042 /usr/unsupported/lib \
2043 /usr/athena/lib \
2044 /usr/local/x11r5/lib \
2045 /usr/lpp/Xamples/lib \
2046 /lib/usr/lib/X11 \
2047 \
2048 /usr/openwin/lib \
2049 /usr/openwin/share/lib \
2050 ; \
2051 do
2052 for ac_extension in a so sl; do
2053 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2054 ac_x_libraries=$ac_dir
2055 break 2
2056 fi
2057 done
2058 done
2059 fi
2060 rm -f conftest*
2061 fi # $ac_x_libraries = NO
2062
2063 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2064 # Didn't find X anywhere. Cache the known absence of X.
2065 ac_cv_have_x="have_x=no"
2066 else
2067 # Record where we found X for the cache.
2068 ac_cv_have_x="have_x=yes \
2069 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2070 fi
2071 fi
2072 fi
2073 eval "$ac_cv_have_x"
2074 fi # $with_x != no
2075
2076 if test "$have_x" != yes; then
2077 echo "$ac_t""$have_x" 1>&6
2078 no_x=yes
2079 else
2080 # If each of the values was on the command line, it overrides each guess.
2081 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2082 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2083 # Update the cache value to reflect the command line values.
2084 ac_cv_have_x="have_x=yes \
2085 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2086 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2087 fi
2088
2089 not_really_there=""
2090 if test "$no_x" = ""; then
2091 if test "$x_includes" = ""; then
2092 cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <X11/XIntrinsic.h>
2096 EOF
2097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2098 { (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2099 ac_err=`grep -v '^ *+' conftest.out`
2100 if test -z "$ac_err"; then
2101 :
2102 else
2103 echo "$ac_err" >&5
2104 echo "configure: failed program was:" >&5
2105 cat conftest.$ac_ext >&5
2106 rm -rf conftest*
2107 not_really_there="yes"
2108 fi
2109 rm -f conftest*
2110 else
2111 if test ! -r $x_includes/X11/Intrinsic.h; then
2112 not_really_there="yes"
2113 fi
2114 fi
2115 fi
2116 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
2117 echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
2118 echo "configure:2119: checking for X11 header files" >&5
2119 XINCLUDES="# no special path needed"
2120 cat > conftest.$ac_ext <<EOF
2121 #line 2122 "configure"
2122 #include "confdefs.h"
2123 #include <X11/Intrinsic.h>
2124 EOF
2125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2126 { (eval echo configure:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2127 ac_err=`grep -v '^ *+' conftest.out`
2128 if test -z "$ac_err"; then
2129 :
2130 else
2131 echo "$ac_err" >&5
2132 echo "configure: failed program was:" >&5
2133 cat conftest.$ac_ext >&5
2134 rm -rf conftest*
2135 XINCLUDES="nope"
2136 fi
2137 rm -f conftest*
2138 if test "$XINCLUDES" = nope; then
2139 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include /usr/X11R6/include /usr/include/X11R6"
2140 for i in $dirs ; do
2141 if test -r $i/X11/Intrinsic.h; then
2142 echo "$ac_t""$i" 1>&6
2143 XINCLUDES=" -I$i"
2144 break
2145 fi
2146 done
2147 fi
2148 else
2149 if test "$x_includes" != ""; then
2150 XINCLUDES=-I$x_includes
2151 else
2152 XINCLUDES="# no special path needed"
2153 fi
2154 fi
2155 if test "$XINCLUDES" = nope; then
2156 echo "$ac_t""couldn't find any!" 1>&6
2157 XINCLUDES="# no include files found"
2158 fi
2159
2160 if test "$no_x" = yes; then
2161 echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
2162 echo "configure:2163: checking for X11 libraries" >&5
2163 XLIBSW=nope
2164 dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/X11R6/lib /usr/lib/X11R6 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
2165 for i in $dirs ; do
2166 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
2167 echo "$ac_t""$i" 1>&6
2168 XLIBSW="-L$i -lX11"
2169 break
2170 fi
2171 done
2172 else
2173 if test "$x_libraries" = ""; then
2174 XLIBSW=-lX11
2175 else
2176 XLIBSW="-L$x_libraries -lX11"
2177 fi
2178 fi
2179 if test "$XLIBSW" = nope ; then
2180 echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
2181 echo "configure:2182: checking for XCreateWindow in -lXwindow" >&5
2182 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
2183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186 ac_save_LIBS="$LIBS"
2187 LIBS="-lXwindow $LIBS"
2188 cat > conftest.$ac_ext <<EOF
2189 #line 2190 "configure"
2190 #include "confdefs.h"
2191 /* Override any gcc2 internal prototype to avoid an error. */
2192 #ifdef __cplusplus
2193 extern "C"
2194 #endif
2195 /* We use char because int might match the return type of a gcc2
2196 builtin and then its argument prototype would still apply. */
2197 char XCreateWindow();
2198
2199 int main() {
2200 XCreateWindow()
2201 ; return 0; }
2202 EOF
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2204 rm -rf conftest*
2205 eval "ac_cv_lib_$ac_lib_var=yes"
2206 else
2207 echo "configure: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2209 rm -rf conftest*
2210 eval "ac_cv_lib_$ac_lib_var=no"
2211 fi
2212 rm -f conftest*
2213 LIBS="$ac_save_LIBS"
2214
2215 fi
2216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2217 echo "$ac_t""yes" 1>&6
2218 XLIBSW=-lXwindow
2219 else
2220 echo "$ac_t""no" 1>&6
2221 fi
2222
2223 fi
2224 if test "$XLIBSW" = nope ; then
2225 echo "$ac_t""couldn't find any! Using -lX11." 1>&6
2226 XLIBSW=-lX11
2227 fi
2228
2229
2230
2231
2232 #--------------------------------------------------------------------
2233 # Try to locate the Tcl package
2234 #--------------------------------------------------------------------
2235
2236 TCLINCLUDE=nope
2237 TCLLIB=nope
2238 TCLPACKAGE=nope
2239
2240 # Check whether --with-tcl or --without-tcl was given.
2241 if test "${with_tcl+set}" = set; then
2242 withval="$with_tcl"
2243
2244 TCLPACKAGE="$withval"
2245 else
2246 TCLPACKAGE=nope
2247 fi
2248
2249 # Check whether --with-tclincl or --without-tclincl was given.
2250 if test "${with_tclincl+set}" = set; then
2251 withval="$with_tclincl"
2252
2253 TCLINCLUDE="-I$withval"
2254 else
2255 TCLINCLUDE=nope
2256 fi
2257
2258 # Check whether --with-tcllib or --without-tcllib was given.
2259 if test "${with_tcllib+set}" = set; then
2260 withval="$with_tcllib"
2261
2262 TCLLIB="-L$withval"
2263 else
2264 TCLLIB=nope
2265 fi
2266
2267
2268 if test "$TCLINCLUDE" = nope; then
2269 if test "$TCLPACKAGE" != nope; then
2270 TCLINCLUDE="-I$TCLPACKAGE/include"
2271 fi
2272 fi
2273
2274 if test "$TCLLIB" = nope; then
2275 if test "$TCLPACKAGE" != nope; then
2276 TCLLIB="-L$TCLPACKAGE/lib"
2277 fi
2278 fi
2279
2280 echo $ac_n "checking for Tcl header files""... $ac_c" 1>&6
2281 echo "configure:2282: checking for Tcl header files" >&5
2282 if test "$TCLINCLUDE" = nope; then
2283 cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286 #include <tcl.h>
2287 EOF
2288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2289 { (eval echo configure:2290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2290 ac_err=`grep -v '^ *+' conftest.out`
2291 if test -z "$ac_err"; then
2292 :
2293 else
2294 echo "$ac_err" >&5
2295 echo "configure: failed program was:" >&5
2296 cat conftest.$ac_ext >&5
2297 rm -rf conftest*
2298 TCLINCLUDE="nope"
2299 fi
2300 rm -f conftest*
2301 if test "$TCLINCLUDE" = nope; then
2302 dirs="$prefix/include /usr/local/include /usr/include /opt/local/include /home/sci/local/include"
2303 for i in $dirs ; do
2304 if test -r $i/tcl.h; then
2305 echo "$ac_t""$i" 1>&6
2306 TCLINCLUDE="-I$i"
2307 break
2308 fi
2309 done
2310 fi
2311 if test "$TCLINCLUDE" = nope; then
2312 TCLINCLUDE="-I/usr/local/include"
2313 echo "$ac_t""not found" 1>&6
2314 fi
2315 else
2316 echo "$ac_t""$TCLINCLUDE" 1>&6
2317 fi
2318
2319 echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
2320 echo "configure:2321: checking for Tcl library" >&5
2321 if test "$TCLLIB" = nope; then
2322 dirs="$prefix/lib /usr/local/lib /usr/lib /opt/local/lib /home/sci/local/lib"
2323 for i in $dirs ; do
2324 if test -r $i/libtcl.a; then
2325 echo "$ac_t""$i" 1>&6
2326 TCLLIB="-L$i"
2327 break
2328 fi
2329 done
2330 if test "$TCLLIB" = nope; then
2331 echo "$ac_t""not found" 1>&6
2332 TCLLIB="-L/usr/local/lib"
2333 fi
2334 else
2335 echo "$ac_t""$TCLLIB" 1>&6
2336 fi
2337
2338
2339
2340
2341 #----------------------------------------------------------------
2342 # Look for Python
2343 #----------------------------------------------------------------
2344
2345 PYINCLUDE=nope
2346 PYLIB=nope
2347 PYPACKAGE=nope
2348 PYLINK="-lModules -lPython -lObjects -lParser"
2349
2350 # Check whether --with-py or --without-py was given.
2351 if test "${with_py+set}" = set; then
2352 withval="$with_py"
2353
2354 PYPACKAGE="$withval"
2355 else
2356 PYPACKAGE=nope
2357 fi
2358
2359 # Check whether --with-pyincl or --without-pyincl was given.
2360 if test "${with_pyincl+set}" = set; then
2361 withval="$with_pyincl"
2362
2363 PYINCLUDE="$withval"
2364 else
2365 PYINCLUDE=nope
2366 fi
2367
2368 # Check whether --with-pylib or --without-pylib was given.
2369 if test "${with_pylib+set}" = set; then
2370 withval="$with_pylib"
2371
2372 PYLIB="$withval"
2373 else
2374 PYLIB=nope
2375 fi
2376
2377
2378 if test "$PYINCLUDE" = nope; then
2379 if test "$PYPACKAGE" != nope; then
2380 PYINCLUDE="$PYPACKAGE/include"
2381 fi
2382 fi
2383
2384 if test "$PYLIB" = nope; then
2385 if test "$PYPACKAGE" != nope; then
2386 PYLIB="$PYPACKAGE/lib"
2387 fi
2388 fi
2389
2390
2391 echo $ac_n "checking for Python header files""... $ac_c" 1>&6
2392 echo "configure:2393: checking for Python header files" >&5
2393
2394 dirs="$PYINCLUDE $PYINCLUDE/python1.5 $PYINCLUDE/python1.4 $PYINCLUDE/Py $prefix/include/python1.5 $prefix/include/python1.4 /usr/local/include/python1.5 /usr/include/python1.5 /usr/local/include/python1.4 /usr/include/python1.4 $prefix/include/Py /usr/local/include/Py /usr/include/Py"
2395 for i in $dirs ; do
2396 if test -r $i/Python.h; then
2397 echo "$ac_t""$i" 1>&6
2398 PYINCLUDE="-I$i"
2399 break
2400 fi
2401 done
2402 if test "$PYINCLUDE" = nope; then
2403 PYINCLUDE="-I/usr/local/include/Py"
2404 echo "$ac_t""not found" 1>&6
2405 fi
2406
2407 echo $ac_n "checking for Python library""... $ac_c" 1>&6
2408 echo "configure:2409: checking for Python library" >&5
2409 dirs="$PYLIB $PYLIB/config $PYLIB/lib $PYLIB/python1.5/config $PYLIB/python1.4/config $PYLIB/python/lib $prefix/lib/python1.5/config $prefix/lib/python1.4/config /usr/local/lib/python1.5/config /usr/lib/python1.5 /usr/local/lib/python1.4/config /usr/lib/python1.4 $prefix/lib/python/lib /usr/local/lib/python/lib /usr/lib/python/lib /home/sci/local/lib/python"
2410
2411 for i in $dirs ; do
2412 if test -r $i/libpython1.5.a; then
2413 echo "$ac_t""$i" 1>&6
2414 PYLIB="$i"
2415 PYINCLUDE="$PYINCLUDE -I$i"
2416 PYLINK="-lpython1.5"
2417 break
2418 fi
2419 if test -r $i/libPython.a; then
2420 echo "$ac_t""$i" 1>&6
2421 PYLIB="$i"
2422 PYINCLUDE="$PYINCLUDE -I$i"
2423 break
2424 fi
2425 done
2426 if test "$PYLIB" = nope; then
2427 echo "$ac_t""not found" 1>&6
2428 PYLIB="/usr/local/lib/python/lib"
2429 PYINCLUDE="$PYINCLUDE -I$PYLIB"
2430 fi
2431
2432
2433
2434
2435
2436 #----------------------------------------------------------------
2437 # Look for Perl5
2438 #----------------------------------------------------------------
2439
2440 PERLBIN=nope
2441
2442 # Check whether --with-perl5 or --without-perl5 was given.
2443 if test "${with_perl5+set}" = set; then
2444 withval="$with_perl5"
2445
2446 PERLBIN="$withval"
2447 else
2448 PERLBIN=nope
2449 fi
2450
2451
2452 # First figure out what the name of Perl5 is
2453
2454 if test "$PERLBIN" = nope; then
2455 for ac_prog in perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl
2456 do
2457 # Extract the first word of "$ac_prog", so it can be a program name with args.
2458 set dummy $ac_prog; ac_word=$2
2459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2460 echo "configure:2461: checking for $ac_word" >&5
2461 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
2462 echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464 if test -n "$PERL"; then
2465 ac_cv_prog_PERL="$PERL" # Let the user override the test.
2466 else
2467 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2468 for ac_dir in $PATH; do
2469 test -z "$ac_dir" && ac_dir=.
2470 if test -f $ac_dir/$ac_word; then
2471 ac_cv_prog_PERL="$ac_prog"
2472 break
2473 fi
2474 done
2475 IFS="$ac_save_ifs"
2476 fi
2477 fi
2478 PERL="$ac_cv_prog_PERL"
2479 if test -n "$PERL"; then
2480 echo "$ac_t""$PERL" 1>&6
2481 else
2482 echo "$ac_t""no" 1>&6
2483 fi
2484
2485 test -n "$PERL" && break
2486 done
2487 test -n "$PERL" || PERL="nope"
2488
2489 else
2490 PERL="$PERLBIN"
2491 fi
2492 echo $ac_n "checking for Perl5 header files""... $ac_c" 1>&6
2493 echo "configure:2494: checking for Perl5 header files" >&5
2494 if test "$PERL" != nope; then
2495 PERL5DIR=`($PERL -e 'use Config; print $Config{archlib};') 2>/dev/null`
2496 if test "$PERL5DIR" != ""; then
2497 dirs="$PERL5DIR $PERL5DIR/CORE"
2498 PERL5EXT=none
2499 for i in $dirs; do
2500 if test -r $i/perl.h; then
2501 echo "$ac_t""$i" 1>&6
2502 PERL5EXT="$i"
2503 break;
2504 fi
2505 done
2506 if test "$PERL5EXT" = none; then
2507 PERL5EXT="$PERL5DIR/CORE"
2508 echo "$ac_t""could not locate perl.h...using $PERL5EXT" 1>&6
2509 fi
2510 else
2511 echo "$ac_t""unable to determine perl5 configuration" 1>&6
2512 PERL5EXT=$PERL5DIR
2513 fi
2514 else
2515 echo "$ac_t""could not figure out how to run perl5" 1>&6
2516 PERL5EXT="/usr/local/lib/perl/archname/5.003/CORE"
2517 fi
2518
2519
2520
2521 trap '' 1 2 15
2522 cat > confcache <<\EOF
2523 # This file is a shell script that caches the results of configure
2524 # tests run on this system so they can be shared between configure
2525 # scripts and configure runs. It is not useful on other systems.
2526 # If it contains results you don't want to keep, you may remove or edit it.
2527 #
2528 # By default, configure uses ./config.cache as the cache file,
2529 # creating it if it does not exist already. You can give configure
2530 # the --cache-file=FILE option to use a different cache file; that is
2531 # what configure does when it calls configure scripts in
2532 # subdirectories, so they share the cache.
2533 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2534 # config.status only pays attention to the cache file if you give it the
2535 # --recheck option to rerun configure.
2536 #
2537 EOF
2538 # The following way of writing the cache mishandles newlines in values,
2539 # but we know of no workaround that is simple, portable, and efficient.
2540 # So, don't put newlines in cache variables' values.
2541 # Ultrix sh set writes to stderr and can't be redirected directly,
2542 # and sets the high bit in the cache file unless we assign to the vars.
2543 (set) 2>&1 |
2544 case `(ac_space=' '; set) 2>&1` in
2545 *ac_space=\ *)
2546 # `set' does not quote correctly, so add quotes (double-quote substitution
2547 # turns \\\\ into \\, and sed turns \\ into \).
2548 sed -n \
2549 -e "s/'/'\\\\''/g" \
2550 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2551 ;;
2552 *)
2553 # `set' quotes correctly as required by POSIX, so do not add quotes.
2554 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2555 ;;
2556 esac >> confcache
2557 if cmp -s $cache_file confcache; then
2558 :
2559 else
2560 if test -w $cache_file; then
2561 echo "updating cache $cache_file"
2562 cat confcache > $cache_file
2563 else
2564 echo "not updating unwritable cache $cache_file"
2565 fi
2566 fi
2567 rm -f confcache
2568
2569 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2570
2571 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2572 # Let make expand exec_prefix.
2573 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2574
2575 # Any assignment to VPATH causes Sun make to only execute
2576 # the first set of double-colon rules, so remove it if not needed.
2577 # If there is a colon in the path, we need to keep it.
2578 if test "x$srcdir" = x.; then
2579 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2580 fi
2581
2582 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2583
2584 # Transform confdefs.h into DEFS.
2585 # Protect against shell expansion while executing Makefile rules.
2586 # Protect against Makefile macro expansion.
2587 cat > conftest.defs <<\EOF
2588 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2589 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
2590 s%\[%\\&%g
2591 s%\]%\\&%g
2592 s%\$%$$%g
2593 EOF
2594 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2595 rm -f conftest.defs
2596
2597
2598 # Without the "./", some shells look in PATH for config.status.
2599 : ${CONFIG_STATUS=./config.status}
2600
2601 echo creating $CONFIG_STATUS
2602 rm -f $CONFIG_STATUS
2603 cat > $CONFIG_STATUS <<EOF
2604 #! /bin/sh
2605 # Generated automatically by configure.
2606 # Run this file to recreate the current configuration.
2607 # This directory was configured as follows,
2608 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2609 #
2610 # $0 $ac_configure_args
2611 #
2612 # Compiler output produced by configure, useful for debugging
2613 # configure, is in ./config.log if it exists.
2614
2615 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2616 for ac_option
2617 do
2618 case "\$ac_option" in
2619 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2620 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2621 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2622 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2623 echo "$CONFIG_STATUS generated by autoconf version 2.12"
2624 exit 0 ;;
2625 -help | --help | --hel | --he | --h)
2626 echo "\$ac_cs_usage"; exit 0 ;;
2627 *) echo "\$ac_cs_usage"; exit 1 ;;
2628 esac
2629 done
2630
2631 ac_given_srcdir=$srcdir
2632
2633 trap 'rm -fr `echo "Makefile SWIG/Makefile Modules/Makefile Runtime/Makefile swig_lib/tcl/Makefile swig_lib/python/Makefile swig_lib/perl5/Makefile Makefile.template" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2634 EOF
2635 cat >> $CONFIG_STATUS <<EOF
2636
2637 # Protect against being on the right side of a sed subst in config.status.
2638 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2639 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2640 $ac_vpsub
2641 $extrasub
2642 s%@CFLAGS@%$CFLAGS%g
2643 s%@CPPFLAGS@%$CPPFLAGS%g
2644 s%@CXXFLAGS@%$CXXFLAGS%g
2645 s%@DEFS@%$DEFS%g
2646 s%@LDFLAGS@%$LDFLAGS%g
2647 s%@LIBS@%$LIBS%g
2648 s%@exec_prefix@%$exec_prefix%g
2649 s%@prefix@%$prefix%g
2650 s%@program_transform_name@%$program_transform_name%g
2651 s%@bindir@%$bindir%g
2652 s%@sbindir@%$sbindir%g
2653 s%@libexecdir@%$libexecdir%g
2654 s%@datadir@%$datadir%g
2655 s%@sysconfdir@%$sysconfdir%g
2656 s%@sharedstatedir@%$sharedstatedir%g
2657 s%@localstatedir@%$localstatedir%g
2658 s%@libdir@%$libdir%g
2659 s%@includedir@%$includedir%g
2660 s%@oldincludedir@%$oldincludedir%g
2661 s%@infodir@%$infodir%g
2662 s%@mandir@%$mandir%g
2663 s%@MACHDEP@%$MACHDEP%g
2664 s%@CXX@%$CXX%g
2665 s%@CC@%$CC%g
2666 s%@RANLIB@%$RANLIB%g
2667 s%@AR@%$AR%g
2668 s%@CXXCPP@%$CXXCPP%g
2669 s%@ALLOCA@%$ALLOCA%g
2670 s%@YACC@%$YACC%g
2671 s%@YACCFLAGS@%$YACCFLAGS%g
2672 s%@SO@%$SO%g
2673 s%@LDSHARED@%$LDSHARED%g
2674 s%@CCSHARED@%$CCSHARED%g
2675 s%@LINKFORSHARED@%$LINKFORSHARED%g
2676 s%@LIBM@%$LIBM%g
2677 s%@LIBCRYPT@%$LIBCRYPT%g
2678 s%@LIBC@%$LIBC%g
2679 s%@XINCLUDES@%$XINCLUDES%g
2680 s%@XLIBSW@%$XLIBSW%g
2681 s%@TCLINCLUDE@%$TCLINCLUDE%g
2682 s%@TCLLIB@%$TCLLIB%g
2683 s%@PYINCLUDE@%$PYINCLUDE%g
2684 s%@PYLIB@%$PYLIB%g
2685 s%@PYLINK@%$PYLINK%g
2686 s%@PERL@%$PERL%g
2687 s%@PERL5EXT@%$PERL5EXT%g
2688
2689 CEOF
2690 EOF
2691
2692 cat >> $CONFIG_STATUS <<\EOF
2693
2694 # Split the substitutions into bite-sized pieces for seds with
2695 # small command number limits, like on Digital OSF/1 and HP-UX.
2696 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2697 ac_file=1 # Number of current file.
2698 ac_beg=1 # First line for current file.
2699 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2700 ac_more_lines=:
2701 ac_sed_cmds=""
2702 while $ac_more_lines; do
2703 if test $ac_beg -gt 1; then
2704 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2705 else
2706 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2707 fi
2708 if test ! -s conftest.s$ac_file; then
2709 ac_more_lines=false
2710 rm -f conftest.s$ac_file
2711 else
2712 if test -z "$ac_sed_cmds"; then
2713 ac_sed_cmds="sed -f conftest.s$ac_file"
2714 else
2715 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2716 fi
2717 ac_file=`expr $ac_file + 1`
2718 ac_beg=$ac_end
2719 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2720 fi
2721 done
2722 if test -z "$ac_sed_cmds"; then
2723 ac_sed_cmds=cat
2724 fi
2725 EOF
2726
2727 cat >> $CONFIG_STATUS <<EOF
2728
2729 CONFIG_FILES=\${CONFIG_FILES-"Makefile SWIG/Makefile Modules/Makefile Runtime/Makefile swig_lib/tcl/Makefile swig_lib/python/Makefile swig_lib/perl5/Makefile Makefile.template"}
2730 EOF
2731 cat >> $CONFIG_STATUS <<\EOF
2732 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2733 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2734 case "$ac_file" in
2735 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2736 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2737 *) ac_file_in="${ac_file}.in" ;;
2738 esac
2739
2740 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2741
2742 # Remove last slash and all that follows it. Not all systems have dirname.
2743 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2744 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2745 # The file is in a subdirectory.
2746 test ! -d "$ac_dir" && mkdir "$ac_dir"
2747 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2748 # A "../" for each directory in $ac_dir_suffix.
2749 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2750 else
2751 ac_dir_suffix= ac_dots=
2752 fi
2753
2754 case "$ac_given_srcdir" in
2755 .) srcdir=.
2756 if test -z "$ac_dots"; then top_srcdir=.
2757 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2758 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2759 *) # Relative path.
2760 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2761 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2762 esac
2763
2764
2765 echo creating "$ac_file"
2766 rm -f "$ac_file"
2767 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2768 case "$ac_file" in
2769 *Makefile*) ac_comsub="1i\\
2770 # $configure_input" ;;
2771 *) ac_comsub= ;;
2772 esac
2773
2774 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2775 sed -e "$ac_comsub
2776 s%@configure_input@%$configure_input%g
2777 s%@srcdir@%$srcdir%g
2778 s%@top_srcdir@%$top_srcdir%g
2779 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2780 fi; done
2781 rm -f conftest.s*
2782
2783 EOF
2784 cat >> $CONFIG_STATUS <<EOF
2785
2786 EOF
2787 cat >> $CONFIG_STATUS <<\EOF
2788
2789 exit 0
2790 EOF
2791 chmod +x $CONFIG_STATUS
2792 rm -fr confdefs* $ac_clean_files
2793 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2794
2795
2796
2797
2798
2799
2800