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