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