Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
bfde4a67 | 4 | # Generated automatically using autoconf version 2.12 |
bc859e63 | 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
5436fc65 C |
6 | # |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --enable-netrom " | |
188c635f SG |
16 | ac_help="$ac_help |
17 | --enable-gm " | |
3c0bf315 MM |
18 | ac_help="$ac_help |
19 | --enable-sim-powerpc " | |
5436fc65 C |
20 | ac_help="$ac_help |
21 | --enable-gdbtk " | |
22 | ac_help="$ac_help | |
047465fd | 23 | --with-tclconfig directory containing tcl configuration (tclConfig.sh)" |
4e327047 | 24 | ac_help="$ac_help |
047465fd | 25 | --with-tkconfig directory containing tk configuration (tkConfig.sh)" |
4e327047 | 26 | ac_help="$ac_help |
047465fd | 27 | --with-tclinclude directory where tcl private headers are" |
4e327047 | 28 | ac_help="$ac_help |
047465fd | 29 | --with-tkinclude directory where tk private headers are" |
1d5eb137 FF |
30 | ac_help="$ac_help |
31 | --enable-shared use shared libraries" | |
5436fc65 C |
32 | |
33 | # Initialize some variables set by options. | |
34 | # The variables have the same names as the options, with | |
35 | # dashes changed to underlines. | |
36 | build=NONE | |
37 | cache_file=./config.cache | |
38 | exec_prefix=NONE | |
39 | host=NONE | |
40 | no_create= | |
41 | nonopt=NONE | |
42 | no_recursion= | |
43 | prefix=NONE | |
44 | program_prefix=NONE | |
45 | program_suffix=NONE | |
46 | program_transform_name=s,x,x, | |
47 | silent= | |
48 | site= | |
49 | srcdir= | |
50 | target=NONE | |
51 | verbose= | |
52 | x_includes=NONE | |
53 | x_libraries=NONE | |
1a7b4b7c DE |
54 | bindir='${exec_prefix}/bin' |
55 | sbindir='${exec_prefix}/sbin' | |
56 | libexecdir='${exec_prefix}/libexec' | |
57 | datadir='${prefix}/share' | |
58 | sysconfdir='${prefix}/etc' | |
59 | sharedstatedir='${prefix}/com' | |
60 | localstatedir='${prefix}/var' | |
61 | libdir='${exec_prefix}/lib' | |
62 | includedir='${prefix}/include' | |
63 | oldincludedir='/usr/include' | |
64 | infodir='${prefix}/info' | |
65 | mandir='${prefix}/man' | |
5436fc65 C |
66 | |
67 | # Initialize some other variables. | |
68 | subdirs= | |
1a7b4b7c | 69 | MFLAGS= MAKEFLAGS= |
bfde4a67 SG |
70 | # Maximum number of lines to put in a shell here document. |
71 | ac_max_here_lines=12 | |
5436fc65 C |
72 | |
73 | ac_prev= | |
74 | for ac_option | |
75 | do | |
76 | ||
77 | # If the previous option needs an argument, assign it. | |
78 | if test -n "$ac_prev"; then | |
79 | eval "$ac_prev=\$ac_option" | |
80 | ac_prev= | |
81 | continue | |
82 | fi | |
83 | ||
84 | case "$ac_option" in | |
85 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
86 | *) ac_optarg= ;; | |
87 | esac | |
88 | ||
89 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
90 | ||
91 | case "$ac_option" in | |
92 | ||
1a7b4b7c DE |
93 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
94 | ac_prev=bindir ;; | |
95 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
96 | bindir="$ac_optarg" ;; | |
97 | ||
98 | -build | --build | --buil | --bui | --bu) | |
5436fc65 | 99 | ac_prev=build ;; |
1a7b4b7c | 100 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
5436fc65 C |
101 | build="$ac_optarg" ;; |
102 | ||
103 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
104 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
105 | ac_prev=cache_file ;; | |
106 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
107 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
108 | cache_file="$ac_optarg" ;; | |
109 | ||
1a7b4b7c DE |
110 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
111 | ac_prev=datadir ;; | |
112 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
113 | | --da=*) | |
114 | datadir="$ac_optarg" ;; | |
115 | ||
5436fc65 C |
116 | -disable-* | --disable-*) |
117 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
118 | # Reject names that are not valid shell variable names. | |
119 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
120 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
121 | fi | |
122 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
123 | eval "enable_${ac_feature}=no" ;; | |
124 | ||
125 | -enable-* | --enable-*) | |
126 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
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 | case "$ac_option" in | |
133 | *=*) ;; | |
134 | *) ac_optarg=yes ;; | |
135 | esac | |
136 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
137 | ||
138 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
139 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
140 | | --exec | --exe | --ex) | |
141 | ac_prev=exec_prefix ;; | |
142 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
143 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
144 | | --exec=* | --exe=* | --ex=*) | |
145 | exec_prefix="$ac_optarg" ;; | |
146 | ||
147 | -gas | --gas | --ga | --g) | |
148 | # Obsolete; use --with-gas. | |
149 | with_gas=yes ;; | |
150 | ||
151 | -help | --help | --hel | --he) | |
152 | # Omit some internal or obsolete options to make the list less imposing. | |
153 | # This message is too long to be a string in the A/UX 3.1 sh. | |
154 | cat << EOF | |
155 | Usage: configure [options] [host] | |
156 | Options: [defaults in brackets after descriptions] | |
157 | Configuration: | |
158 | --cache-file=FILE cache test results in FILE | |
159 | --help print this message | |
160 | --no-create do not create output files | |
161 | --quiet, --silent do not print \`checking...' messages | |
162 | --version print the version of autoconf that created configure | |
163 | Directory and file names: | |
164 | --prefix=PREFIX install architecture-independent files in PREFIX | |
165 | [$ac_default_prefix] | |
1a7b4b7c | 166 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5436fc65 | 167 | [same as prefix] |
1a7b4b7c DE |
168 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
169 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
170 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
171 | --datadir=DIR read-only architecture-independent data in DIR | |
172 | [PREFIX/share] | |
173 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
174 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
175 | [PREFIX/com] | |
176 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
177 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
178 | --includedir=DIR C header files in DIR [PREFIX/include] | |
179 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
180 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
181 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
5436fc65 C |
182 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
183 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
184 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1a7b4b7c DE |
185 | --program-transform-name=PROGRAM |
186 | run sed PROGRAM on installed program names | |
187 | EOF | |
188 | cat << EOF | |
5436fc65 C |
189 | Host type: |
190 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
191 | --host=HOST configure for HOST [guessed] | |
192 | --target=TARGET configure for TARGET [TARGET=HOST] | |
193 | Features and packages: | |
194 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
195 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
196 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
197 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
198 | --x-includes=DIR X include files are in DIR | |
199 | --x-libraries=DIR X library files are in DIR | |
5436fc65 | 200 | EOF |
1a7b4b7c DE |
201 | if test -n "$ac_help"; then |
202 | echo "--enable and --with options recognized:$ac_help" | |
203 | fi | |
5436fc65 C |
204 | exit 0 ;; |
205 | ||
206 | -host | --host | --hos | --ho) | |
207 | ac_prev=host ;; | |
208 | -host=* | --host=* | --hos=* | --ho=*) | |
209 | host="$ac_optarg" ;; | |
210 | ||
1a7b4b7c DE |
211 | -includedir | --includedir | --includedi | --included | --include \ |
212 | | --includ | --inclu | --incl | --inc) | |
213 | ac_prev=includedir ;; | |
214 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
215 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
216 | includedir="$ac_optarg" ;; | |
217 | ||
218 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
219 | ac_prev=infodir ;; | |
220 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
221 | infodir="$ac_optarg" ;; | |
222 | ||
223 | -libdir | --libdir | --libdi | --libd) | |
224 | ac_prev=libdir ;; | |
225 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
226 | libdir="$ac_optarg" ;; | |
227 | ||
228 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
229 | | --libexe | --libex | --libe) | |
230 | ac_prev=libexecdir ;; | |
231 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
232 | | --libexe=* | --libex=* | --libe=*) | |
233 | libexecdir="$ac_optarg" ;; | |
234 | ||
235 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
236 | | --localstate | --localstat | --localsta | --localst \ | |
237 | | --locals | --local | --loca | --loc | --lo) | |
238 | ac_prev=localstatedir ;; | |
239 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
240 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
241 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
242 | localstatedir="$ac_optarg" ;; | |
243 | ||
244 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
245 | ac_prev=mandir ;; | |
246 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
247 | mandir="$ac_optarg" ;; | |
248 | ||
5436fc65 C |
249 | -nfp | --nfp | --nf) |
250 | # Obsolete; use --without-fp. | |
251 | with_fp=no ;; | |
252 | ||
253 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
254 | | --no-cr | --no-c) | |
255 | no_create=yes ;; | |
256 | ||
257 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
258 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
259 | no_recursion=yes ;; | |
260 | ||
1a7b4b7c DE |
261 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
262 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
263 | | --oldin | --oldi | --old | --ol | --o) | |
264 | ac_prev=oldincludedir ;; | |
265 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
266 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
267 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
268 | oldincludedir="$ac_optarg" ;; | |
269 | ||
5436fc65 C |
270 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
271 | ac_prev=prefix ;; | |
272 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
273 | prefix="$ac_optarg" ;; | |
274 | ||
275 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
276 | | --program-pre | --program-pr | --program-p) | |
277 | ac_prev=program_prefix ;; | |
278 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
279 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
280 | program_prefix="$ac_optarg" ;; | |
281 | ||
282 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
283 | | --program-suf | --program-su | --program-s) | |
284 | ac_prev=program_suffix ;; | |
285 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
286 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
287 | program_suffix="$ac_optarg" ;; | |
288 | ||
289 | -program-transform-name | --program-transform-name \ | |
290 | | --program-transform-nam | --program-transform-na \ | |
291 | | --program-transform-n | --program-transform- \ | |
292 | | --program-transform | --program-transfor \ | |
293 | | --program-transfo | --program-transf \ | |
294 | | --program-trans | --program-tran \ | |
295 | | --progr-tra | --program-tr | --program-t) | |
296 | ac_prev=program_transform_name ;; | |
297 | -program-transform-name=* | --program-transform-name=* \ | |
298 | | --program-transform-nam=* | --program-transform-na=* \ | |
299 | | --program-transform-n=* | --program-transform-=* \ | |
300 | | --program-transform=* | --program-transfor=* \ | |
301 | | --program-transfo=* | --program-transf=* \ | |
302 | | --program-trans=* | --program-tran=* \ | |
303 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
304 | program_transform_name="$ac_optarg" ;; | |
305 | ||
306 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
307 | | -silent | --silent | --silen | --sile | --sil) | |
308 | silent=yes ;; | |
309 | ||
1a7b4b7c DE |
310 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
311 | ac_prev=sbindir ;; | |
312 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
313 | | --sbi=* | --sb=*) | |
314 | sbindir="$ac_optarg" ;; | |
315 | ||
316 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
317 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
318 | | --sharedst | --shareds | --shared | --share | --shar \ | |
319 | | --sha | --sh) | |
320 | ac_prev=sharedstatedir ;; | |
321 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
322 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
323 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
324 | | --sha=* | --sh=*) | |
325 | sharedstatedir="$ac_optarg" ;; | |
326 | ||
5436fc65 C |
327 | -site | --site | --sit) |
328 | ac_prev=site ;; | |
329 | -site=* | --site=* | --sit=*) | |
330 | site="$ac_optarg" ;; | |
331 | ||
332 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
333 | ac_prev=srcdir ;; | |
334 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
335 | srcdir="$ac_optarg" ;; | |
336 | ||
1a7b4b7c DE |
337 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
338 | | --syscon | --sysco | --sysc | --sys | --sy) | |
339 | ac_prev=sysconfdir ;; | |
340 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
341 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
342 | sysconfdir="$ac_optarg" ;; | |
343 | ||
5436fc65 C |
344 | -target | --target | --targe | --targ | --tar | --ta | --t) |
345 | ac_prev=target ;; | |
346 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
347 | target="$ac_optarg" ;; | |
348 | ||
349 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
350 | verbose=yes ;; | |
351 | ||
352 | -version | --version | --versio | --versi | --vers) | |
bfde4a67 | 353 | echo "configure generated by autoconf version 2.12" |
5436fc65 C |
354 | exit 0 ;; |
355 | ||
356 | -with-* | --with-*) | |
357 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
358 | # Reject names that are not valid shell variable names. | |
359 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
360 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
361 | fi | |
362 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
363 | case "$ac_option" in | |
364 | *=*) ;; | |
365 | *) ac_optarg=yes ;; | |
366 | esac | |
367 | eval "with_${ac_package}='$ac_optarg'" ;; | |
368 | ||
369 | -without-* | --without-*) | |
370 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
371 | # Reject names that are not valid shell variable names. | |
372 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
373 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
374 | fi | |
375 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
376 | eval "with_${ac_package}=no" ;; | |
377 | ||
378 | --x) | |
379 | # Obsolete; use --with-x. | |
380 | with_x=yes ;; | |
381 | ||
382 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
383 | | --x-incl | --x-inc | --x-in | --x-i) | |
384 | ac_prev=x_includes ;; | |
385 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
386 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
387 | x_includes="$ac_optarg" ;; | |
388 | ||
389 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
390 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
391 | ac_prev=x_libraries ;; | |
392 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
393 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
394 | x_libraries="$ac_optarg" ;; | |
395 | ||
396 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
397 | ;; | |
398 | ||
1a7b4b7c | 399 | *) |
5436fc65 C |
400 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
401 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
402 | fi | |
403 | if test "x$nonopt" != xNONE; then | |
404 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
405 | fi | |
406 | nonopt="$ac_option" | |
407 | ;; | |
408 | ||
409 | esac | |
410 | done | |
411 | ||
412 | if test -n "$ac_prev"; then | |
413 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
414 | fi | |
415 | ||
416 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
417 | ||
418 | # File descriptor usage: | |
419 | # 0 standard input | |
420 | # 1 file creation | |
421 | # 2 errors and warnings | |
422 | # 3 some systems may open it to /dev/tty | |
423 | # 4 used on the Kubota Titan | |
424 | # 6 checking for... messages and results | |
425 | # 5 compiler messages saved in config.log | |
426 | if test "$silent" = yes; then | |
427 | exec 6>/dev/null | |
428 | else | |
429 | exec 6>&1 | |
430 | fi | |
431 | exec 5>./config.log | |
432 | ||
433 | echo "\ | |
434 | This file contains any messages produced by compilers while | |
435 | running configure, to aid debugging if configure makes a mistake. | |
436 | " 1>&5 | |
437 | ||
438 | # Strip out --no-create and --no-recursion so they do not pile up. | |
439 | # Also quote any args containing shell metacharacters. | |
440 | ac_configure_args= | |
441 | for ac_arg | |
442 | do | |
443 | case "$ac_arg" in | |
444 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
445 | | --no-cr | --no-c) ;; | |
446 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
447 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
448 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
449 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
450 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
451 | esac | |
452 | done | |
453 | ||
454 | # NLS nuisances. | |
bfde4a67 SG |
455 | # Only set these to C if already set. These must not be set unconditionally |
456 | # because not all systems understand e.g. LANG=C (notably SCO). | |
457 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
458 | # Non-C LC_CTYPE values break the ctype check. | |
ef6c51d1 | 459 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
bfde4a67 SG |
460 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
461 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
462 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
5436fc65 C |
463 | |
464 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
465 | rm -rf conftest* confdefs.h | |
466 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
467 | echo > confdefs.h | |
468 | ||
469 | # A filename unique to this package, relative to the directory that | |
470 | # configure is in, which we can look for to find out if srcdir is correct. | |
471 | ac_unique_file=main.c | |
472 | ||
473 | # Find the source files, if location was not specified. | |
474 | if test -z "$srcdir"; then | |
475 | ac_srcdir_defaulted=yes | |
476 | # Try the directory containing this script, then its parent. | |
477 | ac_prog=$0 | |
478 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
479 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
480 | srcdir=$ac_confdir | |
481 | if test ! -r $srcdir/$ac_unique_file; then | |
482 | srcdir=.. | |
483 | fi | |
484 | else | |
485 | ac_srcdir_defaulted=no | |
486 | fi | |
487 | if test ! -r $srcdir/$ac_unique_file; then | |
488 | if test "$ac_srcdir_defaulted" = yes; then | |
489 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
490 | else | |
491 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
492 | fi | |
493 | fi | |
494 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
495 | ||
496 | # Prefer explicitly selected file to automatically selected ones. | |
497 | if test -z "$CONFIG_SITE"; then | |
498 | if test "x$prefix" != xNONE; then | |
499 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
500 | else | |
501 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
502 | fi | |
503 | fi | |
504 | for ac_site_file in $CONFIG_SITE; do | |
505 | if test -r "$ac_site_file"; then | |
506 | echo "loading site script $ac_site_file" | |
507 | . "$ac_site_file" | |
508 | fi | |
509 | done | |
510 | ||
511 | if test -r "$cache_file"; then | |
512 | echo "loading cache $cache_file" | |
513 | . $cache_file | |
514 | else | |
515 | echo "creating cache $cache_file" | |
516 | > $cache_file | |
517 | fi | |
518 | ||
519 | ac_ext=c | |
520 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
3dedc867 | 521 | ac_cpp='$CPP $CPPFLAGS' |
1a7b4b7c DE |
522 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
523 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
bfde4a67 | 524 | cross_compiling=$ac_cv_prog_cc_cross |
5436fc65 C |
525 | |
526 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
527 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
528 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
529 | ac_n= ac_c=' | |
530 | ' ac_t=' ' | |
531 | else | |
532 | ac_n=-n ac_c= ac_t= | |
533 | fi | |
534 | else | |
535 | ac_n= ac_c='\c' ac_t= | |
536 | fi | |
537 | ||
538 | ||
539 | ||
db210d08 | 540 | |
5436fc65 C |
541 | # Extract the first word of "gcc", so it can be a program name with args. |
542 | set dummy gcc; ac_word=$2 | |
543 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
bfde4a67 | 544 | echo "configure:545: checking for $ac_word" >&5 |
5436fc65 C |
545 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
547 | else | |
548 | if test -n "$CC"; then | |
549 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
550 | else | |
551 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 552 | for ac_dir in $PATH; do |
5436fc65 C |
553 | test -z "$ac_dir" && ac_dir=. |
554 | if test -f $ac_dir/$ac_word; then | |
555 | ac_cv_prog_CC="gcc" | |
556 | break | |
557 | fi | |
558 | done | |
559 | IFS="$ac_save_ifs" | |
5436fc65 C |
560 | fi |
561 | fi | |
562 | CC="$ac_cv_prog_CC" | |
563 | if test -n "$CC"; then | |
564 | echo "$ac_t""$CC" 1>&6 | |
565 | else | |
566 | echo "$ac_t""no" 1>&6 | |
567 | fi | |
568 | ||
1a7b4b7c DE |
569 | if test -z "$CC"; then |
570 | # Extract the first word of "cc", so it can be a program name with args. | |
571 | set dummy cc; ac_word=$2 | |
572 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
bfde4a67 | 573 | echo "configure:574: checking for $ac_word" >&5 |
1a7b4b7c DE |
574 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
575 | echo $ac_n "(cached) $ac_c" 1>&6 | |
576 | else | |
577 | if test -n "$CC"; then | |
578 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
579 | else | |
580 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
581 | ac_prog_rejected=no | |
582 | for ac_dir in $PATH; do | |
583 | test -z "$ac_dir" && ac_dir=. | |
584 | if test -f $ac_dir/$ac_word; then | |
585 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
586 | ac_prog_rejected=yes | |
587 | continue | |
588 | fi | |
589 | ac_cv_prog_CC="cc" | |
590 | break | |
591 | fi | |
592 | done | |
593 | IFS="$ac_save_ifs" | |
594 | if test $ac_prog_rejected = yes; then | |
595 | # We found a bogon in the path, so make sure we never use it. | |
596 | set dummy $ac_cv_prog_CC | |
597 | shift | |
598 | if test $# -gt 0; then | |
599 | # We chose a different compiler from the bogus one. | |
600 | # However, it has the same basename, so the bogon will be chosen | |
601 | # first if we set CC to just the basename; use the full file name. | |
602 | shift | |
603 | set dummy "$ac_dir/$ac_word" "$@" | |
604 | shift | |
605 | ac_cv_prog_CC="$@" | |
606 | fi | |
607 | fi | |
608 | fi | |
609 | fi | |
610 | CC="$ac_cv_prog_CC" | |
611 | if test -n "$CC"; then | |
612 | echo "$ac_t""$CC" 1>&6 | |
613 | else | |
614 | echo "$ac_t""no" 1>&6 | |
615 | fi | |
616 | ||
617 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
618 | fi | |
5436fc65 | 619 | |
bfde4a67 SG |
620 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
621 | echo "configure:622: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 | |
622 | ||
623 | ac_ext=c | |
624 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
625 | ac_cpp='$CPP $CPPFLAGS' | |
626 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
627 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
628 | cross_compiling=$ac_cv_prog_cc_cross | |
629 | ||
630 | cat > conftest.$ac_ext <<EOF | |
631 | #line 632 "configure" | |
632 | #include "confdefs.h" | |
633 | main(){return(0);} | |
634 | EOF | |
635 | if { (eval echo configure:636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
636 | ac_cv_prog_cc_works=yes | |
637 | # If we can't run a trivial program, we are probably using a cross compiler. | |
638 | if (./conftest; exit) 2>/dev/null; then | |
639 | ac_cv_prog_cc_cross=no | |
640 | else | |
641 | ac_cv_prog_cc_cross=yes | |
642 | fi | |
643 | else | |
644 | echo "configure: failed program was:" >&5 | |
645 | cat conftest.$ac_ext >&5 | |
646 | ac_cv_prog_cc_works=no | |
647 | fi | |
648 | rm -fr conftest* | |
649 | ||
650 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
651 | if test $ac_cv_prog_cc_works = no; then | |
652 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
653 | fi | |
654 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
655 | echo "configure:656: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
656 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 | |
657 | cross_compiling=$ac_cv_prog_cc_cross | |
658 | ||
5436fc65 | 659 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
bfde4a67 | 660 | echo "configure:661: checking whether we are using GNU C" >&5 |
5436fc65 C |
661 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
662 | echo $ac_n "(cached) $ac_c" 1>&6 | |
663 | else | |
664 | cat > conftest.c <<EOF | |
665 | #ifdef __GNUC__ | |
666 | yes; | |
667 | #endif | |
668 | EOF | |
bfde4a67 | 669 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
5436fc65 C |
670 | ac_cv_prog_gcc=yes |
671 | else | |
672 | ac_cv_prog_gcc=no | |
673 | fi | |
674 | fi | |
1a7b4b7c | 675 | |
5436fc65 | 676 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
bfde4a67 | 677 | |
5436fc65 C |
678 | if test $ac_cv_prog_gcc = yes; then |
679 | GCC=yes | |
bfde4a67 SG |
680 | ac_test_CFLAGS="${CFLAGS+set}" |
681 | ac_save_CFLAGS="$CFLAGS" | |
682 | CFLAGS= | |
683 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
684 | echo "configure:685: checking whether ${CC-cc} accepts -g" >&5 | |
685 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then | |
5436fc65 C |
686 | echo $ac_n "(cached) $ac_c" 1>&6 |
687 | else | |
688 | echo 'void f(){}' > conftest.c | |
689 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
bfde4a67 | 690 | ac_cv_prog_cc_g=yes |
5436fc65 | 691 | else |
bfde4a67 | 692 | ac_cv_prog_cc_g=no |
5436fc65 C |
693 | fi |
694 | rm -f conftest* | |
695 | ||
696 | fi | |
1a7b4b7c | 697 | |
bfde4a67 SG |
698 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
699 | if test "$ac_test_CFLAGS" = set; then | |
700 | CFLAGS="$ac_save_CFLAGS" | |
701 | elif test $ac_cv_prog_cc_g = yes; then | |
702 | CFLAGS="-g -O2" | |
703 | else | |
704 | CFLAGS="-O2" | |
5436fc65 C |
705 | fi |
706 | else | |
707 | GCC= | |
708 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
709 | fi | |
710 | ||
711 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
bfde4a67 | 712 | echo "configure:713: checking how to run the C preprocessor" >&5 |
5436fc65 C |
713 | # On Suns, sometimes $CPP names a directory. |
714 | if test -n "$CPP" && test -d "$CPP"; then | |
715 | CPP= | |
716 | fi | |
717 | if test -z "$CPP"; then | |
718 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
719 | echo $ac_n "(cached) $ac_c" 1>&6 | |
720 | else | |
721 | # This must be in double quotes, not single quotes, because CPP may get | |
722 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
723 | CPP="${CC-cc} -E" | |
724 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
725 | # not just through cpp. | |
726 | cat > conftest.$ac_ext <<EOF | |
bfde4a67 | 727 | #line 728 "configure" |
5436fc65 C |
728 | #include "confdefs.h" |
729 | #include <assert.h> | |
730 | Syntax Error | |
731 | EOF | |
1a7b4b7c | 732 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
bfde4a67 | 733 | { (eval echo configure:734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
734 | ac_err=`grep -v '^ *+' conftest.out` |
735 | if test -z "$ac_err"; then | |
736 | : | |
737 | else | |
738 | echo "$ac_err" >&5 | |
bfde4a67 SG |
739 | echo "configure: failed program was:" >&5 |
740 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
741 | rm -rf conftest* |
742 | CPP="${CC-cc} -E -traditional-cpp" | |
743 | cat > conftest.$ac_ext <<EOF | |
bfde4a67 | 744 | #line 745 "configure" |
5436fc65 C |
745 | #include "confdefs.h" |
746 | #include <assert.h> | |
747 | Syntax Error | |
748 | EOF | |
1a7b4b7c | 749 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
bfde4a67 | 750 | { (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
751 | ac_err=`grep -v '^ *+' conftest.out` |
752 | if test -z "$ac_err"; then | |
753 | : | |
754 | else | |
755 | echo "$ac_err" >&5 | |
bfde4a67 SG |
756 | echo "configure: failed program was:" >&5 |
757 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
758 | rm -rf conftest* |
759 | CPP=/lib/cpp | |
760 | fi | |
761 | rm -f conftest* | |
762 | fi | |
763 | rm -f conftest* | |
764 | ac_cv_prog_CPP="$CPP" | |
765 | fi | |
dedcc91d SC |
766 | CPP="$ac_cv_prog_CPP" |
767 | else | |
768 | ac_cv_prog_CPP="$CPP" | |
5436fc65 | 769 | fi |
5436fc65 C |
770 | echo "$ac_t""$CPP" 1>&6 |
771 | ||
772 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
bfde4a67 | 773 | echo "configure:774: checking for AIX" >&5 |
5436fc65 | 774 | cat > conftest.$ac_ext <<EOF |
bfde4a67 | 775 | #line 776 "configure" |
5436fc65 C |
776 | #include "confdefs.h" |
777 | #ifdef _AIX | |
778 | yes | |
779 | #endif | |
780 | ||
781 | EOF | |
782 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
783 | egrep "yes" >/dev/null 2>&1; then | |
784 | rm -rf conftest* | |
785 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
786 | #define _ALL_SOURCE 1 | |
787 | EOF | |
788 | ||
789 | else | |
790 | rm -rf conftest* | |
791 | echo "$ac_t""no" 1>&6 | |
792 | fi | |
793 | rm -f conftest* | |
794 | ||
795 | ||
bfde4a67 | 796 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
5436fc65 | 797 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
bfde4a67 | 798 | echo "configure:799: checking for minix/config.h" >&5 |
5436fc65 C |
799 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
800 | echo $ac_n "(cached) $ac_c" 1>&6 | |
801 | else | |
802 | cat > conftest.$ac_ext <<EOF | |
bfde4a67 | 803 | #line 804 "configure" |
5436fc65 C |
804 | #include "confdefs.h" |
805 | #include <minix/config.h> | |
806 | EOF | |
1a7b4b7c | 807 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
bfde4a67 | 808 | { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
809 | ac_err=`grep -v '^ *+' conftest.out` |
810 | if test -z "$ac_err"; then | |
811 | rm -rf conftest* | |
812 | eval "ac_cv_header_$ac_safe=yes" | |
813 | else | |
814 | echo "$ac_err" >&5 | |
bfde4a67 SG |
815 | echo "configure: failed program was:" >&5 |
816 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
817 | rm -rf conftest* |
818 | eval "ac_cv_header_$ac_safe=no" | |
819 | fi | |
820 | rm -f conftest* | |
821 | fi | |
822 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
823 | echo "$ac_t""yes" 1>&6 | |
824 | MINIX=yes | |
825 | else | |
826 | echo "$ac_t""no" 1>&6 | |
827 | MINIX= | |
828 | fi | |
829 | ||
830 | if test "$MINIX" = yes; then | |
831 | cat >> confdefs.h <<\EOF | |
832 | #define _POSIX_SOURCE 1 | |
833 | EOF | |
834 | ||
835 | cat >> confdefs.h <<\EOF | |
836 | #define _POSIX_1_SOURCE 2 | |
837 | EOF | |
838 | ||
839 | cat >> confdefs.h <<\EOF | |
840 | #define _MINIX 1 | |
841 | EOF | |
842 | ||
843 | fi | |
844 | ||
845 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
bfde4a67 | 846 | echo "configure:847: checking for POSIXized ISC" >&5 |
5436fc65 C |
847 | if test -d /etc/conf/kconfig.d && |
848 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
849 | then | |
850 | echo "$ac_t""yes" 1>&6 | |
851 | ISC=yes # If later tests want to check for ISC. | |
852 | cat >> confdefs.h <<\EOF | |
853 | #define _POSIX_SOURCE 1 | |
854 | EOF | |
855 | ||
856 | if test "$GCC" = yes; then | |
857 | CC="$CC -posix" | |
858 | else | |
859 | CC="$CC -Xp" | |
860 | fi | |
861 | else | |
862 | echo "$ac_t""no" 1>&6 | |
863 | ISC= | |
864 | fi | |
865 | ||
866 | ||
f02156cf | 867 | |
5436fc65 | 868 | ac_aux_dir= |
f02156cf | 869 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do |
5436fc65 C |
870 | if test -f $ac_dir/install-sh; then |
871 | ac_aux_dir=$ac_dir | |
872 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
873 | break | |
874 | elif test -f $ac_dir/install.sh; then | |
875 | ac_aux_dir=$ac_dir | |
876 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
877 | break | |
878 | fi | |
879 | done | |
880 | if test -z "$ac_aux_dir"; then | |
f02156cf | 881 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } |
5436fc65 C |
882 | fi |
883 | ac_config_guess=$ac_aux_dir/config.guess | |
884 | ac_config_sub=$ac_aux_dir/config.sub | |
885 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
886 | ||
0579b53d GN |
887 | |
888 | # Do some error checking and defaulting for the host and target type. | |
889 | # The inputs are: | |
890 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
891 | # | |
892 | # The rules are: | |
893 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
894 | # same time. | |
895 | # 2. Host defaults to nonopt. | |
896 | # 3. If nonopt is not specified, then host defaults to the current host, | |
897 | # as determined by config.guess. | |
898 | # 4. Target and build default to nonopt. | |
899 | # 5. If nonopt is not specified, then target and build default to host. | |
900 | ||
901 | # The aliases save the names the user supplied, while $host etc. | |
902 | # will get canonicalized. | |
903 | case $host---$target---$nonopt in | |
904 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
905 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
906 | esac | |
907 | ||
908 | ||
909 | # Make sure we can run config.sub. | |
910 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
911 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
912 | fi | |
913 | ||
914 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
f02156cf | 915 | echo "configure:916: checking host system type" >&5 |
0579b53d GN |
916 | |
917 | host_alias=$host | |
918 | case "$host_alias" in | |
919 | NONE) | |
920 | case $nonopt in | |
921 | NONE) | |
922 | if host_alias=`$ac_config_guess`; then : | |
923 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
924 | fi ;; | |
925 | *) host_alias=$nonopt ;; | |
926 | esac ;; | |
927 | esac | |
928 | ||
929 | host=`$ac_config_sub $host_alias` | |
bfde4a67 SG |
930 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
931 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
932 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
0579b53d GN |
933 | echo "$ac_t""$host" 1>&6 |
934 | ||
935 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
f02156cf | 936 | echo "configure:937: checking target system type" >&5 |
0579b53d GN |
937 | |
938 | target_alias=$target | |
939 | case "$target_alias" in | |
940 | NONE) | |
941 | case $nonopt in | |
942 | NONE) target_alias=$host_alias ;; | |
943 | *) target_alias=$nonopt ;; | |
944 | esac ;; | |
945 | esac | |
946 | ||
947 | target=`$ac_config_sub $target_alias` | |
bfde4a67 SG |
948 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
949 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
950 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
0579b53d GN |
951 | echo "$ac_t""$target" 1>&6 |
952 | ||
953 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
f02156cf | 954 | echo "configure:955: checking build system type" >&5 |
0579b53d GN |
955 | |
956 | build_alias=$build | |
957 | case "$build_alias" in | |
958 | NONE) | |
959 | case $nonopt in | |
960 | NONE) build_alias=$host_alias ;; | |
961 | *) build_alias=$nonopt ;; | |
962 | esac ;; | |
963 | esac | |
964 | ||
965 | build=`$ac_config_sub $build_alias` | |
bfde4a67 SG |
966 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
967 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
968 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
0579b53d GN |
969 | echo "$ac_t""$build" 1>&6 |
970 | ||
971 | test "$host_alias" != "$target_alias" && | |
972 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
973 | NONENONEs,x,x, && | |
974 | program_prefix=${target_alias}- | |
975 | ||
976 | ||
bfde4a67 SG |
977 | |
978 | CONFIG_OBS= | |
979 | ||
980 | configdirs="doc testsuite" | |
981 | ||
982 | ||
983 | . ${srcdir}/configure.host | |
984 | ||
985 | . ${srcdir}/configure.tgt | |
986 | ||
987 | ||
5436fc65 C |
988 | # Find a good install program. We prefer a C program (faster), |
989 | # so one script is as good as another. But avoid the broken or | |
990 | # incompatible versions: | |
991 | # SysV /etc/install, /usr/sbin/install | |
992 | # SunOS /usr/etc/install | |
993 | # IRIX /sbin/install | |
994 | # AIX /bin/install | |
995 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
996 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
997 | # ./install, which can be erroneously created by make from ./install.sh. | |
998 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
f02156cf | 999 | echo "configure:1000: checking for a BSD compatible install" >&5 |
5436fc65 C |
1000 | if test -z "$INSTALL"; then |
1001 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
1002 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1003 | else | |
bfde4a67 | 1004 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" |
5436fc65 C |
1005 | for ac_dir in $PATH; do |
1006 | # Account for people who put trailing slashes in PATH elements. | |
1007 | case "$ac_dir/" in | |
1008 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
1009 | *) | |
1010 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
1011 | for ac_prog in ginstall installbsd scoinst install; do | |
1012 | if test -f $ac_dir/$ac_prog; then | |
1013 | if test $ac_prog = install && | |
1014 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
1015 | # AIX install. It has an incompatible calling convention. | |
1016 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
1017 | : | |
1018 | else | |
1019 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
1020 | break 2 | |
1021 | fi | |
1022 | fi | |
1023 | done | |
1024 | ;; | |
1025 | esac | |
1026 | done | |
bfde4a67 | 1027 | IFS="$ac_save_IFS" |
1a7b4b7c | 1028 | |
5436fc65 | 1029 | fi |
1a7b4b7c DE |
1030 | if test "${ac_cv_path_install+set}" = set; then |
1031 | INSTALL="$ac_cv_path_install" | |
1032 | else | |
1033 | # As a last resort, use the slow shell script. We don't cache a | |
1034 | # path for INSTALL within a source directory, because that will | |
1035 | # break other packages using the cache if that directory is | |
1036 | # removed, or if the path is relative. | |
1037 | INSTALL="$ac_install_sh" | |
1038 | fi | |
5436fc65 C |
1039 | fi |
1040 | echo "$ac_t""$INSTALL" 1>&6 | |
1041 | ||
1042 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
1043 | # It thinks the first close brace ends the variable substitution. | |
1044 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
1045 | ||
1046 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
1047 | ||
d8efbc66 FF |
1048 | if test $host != $build; then |
1049 | ac_tool_prefix=${host_alias}- | |
1050 | else | |
1051 | ac_tool_prefix= | |
1052 | fi | |
1053 | ||
1054 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
1055 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1056 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f02156cf | 1057 | echo "configure:1058: checking for $ac_word" >&5 |
d8efbc66 FF |
1058 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1059 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1060 | else | |
1061 | if test -n "$AR"; then | |
1062 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1063 | else | |
1064 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1065 | for ac_dir in $PATH; do | |
1066 | test -z "$ac_dir" && ac_dir=. | |
1067 | if test -f $ac_dir/$ac_word; then | |
1068 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1069 | break | |
1070 | fi | |
1071 | done | |
1072 | IFS="$ac_save_ifs" | |
1073 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
1074 | fi | |
1075 | fi | |
1076 | AR="$ac_cv_prog_AR" | |
1077 | if test -n "$AR"; then | |
1078 | echo "$ac_t""$AR" 1>&6 | |
1079 | else | |
1080 | echo "$ac_t""no" 1>&6 | |
1081 | fi | |
1082 | ||
1083 | ||
1084 | ||
1085 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1086 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1087 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f02156cf | 1088 | echo "configure:1089: checking for $ac_word" >&5 |
d8efbc66 FF |
1089 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1091 | else | |
1092 | if test -n "$RANLIB"; then | |
1093 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1094 | else | |
1095 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1096 | for ac_dir in $PATH; do | |
1097 | test -z "$ac_dir" && ac_dir=. | |
1098 | if test -f $ac_dir/$ac_word; then | |
1099 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1100 | break | |
1101 | fi | |
1102 | done | |
1103 | IFS="$ac_save_ifs" | |
1104 | fi | |
1105 | fi | |
1106 | RANLIB="$ac_cv_prog_RANLIB" | |
1107 | if test -n "$RANLIB"; then | |
1108 | echo "$ac_t""$RANLIB" 1>&6 | |
1109 | else | |
1110 | echo "$ac_t""no" 1>&6 | |
1111 | fi | |
1112 | ||
1113 | ||
1114 | if test -z "$ac_cv_prog_RANLIB"; then | |
1115 | if test -n "$ac_tool_prefix"; then | |
1116 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5436fc65 C |
1117 | set dummy ranlib; ac_word=$2 |
1118 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f02156cf | 1119 | echo "configure:1120: checking for $ac_word" >&5 |
5436fc65 C |
1120 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1122 | else | |
1123 | if test -n "$RANLIB"; then | |
1124 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1125 | else | |
1126 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 1127 | for ac_dir in $PATH; do |
5436fc65 C |
1128 | test -z "$ac_dir" && ac_dir=. |
1129 | if test -f $ac_dir/$ac_word; then | |
1130 | ac_cv_prog_RANLIB="ranlib" | |
1131 | break | |
1132 | fi | |
1133 | done | |
1134 | IFS="$ac_save_ifs" | |
1135 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1136 | fi | |
1137 | fi | |
1138 | RANLIB="$ac_cv_prog_RANLIB" | |
1139 | if test -n "$RANLIB"; then | |
1140 | echo "$ac_t""$RANLIB" 1>&6 | |
1141 | else | |
1142 | echo "$ac_t""no" 1>&6 | |
1143 | fi | |
1144 | ||
d8efbc66 FF |
1145 | else |
1146 | RANLIB=":" | |
1147 | fi | |
1148 | fi | |
1149 | ||
204c8825 FF |
1150 | for ac_prog in 'bison -y' byacc |
1151 | do | |
1152 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1153 | set dummy $ac_prog; ac_word=$2 | |
1154 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f02156cf | 1155 | echo "configure:1156: checking for $ac_word" >&5 |
204c8825 FF |
1156 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
1157 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1158 | else | |
1159 | if test -n "$YACC"; then | |
1160 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
1161 | else | |
1162 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1163 | for ac_dir in $PATH; do | |
1164 | test -z "$ac_dir" && ac_dir=. | |
1165 | if test -f $ac_dir/$ac_word; then | |
1166 | ac_cv_prog_YACC="$ac_prog" | |
1167 | break | |
1168 | fi | |
1169 | done | |
1170 | IFS="$ac_save_ifs" | |
1171 | fi | |
1172 | fi | |
1173 | YACC="$ac_cv_prog_YACC" | |
1174 | if test -n "$YACC"; then | |
1175 | echo "$ac_t""$YACC" 1>&6 | |
1176 | else | |
1177 | echo "$ac_t""no" 1>&6 | |
1178 | fi | |
1179 | ||
1180 | test -n "$YACC" && break | |
1181 | done | |
1182 | test -n "$YACC" || YACC="yacc" | |
1183 | ||
d8efbc66 FF |
1184 | for ac_prog in mawk gawk nawk awk |
1185 | do | |
1186 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1187 | set dummy $ac_prog; ac_word=$2 | |
1188 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
f02156cf | 1189 | echo "configure:1190: checking for $ac_word" >&5 |
d8efbc66 FF |
1190 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
1191 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1192 | else | |
1193 | if test -n "$AWK"; then | |
1194 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
1195 | else | |
1196 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1197 | for ac_dir in $PATH; do | |
1198 | test -z "$ac_dir" && ac_dir=. | |
1199 | if test -f $ac_dir/$ac_word; then | |
1200 | ac_cv_prog_AWK="$ac_prog" | |
1201 | break | |
1202 | fi | |
1203 | done | |
1204 | IFS="$ac_save_ifs" | |
1205 | fi | |
1206 | fi | |
1207 | AWK="$ac_cv_prog_AWK" | |
1208 | if test -n "$AWK"; then | |
1209 | echo "$ac_t""$AWK" 1>&6 | |
1210 | else | |
1211 | echo "$ac_t""no" 1>&6 | |
1212 | fi | |
1213 | ||
1214 | test -n "$AWK" && break | |
1215 | done | |
1216 | ||
5436fc65 | 1217 | |
5436fc65 C |
1218 | if test "$program_transform_name" = s,x,x,; then |
1219 | program_transform_name= | |
1220 | else | |
1a7b4b7c DE |
1221 | # Double any \ or $. echo might interpret backslashes. |
1222 | cat <<\EOF_SED > conftestsed | |
1223 | s,\\,\\\\,g; s,\$,$$,g | |
1224 | EOF_SED | |
5436fc65 C |
1225 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
1226 | rm -f conftestsed | |
1227 | fi | |
1228 | test "$program_prefix" != NONE && | |
1229 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1230 | # Use a double $ so make ignores it. | |
1231 | test "$program_suffix" != NONE && | |
1232 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1233 | ||
1234 | # sed with no file args requires a program. | |
1235 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1236 | ||
1237 | ||
2b576293 | 1238 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
f02156cf | 1239 | echo "configure:1240: checking for ANSI C header files" >&5 |
2b576293 C |
1240 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
1241 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1242 | else | |
1243 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1244 | #line 1245 "configure" |
2b576293 C |
1245 | #include "confdefs.h" |
1246 | #include <stdlib.h> | |
1247 | #include <stdarg.h> | |
1248 | #include <string.h> | |
1249 | #include <float.h> | |
1250 | EOF | |
1a7b4b7c | 1251 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f02156cf | 1252 | { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2b576293 C |
1253 | ac_err=`grep -v '^ *+' conftest.out` |
1254 | if test -z "$ac_err"; then | |
1255 | rm -rf conftest* | |
1256 | ac_cv_header_stdc=yes | |
1257 | else | |
1258 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1259 | echo "configure: failed program was:" >&5 |
1260 | cat conftest.$ac_ext >&5 | |
2b576293 C |
1261 | rm -rf conftest* |
1262 | ac_cv_header_stdc=no | |
1263 | fi | |
1264 | rm -f conftest* | |
1265 | ||
1266 | if test $ac_cv_header_stdc = yes; then | |
1267 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1268 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1269 | #line 1270 "configure" |
2b576293 C |
1270 | #include "confdefs.h" |
1271 | #include <string.h> | |
1272 | EOF | |
1273 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1274 | egrep "memchr" >/dev/null 2>&1; then | |
1275 | : | |
1276 | else | |
1277 | rm -rf conftest* | |
1278 | ac_cv_header_stdc=no | |
1279 | fi | |
1280 | rm -f conftest* | |
1281 | ||
1282 | fi | |
1283 | ||
1284 | if test $ac_cv_header_stdc = yes; then | |
1285 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1286 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1287 | #line 1288 "configure" |
2b576293 C |
1288 | #include "confdefs.h" |
1289 | #include <stdlib.h> | |
1290 | EOF | |
1291 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1292 | egrep "free" >/dev/null 2>&1; then | |
1293 | : | |
1294 | else | |
1295 | rm -rf conftest* | |
1296 | ac_cv_header_stdc=no | |
1297 | fi | |
1298 | rm -f conftest* | |
1299 | ||
1300 | fi | |
1301 | ||
1302 | if test $ac_cv_header_stdc = yes; then | |
1303 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1304 | if test "$cross_compiling" = yes; then | |
1a7b4b7c | 1305 | : |
2b576293 | 1306 | else |
bfde4a67 | 1307 | cat > conftest.$ac_ext <<EOF |
f02156cf | 1308 | #line 1309 "configure" |
2b576293 C |
1309 | #include "confdefs.h" |
1310 | #include <ctype.h> | |
1311 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1312 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1313 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1314 | int main () { int i; for (i = 0; i < 256; i++) | |
1315 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1316 | exit (0); } | |
1317 | ||
1318 | EOF | |
f02156cf | 1319 | if { (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1320 | then |
2b576293 C |
1321 | : |
1322 | else | |
bfde4a67 SG |
1323 | echo "configure: failed program was:" >&5 |
1324 | cat conftest.$ac_ext >&5 | |
1325 | rm -fr conftest* | |
2b576293 C |
1326 | ac_cv_header_stdc=no |
1327 | fi | |
ef6c51d1 | 1328 | rm -fr conftest* |
bfde4a67 SG |
1329 | fi |
1330 | ||
2b576293 C |
1331 | fi |
1332 | fi | |
1a7b4b7c | 1333 | |
2b576293 C |
1334 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
1335 | if test $ac_cv_header_stdc = yes; then | |
1336 | cat >> confdefs.h <<\EOF | |
1337 | #define STDC_HEADERS 1 | |
1338 | EOF | |
1339 | ||
1340 | fi | |
1341 | ||
0db3fe94 | 1342 | for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h |
1a494973 | 1343 | do |
bfde4a67 | 1344 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1a494973 | 1345 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
f02156cf | 1346 | echo "configure:1347: checking for $ac_hdr" >&5 |
1a494973 C |
1347 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1348 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1349 | else | |
1350 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1351 | #line 1352 "configure" |
1a494973 C |
1352 | #include "confdefs.h" |
1353 | #include <$ac_hdr> | |
1354 | EOF | |
1a7b4b7c | 1355 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f02156cf | 1356 | { (eval echo configure:1357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1a494973 C |
1357 | ac_err=`grep -v '^ *+' conftest.out` |
1358 | if test -z "$ac_err"; then | |
1359 | rm -rf conftest* | |
1360 | eval "ac_cv_header_$ac_safe=yes" | |
1361 | else | |
1362 | echo "$ac_err" >&5 | |
bfde4a67 SG |
1363 | echo "configure: failed program was:" >&5 |
1364 | cat conftest.$ac_ext >&5 | |
1a494973 C |
1365 | rm -rf conftest* |
1366 | eval "ac_cv_header_$ac_safe=no" | |
1367 | fi | |
1368 | rm -f conftest* | |
1369 | fi | |
1370 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1371 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 | 1372 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
1a494973 C |
1373 | cat >> confdefs.h <<EOF |
1374 | #define $ac_tr_hdr 1 | |
1375 | EOF | |
1376 | ||
1377 | else | |
1378 | echo "$ac_t""no" 1>&6 | |
1379 | fi | |
1380 | done | |
1381 | ||
2b576293 | 1382 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
f02156cf | 1383 | echo "configure:1384: checking whether stat file-mode macros are broken" >&5 |
2b576293 C |
1384 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then |
1385 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1386 | else | |
1387 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1388 | #line 1389 "configure" |
2b576293 C |
1389 | #include "confdefs.h" |
1390 | #include <sys/types.h> | |
1391 | #include <sys/stat.h> | |
1392 | ||
1393 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
1394 | # if S_ISBLK (S_IFDIR) | |
1395 | You lose. | |
1396 | # endif | |
1397 | #endif | |
1398 | ||
1399 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
1400 | # if S_ISBLK (S_IFCHR) | |
1401 | You lose. | |
1402 | # endif | |
1403 | #endif | |
1404 | ||
1405 | #if defined(S_ISLNK) && defined(S_IFREG) | |
1406 | # if S_ISLNK (S_IFREG) | |
1407 | You lose. | |
1408 | # endif | |
1409 | #endif | |
1410 | ||
1411 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
1412 | # if S_ISSOCK (S_IFREG) | |
1413 | You lose. | |
1414 | # endif | |
1415 | #endif | |
1416 | ||
1417 | EOF | |
1418 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1419 | egrep "You lose" >/dev/null 2>&1; then | |
1420 | rm -rf conftest* | |
1421 | ac_cv_header_stat_broken=yes | |
1422 | else | |
1423 | rm -rf conftest* | |
1424 | ac_cv_header_stat_broken=no | |
1425 | fi | |
1426 | rm -f conftest* | |
1427 | ||
1428 | fi | |
1a7b4b7c | 1429 | |
2b576293 C |
1430 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 |
1431 | if test $ac_cv_header_stat_broken = yes; then | |
1432 | cat >> confdefs.h <<\EOF | |
1433 | #define STAT_MACROS_BROKEN 1 | |
1434 | EOF | |
1435 | ||
1436 | fi | |
1437 | ||
1438 | ||
8501c742 | 1439 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
f02156cf | 1440 | echo "configure:1441: checking for working const" >&5 |
8501c742 SG |
1441 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
1442 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1443 | else | |
1444 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1445 | #line 1446 "configure" |
8501c742 SG |
1446 | #include "confdefs.h" |
1447 | ||
bfde4a67 | 1448 | int main() { |
8501c742 SG |
1449 | |
1450 | /* Ultrix mips cc rejects this. */ | |
1451 | typedef int charset[2]; const charset x; | |
1452 | /* SunOS 4.1.1 cc rejects this. */ | |
1453 | char const *const *ccp; | |
1454 | char **p; | |
1455 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
1456 | struct point {int x, y;}; | |
1457 | static struct point const zero = {0,0}; | |
1458 | /* AIX XL C 1.02.0.0 rejects this. | |
1459 | It does not let you subtract one const X* pointer from another in an arm | |
1460 | of an if-expression whose if-part is not a constant expression */ | |
1461 | const char *g = "string"; | |
1462 | ccp = &g + (g ? g-g : 0); | |
1463 | /* HPUX 7.0 cc rejects these. */ | |
1464 | ++ccp; | |
1465 | p = (char**) ccp; | |
1466 | ccp = (char const *const *) p; | |
1467 | { /* SCO 3.2v4 cc rejects this. */ | |
1468 | char *t; | |
1469 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
1470 | ||
1471 | *t++ = 0; | |
1472 | } | |
1473 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
1474 | int x[] = {25, 17}; | |
1475 | const int *foo = &x[0]; | |
1476 | ++foo; | |
1477 | } | |
1478 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
1479 | typedef const int *iptr; | |
1480 | iptr p = 0; | |
1481 | ++p; | |
1482 | } | |
1483 | { /* AIX XL C 1.02.0.0 rejects this saying | |
1484 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
1485 | struct s { int j; const int *ap[3]; }; | |
1486 | struct s *b; b->j = 5; | |
1487 | } | |
1488 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
1489 | const int foo = 10; | |
1490 | } | |
1491 | ||
1492 | ; return 0; } | |
1493 | EOF | |
f02156cf | 1494 | if { (eval echo configure:1495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
8501c742 SG |
1495 | rm -rf conftest* |
1496 | ac_cv_c_const=yes | |
1497 | else | |
bfde4a67 SG |
1498 | echo "configure: failed program was:" >&5 |
1499 | cat conftest.$ac_ext >&5 | |
8501c742 SG |
1500 | rm -rf conftest* |
1501 | ac_cv_c_const=no | |
1502 | fi | |
1503 | rm -f conftest* | |
8501c742 SG |
1504 | fi |
1505 | ||
1506 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
1507 | if test $ac_cv_c_const = no; then | |
1508 | cat >> confdefs.h <<\EOF | |
1509 | #define const | |
1510 | EOF | |
1511 | ||
1512 | fi | |
1513 | ||
1514 | ||
5d394f70 | 1515 | for ac_func in setpgid sbrk select poll |
72ae15f6 FF |
1516 | do |
1517 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
f02156cf | 1518 | echo "configure:1519: checking for $ac_func" >&5 |
72ae15f6 FF |
1519 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1520 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1521 | else | |
1522 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1523 | #line 1524 "configure" |
72ae15f6 FF |
1524 | #include "confdefs.h" |
1525 | /* System header to define __stub macros and hopefully few prototypes, | |
1526 | which can conflict with char $ac_func(); below. */ | |
1527 | #include <assert.h> | |
1528 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
1529 | /* We use char because int might match the return type of a gcc2 |
1530 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c | 1531 | char $ac_func(); |
72ae15f6 | 1532 | |
bfde4a67 | 1533 | int main() { |
72ae15f6 FF |
1534 | |
1535 | /* The GNU C library defines this for functions which it implements | |
1536 | to always fail with ENOSYS. Some functions are actually named | |
1537 | something starting with __ and the normal name is an alias. */ | |
1538 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1539 | choke me | |
1540 | #else | |
1541 | $ac_func(); | |
1542 | #endif | |
1543 | ||
1544 | ; return 0; } | |
1545 | EOF | |
f02156cf | 1546 | if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
72ae15f6 FF |
1547 | rm -rf conftest* |
1548 | eval "ac_cv_func_$ac_func=yes" | |
1549 | else | |
bfde4a67 SG |
1550 | echo "configure: failed program was:" >&5 |
1551 | cat conftest.$ac_ext >&5 | |
72ae15f6 FF |
1552 | rm -rf conftest* |
1553 | eval "ac_cv_func_$ac_func=no" | |
1554 | fi | |
1555 | rm -f conftest* | |
ef6c51d1 | 1556 | fi |
bfde4a67 | 1557 | |
72ae15f6 FF |
1558 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1559 | echo "$ac_t""yes" 1>&6 | |
1a7b4b7c | 1560 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
72ae15f6 FF |
1561 | cat >> confdefs.h <<EOF |
1562 | #define $ac_tr_func 1 | |
1563 | EOF | |
1564 | ||
1565 | else | |
1566 | echo "$ac_t""no" 1>&6 | |
1567 | fi | |
1568 | done | |
1569 | ||
1570 | ||
0d4c1152 FF |
1571 | # If we are configured native on Linux, work around problems with sys/procfs.h |
1572 | if test "${target}" = "${host}"; then | |
1573 | case "${host}" in | |
1574 | i345686-*-linux*) | |
1575 | cat >> confdefs.h <<\EOF | |
1576 | #define START_INFERIOR_TRAPS_EXPECTED "2" | |
1577 | EOF | |
1578 | ||
1579 | cat >> confdefs.h <<\EOF | |
1580 | #define sys_quotactl 1 | |
1581 | EOF | |
1582 | ||
1583 | ;; | |
1584 | esac | |
1585 | fi | |
1586 | ||
4708ac65 | 1587 | echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 |
f02156cf | 1588 | echo "configure:1589: checking for gregset_t type" >&5 |
07b77f5c | 1589 | if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then |
4708ac65 FF |
1590 | echo $ac_n "(cached) $ac_c" 1>&6 |
1591 | else | |
1592 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1593 | #line 1594 "configure" |
4708ac65 FF |
1594 | #include "confdefs.h" |
1595 | #include <sys/procfs.h> | |
bfde4a67 | 1596 | int main() { |
4708ac65 FF |
1597 | gregset_t *gregsetp = 0 |
1598 | ; return 0; } | |
1599 | EOF | |
f02156cf | 1600 | if { (eval echo configure:1601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4708ac65 | 1601 | rm -rf conftest* |
07b77f5c | 1602 | gdb_cv_have_gregset_t=yes |
4708ac65 | 1603 | else |
bfde4a67 SG |
1604 | echo "configure: failed program was:" >&5 |
1605 | cat conftest.$ac_ext >&5 | |
4708ac65 | 1606 | rm -rf conftest* |
07b77f5c | 1607 | gdb_cv_have_gregset_t=no |
4708ac65 FF |
1608 | fi |
1609 | rm -f conftest* | |
4708ac65 FF |
1610 | fi |
1611 | ||
07b77f5c FF |
1612 | echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6 |
1613 | if test $gdb_cv_have_gregset_t = yes; then | |
4708ac65 FF |
1614 | cat >> confdefs.h <<\EOF |
1615 | #define HAVE_GREGSET_T 1 | |
1616 | EOF | |
1617 | ||
1618 | fi | |
1619 | ||
1620 | echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6 | |
f02156cf | 1621 | echo "configure:1622: checking for fpregset_t type" >&5 |
07b77f5c | 1622 | if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then |
4708ac65 FF |
1623 | echo $ac_n "(cached) $ac_c" 1>&6 |
1624 | else | |
1625 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1626 | #line 1627 "configure" |
4708ac65 FF |
1627 | #include "confdefs.h" |
1628 | #include <sys/procfs.h> | |
bfde4a67 | 1629 | int main() { |
4708ac65 FF |
1630 | fpregset_t *fpregsetp = 0 |
1631 | ; return 0; } | |
1632 | EOF | |
f02156cf | 1633 | if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4708ac65 | 1634 | rm -rf conftest* |
07b77f5c | 1635 | gdb_cv_have_fpregset_t=yes |
4708ac65 | 1636 | else |
bfde4a67 SG |
1637 | echo "configure: failed program was:" >&5 |
1638 | cat conftest.$ac_ext >&5 | |
4708ac65 | 1639 | rm -rf conftest* |
07b77f5c | 1640 | gdb_cv_have_fpregset_t=no |
4708ac65 FF |
1641 | fi |
1642 | rm -f conftest* | |
4708ac65 FF |
1643 | fi |
1644 | ||
07b77f5c FF |
1645 | echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6 |
1646 | if test $gdb_cv_have_fpregset_t = yes; then | |
4708ac65 FF |
1647 | cat >> confdefs.h <<\EOF |
1648 | #define HAVE_FPREGSET_T 1 | |
1649 | EOF | |
1650 | ||
1651 | fi | |
1652 | ||
bfde4a67 | 1653 | echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 |
f02156cf | 1654 | echo "configure:1655: checking for main in -lm" >&5 |
bfde4a67 | 1655 | ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` |
ef6c51d1 SG |
1656 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1657 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1658 | else | |
1659 | ac_save_LIBS="$LIBS" | |
1660 | LIBS="-lm $LIBS" | |
1661 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1662 | #line 1663 "configure" |
ef6c51d1 SG |
1663 | #include "confdefs.h" |
1664 | ||
bfde4a67 | 1665 | int main() { |
ef6c51d1 SG |
1666 | main() |
1667 | ; return 0; } | |
1668 | EOF | |
f02156cf | 1669 | if { (eval echo configure:1670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
ef6c51d1 SG |
1670 | rm -rf conftest* |
1671 | eval "ac_cv_lib_$ac_lib_var=yes" | |
1672 | else | |
bfde4a67 SG |
1673 | echo "configure: failed program was:" >&5 |
1674 | cat conftest.$ac_ext >&5 | |
ef6c51d1 SG |
1675 | rm -rf conftest* |
1676 | eval "ac_cv_lib_$ac_lib_var=no" | |
1677 | fi | |
1678 | rm -f conftest* | |
1679 | LIBS="$ac_save_LIBS" | |
1680 | ||
1681 | fi | |
1682 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
1683 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
1684 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
1685 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
ef6c51d1 SG |
1686 | cat >> confdefs.h <<EOF |
1687 | #define $ac_tr_lib 1 | |
1688 | EOF | |
1689 | ||
1690 | LIBS="-lm $LIBS" | |
1691 | ||
1692 | else | |
1693 | echo "$ac_t""no" 1>&6 | |
1694 | fi | |
1695 | ||
1696 | ||
aa220473 | 1697 | |
3f550b59 | 1698 | echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 |
f02156cf | 1699 | echo "configure:1700: checking for long long support in compiler" >&5 |
3f550b59 FF |
1700 | if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then |
1701 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1702 | else | |
1703 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1704 | #line 1705 "configure" |
3f550b59 FF |
1705 | #include "confdefs.h" |
1706 | ||
bfde4a67 | 1707 | int main() { |
80f600a4 | 1708 | |
d538f9cf FF |
1709 | extern long long foo; |
1710 | switch (foo & 2) { case 0: return 1; } | |
1711 | ||
3f550b59 FF |
1712 | ; return 0; } |
1713 | EOF | |
f02156cf | 1714 | if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3f550b59 FF |
1715 | rm -rf conftest* |
1716 | gdb_cv_c_long_long=yes | |
1717 | else | |
bfde4a67 SG |
1718 | echo "configure: failed program was:" >&5 |
1719 | cat conftest.$ac_ext >&5 | |
3f550b59 FF |
1720 | rm -rf conftest* |
1721 | gdb_cv_c_long_long=no | |
1722 | fi | |
1723 | rm -f conftest* | |
3f550b59 FF |
1724 | fi |
1725 | ||
1726 | echo "$ac_t""$gdb_cv_c_long_long" 1>&6 | |
1727 | if test $gdb_cv_c_long_long = yes; then | |
1728 | cat >> confdefs.h <<\EOF | |
1729 | #define CC_HAS_LONG_LONG 1 | |
1730 | EOF | |
1731 | ||
1732 | fi | |
1733 | ||
1734 | ||
1735 | echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 | |
f02156cf | 1736 | echo "configure:1737: checking for long long support in printf" >&5 |
3f550b59 FF |
1737 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then |
1738 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1739 | else | |
1740 | if test "$cross_compiling" = yes; then | |
1741 | gdb_cv_printf_has_long_long=no | |
1742 | else | |
bfde4a67 | 1743 | cat > conftest.$ac_ext <<EOF |
f02156cf | 1744 | #line 1745 "configure" |
3f550b59 FF |
1745 | #include "confdefs.h" |
1746 | ||
1747 | int main () { | |
1748 | char buf[16]; | |
1749 | long long l = 0x12345; | |
1750 | sprintf (buf, "%llx", l); | |
1751 | return (strcmp ("12345", buf)); | |
1752 | } | |
1753 | EOF | |
f02156cf | 1754 | if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1755 | then |
3f550b59 FF |
1756 | gdb_cv_printf_has_long_long=yes |
1757 | else | |
bfde4a67 SG |
1758 | echo "configure: failed program was:" >&5 |
1759 | cat conftest.$ac_ext >&5 | |
1760 | rm -fr conftest* | |
3f550b59 FF |
1761 | gdb_cv_printf_has_long_long=no |
1762 | fi | |
ef6c51d1 | 1763 | rm -fr conftest* |
8b701284 ILT |
1764 | fi |
1765 | ||
bfde4a67 SG |
1766 | fi |
1767 | ||
3f550b59 FF |
1768 | if test $gdb_cv_printf_has_long_long = yes; then |
1769 | cat >> confdefs.h <<\EOF | |
1770 | #define PRINTF_HAS_LONG_LONG 1 | |
1771 | EOF | |
1772 | ||
1773 | fi | |
1774 | echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6 | |
1775 | ||
1776 | ||
07b77f5c | 1777 | echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 |
f02156cf | 1778 | echo "configure:1779: checking for long double support in compiler" >&5 |
aa220473 SG |
1779 | if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then |
1780 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1781 | else | |
1782 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1783 | #line 1784 "configure" |
aa220473 SG |
1784 | #include "confdefs.h" |
1785 | ||
bfde4a67 | 1786 | int main() { |
aa220473 SG |
1787 | long double foo; |
1788 | ; return 0; } | |
1789 | EOF | |
f02156cf | 1790 | if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
aa220473 SG |
1791 | rm -rf conftest* |
1792 | ac_cv_c_long_double=yes | |
1793 | else | |
bfde4a67 SG |
1794 | echo "configure: failed program was:" >&5 |
1795 | cat conftest.$ac_ext >&5 | |
aa220473 SG |
1796 | rm -rf conftest* |
1797 | ac_cv_c_long_double=no | |
1798 | fi | |
1799 | rm -f conftest* | |
aa220473 SG |
1800 | fi |
1801 | ||
1802 | echo "$ac_t""$ac_cv_c_long_double" 1>&6 | |
1803 | if test $ac_cv_c_long_double = yes; then | |
1804 | cat >> confdefs.h <<\EOF | |
1805 | #define HAVE_LONG_DOUBLE 1 | |
1806 | EOF | |
1807 | ||
1808 | fi | |
1809 | ||
07b77f5c FF |
1810 | |
1811 | echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 | |
f02156cf | 1812 | echo "configure:1813: checking for long double support in printf" >&5 |
07b77f5c FF |
1813 | if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then |
1814 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1815 | else | |
1816 | if test "$cross_compiling" = yes; then | |
1817 | gdb_cv_printf_has_long_double=no | |
1818 | else | |
bfde4a67 | 1819 | cat > conftest.$ac_ext <<EOF |
f02156cf | 1820 | #line 1821 "configure" |
07b77f5c FF |
1821 | #include "confdefs.h" |
1822 | ||
1823 | int main () { | |
1824 | char buf[16]; | |
1825 | long double f = 3.141592653; | |
1826 | sprintf (buf, "%Lg", f); | |
1827 | return (strncmp ("3.14159", buf, 7)); | |
1828 | } | |
1829 | EOF | |
f02156cf | 1830 | if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 | 1831 | then |
07b77f5c FF |
1832 | gdb_cv_printf_has_long_double=yes |
1833 | else | |
bfde4a67 SG |
1834 | echo "configure: failed program was:" >&5 |
1835 | cat conftest.$ac_ext >&5 | |
1836 | rm -fr conftest* | |
07b77f5c FF |
1837 | gdb_cv_printf_has_long_double=no |
1838 | fi | |
ef6c51d1 | 1839 | rm -fr conftest* |
8b701284 ILT |
1840 | fi |
1841 | ||
bfde4a67 SG |
1842 | fi |
1843 | ||
07b77f5c FF |
1844 | if test $gdb_cv_printf_has_long_double = yes; then |
1845 | cat >> confdefs.h <<\EOF | |
1846 | #define PRINTF_HAS_LONG_DOUBLE 1 | |
1847 | EOF | |
1848 | ||
1849 | fi | |
1850 | echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6 | |
1851 | ||
bfde4a67 SG |
1852 | for ac_hdr in unistd.h |
1853 | do | |
1854 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
1855 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
f02156cf | 1856 | echo "configure:1857: checking for $ac_hdr" >&5 |
bfde4a67 SG |
1857 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1858 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1859 | else | |
1860 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1861 | #line 1862 "configure" |
bfde4a67 SG |
1862 | #include "confdefs.h" |
1863 | #include <$ac_hdr> | |
1864 | EOF | |
1865 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
f02156cf | 1866 | { (eval echo configure:1867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
bfde4a67 SG |
1867 | ac_err=`grep -v '^ *+' conftest.out` |
1868 | if test -z "$ac_err"; then | |
1869 | rm -rf conftest* | |
1870 | eval "ac_cv_header_$ac_safe=yes" | |
1871 | else | |
1872 | echo "$ac_err" >&5 | |
1873 | echo "configure: failed program was:" >&5 | |
1874 | cat conftest.$ac_ext >&5 | |
1875 | rm -rf conftest* | |
1876 | eval "ac_cv_header_$ac_safe=no" | |
1877 | fi | |
1878 | rm -f conftest* | |
1879 | fi | |
1880 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1881 | echo "$ac_t""yes" 1>&6 | |
1882 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
1883 | cat >> confdefs.h <<EOF | |
1884 | #define $ac_tr_hdr 1 | |
1885 | EOF | |
1886 | ||
1887 | else | |
1888 | echo "$ac_t""no" 1>&6 | |
1889 | fi | |
1890 | done | |
1891 | ||
1892 | for ac_func in getpagesize | |
1a7b4b7c DE |
1893 | do |
1894 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
f02156cf | 1895 | echo "configure:1896: checking for $ac_func" >&5 |
1a7b4b7c DE |
1896 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1897 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1898 | else | |
1899 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 1900 | #line 1901 "configure" |
1a7b4b7c DE |
1901 | #include "confdefs.h" |
1902 | /* System header to define __stub macros and hopefully few prototypes, | |
1903 | which can conflict with char $ac_func(); below. */ | |
1904 | #include <assert.h> | |
1905 | /* Override any gcc2 internal prototype to avoid an error. */ | |
bc859e63 SG |
1906 | /* We use char because int might match the return type of a gcc2 |
1907 | builtin and then its argument prototype would still apply. */ | |
1a7b4b7c DE |
1908 | char $ac_func(); |
1909 | ||
bfde4a67 | 1910 | int main() { |
1a7b4b7c DE |
1911 | |
1912 | /* The GNU C library defines this for functions which it implements | |
1913 | to always fail with ENOSYS. Some functions are actually named | |
1914 | something starting with __ and the normal name is an alias. */ | |
1915 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1916 | choke me | |
1917 | #else | |
1918 | $ac_func(); | |
1919 | #endif | |
1920 | ||
1921 | ; return 0; } | |
1922 | EOF | |
f02156cf | 1923 | if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1a7b4b7c DE |
1924 | rm -rf conftest* |
1925 | eval "ac_cv_func_$ac_func=yes" | |
1926 | else | |
bfde4a67 SG |
1927 | echo "configure: failed program was:" >&5 |
1928 | cat conftest.$ac_ext >&5 | |
1a7b4b7c DE |
1929 | rm -rf conftest* |
1930 | eval "ac_cv_func_$ac_func=no" | |
1931 | fi | |
1932 | rm -f conftest* | |
ef6c51d1 | 1933 | fi |
bfde4a67 | 1934 | |
1a7b4b7c DE |
1935 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1936 | echo "$ac_t""yes" 1>&6 | |
1937 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1938 | cat >> confdefs.h <<EOF | |
1939 | #define $ac_tr_func 1 | |
1940 | EOF | |
1941 | ||
1942 | else | |
1943 | echo "$ac_t""no" 1>&6 | |
1944 | fi | |
1945 | done | |
1946 | ||
2b576293 | 1947 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
f02156cf | 1948 | echo "configure:1949: checking for working mmap" >&5 |
bfde4a67 | 1949 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2b576293 C |
1950 | echo $ac_n "(cached) $ac_c" 1>&6 |
1951 | else | |
1952 | if test "$cross_compiling" = yes; then | |
bfde4a67 | 1953 | ac_cv_func_mmap_fixed_mapped=no |
2b576293 | 1954 | else |
bfde4a67 | 1955 | cat > conftest.$ac_ext <<EOF |
f02156cf | 1956 | #line 1957 "configure" |
2b576293 C |
1957 | #include "confdefs.h" |
1958 | ||
bfde4a67 SG |
1959 | /* Thanks to Mike Haertel and Jim Avera for this test. |
1960 | Here is a matrix of mmap possibilities: | |
1961 | mmap private not fixed | |
1962 | mmap private fixed at somewhere currently unmapped | |
1963 | mmap private fixed at somewhere already mapped | |
1964 | mmap shared not fixed | |
1965 | mmap shared fixed at somewhere currently unmapped | |
1966 | mmap shared fixed at somewhere already mapped | |
1967 | For private mappings, we should verify that changes cannot be read() | |
1968 | back from the file, nor mmap's back from the file at a different | |
1969 | address. (There have been systems where private was not correctly | |
1970 | implemented like the infamous i386 svr4.0, and systems where the | |
1971 | VM page cache was not coherent with the filesystem buffer cache | |
1972 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
1973 | For shared mappings, we should conversely verify that changes get | |
1974 | propogated back to all the places they're supposed to be. | |
1975 | ||
1976 | Grep wants private fixed already mapped. | |
1977 | The main things grep needs to know about mmap are: | |
1978 | * does it exist and is it safe to write into the mmap'd area | |
1979 | * how to use it (BSD variants) */ | |
2b576293 C |
1980 | #include <sys/types.h> |
1981 | #include <fcntl.h> | |
1982 | #include <sys/mman.h> | |
1983 | ||
bfde4a67 | 1984 | /* This mess was copied from the GNU getpagesize.h. */ |
2b576293 | 1985 | #ifndef HAVE_GETPAGESIZE |
bfde4a67 SG |
1986 | # ifdef HAVE_UNISTD_H |
1987 | # include <unistd.h> | |
8b701284 ILT |
1988 | # endif |
1989 | ||
bfde4a67 SG |
1990 | /* Assume that all systems that can run configure have sys/param.h. */ |
1991 | # ifndef HAVE_SYS_PARAM_H | |
1992 | # define HAVE_SYS_PARAM_H 1 | |
1993 | # endif | |
1994 | ||
1995 | # ifdef _SC_PAGESIZE | |
1996 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
1997 | # else /* no _SC_PAGESIZE */ | |
1998 | # ifdef HAVE_SYS_PARAM_H | |
1999 | # include <sys/param.h> | |
2000 | # ifdef EXEC_PAGESIZE | |
2001 | # define getpagesize() EXEC_PAGESIZE | |
2002 | # else /* no EXEC_PAGESIZE */ | |
2003 | # ifdef NBPG | |
2004 | # define getpagesize() NBPG * CLSIZE | |
2005 | # ifndef CLSIZE | |
2006 | # define CLSIZE 1 | |
2007 | # endif /* no CLSIZE */ | |
2008 | # else /* no NBPG */ | |
2009 | # ifdef NBPC | |
2010 | # define getpagesize() NBPC | |
2011 | # else /* no NBPC */ | |
2012 | # ifdef PAGESIZE | |
2013 | # define getpagesize() PAGESIZE | |
2014 | # endif /* PAGESIZE */ | |
2015 | # endif /* no NBPC */ | |
2016 | # endif /* no NBPG */ | |
2017 | # endif /* no EXEC_PAGESIZE */ | |
2018 | # else /* no HAVE_SYS_PARAM_H */ | |
2019 | # define getpagesize() 8192 /* punt totally */ | |
2020 | # endif /* no HAVE_SYS_PARAM_H */ | |
2021 | # endif /* no _SC_PAGESIZE */ | |
2022 | ||
2023 | #endif /* no HAVE_GETPAGESIZE */ | |
2b576293 C |
2024 | |
2025 | #ifdef __cplusplus | |
bfde4a67 | 2026 | extern "C" { void *malloc(unsigned); } |
2b576293 | 2027 | #else |
bfde4a67 | 2028 | char *malloc(); |
2b576293 C |
2029 | #endif |
2030 | ||
2031 | int | |
2032 | main() | |
2033 | { | |
bfde4a67 SG |
2034 | char *data, *data2, *data3; |
2035 | int i, pagesize; | |
2036 | int fd; | |
2037 | ||
2038 | pagesize = getpagesize(); | |
2039 | ||
2040 | /* | |
2041 | * First, make a file with some known garbage in it. | |
2042 | */ | |
2043 | data = malloc(pagesize); | |
2044 | if (!data) | |
2045 | exit(1); | |
2046 | for (i = 0; i < pagesize; ++i) | |
2047 | *(data + i) = rand(); | |
2048 | umask(0); | |
2049 | fd = creat("conftestmmap", 0600); | |
2050 | if (fd < 0) | |
2051 | exit(1); | |
2052 | if (write(fd, data, pagesize) != pagesize) | |
2053 | exit(1); | |
2054 | close(fd); | |
2055 | ||
2056 | /* | |
2057 | * Next, try to mmap the file at a fixed address which | |
2058 | * already has something else allocated at it. If we can, | |
2059 | * also make sure that we see the same garbage. | |
2060 | */ | |
2061 | fd = open("conftestmmap", O_RDWR); | |
2062 | if (fd < 0) | |
2063 | exit(1); | |
2064 | data2 = malloc(2 * pagesize); | |
2065 | if (!data2) | |
2066 | exit(1); | |
2067 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
2068 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
2069 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
2070 | exit(1); | |
2071 | for (i = 0; i < pagesize; ++i) | |
2072 | if (*(data + i) != *(data2 + i)) | |
2073 | exit(1); | |
2074 | ||
2075 | /* | |
2076 | * Finally, make sure that changes to the mapped area | |
2077 | * do not percolate back to the file as seen by read(). | |
2078 | * (This is a bug on some variants of i386 svr4.0.) | |
2079 | */ | |
2080 | for (i = 0; i < pagesize; ++i) | |
2081 | *(data2 + i) = *(data2 + i) + 1; | |
2082 | data3 = malloc(pagesize); | |
2083 | if (!data3) | |
2084 | exit(1); | |
2085 | if (read(fd, data3, pagesize) != pagesize) | |
2086 | exit(1); | |
2087 | for (i = 0; i < pagesize; ++i) | |
2088 | if (*(data + i) != *(data3 + i)) | |
2089 | exit(1); | |
2090 | close(fd); | |
2091 | unlink("conftestmmap"); | |
2092 | exit(0); | |
2b576293 C |
2093 | } |
2094 | ||
2095 | EOF | |
f02156cf | 2096 | if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
bfde4a67 SG |
2097 | then |
2098 | ac_cv_func_mmap_fixed_mapped=yes | |
2b576293 | 2099 | else |
bfde4a67 SG |
2100 | echo "configure: failed program was:" >&5 |
2101 | cat conftest.$ac_ext >&5 | |
2102 | rm -fr conftest* | |
2103 | ac_cv_func_mmap_fixed_mapped=no | |
2b576293 | 2104 | fi |
ef6c51d1 | 2105 | rm -fr conftest* |
8b701284 ILT |
2106 | fi |
2107 | ||
bfde4a67 SG |
2108 | fi |
2109 | ||
2110 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
2111 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
2b576293 C |
2112 | cat >> confdefs.h <<\EOF |
2113 | #define HAVE_MMAP 1 | |
2114 | EOF | |
2115 | ||
2116 | fi | |
2117 | ||
5436fc65 | 2118 | |
5819f35d | 2119 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
f02156cf | 2120 | echo "configure:2121: checking whether malloc must be declared" >&5 |
5819f35d SG |
2121 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
2122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2123 | else | |
2124 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 2125 | #line 2126 "configure" |
5819f35d SG |
2126 | #include "confdefs.h" |
2127 | ||
2128 | #include <stdio.h> | |
2129 | #ifdef HAVE_STRING_H | |
2130 | #include <string.h> | |
2131 | #else | |
2132 | #ifdef HAVE_STRINGS_H | |
2133 | #include <strings.h> | |
2134 | #endif | |
2135 | #endif | |
2136 | #ifdef HAVE_STDLIB_H | |
2137 | #include <stdlib.h> | |
2138 | #endif | |
2139 | #ifdef HAVE_UNISTD_H | |
2140 | #include <unistd.h> | |
2141 | #endif | |
bfde4a67 | 2142 | int main() { |
5819f35d SG |
2143 | char *(*pfn) = (char *(*)) malloc |
2144 | ; return 0; } | |
2145 | EOF | |
f02156cf | 2146 | if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2147 | rm -rf conftest* |
2148 | bfd_cv_decl_needed_malloc=no | |
2149 | else | |
bfde4a67 SG |
2150 | echo "configure: failed program was:" >&5 |
2151 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2152 | rm -rf conftest* |
2153 | bfd_cv_decl_needed_malloc=yes | |
2154 | fi | |
2155 | rm -f conftest* | |
5819f35d SG |
2156 | fi |
2157 | ||
2158 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
2159 | if test $bfd_cv_decl_needed_malloc = yes; then | |
2160 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2161 | cat >> confdefs.h <<EOF | |
2162 | #define $bfd_tr_decl 1 | |
2163 | EOF | |
2164 | ||
2165 | fi | |
2166 | ||
2167 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 | |
f02156cf | 2168 | echo "configure:2169: checking whether realloc must be declared" >&5 |
5819f35d SG |
2169 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
2170 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2171 | else | |
2172 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 2173 | #line 2174 "configure" |
5819f35d SG |
2174 | #include "confdefs.h" |
2175 | ||
2176 | #include <stdio.h> | |
2177 | #ifdef HAVE_STRING_H | |
2178 | #include <string.h> | |
2179 | #else | |
2180 | #ifdef HAVE_STRINGS_H | |
2181 | #include <strings.h> | |
2182 | #endif | |
2183 | #endif | |
2184 | #ifdef HAVE_STDLIB_H | |
2185 | #include <stdlib.h> | |
2186 | #endif | |
2187 | #ifdef HAVE_UNISTD_H | |
2188 | #include <unistd.h> | |
2189 | #endif | |
bfde4a67 | 2190 | int main() { |
5819f35d SG |
2191 | char *(*pfn) = (char *(*)) realloc |
2192 | ; return 0; } | |
2193 | EOF | |
f02156cf | 2194 | if { (eval echo configure:2195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2195 | rm -rf conftest* |
2196 | bfd_cv_decl_needed_realloc=no | |
2197 | else | |
bfde4a67 SG |
2198 | echo "configure: failed program was:" >&5 |
2199 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2200 | rm -rf conftest* |
2201 | bfd_cv_decl_needed_realloc=yes | |
2202 | fi | |
2203 | rm -f conftest* | |
5819f35d SG |
2204 | fi |
2205 | ||
2206 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
2207 | if test $bfd_cv_decl_needed_realloc = yes; then | |
2208 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2209 | cat >> confdefs.h <<EOF | |
2210 | #define $bfd_tr_decl 1 | |
2211 | EOF | |
2212 | ||
2213 | fi | |
2214 | ||
2215 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 | |
f02156cf | 2216 | echo "configure:2217: checking whether free must be declared" >&5 |
5819f35d SG |
2217 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
2218 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2219 | else | |
2220 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 2221 | #line 2222 "configure" |
5819f35d SG |
2222 | #include "confdefs.h" |
2223 | ||
2224 | #include <stdio.h> | |
2225 | #ifdef HAVE_STRING_H | |
2226 | #include <string.h> | |
2227 | #else | |
2228 | #ifdef HAVE_STRINGS_H | |
2229 | #include <strings.h> | |
2230 | #endif | |
2231 | #endif | |
2232 | #ifdef HAVE_STDLIB_H | |
2233 | #include <stdlib.h> | |
2234 | #endif | |
2235 | #ifdef HAVE_UNISTD_H | |
2236 | #include <unistd.h> | |
2237 | #endif | |
bfde4a67 | 2238 | int main() { |
5819f35d SG |
2239 | char *(*pfn) = (char *(*)) free |
2240 | ; return 0; } | |
2241 | EOF | |
f02156cf | 2242 | if { (eval echo configure:2243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
5819f35d SG |
2243 | rm -rf conftest* |
2244 | bfd_cv_decl_needed_free=no | |
2245 | else | |
bfde4a67 SG |
2246 | echo "configure: failed program was:" >&5 |
2247 | cat conftest.$ac_ext >&5 | |
5819f35d SG |
2248 | rm -rf conftest* |
2249 | bfd_cv_decl_needed_free=yes | |
2250 | fi | |
2251 | rm -f conftest* | |
5819f35d SG |
2252 | fi |
2253 | ||
2254 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
2255 | if test $bfd_cv_decl_needed_free = yes; then | |
2256 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2257 | cat >> confdefs.h <<EOF | |
2258 | #define $bfd_tr_decl 1 | |
2259 | EOF | |
2260 | ||
2261 | fi | |
2262 | ||
fef1696f | 2263 | |
47ef0da5 | 2264 | |
89e673a4 SG |
2265 | |
2266 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
5d394f70 SG |
2267 | case ${host_os} in |
2268 | hpux*) | |
2269 | echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 | |
f02156cf | 2270 | echo "configure:2271: checking for HPUX/OSF thread support" >&5 |
5d394f70 | 2271 | if test -f /usr/include/dce/cma_config.h ; then |
c4c9112a SG |
2272 | if test "$GCC" = "yes" ; then |
2273 | echo "$ac_t""yes" 1>&6 | |
2274 | cat >> confdefs.h <<\EOF | |
5d394f70 SG |
2275 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
2276 | EOF | |
2277 | ||
c4c9112a SG |
2278 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" |
2279 | else | |
2280 | echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6 | |
2281 | fi | |
6c310da8 SG |
2282 | else |
2283 | echo "$ac_t""no" 1>&6 | |
2284 | fi | |
2285 | ;; | |
2286 | solaris*) | |
2287 | echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 | |
f02156cf | 2288 | echo "configure:2289: checking for Solaris thread debugging library" >&5 |
6c310da8 SG |
2289 | if test -f /usr/lib/libthread_db.so.1 ; then |
2290 | echo "$ac_t""yes" 1>&6 | |
2291 | cat >> confdefs.h <<\EOF | |
2292 | #define HAVE_THREAD_DB_LIB 1 | |
2293 | EOF | |
2294 | ||
2295 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
bfde4a67 | 2296 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
f02156cf | 2297 | echo "configure:2298: checking for dlopen in -ldl" >&5 |
bfde4a67 | 2298 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
95b47547 SG |
2299 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2300 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2301 | else | |
2302 | ac_save_LIBS="$LIBS" | |
2303 | LIBS="-ldl $LIBS" | |
2304 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 2305 | #line 2306 "configure" |
95b47547 SG |
2306 | #include "confdefs.h" |
2307 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2308 | /* We use char because int might match the return type of a gcc2 | |
2309 | builtin and then its argument prototype would still apply. */ | |
2310 | char dlopen(); | |
2311 | ||
bfde4a67 | 2312 | int main() { |
95b47547 SG |
2313 | dlopen() |
2314 | ; return 0; } | |
2315 | EOF | |
f02156cf | 2316 | if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
95b47547 SG |
2317 | rm -rf conftest* |
2318 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2319 | else | |
bfde4a67 SG |
2320 | echo "configure: failed program was:" >&5 |
2321 | cat conftest.$ac_ext >&5 | |
95b47547 SG |
2322 | rm -rf conftest* |
2323 | eval "ac_cv_lib_$ac_lib_var=no" | |
2324 | fi | |
2325 | rm -f conftest* | |
2326 | LIBS="$ac_save_LIBS" | |
2327 | ||
2328 | fi | |
2329 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2330 | echo "$ac_t""yes" 1>&6 | |
bfde4a67 SG |
2331 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
2332 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
95b47547 SG |
2333 | cat >> confdefs.h <<EOF |
2334 | #define $ac_tr_lib 1 | |
2335 | EOF | |
2336 | ||
2337 | LIBS="-ldl $LIBS" | |
2338 | ||
2339 | else | |
2340 | echo "$ac_t""no" 1>&6 | |
2341 | fi | |
2342 | ||
ef6c51d1 SG |
2343 | if test "$GCC" = "yes" ; then |
2344 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic" | |
2345 | fi | |
5d394f70 SG |
2346 | else |
2347 | echo "$ac_t""no" 1>&6 | |
2348 | fi | |
2349 | ;; | |
2350 | esac | |
4915acad | 2351 | |
89e673a4 | 2352 | fi |
47ef0da5 | 2353 | |
5436fc65 | 2354 | ENABLE_CFLAGS= |
5436fc65 C |
2355 | |
2356 | # Check whether --enable-netrom or --disable-netrom was given. | |
1a7b4b7c DE |
2357 | if test "${enable_netrom+set}" = set; then |
2358 | enableval="$enable_netrom" | |
5436fc65 C |
2359 | case "${enableval}" in |
2360 | yes) enable_netrom=yes ;; | |
2361 | no) enable_netrom=no ;; | |
2362 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
2363 | esac | |
2364 | fi | |
2365 | ||
2366 | ||
2367 | if test "${enable_netrom}" = "yes"; then | |
6c310da8 | 2368 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" |
5436fc65 C |
2369 | fi |
2370 | ||
188c635f SG |
2371 | # start-sanitize-gm |
2372 | ENABLE_GM= | |
2373 | ||
2374 | # Check whether --enable-gm or --disable-gm was given. | |
1a7b4b7c DE |
2375 | if test "${enable_gm+set}" = set; then |
2376 | enableval="$enable_gm" | |
188c635f | 2377 | case "${enableval}" in |
6c310da8 | 2378 | yes) CONFIG_OBS="${CONFIG_OBS} gmagic.o" |
188c635f SG |
2379 | ENABLE_CFLAGS=-DGENERAL_MAGIC |
2380 | ;; | |
2381 | no) ;; | |
2382 | *) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;; | |
2383 | esac | |
2384 | fi | |
2385 | ||
2386 | ||
2387 | # end-sanitize-gm | |
2388 | ||
3c0bf315 | 2389 | # Check whether --enable-sim-powerpc or --disable-sim-powerpc was given. |
1a7b4b7c DE |
2390 | if test "${enable_sim_powerpc+set}" = set; then |
2391 | enableval="$enable_sim_powerpc" | |
3c0bf315 MM |
2392 | case "${enableval}" in |
2393 | yes) powerpc_sim=yes ;; | |
2394 | no) powerpc_sim=no ;; | |
2395 | *) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;; | |
2396 | esac | |
2397 | else | |
2398 | if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi | |
2399 | fi | |
2400 | ||
2401 | ||
5436fc65 C |
2402 | # start-sanitize-gdbtk |
2403 | ENABLE_GDBTK= | |
2404 | ||
2405 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
1a7b4b7c DE |
2406 | if test "${enable_gdbtk+set}" = set; then |
2407 | enableval="$enable_gdbtk" | |
5436fc65 | 2408 | case "${enableval}" in |
0fe1522a SG |
2409 | yes) |
2410 | case "$host" in | |
2411 | *go32*) | |
2412 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 | |
2413 | enable_gdbtk=no ;; | |
d9951af4 | 2414 | *cygwin32* | *windows*) |
b613bfbf GN |
2415 | echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2 |
2416 | enable_gdbtk=no ;; | |
0fe1522a SG |
2417 | *) |
2418 | enable_gdbtk=yes ;; | |
2419 | esac ;; | |
2420 | no) | |
2421 | enable_gdbtk=no ;; | |
2422 | *) | |
2423 | { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
5436fc65 | 2424 | esac |
0fe1522a SG |
2425 | else |
2426 | ||
b613bfbf | 2427 | # Default is on for everything but go32 and cygwin32 |
0fe1522a | 2428 | case "$host" in |
d9951af4 | 2429 | *go32* | *cygwin32* | *windows*) |
b613bfbf | 2430 | ;; |
0fe1522a SG |
2431 | *) |
2432 | enable_gdbtk=yes ;; | |
2433 | esac | |
2434 | ||
5436fc65 C |
2435 | fi |
2436 | ||
2437 | ||
2438 | if test "${enable_gdbtk}" = "yes"; then | |
0fe1522a | 2439 | |
047465fd TT |
2440 | |
2441 | # | |
2442 | # Ok, lets find the tcl configuration | |
2443 | # First, look for one uninstalled. | |
2444 | # the alternative search directory is invoked by --with-tclconfig | |
2445 | # | |
5436fc65 | 2446 | |
047465fd TT |
2447 | if test x"${no_tcl}" = x ; then |
2448 | # we reset no_tcl in case something fails here | |
2449 | no_tcl=true | |
2450 | # Check whether --with-tclconfig or --without-tclconfig was given. | |
2451 | if test "${with_tclconfig+set}" = set; then | |
2452 | withval="$with_tclconfig" | |
2453 | with_tclconfig=${withval} | |
5436fc65 C |
2454 | fi |
2455 | ||
047465fd | 2456 | echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 |
f02156cf | 2457 | echo "configure:2458: checking for Tcl configuration" >&5 |
047465fd | 2458 | if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then |
5436fc65 C |
2459 | echo $ac_n "(cached) $ac_c" 1>&6 |
2460 | else | |
047465fd | 2461 | |
1a7b4b7c | 2462 | |
047465fd TT |
2463 | # First check to see if --with-tclconfig was specified. |
2464 | if test x"${with_tclconfig}" != x ; then | |
2465 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
2466 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
2467 | else | |
2468 | { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 2469 | fi |
047465fd | 2470 | fi |
5436fc65 | 2471 | |
047465fd TT |
2472 | # then check for a private Tcl installation |
2473 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2474 | for i in \ | |
2475 | ../tcl \ | |
2476 | `ls -dr ../tcl[7-9]* 2>/dev/null` \ | |
2477 | ../../tcl \ | |
2478 | `ls -dr ../../tcl[7-9]* 2>/dev/null` \ | |
2479 | ../../../tcl \ | |
2480 | `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do | |
2481 | if test -f "$i/unix/tclConfig.sh" ; then | |
2482 | ac_cv_c_tclconfig=`(cd $i/unix; pwd)` | |
2483 | break | |
2484 | fi | |
2485 | done | |
2486 | fi | |
2487 | # check in a few common install locations | |
2488 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2489 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
2490 | if test -f "$i/tclConfig.sh" ; then | |
2491 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
2492 | break | |
2493 | fi | |
2494 | done | |
2495 | fi | |
2496 | # check in a few other private locations | |
2497 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2498 | for i in \ | |
2499 | ${srcdir}/../tcl \ | |
2500 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do | |
2501 | if test -f "$i/unix/tclConfig.sh" ; then | |
2502 | ac_cv_c_tclconfig=`(cd $i/unix; pwd)` | |
2503 | break | |
2504 | fi | |
2505 | done | |
2506 | fi | |
2507 | ||
5436fc65 | 2508 | fi |
1a7b4b7c | 2509 | |
047465fd TT |
2510 | if test x"${ac_cv_c_tclconfig}" = x ; then |
2511 | TCLCONFIG="# no Tcl configs found" | |
2512 | echo "configure: warning: Can't find Tcl configuration definitions" 1>&2 | |
2513 | else | |
2514 | no_tcl= | |
2515 | TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh | |
2516 | echo "$ac_t""found $TCLCONFIG" 1>&6 | |
5436fc65 | 2517 | fi |
5436fc65 C |
2518 | fi |
2519 | ||
0cf433d9 ILT |
2520 | if test -z "${no_tcl}"; then |
2521 | ||
047465fd | 2522 | . $TCLCONFIG |
5436fc65 | 2523 | |
047465fd TT |
2524 | |
2525 | ||
2526 | ||
2527 | ||
2528 | ||
5436fc65 | 2529 | |
5436fc65 | 2530 | |
5436fc65 | 2531 | |
5436fc65 | 2532 | |
047465fd TT |
2533 | |
2534 | ||
2535 | ||
2536 | ||
2537 | ||
2538 | ||
2539 | ||
2540 | ||
2541 | ||
2542 | ||
2543 | ||
2544 | ||
5436fc65 | 2545 | |
5436fc65 | 2546 | |
5436fc65 | 2547 | |
0cf433d9 | 2548 | |
047465fd TT |
2549 | # |
2550 | # Ok, lets find the tk configuration | |
2551 | # First, look for one uninstalled. | |
2552 | # the alternative search directory is invoked by --with-tkconfig | |
2553 | # | |
5436fc65 | 2554 | |
047465fd TT |
2555 | if test x"${no_tk}" = x ; then |
2556 | # we reset no_tk in case something fails here | |
2557 | no_tk=true | |
2558 | # Check whether --with-tkconfig or --without-tkconfig was given. | |
2559 | if test "${with_tkconfig+set}" = set; then | |
2560 | withval="$with_tkconfig" | |
2561 | with_tkconfig=${withval} | |
5436fc65 C |
2562 | fi |
2563 | ||
047465fd | 2564 | echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6 |
f02156cf | 2565 | echo "configure:2566: checking for Tk configuration" >&5 |
047465fd | 2566 | if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then |
5436fc65 C |
2567 | echo $ac_n "(cached) $ac_c" 1>&6 |
2568 | else | |
047465fd | 2569 | |
5436fc65 | 2570 | |
047465fd TT |
2571 | # First check to see if --with-tkconfig was specified. |
2572 | if test x"${with_tkconfig}" != x ; then | |
2573 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
2574 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
2575 | else | |
2576 | { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; } | |
5436fc65 | 2577 | fi |
047465fd | 2578 | fi |
5436fc65 | 2579 | |
047465fd TT |
2580 | # then check for a private Tk library |
2581 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2582 | for i in \ | |
2583 | ../tk \ | |
2584 | `ls -dr ../tk[4-9]* 2>/dev/null` \ | |
2585 | ../../tk \ | |
2586 | `ls -dr ../../tk[4-9]* 2>/dev/null` \ | |
2587 | ../../../tk \ | |
2588 | `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do | |
2589 | if test -f "$i/unix/tkConfig.sh" ; then | |
2590 | ac_cv_c_tkconfig=`(cd $i/unix; pwd)` | |
2591 | break | |
2592 | fi | |
2593 | done | |
2594 | fi | |
2595 | # check in a few common install locations | |
2596 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2597 | for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do | |
2598 | if test -f "$i/tkConfig.sh" ; then | |
2599 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
2600 | break | |
2601 | fi | |
2602 | done | |
2603 | fi | |
2604 | # check in a few other private locations | |
2605 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2606 | for i in \ | |
2607 | ${srcdir}/../tk \ | |
2608 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do | |
2609 | if test -f "$i/unix/tkConfig.sh" ; then | |
2610 | ac_cv_c_tkconfig=`(cd $i/unix; pwd)` | |
2611 | break | |
2612 | fi | |
2613 | done | |
2614 | fi | |
2615 | ||
5436fc65 | 2616 | fi |
5436fc65 | 2617 | |
047465fd TT |
2618 | if test x"${ac_cv_c_tkconfig}" = x ; then |
2619 | TKCONFIG="# no Tk configs found" | |
2620 | echo "configure: warning: Can't find Tk configuration definitions" 1>&2 | |
2621 | else | |
2622 | no_tk= | |
2623 | TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh | |
2624 | echo "$ac_t""found $TKCONFIG" 1>&6 | |
2625 | fi | |
5436fc65 C |
2626 | fi |
2627 | ||
2628 | ||
5436fc65 | 2629 | |
0cf433d9 ILT |
2630 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
2631 | # point to doing Tcl. | |
2632 | if test -z "${no_tk}"; then | |
2633 | ||
047465fd TT |
2634 | if test -f "$TKCONFIG" ; then |
2635 | . $TKCONFIG | |
2636 | fi | |
5436fc65 | 2637 | |
047465fd TT |
2638 | |
2639 | ||
5436fc65 | 2640 | |
047465fd | 2641 | |
5436fc65 C |
2642 | |
2643 | ||
a2b63bbd | 2644 | |
047465fd TT |
2645 | |
2646 | ||
2647 | ||
2648 | ||
0cf433d9 | 2649 | |
5436fc65 | 2650 | # |
4e327047 TT |
2651 | # Ok, lets find the tcl source trees so we can use the headers |
2652 | # Warning: transition of version 9 to 10 will break this algorithm | |
2653 | # because 10 sorts before 9. We also look for just tcl. We have to | |
2654 | # be careful that we don't match stuff like tclX by accident. | |
2655 | # the alternative search directory is involked by --with-tclinclude | |
5436fc65 | 2656 | # |
4e327047 TT |
2657 | no_tcl=true |
2658 | echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6 | |
f02156cf | 2659 | echo "configure:2660: checking for Tcl private headers" >&5 |
4e327047 | 2660 | # Check whether --with-tclinclude or --without-tclinclude was given. |
1a7b4b7c DE |
2661 | if test "${with_tclinclude+set}" = set; then |
2662 | withval="$with_tclinclude" | |
4e327047 TT |
2663 | with_tclinclude=${withval} |
2664 | fi | |
2665 | ||
2666 | if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then | |
2667 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2668 | else | |
2669 | ||
2670 | # first check to see if --with-tclinclude was specified | |
2671 | if test x"${with_tclinclude}" != x ; then | |
2672 | if test -f ${with_tclinclude}/tclInt.h ; then | |
2673 | ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` | |
047465fd TT |
2674 | elif test -f ${with_tclinclude}/generic/tclInt.h ; then |
2675 | ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` | |
5436fc65 | 2676 | else |
4e327047 TT |
2677 | { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
2678 | fi | |
2679 | fi | |
047465fd TT |
2680 | |
2681 | # next check if it came with Tcl configuration file | |
2682 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
2683 | if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then | |
2684 | ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)` | |
2685 | fi | |
2686 | fi | |
2687 | ||
4e327047 TT |
2688 | # next check in private source directory |
2689 | # | |
2690 | # since ls returns lowest version numbers first, reverse its output | |
2691 | if test x"${ac_cv_c_tclh}" = x ; then | |
2692 | for i in \ | |
2693 | ${srcdir}/../tcl \ | |
047465fd | 2694 | `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 2695 | ${srcdir}/../../tcl \ |
047465fd | 2696 | `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \ |
4e327047 | 2697 | ${srcdir}/../../../tcl \ |
047465fd | 2698 | `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do |
4e327047 | 2699 | if test -f $i/generic/tclInt.h ; then |
047465fd | 2700 | ac_cv_c_tclh=`(cd $i/generic; pwd)` |
1a7b4b7c | 2701 | break |
4e327047 TT |
2702 | fi |
2703 | done | |
2704 | fi | |
2705 | # finally check in a few common install locations | |
2706 | # | |
2707 | # since ls returns lowest version numbers first, reverse its output | |
2708 | if test x"${ac_cv_c_tclh}" = x ; then | |
2709 | for i in \ | |
047465fd TT |
2710 | `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \ |
2711 | `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \ | |
4e327047 TT |
2712 | /usr/local/src/tcl \ |
2713 | /usr/local/lib/tcl \ | |
2714 | ${prefix}/include ; do | |
047465fd TT |
2715 | if test -f $i/generic/tclInt.h ; then |
2716 | ac_cv_c_tclh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2717 | break |
2718 | fi | |
2719 | done | |
2720 | fi | |
2721 | # see if one is installed | |
2722 | if test x"${ac_cv_c_tclh}" = x ; then | |
bfde4a67 | 2723 | ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'` |
4e327047 | 2724 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 |
f02156cf | 2725 | echo "configure:2726: checking for tclInt.h" >&5 |
5436fc65 C |
2726 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2727 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2728 | else | |
2729 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 2730 | #line 2731 "configure" |
5436fc65 | 2731 | #include "confdefs.h" |
4e327047 | 2732 | #include <tclInt.h> |
5436fc65 | 2733 | EOF |
1a7b4b7c | 2734 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f02156cf | 2735 | { (eval echo configure:2736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
2736 | ac_err=`grep -v '^ *+' conftest.out` |
2737 | if test -z "$ac_err"; then | |
2738 | rm -rf conftest* | |
2739 | eval "ac_cv_header_$ac_safe=yes" | |
2740 | else | |
2741 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2742 | echo "configure: failed program was:" >&5 |
2743 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2744 | rm -rf conftest* |
2745 | eval "ac_cv_header_$ac_safe=no" | |
2746 | fi | |
2747 | rm -f conftest* | |
2748 | fi | |
2749 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2750 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 2751 | ac_cv_c_tclh=installed |
5436fc65 C |
2752 | else |
2753 | echo "$ac_t""no" 1>&6 | |
4e327047 | 2754 | ac_cv_c_tclh="" |
5436fc65 C |
2755 | fi |
2756 | ||
4e327047 TT |
2757 | fi |
2758 | ||
2759 | fi | |
2760 | ||
2761 | if test x"${ac_cv_c_tclh}" = x ; then | |
2762 | TCLHDIR="# no Tcl private headers found" | |
2763 | { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; } | |
2764 | fi | |
2765 | if test x"${ac_cv_c_tclh}" != x ; then | |
2766 | no_tcl="" | |
1a7b4b7c | 2767 | if test x"${ac_cv_c_tclh}" = x"installed" ; then |
4e327047 TT |
2768 | echo "$ac_t""is installed" 1>&6 |
2769 | TCLHDIR="" | |
2770 | else | |
2771 | echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6 | |
2772 | # this hack is cause the TCLHDIR won't print if there is a "-I" in it. | |
2773 | TCLHDIR="-I${ac_cv_c_tclh}" | |
5436fc65 | 2774 | fi |
5436fc65 | 2775 | fi |
4e327047 | 2776 | |
4e327047 | 2777 | |
5436fc65 | 2778 | |
0cf433d9 | 2779 | |
5436fc65 | 2780 | # |
4e327047 TT |
2781 | # Ok, lets find the tk source trees so we can use the headers |
2782 | # If the directory (presumably symlink) named "tk" exists, use that one | |
2783 | # in preference to any others. Same logic is used when choosing library | |
2784 | # and again with Tcl. The search order is the best place to look first, then in | |
2785 | # decreasing significance. The loop breaks if the trigger file is found. | |
2786 | # Note the gross little conversion here of srcdir by cd'ing to the found | |
2787 | # directory. This converts the path from a relative to an absolute, so | |
2788 | # recursive cache variables for the path will work right. We check all | |
2789 | # the possible paths in one loop rather than many seperate loops to speed | |
2790 | # things up. | |
047465fd | 2791 | # the alternative search directory is involked by --with-tkinclude |
5436fc65 | 2792 | # |
047465fd | 2793 | no_tk=true |
4e327047 | 2794 | echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6 |
f02156cf | 2795 | echo "configure:2796: checking for Tk private headers" >&5 |
4e327047 | 2796 | # Check whether --with-tkinclude or --without-tkinclude was given. |
1a7b4b7c DE |
2797 | if test "${with_tkinclude+set}" = set; then |
2798 | withval="$with_tkinclude" | |
4e327047 TT |
2799 | with_tkinclude=${withval} |
2800 | fi | |
2801 | ||
4e327047 TT |
2802 | if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then |
2803 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2804 | else | |
2805 | ||
2806 | # first check to see if --with-tkinclude was specified | |
2807 | if test x"${with_tkinclude}" != x ; then | |
2808 | if test -f ${with_tkinclude}/tk.h ; then | |
2809 | ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` | |
047465fd TT |
2810 | elif test -f ${with_tkinclude}/generic/tk.h ; then |
2811 | ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` | |
5436fc65 | 2812 | else |
4e327047 TT |
2813 | { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; } |
2814 | fi | |
2815 | fi | |
047465fd TT |
2816 | |
2817 | # next check if it came with Tk configuration file | |
2818 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
2819 | if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then | |
2820 | ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)` | |
2821 | fi | |
2822 | fi | |
2823 | ||
4e327047 TT |
2824 | # next check in private source directory |
2825 | # | |
047465fd | 2826 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
2827 | if test x"${ac_cv_c_tkh}" = x ; then |
2828 | for i in \ | |
2829 | ${srcdir}/../tk \ | |
047465fd | 2830 | `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \ |
4e327047 | 2831 | ${srcdir}/../../tk \ |
047465fd | 2832 | `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \ |
4e327047 | 2833 | ${srcdir}/../../../tk \ |
047465fd TT |
2834 | `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do |
2835 | if test -f $i/generic/tk.h ; then | |
2836 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2837 | break |
2838 | fi | |
4e327047 TT |
2839 | done |
2840 | fi | |
2841 | # finally check in a few common install locations | |
2842 | # | |
047465fd | 2843 | # since ls returns lowest version numbers first, reverse its output |
4e327047 TT |
2844 | if test x"${ac_cv_c_tkh}" = x ; then |
2845 | for i in \ | |
047465fd TT |
2846 | `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \ |
2847 | `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \ | |
4e327047 TT |
2848 | /usr/local/src/tk \ |
2849 | /usr/local/lib/tk \ | |
2850 | ${prefix}/include ; do | |
047465fd TT |
2851 | if test -f $i/generic/tk.h ; then |
2852 | ac_cv_c_tkh=`(cd $i/generic; pwd)` | |
4e327047 TT |
2853 | break |
2854 | fi | |
2855 | done | |
2856 | fi | |
2857 | # see if one is installed | |
2858 | if test x"${ac_cv_c_tkh}" = x ; then | |
bfde4a67 | 2859 | ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'` |
4e327047 | 2860 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 |
f02156cf | 2861 | echo "configure:2862: checking for tk.h" >&5 |
5436fc65 C |
2862 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2863 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2864 | else | |
2865 | cat > conftest.$ac_ext <<EOF | |
f02156cf | 2866 | #line 2867 "configure" |
5436fc65 | 2867 | #include "confdefs.h" |
4e327047 | 2868 | #include <tk.h> |
5436fc65 | 2869 | EOF |
1a7b4b7c | 2870 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
f02156cf | 2871 | { (eval echo configure:2872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
5436fc65 C |
2872 | ac_err=`grep -v '^ *+' conftest.out` |
2873 | if test -z "$ac_err"; then | |
2874 | rm -rf conftest* | |
2875 | eval "ac_cv_header_$ac_safe=yes" | |
2876 | else | |
2877 | echo "$ac_err" >&5 | |
bfde4a67 SG |
2878 | echo "configure: failed program was:" >&5 |
2879 | cat conftest.$ac_ext >&5 | |
5436fc65 C |
2880 | rm -rf conftest* |
2881 | eval "ac_cv_header_$ac_safe=no" | |
2882 | fi | |
2883 | rm -f conftest* | |
2884 | fi | |
2885 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2886 | echo "$ac_t""yes" 1>&6 | |
4e327047 | 2887 | ac_cv_c_tkh=installed |
5436fc65 C |
2888 | else |
2889 | echo "$ac_t""no" 1>&6 | |
047465fd | 2890 | ac_cv_c_tkh="" |
5436fc65 C |
2891 | fi |
2892 | ||
4e327047 TT |
2893 | fi |
2894 | ||
2895 | fi | |
2896 | ||
2897 | if test x"${ac_cv_c_tkh}" != x ; then | |
2898 | no_tk="" | |
2899 | if test x"${ac_cv_c_tkh}" = x"installed" ; then | |
2900 | echo "$ac_t""is installed" 1>&6 | |
2901 | TKHDIR="" | |
2902 | else | |
047465fd | 2903 | echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6 |
4e327047 TT |
2904 | # this hack is cause the TKHDIR won't print if there is a "-I" in it. |
2905 | TKHDIR="-I${ac_cv_c_tkh}" | |
5436fc65 C |
2906 | fi |
2907 | else | |
4e327047 TT |
2908 | TKHDIR="# no Tk directory found" |
2909 | echo "configure: warning: Can't find Tk private headers" 1>&2 | |
2910 | no_tk=true | |
5436fc65 C |
2911 | fi |
2912 | ||
5436fc65 C |
2913 | |
2914 | ||
2915 | ||
0cf433d9 | 2916 | ENABLE_GDBTK=1 |
5436fc65 | 2917 | |
6c310da8 | 2918 | # Include some libraries that Tcl and Tk want. |
f02156cf TT |
2919 | TCL_LIBS='$(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
2920 | LIBS="${LIBS} ${TK_LIBS} ${TCL_LIBS}" | |
6c310da8 | 2921 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o" |
0cf433d9 | 2922 | fi |
1a57cd09 | 2923 | fi |
a2b63bbd | 2924 | fi |
66efdff9 | 2925 | |
66efdff9 | 2926 | |
5436fc65 | 2927 | |
66efdff9 JM |
2928 | |
2929 | ||
5436fc65 C |
2930 | # end-sanitize-gdbtk |
2931 | ||
2932 | ||
2933 | ||
2934 | ||
2935 | ||
1d5eb137 FF |
2936 | # Begin stuff to support --enable-shared |
2937 | # Check whether --enable-shared or --disable-shared was given. | |
2938 | if test "${enable_shared+set}" = set; then | |
2939 | enableval="$enable_shared" | |
2940 | case "${enableval}" in | |
2941 | yes) shared=true ;; | |
2942 | no) shared=false ;; | |
2943 | *) shared=true ;; | |
2944 | esac | |
2945 | fi | |
2946 | ||
2947 | HLDFLAGS= | |
2948 | HLDENV= | |
2949 | # If we have shared libraries, try to set rpath reasonably. | |
2950 | if test "${shared}" = "true"; then | |
2951 | case "${host}" in | |
2952 | *-*-hpux*) | |
2953 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
2954 | ;; | |
2955 | *-*-irix5* | *-*-irix6*) | |
2956 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
2957 | ;; | |
2958 | *-*-linux*aout*) | |
2959 | ;; | |
8ddf07a2 | 2960 | *-*-linux* | *-pc-linux-gnu) |
1d5eb137 FF |
2961 | HLDFLAGS='-Wl,-rpath,$(libdir)' |
2962 | ;; | |
2963 | *-*-solaris*) | |
2964 | HLDFLAGS='-R $(libdir)' | |
2965 | ;; | |
2966 | *-*-sysv4*) | |
2967 | HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' | |
2968 | ;; | |
2969 | esac | |
2970 | fi | |
2971 | ||
2972 | # On SunOS, if the linker supports the -rpath option, use it to | |
2973 | # prevent ../bfd and ../opcodes from being included in the run time | |
2974 | # search path. | |
2975 | case "${host}" in | |
2976 | *-*-sunos*) | |
2977 | echo 'main () { }' > conftest.c | |
2978 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
2979 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
2980 | : | |
2981 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
2982 | : | |
2983 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
2984 | : | |
074d813d PS |
2985 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then |
2986 | : | |
1d5eb137 FF |
2987 | elif test "${shared}" = "true"; then |
2988 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
2989 | else | |
2990 | HLDFLAGS='-Wl,-rpath=' | |
2991 | fi | |
2992 | rm -f conftest.t conftest.c conftest | |
2993 | ;; | |
2994 | esac | |
2995 | ||
2996 | ||
2997 | # End stuff to support --enable-shared | |
2998 | ||
7c40dd08 DE |
2999 | # target_subdir is used by the testsuite to find the target libraries. |
3000 | target_subdir= | |
3001 | if test "${host}" != "${target}"; then | |
3002 | target_subdir="${target_alias}/" | |
3003 | fi | |
3004 | ||
5436fc65 | 3005 | |
5f107900 | 3006 | frags= |
5436fc65 C |
3007 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
3008 | if test ! -f ${host_makefile_frag}; then | |
3009 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
3010 | fi | |
5f107900 | 3011 | frags="$frags $host_makefile_frag" |
5436fc65 C |
3012 | |
3013 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
3014 | if test ! -f ${target_makefile_frag}; then | |
3015 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
3016 | fi | |
5f107900 | 3017 | frags="$frags $target_makefile_frag" |
5436fc65 C |
3018 | |
3019 | ||
3020 | ||
3021 | ||
3022 | ||
094fd4ae C |
3023 | hostfile=`sed -n ' |
3024 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3025 | ' ${host_makefile_frag}` | |
5436fc65 | 3026 | |
094fd4ae C |
3027 | targetfile=`sed -n ' |
3028 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3029 | ' ${target_makefile_frag}` | |
5436fc65 C |
3030 | |
3031 | # these really aren't orthogonal true/false values of the same condition, | |
3032 | # but shells are slow enough that I like to reuse the test conditions | |
3033 | # whenever possible | |
3034 | if test "${target}" = "${host}"; then | |
094fd4ae C |
3035 | nativefile=`sed -n ' |
3036 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
3037 | ' ${host_makefile_frag}` | |
33ef0f93 | 3038 | # else |
5436fc65 | 3039 | # GDBserver is only useful in a "native" enviroment |
33ef0f93 | 3040 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` |
5436fc65 C |
3041 | fi |
3042 | ||
094fd4ae | 3043 | |
5436fc65 C |
3044 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
3045 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
3046 | # corresponding links. But we have to remove the xm.h files and tm.h | |
3047 | # files anyway, e.g. when switching from "configure host" to | |
3048 | # "configure none". | |
3049 | ||
3050 | files= | |
3051 | links= | |
3052 | rm -f xm.h | |
3053 | if test "${hostfile}" != ""; then | |
3054 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
3055 | links="${links} xm.h" | |
3056 | fi | |
3057 | rm -f tm.h | |
3058 | if test "${targetfile}" != ""; then | |
3059 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
3060 | links="${links} tm.h" | |
3061 | fi | |
3062 | rm -f nm.h | |
3063 | if test "${nativefile}" != ""; then | |
3064 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
3065 | links="${links} nm.h" | |
3066 | else | |
3067 | # A cross-only configuration. | |
3068 | files="${files} config/nm-empty.h" | |
3069 | links="${links} nm.h" | |
3070 | fi | |
3071 | # start-sanitize-gdbtk | |
3072 | ||
3073 | # Make it possible to use the GUI without doing a full install | |
3074 | if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then | |
3075 | files="${files} gdbtk.tcl" | |
3076 | links="${links} gdbtk.tcl" | |
3077 | fi | |
3078 | # end-sanitize-gdbtk | |
3079 | ||
3080 | ||
3081 | ||
3082 | subdirs="$configdirs" | |
3083 | ||
3084 | trap '' 1 2 15 | |
3085 | cat > confcache <<\EOF | |
3086 | # This file is a shell script that caches the results of configure | |
3087 | # tests run on this system so they can be shared between configure | |
3088 | # scripts and configure runs. It is not useful on other systems. | |
3089 | # If it contains results you don't want to keep, you may remove or edit it. | |
3090 | # | |
3091 | # By default, configure uses ./config.cache as the cache file, | |
3092 | # creating it if it does not exist already. You can give configure | |
3093 | # the --cache-file=FILE option to use a different cache file; that is | |
3094 | # what configure does when it calls configure scripts in | |
3095 | # subdirectories, so they share the cache. | |
3096 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3097 | # config.status only pays attention to the cache file if you give it the | |
3098 | # --recheck option to rerun configure. | |
3099 | # | |
3100 | EOF | |
bfde4a67 SG |
3101 | # The following way of writing the cache mishandles newlines in values, |
3102 | # but we know of no workaround that is simple, portable, and efficient. | |
3103 | # So, don't put newlines in cache variables' values. | |
5436fc65 C |
3104 | # Ultrix sh set writes to stderr and can't be redirected directly, |
3105 | # and sets the high bit in the cache file unless we assign to the vars. | |
3106 | (set) 2>&1 | | |
bfde4a67 SG |
3107 | case `(ac_space=' '; set) 2>&1` in |
3108 | *ac_space=\ *) | |
3109 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3110 | # turns \\\\ into \\, and sed turns \\ into \). | |
3111 | sed -n \ | |
3112 | -e "s/'/'\\\\''/g" \ | |
3113 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3114 | ;; | |
3115 | *) | |
3116 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3117 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3118 | ;; | |
3119 | esac >> confcache | |
5436fc65 C |
3120 | if cmp -s $cache_file confcache; then |
3121 | : | |
3122 | else | |
3123 | if test -w $cache_file; then | |
3124 | echo "updating cache $cache_file" | |
3125 | cat confcache > $cache_file | |
3126 | else | |
3127 | echo "not updating unwritable cache $cache_file" | |
3128 | fi | |
3129 | fi | |
3130 | rm -f confcache | |
3131 | ||
3132 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
3133 | ||
3134 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
3135 | # Let make expand exec_prefix. | |
3136 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3137 | ||
3138 | # Any assignment to VPATH causes Sun make to only execute | |
3139 | # the first set of double-colon rules, so remove it if not needed. | |
3140 | # If there is a colon in the path, we need to keep it. | |
3141 | if test "x$srcdir" = x.; then | |
3142 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3143 | fi | |
3144 | ||
3145 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3146 | ||
db210d08 | 3147 | DEFS=-DHAVE_CONFIG_H |
5436fc65 C |
3148 | |
3149 | # Without the "./", some shells look in PATH for config.status. | |
3150 | : ${CONFIG_STATUS=./config.status} | |
3151 | ||
3152 | echo creating $CONFIG_STATUS | |
3153 | rm -f $CONFIG_STATUS | |
3154 | cat > $CONFIG_STATUS <<EOF | |
3155 | #! /bin/sh | |
3156 | # Generated automatically by configure. | |
3157 | # Run this file to recreate the current configuration. | |
3158 | # This directory was configured as follows, | |
3159 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3160 | # | |
3161 | # $0 $ac_configure_args | |
3162 | # | |
3163 | # Compiler output produced by configure, useful for debugging | |
3164 | # configure, is in ./config.log if it exists. | |
3165 | ||
3166 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3167 | for ac_option | |
3168 | do | |
3169 | case "\$ac_option" in | |
3170 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
3171 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
3172 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
3173 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
bfde4a67 | 3174 | echo "$CONFIG_STATUS generated by autoconf version 2.12" |
5436fc65 C |
3175 | exit 0 ;; |
3176 | -help | --help | --hel | --he | --h) | |
3177 | echo "\$ac_cs_usage"; exit 0 ;; | |
3178 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3179 | esac | |
3180 | done | |
3181 | ||
3182 | ac_given_srcdir=$srcdir | |
3183 | ac_given_INSTALL="$INSTALL" | |
3184 | ||
18ea4416 | 3185 | trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1a7b4b7c DE |
3186 | EOF |
3187 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 3188 | |
1a7b4b7c DE |
3189 | # Protect against being on the right side of a sed subst in config.status. |
3190 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
3191 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5436fc65 C |
3192 | $ac_vpsub |
3193 | $extrasub | |
3194 | s%@CFLAGS@%$CFLAGS%g | |
3195 | s%@CPPFLAGS@%$CPPFLAGS%g | |
3196 | s%@CXXFLAGS@%$CXXFLAGS%g | |
3197 | s%@DEFS@%$DEFS%g | |
3198 | s%@LDFLAGS@%$LDFLAGS%g | |
3199 | s%@LIBS@%$LIBS%g | |
3200 | s%@exec_prefix@%$exec_prefix%g | |
3201 | s%@prefix@%$prefix%g | |
3202 | s%@program_transform_name@%$program_transform_name%g | |
1a7b4b7c DE |
3203 | s%@bindir@%$bindir%g |
3204 | s%@sbindir@%$sbindir%g | |
3205 | s%@libexecdir@%$libexecdir%g | |
3206 | s%@datadir@%$datadir%g | |
3207 | s%@sysconfdir@%$sysconfdir%g | |
3208 | s%@sharedstatedir@%$sharedstatedir%g | |
3209 | s%@localstatedir@%$localstatedir%g | |
3210 | s%@libdir@%$libdir%g | |
3211 | s%@includedir@%$includedir%g | |
3212 | s%@oldincludedir@%$oldincludedir%g | |
3213 | s%@infodir@%$infodir%g | |
3214 | s%@mandir@%$mandir%g | |
5436fc65 C |
3215 | s%@CC@%$CC%g |
3216 | s%@CPP@%$CPP%g | |
5436fc65 C |
3217 | s%@host@%$host%g |
3218 | s%@host_alias@%$host_alias%g | |
3219 | s%@host_cpu@%$host_cpu%g | |
3220 | s%@host_vendor@%$host_vendor%g | |
3221 | s%@host_os@%$host_os%g | |
0579b53d GN |
3222 | s%@target@%$target%g |
3223 | s%@target_alias@%$target_alias%g | |
3224 | s%@target_cpu@%$target_cpu%g | |
3225 | s%@target_vendor@%$target_vendor%g | |
3226 | s%@target_os@%$target_os%g | |
5436fc65 C |
3227 | s%@build@%$build%g |
3228 | s%@build_alias@%$build_alias%g | |
3229 | s%@build_cpu@%$build_cpu%g | |
3230 | s%@build_vendor@%$build_vendor%g | |
3231 | s%@build_os@%$build_os%g | |
0579b53d GN |
3232 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3233 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
d8efbc66 FF |
3234 | s%@AR@%$AR%g |
3235 | s%@RANLIB@%$RANLIB%g | |
3236 | s%@YACC@%$YACC%g | |
3237 | s%@AWK@%$AWK%g | |
4915acad | 3238 | s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g |
047465fd TT |
3239 | s%@TCL_VERSION@%$TCL_VERSION%g |
3240 | s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g | |
3241 | s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g | |
3242 | s%@TCL_CC@%$TCL_CC%g | |
3243 | s%@TCL_DEFS@%$TCL_DEFS%g | |
3244 | s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g | |
3245 | s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g | |
3246 | s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g | |
3247 | s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g | |
3248 | s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g | |
3249 | s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g | |
3250 | s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g | |
3251 | s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g | |
3252 | s%@TCL_RANLIB@%$TCL_RANLIB%g | |
3253 | s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g | |
3254 | s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g | |
3255 | s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g | |
3256 | s%@TK_VERSION@%$TK_VERSION%g | |
3257 | s%@TK_DEFS@%$TK_DEFS%g | |
3258 | s%@TK_XINCLUDES@%$TK_XINCLUDES%g | |
3259 | s%@TK_XLIBSW@%$TK_XLIBSW%g | |
3260 | s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g | |
3261 | s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g | |
5436fc65 | 3262 | s%@TCLHDIR@%$TCLHDIR%g |
4e327047 | 3263 | s%@TKHDIR@%$TKHDIR%g |
5436fc65 | 3264 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g |
047465fd | 3265 | s%@X_CFLAGS@%$X_CFLAGS%g |
a2b63bbd | 3266 | s%@X_LDFLAGS@%$X_LDFLAGS%g |
047465fd | 3267 | s%@X_LIBS@%$X_LIBS%g |
5436fc65 | 3268 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
6c310da8 | 3269 | s%@CONFIG_OBS@%$CONFIG_OBS%g |
1d5eb137 FF |
3270 | s%@HLDFLAGS@%$HLDFLAGS%g |
3271 | s%@HLDENV@%$HLDENV%g | |
7c40dd08 | 3272 | s%@target_subdir@%$target_subdir%g |
5436fc65 C |
3273 | /@host_makefile_frag@/r $host_makefile_frag |
3274 | s%@host_makefile_frag@%%g | |
3275 | /@target_makefile_frag@/r $target_makefile_frag | |
3276 | s%@target_makefile_frag@%%g | |
5f107900 | 3277 | s%@frags@%$frags%g |
5436fc65 C |
3278 | s%@subdirs@%$subdirs%g |
3279 | ||
3280 | CEOF | |
3281 | EOF | |
bfde4a67 SG |
3282 | |
3283 | cat >> $CONFIG_STATUS <<\EOF | |
3284 | ||
3285 | # Split the substitutions into bite-sized pieces for seds with | |
3286 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3287 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3288 | ac_file=1 # Number of current file. | |
3289 | ac_beg=1 # First line for current file. | |
3290 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3291 | ac_more_lines=: | |
3292 | ac_sed_cmds="" | |
3293 | while $ac_more_lines; do | |
3294 | if test $ac_beg -gt 1; then | |
3295 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3296 | else | |
3297 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3298 | fi | |
3299 | if test ! -s conftest.s$ac_file; then | |
3300 | ac_more_lines=false | |
3301 | rm -f conftest.s$ac_file | |
3302 | else | |
3303 | if test -z "$ac_sed_cmds"; then | |
3304 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3305 | else | |
3306 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3307 | fi | |
3308 | ac_file=`expr $ac_file + 1` | |
3309 | ac_beg=$ac_end | |
3310 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3311 | fi | |
3312 | done | |
3313 | if test -z "$ac_sed_cmds"; then | |
3314 | ac_sed_cmds=cat | |
3315 | fi | |
3316 | EOF | |
3317 | ||
5436fc65 C |
3318 | cat >> $CONFIG_STATUS <<EOF |
3319 | ||
3320 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"} | |
3321 | EOF | |
3322 | cat >> $CONFIG_STATUS <<\EOF | |
3323 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
bfde4a67 | 3324 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
5436fc65 | 3325 | case "$ac_file" in |
bfde4a67 | 3326 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
5436fc65 C |
3327 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3328 | *) ac_file_in="${ac_file}.in" ;; | |
3329 | esac | |
3330 | ||
bfde4a67 | 3331 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
5436fc65 C |
3332 | |
3333 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3334 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3335 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3336 | # The file is in a subdirectory. | |
3337 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3338 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
3339 | # A "../" for each directory in $ac_dir_suffix. | |
3340 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3341 | else | |
3342 | ac_dir_suffix= ac_dots= | |
3343 | fi | |
3344 | ||
3345 | case "$ac_given_srcdir" in | |
3346 | .) srcdir=. | |
3347 | if test -z "$ac_dots"; then top_srcdir=. | |
3348 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3349 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3350 | *) # Relative path. | |
3351 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3352 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3353 | esac | |
3354 | ||
3355 | case "$ac_given_INSTALL" in | |
3356 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3357 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3358 | esac | |
bfde4a67 | 3359 | |
5436fc65 C |
3360 | echo creating "$ac_file" |
3361 | rm -f "$ac_file" | |
3362 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
3363 | case "$ac_file" in | |
3364 | *Makefile*) ac_comsub="1i\\ | |
3365 | # $configure_input" ;; | |
3366 | *) ac_comsub= ;; | |
3367 | esac | |
bfde4a67 SG |
3368 | |
3369 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5436fc65 C |
3370 | sed -e "$ac_comsub |
3371 | s%@configure_input@%$configure_input%g | |
3372 | s%@srcdir@%$srcdir%g | |
3373 | s%@top_srcdir@%$top_srcdir%g | |
3374 | s%@INSTALL@%$INSTALL%g | |
bfde4a67 | 3375 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
5436fc65 | 3376 | fi; done |
bfde4a67 | 3377 | rm -f conftest.s* |
5436fc65 | 3378 | |
db210d08 FF |
3379 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
3380 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3381 | # | |
3382 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3383 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3384 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3385 | ac_dC='\3' | |
3386 | ac_dD='%g' | |
3387 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3388 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3389 | ac_uB='\([ ]\)%\1#\2define\3' | |
3390 | ac_uC=' ' | |
3391 | ac_uD='\4%g' | |
3392 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3393 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3394 | ac_eB='$%\1#\2define\3' | |
3395 | ac_eC=' ' | |
3396 | ac_eD='%g' | |
3397 | ||
bfde4a67 SG |
3398 | if test "${CONFIG_HEADERS+set}" != set; then |
3399 | EOF | |
3400 | cat >> $CONFIG_STATUS <<EOF | |
3401 | CONFIG_HEADERS="config.h:config.in" | |
3402 | EOF | |
3403 | cat >> $CONFIG_STATUS <<\EOF | |
3404 | fi | |
db210d08 | 3405 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
bfde4a67 | 3406 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
db210d08 | 3407 | case "$ac_file" in |
bfde4a67 | 3408 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
db210d08 FF |
3409 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3410 | *) ac_file_in="${ac_file}.in" ;; | |
3411 | esac | |
3412 | ||
3413 | echo creating $ac_file | |
3414 | ||
3415 | rm -f conftest.frag conftest.in conftest.out | |
bfde4a67 SG |
3416 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
3417 | cat $ac_file_inputs > conftest.in | |
db210d08 FF |
3418 | |
3419 | EOF | |
3420 | ||
3421 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
3422 | # the proper values into config.h.in to produce config.h. And first: | |
1a7b4b7c | 3423 | # Protect against being on the right side of a sed subst in config.status. |
db210d08 FF |
3424 | # Protect against being in an unquoted here document in config.status. |
3425 | rm -f conftest.vals | |
3426 | cat > conftest.hdr <<\EOF | |
3427 | s/[\\&%]/\\&/g | |
3428 | s%[\\$`]%\\&%g | |
bc859e63 | 3429 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
db210d08 FF |
3430 | s%ac_d%ac_u%gp |
3431 | s%ac_u%ac_e%gp | |
3432 | EOF | |
3433 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3434 | rm -f conftest.hdr | |
3435 | ||
3436 | # This sed command replaces #undef with comments. This is necessary, for | |
3437 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3438 | # on some systems where configure will not decide to define it. | |
3439 | cat >> conftest.vals <<\EOF | |
3440 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3441 | EOF | |
3442 | ||
3443 | # Break up conftest.vals because some shells have a limit on | |
3444 | # the size of here documents, and old seds have small limits too. | |
db210d08 FF |
3445 | |
3446 | rm -f conftest.tail | |
3447 | while : | |
3448 | do | |
3449 | ac_lines=`grep -c . conftest.vals` | |
3450 | # grep -c gives empty output for an empty file on some AIX systems. | |
3451 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3452 | # Write a limited-size here document to conftest.frag. | |
3453 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
3454 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
3455 | echo 'CEOF | |
3456 | sed -f conftest.frag conftest.in > conftest.out | |
3457 | rm -f conftest.in | |
3458 | mv conftest.out conftest.in | |
3459 | ' >> $CONFIG_STATUS | |
3460 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
3461 | rm -f conftest.vals | |
3462 | mv conftest.tail conftest.vals | |
3463 | done | |
3464 | rm -f conftest.vals | |
3465 | ||
3466 | cat >> $CONFIG_STATUS <<\EOF | |
3467 | rm -f conftest.frag conftest.h | |
3468 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3469 | cat conftest.in >> conftest.h | |
3470 | rm -f conftest.in | |
3471 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3472 | echo "$ac_file is unchanged" | |
3473 | rm -f conftest.h | |
3474 | else | |
bc859e63 SG |
3475 | # Remove last slash and all that follows it. Not all systems have dirname. |
3476 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3477 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3478 | # The file is in a subdirectory. | |
3479 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3480 | fi | |
db210d08 FF |
3481 | rm -f $ac_file |
3482 | mv conftest.h $ac_file | |
3483 | fi | |
3484 | fi; done | |
3485 | ||
5436fc65 C |
3486 | EOF |
3487 | ||
3488 | cat >> $CONFIG_STATUS <<EOF | |
3489 | ac_sources="$files" | |
3490 | ac_dests="$links" | |
3491 | EOF | |
3492 | ||
3493 | cat >> $CONFIG_STATUS <<\EOF | |
3494 | srcdir=$ac_given_srcdir | |
3495 | while test -n "$ac_sources"; do | |
3496 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
3497 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
3498 | ||
3499 | echo "linking $srcdir/$ac_source to $ac_dest" | |
3500 | ||
3501 | if test ! -r $srcdir/$ac_source; then | |
3502 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
3503 | fi | |
3504 | rm -f $ac_dest | |
3505 | ||
3506 | # Make relative symlinks. | |
3507 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3508 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
3509 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
3510 | # The dest file is in a subdirectory. | |
3511 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
3512 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
3513 | # A "../" for each directory in $ac_dest_dir_suffix. | |
3514 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
3515 | else | |
3516 | ac_dest_dir_suffix= ac_dots= | |
3517 | fi | |
3518 | ||
3519 | case "$srcdir" in | |
3520 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
3521 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
3522 | esac | |
3523 | ||
3524 | # Make a symlink if possible; otherwise try a hard link. | |
3525 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
3526 | ln $srcdir/$ac_source $ac_dest; then : | |
3527 | else | |
3528 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
3529 | fi | |
3530 | done | |
0a5a1821 C |
3531 | EOF |
3532 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 3533 | |
0a5a1821 C |
3534 | gdb_host_cpu=$gdb_host_cpu |
3535 | gdb_target_cpu=$gdb_target_cpu | |
3536 | nativefile=$nativefile | |
3537 | ||
3538 | EOF | |
3539 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
3540 | |
3541 | if test "${nativefile}" = ""; then | |
7bd1f0c5 | 3542 | sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \ |
5436fc65 C |
3543 | < Makefile > Makefile.tem |
3544 | mv -f Makefile.tem Makefile | |
3545 | fi | |
3546 | ||
3547 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
3548 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
3549 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
3550 | mv -f Makefile.tmp Makefile | |
3551 | ||
3552 | case ${srcdir} in | |
3553 | .) | |
3554 | ;; | |
3555 | *) | |
3556 | grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \ | |
3557 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
3558 | esac | |
3559 | ||
31520669 | 3560 | case x$CONFIG_HEADERS in |
18ea4416 | 3561 | xconfig.h:config.in) |
31520669 FF |
3562 | echo > stamp-h ;; |
3563 | esac | |
3564 | ||
5436fc65 C |
3565 | exit 0 |
3566 | EOF | |
3567 | chmod +x $CONFIG_STATUS | |
3568 | rm -fr confdefs* $ac_clean_files | |
3569 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
3570 | ||
3571 | if test "$no_recursion" != yes; then | |
3572 | ||
3573 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
3574 | ac_sub_configure_args= | |
3575 | ac_prev= | |
3576 | for ac_arg in $ac_configure_args; do | |
3577 | if test -n "$ac_prev"; then | |
3578 | ac_prev= | |
3579 | continue | |
3580 | fi | |
3581 | case "$ac_arg" in | |
3582 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
3583 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
3584 | ac_prev=cache_file ;; | |
3585 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
3586 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
3587 | ;; | |
3588 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
3589 | ac_prev=srcdir ;; | |
3590 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
3591 | ;; | |
3592 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
3593 | esac | |
3594 | done | |
3595 | ||
3596 | for ac_config_dir in $configdirs; do | |
3597 | ||
3598 | # Do not complain, so a configure script can configure whichever | |
3599 | # parts of a large source tree are present. | |
3600 | if test ! -d $srcdir/$ac_config_dir; then | |
3601 | continue | |
3602 | fi | |
3603 | ||
3604 | echo configuring in $ac_config_dir | |
3605 | ||
3606 | case "$srcdir" in | |
3607 | .) ;; | |
3608 | *) | |
3609 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
3610 | else | |
3611 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
3612 | fi | |
3613 | ;; | |
3614 | esac | |
3615 | ||
3616 | ac_popdir=`pwd` | |
3617 | cd $ac_config_dir | |
3618 | ||
bfde4a67 SG |
3619 | # A "../" for each directory in /$ac_config_dir. |
3620 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
3621 | ||
5436fc65 C |
3622 | case "$srcdir" in |
3623 | .) # No --srcdir option. We are building in place. | |
3624 | ac_sub_srcdir=$srcdir ;; | |
3625 | /*) # Absolute path. | |
3626 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
3627 | *) # Relative path. | |
bfde4a67 | 3628 | ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; |
5436fc65 C |
3629 | esac |
3630 | ||
3631 | # Check for guested configure; otherwise get Cygnus style configure. | |
3632 | if test -f $ac_sub_srcdir/configure; then | |
3633 | ac_sub_configure=$ac_sub_srcdir/configure | |
3634 | elif test -f $ac_sub_srcdir/configure.in; then | |
3635 | ac_sub_configure=$ac_configure | |
3636 | else | |
3637 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
3638 | ac_sub_configure= | |
3639 | fi | |
3640 | ||
3641 | # The recursion is here. | |
3642 | if test -n "$ac_sub_configure"; then | |
3643 | ||
3644 | # Make the cache file name correct relative to the subdirectory. | |
5436fc65 C |
3645 | case "$cache_file" in |
3646 | /*) ac_sub_cache_file=$cache_file ;; | |
3647 | *) # Relative path. | |
3648 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
3649 | esac | |
3650 | case "$ac_given_INSTALL" in | |
3651 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3652 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3653 | esac | |
3654 | ||
3655 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
3656 | # The eval makes quoting arguments work. | |
3657 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
3658 | then : | |
3659 | else | |
3660 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
3661 | fi | |
3662 | fi | |
3663 | ||
3664 | cd $ac_popdir | |
3665 | done | |
3666 | fi | |
3667 | ||
5e711e7f PS |
3668 | |
3669 | exit 0 | |
b7f3b6d5 | 3670 |