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