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