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