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