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