Commit | Line | Data |
---|---|---|
5436fc65 C |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
da3d57e3 | 4 | # Generated automatically using autoconf version 2.4 |
5436fc65 C |
5 | # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --enable-netrom " | |
188c635f SG |
16 | ac_help="$ac_help |
17 | --enable-gm " | |
3c0bf315 MM |
18 | ac_help="$ac_help |
19 | --enable-sim-powerpc " | |
5436fc65 C |
20 | ac_help="$ac_help |
21 | --enable-gdbtk " | |
22 | ac_help="$ac_help | |
23 | --with-x use the X Window System" | |
24 | ||
25 | # Initialize some variables set by options. | |
26 | # The variables have the same names as the options, with | |
27 | # dashes changed to underlines. | |
28 | build=NONE | |
29 | cache_file=./config.cache | |
30 | exec_prefix=NONE | |
31 | host=NONE | |
32 | no_create= | |
33 | nonopt=NONE | |
34 | no_recursion= | |
35 | prefix=NONE | |
36 | program_prefix=NONE | |
37 | program_suffix=NONE | |
38 | program_transform_name=s,x,x, | |
39 | silent= | |
40 | site= | |
41 | srcdir= | |
42 | target=NONE | |
43 | verbose= | |
44 | x_includes=NONE | |
45 | x_libraries=NONE | |
46 | ||
47 | # Initialize some other variables. | |
48 | subdirs= | |
49 | ||
50 | ac_prev= | |
51 | for ac_option | |
52 | do | |
53 | ||
54 | # If the previous option needs an argument, assign it. | |
55 | if test -n "$ac_prev"; then | |
56 | eval "$ac_prev=\$ac_option" | |
57 | ac_prev= | |
58 | continue | |
59 | fi | |
60 | ||
61 | case "$ac_option" in | |
62 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
63 | *) ac_optarg= ;; | |
64 | esac | |
65 | ||
66 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
67 | ||
68 | case "$ac_option" in | |
69 | ||
da3d57e3 | 70 | -build | --build | --buil | --bui | --bu | --b) |
5436fc65 | 71 | ac_prev=build ;; |
da3d57e3 | 72 | -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) |
5436fc65 C |
73 | build="$ac_optarg" ;; |
74 | ||
75 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
76 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
77 | ac_prev=cache_file ;; | |
78 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
79 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
80 | cache_file="$ac_optarg" ;; | |
81 | ||
82 | -disable-* | --disable-*) | |
83 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
84 | # Reject names that are not valid shell variable names. | |
85 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
86 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
87 | fi | |
88 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
89 | eval "enable_${ac_feature}=no" ;; | |
90 | ||
91 | -enable-* | --enable-*) | |
92 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
93 | # Reject names that are not valid shell variable names. | |
94 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
95 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
96 | fi | |
97 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
98 | case "$ac_option" in | |
99 | *=*) ;; | |
100 | *) ac_optarg=yes ;; | |
101 | esac | |
102 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
103 | ||
104 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
105 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
106 | | --exec | --exe | --ex) | |
107 | ac_prev=exec_prefix ;; | |
108 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
109 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
110 | | --exec=* | --exe=* | --ex=*) | |
111 | exec_prefix="$ac_optarg" ;; | |
112 | ||
113 | -gas | --gas | --ga | --g) | |
114 | # Obsolete; use --with-gas. | |
115 | with_gas=yes ;; | |
116 | ||
117 | -help | --help | --hel | --he) | |
118 | # Omit some internal or obsolete options to make the list less imposing. | |
119 | # This message is too long to be a string in the A/UX 3.1 sh. | |
120 | cat << EOF | |
121 | Usage: configure [options] [host] | |
122 | Options: [defaults in brackets after descriptions] | |
123 | Configuration: | |
124 | --cache-file=FILE cache test results in FILE | |
125 | --help print this message | |
126 | --no-create do not create output files | |
127 | --quiet, --silent do not print \`checking...' messages | |
128 | --version print the version of autoconf that created configure | |
129 | Directory and file names: | |
130 | --prefix=PREFIX install architecture-independent files in PREFIX | |
131 | [$ac_default_prefix] | |
da3d57e3 | 132 | --exec-prefix=PREFIX install architecture-dependent files in PREFIX |
5436fc65 C |
133 | [same as prefix] |
134 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
135 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
136 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
137 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
138 | Host type: | |
139 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
140 | --host=HOST configure for HOST [guessed] | |
141 | --target=TARGET configure for TARGET [TARGET=HOST] | |
142 | Features and packages: | |
143 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
144 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
145 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
146 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
147 | --x-includes=DIR X include files are in DIR | |
148 | --x-libraries=DIR X library files are in DIR | |
149 | --enable and --with options recognized:$ac_help | |
150 | EOF | |
151 | exit 0 ;; | |
152 | ||
153 | -host | --host | --hos | --ho) | |
154 | ac_prev=host ;; | |
155 | -host=* | --host=* | --hos=* | --ho=*) | |
156 | host="$ac_optarg" ;; | |
157 | ||
158 | -nfp | --nfp | --nf) | |
159 | # Obsolete; use --without-fp. | |
160 | with_fp=no ;; | |
161 | ||
162 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
163 | | --no-cr | --no-c) | |
164 | no_create=yes ;; | |
165 | ||
166 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
167 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
168 | no_recursion=yes ;; | |
169 | ||
170 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
171 | ac_prev=prefix ;; | |
172 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
173 | prefix="$ac_optarg" ;; | |
174 | ||
175 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
176 | | --program-pre | --program-pr | --program-p) | |
177 | ac_prev=program_prefix ;; | |
178 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
179 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
180 | program_prefix="$ac_optarg" ;; | |
181 | ||
182 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
183 | | --program-suf | --program-su | --program-s) | |
184 | ac_prev=program_suffix ;; | |
185 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
186 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
187 | program_suffix="$ac_optarg" ;; | |
188 | ||
189 | -program-transform-name | --program-transform-name \ | |
190 | | --program-transform-nam | --program-transform-na \ | |
191 | | --program-transform-n | --program-transform- \ | |
192 | | --program-transform | --program-transfor \ | |
193 | | --program-transfo | --program-transf \ | |
194 | | --program-trans | --program-tran \ | |
195 | | --progr-tra | --program-tr | --program-t) | |
196 | ac_prev=program_transform_name ;; | |
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 | program_transform_name="$ac_optarg" ;; | |
205 | ||
206 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
207 | | -silent | --silent | --silen | --sile | --sil) | |
208 | silent=yes ;; | |
209 | ||
210 | -site | --site | --sit) | |
211 | ac_prev=site ;; | |
212 | -site=* | --site=* | --sit=*) | |
213 | site="$ac_optarg" ;; | |
214 | ||
215 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
216 | ac_prev=srcdir ;; | |
217 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
218 | srcdir="$ac_optarg" ;; | |
219 | ||
220 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
221 | ac_prev=target ;; | |
222 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
223 | target="$ac_optarg" ;; | |
224 | ||
225 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
226 | verbose=yes ;; | |
227 | ||
228 | -version | --version | --versio | --versi | --vers) | |
da3d57e3 | 229 | echo "configure generated by autoconf version 2.4" |
5436fc65 C |
230 | exit 0 ;; |
231 | ||
232 | -with-* | --with-*) | |
233 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
234 | # Reject names that are not valid shell variable names. | |
235 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
236 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
237 | fi | |
238 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
239 | case "$ac_option" in | |
240 | *=*) ;; | |
241 | *) ac_optarg=yes ;; | |
242 | esac | |
243 | eval "with_${ac_package}='$ac_optarg'" ;; | |
244 | ||
245 | -without-* | --without-*) | |
246 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
247 | # Reject names that are not valid shell variable names. | |
248 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
249 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
250 | fi | |
251 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
252 | eval "with_${ac_package}=no" ;; | |
253 | ||
254 | --x) | |
255 | # Obsolete; use --with-x. | |
256 | with_x=yes ;; | |
257 | ||
258 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
259 | | --x-incl | --x-inc | --x-in | --x-i) | |
260 | ac_prev=x_includes ;; | |
261 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
262 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
263 | x_includes="$ac_optarg" ;; | |
264 | ||
265 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
266 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
267 | ac_prev=x_libraries ;; | |
268 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
269 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
270 | x_libraries="$ac_optarg" ;; | |
271 | ||
272 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
273 | ;; | |
274 | ||
275 | *) | |
276 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
277 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
278 | fi | |
279 | if test "x$nonopt" != xNONE; then | |
280 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
281 | fi | |
282 | nonopt="$ac_option" | |
283 | ;; | |
284 | ||
285 | esac | |
286 | done | |
287 | ||
288 | if test -n "$ac_prev"; then | |
289 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
290 | fi | |
291 | ||
292 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
293 | ||
294 | # File descriptor usage: | |
295 | # 0 standard input | |
296 | # 1 file creation | |
297 | # 2 errors and warnings | |
298 | # 3 some systems may open it to /dev/tty | |
299 | # 4 used on the Kubota Titan | |
300 | # 6 checking for... messages and results | |
301 | # 5 compiler messages saved in config.log | |
302 | if test "$silent" = yes; then | |
303 | exec 6>/dev/null | |
304 | else | |
305 | exec 6>&1 | |
306 | fi | |
307 | exec 5>./config.log | |
308 | ||
309 | echo "\ | |
310 | This file contains any messages produced by compilers while | |
311 | running configure, to aid debugging if configure makes a mistake. | |
312 | " 1>&5 | |
313 | ||
314 | # Strip out --no-create and --no-recursion so they do not pile up. | |
315 | # Also quote any args containing shell metacharacters. | |
316 | ac_configure_args= | |
317 | for ac_arg | |
318 | do | |
319 | case "$ac_arg" in | |
320 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
321 | | --no-cr | --no-c) ;; | |
322 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
323 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
324 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
325 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
326 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
327 | esac | |
328 | done | |
329 | ||
330 | # NLS nuisances. | |
331 | # Only set LANG and LC_ALL to C if already set. | |
332 | # These must not be set unconditionally because not all systems understand | |
333 | # e.g. LANG=C (notably SCO). | |
334 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
335 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
336 | ||
337 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
338 | rm -rf conftest* confdefs.h | |
339 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
340 | echo > confdefs.h | |
341 | ||
342 | # A filename unique to this package, relative to the directory that | |
343 | # configure is in, which we can look for to find out if srcdir is correct. | |
344 | ac_unique_file=main.c | |
345 | ||
346 | # Find the source files, if location was not specified. | |
347 | if test -z "$srcdir"; then | |
348 | ac_srcdir_defaulted=yes | |
349 | # Try the directory containing this script, then its parent. | |
350 | ac_prog=$0 | |
351 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
352 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
353 | srcdir=$ac_confdir | |
354 | if test ! -r $srcdir/$ac_unique_file; then | |
355 | srcdir=.. | |
356 | fi | |
357 | else | |
358 | ac_srcdir_defaulted=no | |
359 | fi | |
360 | if test ! -r $srcdir/$ac_unique_file; then | |
361 | if test "$ac_srcdir_defaulted" = yes; then | |
362 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
363 | else | |
364 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
365 | fi | |
366 | fi | |
367 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
368 | ||
369 | # Prefer explicitly selected file to automatically selected ones. | |
370 | if test -z "$CONFIG_SITE"; then | |
371 | if test "x$prefix" != xNONE; then | |
372 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
373 | else | |
374 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
375 | fi | |
376 | fi | |
377 | for ac_site_file in $CONFIG_SITE; do | |
378 | if test -r "$ac_site_file"; then | |
379 | echo "loading site script $ac_site_file" | |
380 | . "$ac_site_file" | |
381 | fi | |
382 | done | |
383 | ||
384 | if test -r "$cache_file"; then | |
385 | echo "loading cache $cache_file" | |
386 | . $cache_file | |
387 | else | |
388 | echo "creating cache $cache_file" | |
389 | > $cache_file | |
390 | fi | |
391 | ||
392 | ac_ext=c | |
393 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
da3d57e3 JM |
394 | ac_cpp='$CPP $CPPFLAGS' |
395 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' | |
396 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' | |
5436fc65 C |
397 | |
398 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
399 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
400 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
401 | ac_n= ac_c=' | |
402 | ' ac_t=' ' | |
403 | else | |
404 | ac_n=-n ac_c= ac_t= | |
405 | fi | |
406 | else | |
407 | ac_n= ac_c='\c' ac_t= | |
408 | fi | |
409 | ||
410 | ||
411 | ||
412 | CC=${CC-cc} | |
413 | # Extract the first word of "gcc", so it can be a program name with args. | |
414 | set dummy gcc; ac_word=$2 | |
415 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
416 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
417 | echo $ac_n "(cached) $ac_c" 1>&6 | |
418 | else | |
419 | if test -n "$CC"; then | |
420 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
421 | else | |
422 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 423 | for ac_dir in $PATH; do |
5436fc65 C |
424 | test -z "$ac_dir" && ac_dir=. |
425 | if test -f $ac_dir/$ac_word; then | |
426 | ac_cv_prog_CC="gcc" | |
427 | break | |
428 | fi | |
429 | done | |
430 | IFS="$ac_save_ifs" | |
431 | test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" | |
432 | fi | |
433 | fi | |
434 | CC="$ac_cv_prog_CC" | |
435 | if test -n "$CC"; then | |
436 | echo "$ac_t""$CC" 1>&6 | |
437 | else | |
438 | echo "$ac_t""no" 1>&6 | |
439 | fi | |
440 | ||
441 | ||
442 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
443 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
444 | echo $ac_n "(cached) $ac_c" 1>&6 | |
445 | else | |
446 | cat > conftest.c <<EOF | |
447 | #ifdef __GNUC__ | |
448 | yes; | |
449 | #endif | |
450 | EOF | |
451 | if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then | |
452 | ac_cv_prog_gcc=yes | |
453 | else | |
454 | ac_cv_prog_gcc=no | |
455 | fi | |
456 | fi | |
457 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
458 | if test $ac_cv_prog_gcc = yes; then | |
459 | GCC=yes | |
460 | if test "${CFLAGS+set}" != set; then | |
461 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
462 | if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then | |
463 | echo $ac_n "(cached) $ac_c" 1>&6 | |
464 | else | |
465 | echo 'void f(){}' > conftest.c | |
466 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
467 | ac_cv_prog_gcc_g=yes | |
468 | else | |
469 | ac_cv_prog_gcc_g=no | |
470 | fi | |
471 | rm -f conftest* | |
472 | ||
473 | fi | |
da3d57e3 | 474 | echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 |
5436fc65 C |
475 | if test $ac_cv_prog_gcc_g = yes; then |
476 | CFLAGS="-g -O" | |
477 | else | |
478 | CFLAGS="-O" | |
479 | fi | |
480 | fi | |
481 | else | |
482 | GCC= | |
483 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
484 | fi | |
485 | ||
486 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
487 | # On Suns, sometimes $CPP names a directory. | |
488 | if test -n "$CPP" && test -d "$CPP"; then | |
489 | CPP= | |
490 | fi | |
491 | if test -z "$CPP"; then | |
492 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
494 | else | |
495 | # This must be in double quotes, not single quotes, because CPP may get | |
496 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
497 | CPP="${CC-cc} -E" | |
498 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
499 | # not just through cpp. | |
500 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 501 | #line 502 "configure" |
5436fc65 C |
502 | #include "confdefs.h" |
503 | #include <assert.h> | |
504 | Syntax Error | |
505 | EOF | |
506 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
507 | ac_err=`grep -v '^ *+' conftest.out` | |
508 | if test -z "$ac_err"; then | |
509 | : | |
510 | else | |
511 | echo "$ac_err" >&5 | |
512 | rm -rf conftest* | |
513 | CPP="${CC-cc} -E -traditional-cpp" | |
514 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 515 | #line 516 "configure" |
5436fc65 C |
516 | #include "confdefs.h" |
517 | #include <assert.h> | |
518 | Syntax Error | |
519 | EOF | |
520 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
521 | ac_err=`grep -v '^ *+' conftest.out` | |
522 | if test -z "$ac_err"; then | |
523 | : | |
524 | else | |
525 | echo "$ac_err" >&5 | |
526 | rm -rf conftest* | |
527 | CPP=/lib/cpp | |
528 | fi | |
529 | rm -f conftest* | |
530 | fi | |
531 | rm -f conftest* | |
532 | ac_cv_prog_CPP="$CPP" | |
533 | fi | |
dedcc91d SC |
534 | CPP="$ac_cv_prog_CPP" |
535 | else | |
536 | ac_cv_prog_CPP="$CPP" | |
5436fc65 | 537 | fi |
5436fc65 C |
538 | echo "$ac_t""$CPP" 1>&6 |
539 | ||
540 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
541 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 542 | #line 543 "configure" |
5436fc65 C |
543 | #include "confdefs.h" |
544 | #ifdef _AIX | |
545 | yes | |
546 | #endif | |
547 | ||
548 | EOF | |
549 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
550 | egrep "yes" >/dev/null 2>&1; then | |
551 | rm -rf conftest* | |
552 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
553 | #define _ALL_SOURCE 1 | |
554 | EOF | |
555 | ||
556 | else | |
557 | rm -rf conftest* | |
558 | echo "$ac_t""no" 1>&6 | |
559 | fi | |
560 | rm -f conftest* | |
561 | ||
562 | ||
563 | ac_safe=`echo "minix/config.h" | tr './\055' '___'` | |
564 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 | |
565 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
566 | echo $ac_n "(cached) $ac_c" 1>&6 | |
567 | else | |
568 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 569 | #line 570 "configure" |
5436fc65 C |
570 | #include "confdefs.h" |
571 | #include <minix/config.h> | |
572 | EOF | |
573 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
574 | ac_err=`grep -v '^ *+' conftest.out` | |
575 | if test -z "$ac_err"; then | |
576 | rm -rf conftest* | |
577 | eval "ac_cv_header_$ac_safe=yes" | |
578 | else | |
579 | echo "$ac_err" >&5 | |
580 | rm -rf conftest* | |
581 | eval "ac_cv_header_$ac_safe=no" | |
582 | fi | |
583 | rm -f conftest* | |
584 | fi | |
585 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
586 | echo "$ac_t""yes" 1>&6 | |
587 | MINIX=yes | |
588 | else | |
589 | echo "$ac_t""no" 1>&6 | |
590 | MINIX= | |
591 | fi | |
592 | ||
593 | if test "$MINIX" = yes; then | |
594 | cat >> confdefs.h <<\EOF | |
595 | #define _POSIX_SOURCE 1 | |
596 | EOF | |
597 | ||
598 | cat >> confdefs.h <<\EOF | |
599 | #define _POSIX_1_SOURCE 2 | |
600 | EOF | |
601 | ||
602 | cat >> confdefs.h <<\EOF | |
603 | #define _MINIX 1 | |
604 | EOF | |
605 | ||
606 | fi | |
607 | ||
608 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
609 | if test -d /etc/conf/kconfig.d && | |
610 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
611 | then | |
612 | echo "$ac_t""yes" 1>&6 | |
613 | ISC=yes # If later tests want to check for ISC. | |
614 | cat >> confdefs.h <<\EOF | |
615 | #define _POSIX_SOURCE 1 | |
616 | EOF | |
617 | ||
618 | if test "$GCC" = yes; then | |
619 | CC="$CC -posix" | |
620 | else | |
621 | CC="$CC -Xp" | |
622 | fi | |
623 | else | |
624 | echo "$ac_t""no" 1>&6 | |
625 | ISC= | |
626 | fi | |
627 | ||
628 | ||
629 | ac_aux_dir= | |
630 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
631 | if test -f $ac_dir/install-sh; then | |
632 | ac_aux_dir=$ac_dir | |
633 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
634 | break | |
635 | elif test -f $ac_dir/install.sh; then | |
636 | ac_aux_dir=$ac_dir | |
637 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
638 | break | |
639 | fi | |
640 | done | |
641 | if test -z "$ac_aux_dir"; then | |
642 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
643 | fi | |
644 | ac_config_guess=$ac_aux_dir/config.guess | |
645 | ac_config_sub=$ac_aux_dir/config.sub | |
646 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
647 | ||
648 | # Find a good install program. We prefer a C program (faster), | |
649 | # so one script is as good as another. But avoid the broken or | |
650 | # incompatible versions: | |
651 | # SysV /etc/install, /usr/sbin/install | |
652 | # SunOS /usr/etc/install | |
653 | # IRIX /sbin/install | |
654 | # AIX /bin/install | |
655 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
656 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
657 | # ./install, which can be erroneously created by make from ./install.sh. | |
658 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
659 | if test -z "$INSTALL"; then | |
660 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
661 | echo $ac_n "(cached) $ac_c" 1>&6 | |
662 | else | |
663 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
664 | for ac_dir in $PATH; do | |
665 | # Account for people who put trailing slashes in PATH elements. | |
666 | case "$ac_dir/" in | |
667 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
668 | *) | |
669 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
670 | for ac_prog in ginstall installbsd scoinst install; do | |
671 | if test -f $ac_dir/$ac_prog; then | |
672 | if test $ac_prog = install && | |
673 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
674 | # AIX install. It has an incompatible calling convention. | |
675 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
676 | : | |
677 | else | |
678 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
679 | break 2 | |
680 | fi | |
681 | fi | |
682 | done | |
683 | ;; | |
684 | esac | |
685 | done | |
686 | IFS="$ac_save_ifs" | |
da3d57e3 JM |
687 | # As a last resort, use the slow shell script. |
688 | test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" | |
5436fc65 | 689 | fi |
da3d57e3 | 690 | INSTALL="$ac_cv_path_install" |
5436fc65 C |
691 | fi |
692 | echo "$ac_t""$INSTALL" 1>&6 | |
693 | ||
694 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
695 | # It thinks the first close brace ends the variable substitution. | |
696 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
697 | ||
698 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
699 | ||
700 | # Extract the first word of "ranlib", so it can be a program name with args. | |
701 | set dummy ranlib; ac_word=$2 | |
702 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
703 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
704 | echo $ac_n "(cached) $ac_c" 1>&6 | |
705 | else | |
706 | if test -n "$RANLIB"; then | |
707 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
708 | else | |
709 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
da3d57e3 | 710 | for ac_dir in $PATH; do |
5436fc65 C |
711 | test -z "$ac_dir" && ac_dir=. |
712 | if test -f $ac_dir/$ac_word; then | |
713 | ac_cv_prog_RANLIB="ranlib" | |
714 | break | |
715 | fi | |
716 | done | |
717 | IFS="$ac_save_ifs" | |
718 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
719 | fi | |
720 | fi | |
721 | RANLIB="$ac_cv_prog_RANLIB" | |
722 | if test -n "$RANLIB"; then | |
723 | echo "$ac_t""$RANLIB" 1>&6 | |
724 | else | |
725 | echo "$ac_t""no" 1>&6 | |
726 | fi | |
727 | ||
204c8825 FF |
728 | for ac_prog in 'bison -y' byacc |
729 | do | |
730 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
731 | set dummy $ac_prog; ac_word=$2 | |
732 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
733 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then | |
734 | echo $ac_n "(cached) $ac_c" 1>&6 | |
735 | else | |
736 | if test -n "$YACC"; then | |
737 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
738 | else | |
739 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
740 | for ac_dir in $PATH; do | |
741 | test -z "$ac_dir" && ac_dir=. | |
742 | if test -f $ac_dir/$ac_word; then | |
743 | ac_cv_prog_YACC="$ac_prog" | |
744 | break | |
745 | fi | |
746 | done | |
747 | IFS="$ac_save_ifs" | |
748 | fi | |
749 | fi | |
750 | YACC="$ac_cv_prog_YACC" | |
751 | if test -n "$YACC"; then | |
752 | echo "$ac_t""$YACC" 1>&6 | |
753 | else | |
754 | echo "$ac_t""no" 1>&6 | |
755 | fi | |
756 | ||
757 | test -n "$YACC" && break | |
758 | done | |
759 | test -n "$YACC" || YACC="yacc" | |
760 | ||
5436fc65 C |
761 | |
762 | ac_aux_dir= | |
763 | for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do | |
764 | if test -f $ac_dir/install-sh; then | |
765 | ac_aux_dir=$ac_dir | |
766 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
767 | break | |
768 | elif test -f $ac_dir/install.sh; then | |
769 | ac_aux_dir=$ac_dir | |
770 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
771 | break | |
772 | fi | |
773 | done | |
774 | if test -z "$ac_aux_dir"; then | |
775 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
776 | fi | |
777 | ac_config_guess=$ac_aux_dir/config.guess | |
778 | ac_config_sub=$ac_aux_dir/config.sub | |
779 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
780 | ||
781 | ||
782 | # Do some error checking and defaulting for the host and target type. | |
783 | # The inputs are: | |
784 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
785 | # | |
786 | # The rules are: | |
787 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
788 | # same time. | |
789 | # 2. Host defaults to nonopt. | |
790 | # 3. If nonopt is not specified, then host defaults to the current host, | |
791 | # as determined by config.guess. | |
792 | # 4. Target and build default to nonopt. | |
793 | # 5. If nonopt is not specified, then target and build default to host. | |
794 | ||
795 | # The aliases save the names the user supplied, while $host etc. | |
796 | # will get canonicalized. | |
797 | case $host---$target---$nonopt in | |
798 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
799 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
800 | esac | |
801 | ||
802 | ||
803 | # Make sure we can run config.sub. | |
804 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
805 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
806 | fi | |
807 | ||
808 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
809 | ||
810 | host_alias=$host | |
811 | case "$host_alias" in | |
812 | NONE) | |
813 | case $nonopt in | |
814 | NONE) | |
815 | if host_alias=`$ac_config_guess`; then : | |
816 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
817 | fi ;; | |
818 | *) host_alias=$nonopt ;; | |
819 | esac ;; | |
820 | esac | |
821 | ||
822 | host=`$ac_config_sub $host_alias` | |
823 | host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
824 | host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
825 | host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
826 | echo "$ac_t""$host" 1>&6 | |
827 | ||
828 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
829 | ||
830 | target_alias=$target | |
831 | case "$target_alias" in | |
832 | NONE) | |
833 | case $nonopt in | |
834 | NONE) target_alias=$host_alias ;; | |
835 | *) target_alias=$nonopt ;; | |
836 | esac ;; | |
837 | esac | |
838 | ||
839 | target=`$ac_config_sub $target_alias` | |
840 | target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
841 | target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
842 | target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
843 | echo "$ac_t""$target" 1>&6 | |
844 | ||
845 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
846 | ||
847 | build_alias=$build | |
848 | case "$build_alias" in | |
849 | NONE) | |
850 | case $nonopt in | |
851 | NONE) build_alias=$host_alias ;; | |
852 | *) build_alias=$nonopt ;; | |
853 | esac ;; | |
854 | esac | |
855 | ||
856 | build=`$ac_config_sub $build_alias` | |
857 | build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
858 | build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
859 | build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
860 | echo "$ac_t""$build" 1>&6 | |
861 | ||
862 | test "$host_alias" != "$target_alias" && | |
863 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
864 | NONENONEs,x,x, && | |
865 | program_prefix=${target_alias}- | |
866 | ||
867 | if test "$program_transform_name" = s,x,x,; then | |
868 | program_transform_name= | |
869 | else | |
870 | # Double any \ or $. | |
871 | echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed | |
872 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
873 | rm -f conftestsed | |
874 | fi | |
875 | test "$program_prefix" != NONE && | |
876 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
877 | # Use a double $ so make ignores it. | |
878 | test "$program_suffix" != NONE && | |
879 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
880 | ||
881 | # sed with no file args requires a program. | |
882 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
883 | ||
884 | ||
2b576293 C |
885 | # If we cannot run a trivial program, we must be cross compiling. |
886 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 | |
887 | if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then | |
888 | echo $ac_n "(cached) $ac_c" 1>&6 | |
889 | else | |
890 | if test "$cross_compiling" = yes; then | |
891 | ac_cv_c_cross=yes | |
892 | else | |
893 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 894 | #line 895 "configure" |
2b576293 C |
895 | #include "confdefs.h" |
896 | main(){return(0);} | |
897 | EOF | |
898 | eval $ac_link | |
899 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
900 | ac_cv_c_cross=no | |
901 | else | |
902 | ac_cv_c_cross=yes | |
903 | fi | |
904 | fi | |
905 | rm -fr conftest* | |
906 | fi | |
188c635f | 907 | cross_compiling=$ac_cv_c_cross |
da3d57e3 | 908 | echo "$ac_t""$ac_cv_c_cross" 1>&6 |
2b576293 C |
909 | |
910 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
911 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |
912 | echo $ac_n "(cached) $ac_c" 1>&6 | |
913 | else | |
914 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 915 | #line 916 "configure" |
2b576293 C |
916 | #include "confdefs.h" |
917 | #include <stdlib.h> | |
918 | #include <stdarg.h> | |
919 | #include <string.h> | |
920 | #include <float.h> | |
921 | EOF | |
922 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
923 | ac_err=`grep -v '^ *+' conftest.out` | |
924 | if test -z "$ac_err"; then | |
925 | rm -rf conftest* | |
926 | ac_cv_header_stdc=yes | |
927 | else | |
928 | echo "$ac_err" >&5 | |
929 | rm -rf conftest* | |
930 | ac_cv_header_stdc=no | |
931 | fi | |
932 | rm -f conftest* | |
933 | ||
934 | if test $ac_cv_header_stdc = yes; then | |
935 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
936 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 937 | #line 938 "configure" |
2b576293 C |
938 | #include "confdefs.h" |
939 | #include <string.h> | |
940 | EOF | |
941 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
942 | egrep "memchr" >/dev/null 2>&1; then | |
943 | : | |
944 | else | |
945 | rm -rf conftest* | |
946 | ac_cv_header_stdc=no | |
947 | fi | |
948 | rm -f conftest* | |
949 | ||
950 | fi | |
951 | ||
952 | if test $ac_cv_header_stdc = yes; then | |
953 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
954 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 955 | #line 956 "configure" |
2b576293 C |
956 | #include "confdefs.h" |
957 | #include <stdlib.h> | |
958 | EOF | |
959 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
960 | egrep "free" >/dev/null 2>&1; then | |
961 | : | |
962 | else | |
963 | rm -rf conftest* | |
964 | ac_cv_header_stdc=no | |
965 | fi | |
966 | rm -f conftest* | |
967 | ||
968 | fi | |
969 | ||
970 | if test $ac_cv_header_stdc = yes; then | |
971 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
972 | if test "$cross_compiling" = yes; then | |
973 | ac_cv_header_stdc=no | |
974 | else | |
975 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 976 | #line 977 "configure" |
2b576293 C |
977 | #include "confdefs.h" |
978 | #include <ctype.h> | |
979 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
980 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
981 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
982 | int main () { int i; for (i = 0; i < 256; i++) | |
983 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
984 | exit (0); } | |
985 | ||
986 | EOF | |
987 | eval $ac_link | |
988 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
989 | : | |
990 | else | |
991 | ac_cv_header_stdc=no | |
992 | fi | |
993 | fi | |
994 | rm -fr conftest* | |
995 | fi | |
996 | fi | |
997 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
998 | if test $ac_cv_header_stdc = yes; then | |
999 | cat >> confdefs.h <<\EOF | |
1000 | #define STDC_HEADERS 1 | |
1001 | EOF | |
1002 | ||
1003 | fi | |
1004 | ||
da3d57e3 | 1005 | for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h |
1a494973 C |
1006 | do |
1007 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
1008 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1009 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1010 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1011 | else | |
1012 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1013 | #line 1014 "configure" |
1a494973 C |
1014 | #include "confdefs.h" |
1015 | #include <$ac_hdr> | |
1016 | EOF | |
1017 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1018 | ac_err=`grep -v '^ *+' conftest.out` | |
1019 | if test -z "$ac_err"; then | |
1020 | rm -rf conftest* | |
1021 | eval "ac_cv_header_$ac_safe=yes" | |
1022 | else | |
1023 | echo "$ac_err" >&5 | |
1024 | rm -rf conftest* | |
1025 | eval "ac_cv_header_$ac_safe=no" | |
1026 | fi | |
1027 | rm -f conftest* | |
1028 | fi | |
1029 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1030 | echo "$ac_t""yes" 1>&6 | |
da3d57e3 | 1031 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` |
1a494973 C |
1032 | cat >> confdefs.h <<EOF |
1033 | #define $ac_tr_hdr 1 | |
1034 | EOF | |
1035 | ||
1036 | else | |
1037 | echo "$ac_t""no" 1>&6 | |
1038 | fi | |
1039 | done | |
1040 | ||
2b576293 C |
1041 | echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 |
1042 | if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then | |
1043 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1044 | else | |
1045 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1046 | #line 1047 "configure" |
2b576293 C |
1047 | #include "confdefs.h" |
1048 | #include <sys/types.h> | |
1049 | #include <sys/stat.h> | |
1050 | ||
1051 | #if defined(S_ISBLK) && defined(S_IFDIR) | |
1052 | # if S_ISBLK (S_IFDIR) | |
1053 | You lose. | |
1054 | # endif | |
1055 | #endif | |
1056 | ||
1057 | #if defined(S_ISBLK) && defined(S_IFCHR) | |
1058 | # if S_ISBLK (S_IFCHR) | |
1059 | You lose. | |
1060 | # endif | |
1061 | #endif | |
1062 | ||
1063 | #if defined(S_ISLNK) && defined(S_IFREG) | |
1064 | # if S_ISLNK (S_IFREG) | |
1065 | You lose. | |
1066 | # endif | |
1067 | #endif | |
1068 | ||
1069 | #if defined(S_ISSOCK) && defined(S_IFREG) | |
1070 | # if S_ISSOCK (S_IFREG) | |
1071 | You lose. | |
1072 | # endif | |
1073 | #endif | |
1074 | ||
1075 | EOF | |
1076 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1077 | egrep "You lose" >/dev/null 2>&1; then | |
1078 | rm -rf conftest* | |
1079 | ac_cv_header_stat_broken=yes | |
1080 | else | |
1081 | rm -rf conftest* | |
1082 | ac_cv_header_stat_broken=no | |
1083 | fi | |
1084 | rm -f conftest* | |
1085 | ||
1086 | fi | |
1087 | echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 | |
1088 | if test $ac_cv_header_stat_broken = yes; then | |
1089 | cat >> confdefs.h <<\EOF | |
1090 | #define STAT_MACROS_BROKEN 1 | |
1091 | EOF | |
1092 | ||
1093 | fi | |
1094 | ||
1095 | ||
1096 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
1097 | if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then | |
1098 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1099 | else | |
1100 | if test "$cross_compiling" = yes; then | |
1101 | ac_cv_func_mmap=no | |
1102 | else | |
1103 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1104 | #line 1105 "configure" |
2b576293 C |
1105 | #include "confdefs.h" |
1106 | ||
1107 | /* Thanks to Mike Haertel and Jim Avera for this test. */ | |
1108 | #include <sys/types.h> | |
1109 | #include <fcntl.h> | |
1110 | #include <sys/mman.h> | |
1111 | ||
1112 | #ifdef BSD | |
1113 | # ifndef BSD4_1 | |
1114 | # define HAVE_GETPAGESIZE | |
1115 | # endif | |
1116 | #endif | |
1117 | ||
1118 | #ifndef HAVE_GETPAGESIZE | |
1119 | # include <sys/param.h> | |
1120 | # ifdef EXEC_PAGESIZE | |
1121 | # define getpagesize() EXEC_PAGESIZE | |
1122 | # else | |
1123 | # ifdef NBPG | |
1124 | # define getpagesize() NBPG * CLSIZE | |
1125 | # ifndef CLSIZE | |
1126 | # define CLSIZE 1 | |
1127 | # endif | |
1128 | # else | |
1129 | # ifdef NBPC | |
1130 | # define getpagesize() NBPC | |
1131 | # else | |
1132 | # define getpagesize() PAGESIZE /* SVR4 */ | |
1133 | # endif | |
1134 | # endif | |
1135 | # endif | |
1136 | #endif | |
1137 | ||
1138 | #ifdef __osf__ | |
1139 | # define valloc malloc | |
1140 | #endif | |
1141 | ||
1142 | #ifdef __cplusplus | |
1143 | extern "C" { void *valloc(unsigned), *malloc(unsigned); } | |
1144 | #else | |
1145 | char *valloc(), *malloc(); | |
1146 | #endif | |
1147 | ||
1148 | int | |
1149 | main() | |
1150 | { | |
1151 | char *buf1, *buf2, *buf3; | |
1152 | int i = getpagesize(), j; | |
1153 | int i2 = getpagesize()*2; | |
1154 | int fd; | |
1155 | ||
1156 | buf1 = (char *)valloc(i2); | |
1157 | buf2 = (char *)valloc(i); | |
1158 | buf3 = (char *)malloc(i2); | |
1159 | for (j = 0; j < i2; ++j) | |
1160 | *(buf1 + j) = rand(); | |
1161 | fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); | |
1162 | write(fd, buf1, i2); | |
1163 | mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); | |
1164 | for (j = 0; j < i; ++j) | |
1165 | if (*(buf1 + j) != *(buf2 + j)) | |
1166 | exit(1); | |
1167 | lseek(fd, (long)i, 0); | |
1168 | read(fd, buf2, i); /* read into mapped memory -- file should not change */ | |
1169 | /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ | |
1170 | lseek(fd, (long)0, 0); | |
1171 | read(fd, buf3, i2); | |
1172 | for (j = 0; j < i2; ++j) | |
1173 | if (*(buf1 + j) != *(buf3 + j)) | |
1174 | exit(1); | |
1175 | exit(0); | |
1176 | } | |
1177 | ||
1178 | EOF | |
1179 | eval $ac_link | |
1180 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
1181 | ac_cv_func_mmap=yes | |
1182 | else | |
1183 | ac_cv_func_mmap=no | |
1184 | fi | |
1185 | fi | |
1186 | rm -fr conftest* | |
1187 | fi | |
1188 | echo "$ac_t""$ac_cv_func_mmap" 1>&6 | |
1189 | if test $ac_cv_func_mmap = yes; then | |
1190 | cat >> confdefs.h <<\EOF | |
1191 | #define HAVE_MMAP 1 | |
1192 | EOF | |
1193 | ||
1194 | fi | |
1195 | ||
5436fc65 C |
1196 | |
1197 | ENABLE_CFLAGS= | |
1198 | ENABLE_CLIBS= | |
1199 | ENABLE_OBS= | |
1200 | ||
1201 | # Check whether --enable-netrom or --disable-netrom was given. | |
da3d57e3 JM |
1202 | enableval="$enable_netrom" |
1203 | if test -n "$enableval"; then | |
5436fc65 C |
1204 | case "${enableval}" in |
1205 | yes) enable_netrom=yes ;; | |
1206 | no) enable_netrom=no ;; | |
1207 | *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;; | |
1208 | esac | |
1209 | fi | |
1210 | ||
1211 | ||
1212 | if test "${enable_netrom}" = "yes"; then | |
1213 | ENABLE_OBS="${ENABLE_OBS} remote-nrom.o" | |
1214 | fi | |
1215 | ||
188c635f SG |
1216 | # start-sanitize-gm |
1217 | ENABLE_GM= | |
1218 | ||
1219 | # Check whether --enable-gm or --disable-gm was given. | |
da3d57e3 JM |
1220 | enableval="$enable_gm" |
1221 | if test -n "$enableval"; then | |
188c635f SG |
1222 | case "${enableval}" in |
1223 | yes) ENABLE_OBS="${ENABLE_OBS} magic.o" | |
1224 | ENABLE_CFLAGS=-DGENERAL_MAGIC | |
1225 | ;; | |
1226 | no) ;; | |
1227 | *) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;; | |
1228 | esac | |
1229 | fi | |
1230 | ||
1231 | ||
1232 | # end-sanitize-gm | |
1233 | ||
3c0bf315 MM |
1234 | # Check whether --enable-sim-powerpc or --disable-sim-powerpc was given. |
1235 | enableval="$enable_sim_powerpc" | |
1236 | if test -n "$enableval"; then | |
1237 | case "${enableval}" in | |
1238 | yes) powerpc_sim=yes ;; | |
1239 | no) powerpc_sim=no ;; | |
1240 | *) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;; | |
1241 | esac | |
1242 | else | |
1243 | if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi | |
1244 | fi | |
1245 | ||
1246 | ||
5436fc65 C |
1247 | # start-sanitize-gdbtk |
1248 | ENABLE_GDBTK= | |
1249 | ||
1250 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
da3d57e3 JM |
1251 | enableval="$enable_gdbtk" |
1252 | if test -n "$enableval"; then | |
5436fc65 C |
1253 | case "${enableval}" in |
1254 | yes) enable_gdbtk=yes ;; | |
1255 | no) enable_gdbtk=no ;; | |
1256 | *) { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;; | |
1257 | esac | |
1258 | fi | |
1259 | ||
1260 | ||
1261 | if test "${enable_gdbtk}" = "yes"; then | |
a2b63bbd | 1262 | # If we find X, set shell vars x_includes and x_libraries to the |
5436fc65 C |
1263 | # paths, otherwise set no_x=yes. |
1264 | # Uses ac_ vars as temps to allow command line to override cache and checks. | |
1265 | # --without-x overrides everything else, but does not touch the cache. | |
1266 | echo $ac_n "checking for X""... $ac_c" 1>&6 | |
1267 | ||
1268 | # Check whether --with-x or --without-x was given. | |
da3d57e3 JM |
1269 | withval="$with_x" |
1270 | if test -n "$withval"; then | |
5436fc65 C |
1271 | : |
1272 | fi | |
1273 | ||
1274 | if test "x$with_x" = xno; then | |
1275 | no_x=yes | |
1276 | else | |
1277 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
1278 | no_x= | |
1279 | else | |
1280 | if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then | |
1281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1282 | else | |
1283 | # One or both of the vars are not set, and there is no cached value. | |
1284 | no_x=yes | |
1285 | rm -fr conftestdir | |
1286 | if mkdir conftestdir; then | |
1287 | cd conftestdir | |
1288 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. | |
1289 | cat > Imakefile <<'EOF' | |
1290 | acfindx: | |
1291 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
1292 | EOF | |
1293 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then | |
1294 | no_x= | |
1295 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
1296 | eval `make acfindx 2>/dev/null | grep -v make` | |
1297 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
dedcc91d SC |
1298 | for ac_extension in a so sl; do |
1299 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
1300 | test -f $ac_im_libdir/libX11.$ac_extension; then | |
1301 | ac_im_usrlibdir=$ac_im_libdir; break | |
1302 | fi | |
1303 | done | |
5436fc65 C |
1304 | # Screen out bogus values from the imake configuration. |
1305 | case "$ac_im_incroot" in | |
1306 | /usr/include) ;; | |
1307 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; | |
1308 | esac | |
1309 | case "$ac_im_usrlibdir" in | |
1310 | /usr/lib | /lib) ;; | |
1311 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; | |
1312 | esac | |
1313 | fi | |
1314 | cd .. | |
1315 | rm -fr conftestdir | |
1316 | fi | |
1317 | ||
1318 | if test "$no_x" = yes; then | |
1319 | test -z "$x_direct_test_library" && x_direct_test_library=Xt | |
1320 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc | |
1321 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h | |
1322 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1323 | #line 1324 "configure" |
5436fc65 C |
1324 | #include "confdefs.h" |
1325 | #include <$x_direct_test_include> | |
1326 | EOF | |
1327 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1328 | ac_err=`grep -v '^ *+' conftest.out` | |
1329 | if test -z "$ac_err"; then | |
1330 | rm -rf conftest* | |
1331 | no_x= ac_x_includes= | |
1332 | else | |
1333 | echo "$ac_err" >&5 | |
1334 | rm -rf conftest* | |
1335 | for ac_dir in \ | |
1336 | /usr/X11R6/include \ | |
1337 | /usr/X11R5/include \ | |
1338 | /usr/X11R4/include \ | |
1339 | \ | |
1340 | /usr/include/X11R6 \ | |
1341 | /usr/include/X11R5 \ | |
1342 | /usr/include/X11R4 \ | |
1343 | \ | |
1344 | /usr/local/X11R6/include \ | |
1345 | /usr/local/X11R5/include \ | |
1346 | /usr/local/X11R4/include \ | |
1347 | \ | |
1348 | /usr/local/include/X11R6 \ | |
1349 | /usr/local/include/X11R5 \ | |
1350 | /usr/local/include/X11R4 \ | |
1351 | \ | |
1352 | /usr/X11/include \ | |
1353 | /usr/include/X11 \ | |
1354 | /usr/local/X11/include \ | |
1355 | /usr/local/include/X11 \ | |
1356 | \ | |
1357 | /usr/X386/include \ | |
1358 | /usr/x386/include \ | |
1359 | /usr/XFree86/include/X11 \ | |
1360 | \ | |
1361 | /usr/include \ | |
1362 | /usr/local/include \ | |
1363 | /usr/unsupported/include \ | |
1364 | /usr/athena/include \ | |
1365 | /usr/local/x11r5/include \ | |
1366 | /usr/lpp/Xamples/include \ | |
1367 | \ | |
1368 | /usr/openwin/include \ | |
1369 | /usr/openwin/share/include \ | |
1370 | ; \ | |
1371 | do | |
1372 | if test -r "$ac_dir/$x_direct_test_include"; then | |
1373 | no_x= ac_x_includes=$ac_dir | |
1374 | break | |
1375 | fi | |
1376 | done | |
1377 | fi | |
1378 | rm -f conftest* | |
1379 | ||
1380 | # Check for the libraries. | |
1381 | # See if we find them without any special options. | |
1382 | # Don't add to $LIBS permanently. | |
1383 | ac_save_LIBS="$LIBS" | |
1384 | LIBS="-l$x_direct_test_library $LIBS" | |
1385 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1386 | #line 1387 "configure" |
5436fc65 C |
1387 | #include "confdefs.h" |
1388 | ||
1389 | int main() { return 0; } | |
1390 | int t() { | |
1391 | ${x_direct_test_function}() | |
1392 | ; return 0; } | |
1393 | EOF | |
1394 | if eval $ac_link; then | |
1395 | rm -rf conftest* | |
1396 | LIBS="$ac_save_LIBS" no_x= ac_x_libraries= | |
1397 | else | |
1398 | rm -rf conftest* | |
1399 | LIBS="$ac_save_LIBS" | |
1400 | # First see if replacing the include by lib works. | |
1401 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ | |
1402 | /usr/X11R6/lib \ | |
1403 | /usr/X11R5/lib \ | |
1404 | /usr/X11R4/lib \ | |
1405 | \ | |
1406 | /usr/lib/X11R6 \ | |
1407 | /usr/lib/X11R5 \ | |
1408 | /usr/lib/X11R4 \ | |
1409 | \ | |
1410 | /usr/local/X11R6/lib \ | |
1411 | /usr/local/X11R5/lib \ | |
1412 | /usr/local/X11R4/lib \ | |
1413 | \ | |
1414 | /usr/local/lib/X11R6 \ | |
1415 | /usr/local/lib/X11R5 \ | |
1416 | /usr/local/lib/X11R4 \ | |
1417 | \ | |
1418 | /usr/X11/lib \ | |
1419 | /usr/lib/X11 \ | |
1420 | /usr/local/X11/lib \ | |
1421 | /usr/local/lib/X11 \ | |
1422 | \ | |
1423 | /usr/X386/lib \ | |
1424 | /usr/x386/lib \ | |
1425 | /usr/XFree86/lib/X11 \ | |
1426 | \ | |
1427 | /usr/lib \ | |
1428 | /usr/local/lib \ | |
1429 | /usr/unsupported/lib \ | |
1430 | /usr/athena/lib \ | |
1431 | /usr/local/x11r5/lib \ | |
1432 | /usr/lpp/Xamples/lib \ | |
1433 | \ | |
1434 | /usr/openwin/lib \ | |
1435 | /usr/openwin/share/lib \ | |
1436 | ; \ | |
1437 | do | |
1438 | for ac_extension in a so sl; do | |
1439 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then | |
1440 | no_x= ac_x_libraries=$ac_dir | |
1441 | break 2 | |
1442 | fi | |
1443 | done | |
1444 | done | |
1445 | fi | |
1446 | rm -f conftest* | |
1447 | ||
1448 | fi | |
1449 | if test "$no_x" = yes; then | |
1450 | ac_cv_path_x="no_x=yes" | |
1451 | else | |
1452 | ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" | |
1453 | fi | |
1454 | fi | |
1455 | fi | |
1456 | eval "$ac_cv_path_x" | |
1457 | fi # $with_x != no | |
1458 | ||
1459 | if test "$no_x" = yes; then | |
1460 | echo "$ac_t""no" 1>&6 | |
1461 | else | |
1462 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
1463 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
1464 | ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
1465 | echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 | |
1466 | fi | |
1467 | ||
a2b63bbd | 1468 | if test "$no_x" = yes; then |
5436fc65 C |
1469 | # Not all programs may use this symbol, but it does not hurt to define it. |
1470 | X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING" | |
1471 | else | |
1472 | if test -n "$x_includes"; then | |
1473 | X_CFLAGS="$X_CFLAGS -I$x_includes" | |
1474 | fi | |
1475 | ||
1476 | # It would be nice to have a more robust check for the -R ld option than | |
1477 | # just checking for Solaris. | |
1478 | # It would also be nice to do this for all -L options, not just this one. | |
1479 | if test -n "$x_libraries"; then | |
1480 | X_LIBS="$X_LIBS -L$x_libraries" | |
1481 | if test "`(uname) 2>/dev/null`" = SunOS && | |
1482 | uname -r | grep '^5' >/dev/null; then | |
1483 | X_LIBS="$X_LIBS -R$x_libraries" | |
1484 | fi | |
1485 | fi | |
1486 | ||
1487 | # Check for libraries that X11R6 Xt/Xaw programs need. | |
1488 | ||
1489 | ac_save_LDFLAGS="$LDFLAGS" | |
1490 | LDFLAGS="$LDFLAGS -L$x_libraries" | |
1491 | # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to | |
1492 | # check for ICE first), but we must link in the order -lSM -lICE or | |
1493 | # we get undefined symbols. So assume we have SM if we have ICE. | |
1494 | # These have to be linked with before -lX11, unlike the other | |
1495 | # libraries we check for below, so use a different variable. | |
1496 | # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. | |
1497 | echo $ac_n "checking for -lICE""... $ac_c" 1>&6 | |
da3d57e3 | 1498 | if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then |
5436fc65 C |
1499 | echo $ac_n "(cached) $ac_c" 1>&6 |
1500 | else | |
1501 | ac_save_LIBS="$LIBS" | |
1502 | LIBS="-lICE $LIBS" | |
1503 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1504 | #line 1505 "configure" |
5436fc65 C |
1505 | #include "confdefs.h" |
1506 | ||
1507 | int main() { return 0; } | |
1508 | int t() { | |
1509 | IceConnectionNumber() | |
1510 | ; return 0; } | |
1511 | EOF | |
1512 | if eval $ac_link; then | |
1513 | rm -rf conftest* | |
da3d57e3 | 1514 | eval "ac_cv_lib_ICE=yes" |
5436fc65 C |
1515 | else |
1516 | rm -rf conftest* | |
da3d57e3 | 1517 | eval "ac_cv_lib_ICE=no" |
5436fc65 C |
1518 | fi |
1519 | rm -f conftest* | |
1520 | LIBS="$ac_save_LIBS" | |
1521 | ||
1522 | fi | |
da3d57e3 | 1523 | if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then |
5436fc65 C |
1524 | echo "$ac_t""yes" 1>&6 |
1525 | X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" | |
1526 | else | |
1527 | echo "$ac_t""no" 1>&6 | |
1528 | fi | |
1529 | ||
1530 | LDFLAGS="$ac_save_LDFLAGS" | |
1531 | ||
1532 | # Check for system-dependent libraries X programs must link with. | |
1533 | ||
1534 | if test "$ISC" = yes; then | |
1535 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" | |
1536 | else | |
1537 | # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X | |
1538 | # libraries were built with DECnet support. And karl@cs.umb.edu says | |
1539 | # the Alpha needs dnet_stub (dnet does not exist). | |
1540 | echo $ac_n "checking for -ldnet""... $ac_c" 1>&6 | |
da3d57e3 | 1541 | if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then |
5436fc65 C |
1542 | echo $ac_n "(cached) $ac_c" 1>&6 |
1543 | else | |
1544 | ac_save_LIBS="$LIBS" | |
1545 | LIBS="-ldnet $LIBS" | |
1546 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1547 | #line 1548 "configure" |
5436fc65 C |
1548 | #include "confdefs.h" |
1549 | ||
1550 | int main() { return 0; } | |
1551 | int t() { | |
1552 | dnet_ntoa() | |
1553 | ; return 0; } | |
1554 | EOF | |
1555 | if eval $ac_link; then | |
1556 | rm -rf conftest* | |
da3d57e3 | 1557 | eval "ac_cv_lib_dnet=yes" |
5436fc65 C |
1558 | else |
1559 | rm -rf conftest* | |
da3d57e3 | 1560 | eval "ac_cv_lib_dnet=no" |
5436fc65 C |
1561 | fi |
1562 | rm -f conftest* | |
1563 | LIBS="$ac_save_LIBS" | |
1564 | ||
1565 | fi | |
da3d57e3 | 1566 | if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then |
5436fc65 C |
1567 | echo "$ac_t""yes" 1>&6 |
1568 | X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" | |
1569 | else | |
1570 | echo "$ac_t""no" 1>&6 | |
1571 | fi | |
1572 | ||
1573 | if test $ac_cv_lib_dnet = no; then | |
1574 | echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6 | |
da3d57e3 | 1575 | if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then |
5436fc65 C |
1576 | echo $ac_n "(cached) $ac_c" 1>&6 |
1577 | else | |
1578 | ac_save_LIBS="$LIBS" | |
1579 | LIBS="-ldnet_stub $LIBS" | |
1580 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1581 | #line 1582 "configure" |
5436fc65 C |
1582 | #include "confdefs.h" |
1583 | ||
1584 | int main() { return 0; } | |
1585 | int t() { | |
1586 | dnet_ntoa() | |
1587 | ; return 0; } | |
1588 | EOF | |
1589 | if eval $ac_link; then | |
1590 | rm -rf conftest* | |
da3d57e3 | 1591 | eval "ac_cv_lib_dnet_stub=yes" |
5436fc65 C |
1592 | else |
1593 | rm -rf conftest* | |
da3d57e3 | 1594 | eval "ac_cv_lib_dnet_stub=no" |
5436fc65 C |
1595 | fi |
1596 | rm -f conftest* | |
1597 | LIBS="$ac_save_LIBS" | |
1598 | ||
1599 | fi | |
da3d57e3 | 1600 | if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then |
5436fc65 C |
1601 | echo "$ac_t""yes" 1>&6 |
1602 | X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" | |
1603 | else | |
1604 | echo "$ac_t""no" 1>&6 | |
1605 | fi | |
1606 | ||
1607 | fi | |
1608 | ||
1609 | # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, | |
1610 | # to get the SysV transport functions. | |
1611 | # Not sure which flavor of 386 UNIX this is, but it seems harmless to | |
1612 | # check for it. | |
1613 | echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 | |
da3d57e3 | 1614 | if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then |
5436fc65 C |
1615 | echo $ac_n "(cached) $ac_c" 1>&6 |
1616 | else | |
1617 | ac_save_LIBS="$LIBS" | |
1618 | LIBS="-lnsl $LIBS" | |
1619 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1620 | #line 1621 "configure" |
5436fc65 C |
1621 | #include "confdefs.h" |
1622 | ||
1623 | int main() { return 0; } | |
1624 | int t() { | |
1625 | t_accept() | |
1626 | ; return 0; } | |
1627 | EOF | |
1628 | if eval $ac_link; then | |
1629 | rm -rf conftest* | |
da3d57e3 | 1630 | eval "ac_cv_lib_nsl=yes" |
5436fc65 C |
1631 | else |
1632 | rm -rf conftest* | |
da3d57e3 | 1633 | eval "ac_cv_lib_nsl=no" |
5436fc65 C |
1634 | fi |
1635 | rm -f conftest* | |
1636 | LIBS="$ac_save_LIBS" | |
1637 | ||
1638 | fi | |
da3d57e3 | 1639 | if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then |
5436fc65 C |
1640 | echo "$ac_t""yes" 1>&6 |
1641 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" | |
1642 | else | |
1643 | echo "$ac_t""no" 1>&6 | |
1644 | fi | |
1645 | ||
1646 | ||
1647 | # lieder@skyler.mavd.honeywell.com says without -lsocket, | |
1648 | # socket/setsockopt and other routines are undefined under SCO ODT 2.0. | |
1649 | # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. | |
1650 | if test "`(uname) 2>/dev/null`" != IRIX; then | |
1651 | echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 | |
da3d57e3 | 1652 | if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then |
5436fc65 C |
1653 | echo $ac_n "(cached) $ac_c" 1>&6 |
1654 | else | |
1655 | ac_save_LIBS="$LIBS" | |
1656 | LIBS="-lsocket $LIBS" | |
1657 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1658 | #line 1659 "configure" |
5436fc65 C |
1659 | #include "confdefs.h" |
1660 | ||
1661 | int main() { return 0; } | |
1662 | int t() { | |
1663 | socket() | |
1664 | ; return 0; } | |
1665 | EOF | |
1666 | if eval $ac_link; then | |
1667 | rm -rf conftest* | |
da3d57e3 | 1668 | eval "ac_cv_lib_socket=yes" |
5436fc65 C |
1669 | else |
1670 | rm -rf conftest* | |
da3d57e3 | 1671 | eval "ac_cv_lib_socket=no" |
5436fc65 C |
1672 | fi |
1673 | rm -f conftest* | |
1674 | LIBS="$ac_save_LIBS" | |
1675 | ||
1676 | fi | |
da3d57e3 | 1677 | if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then |
5436fc65 C |
1678 | echo "$ac_t""yes" 1>&6 |
1679 | X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket" | |
1680 | else | |
1681 | echo "$ac_t""no" 1>&6 | |
1682 | fi | |
1683 | ||
1684 | fi | |
1685 | fi | |
1686 | fi | |
1687 | ||
1688 | ||
a2b63bbd | 1689 | |
5436fc65 C |
1690 | # |
1691 | # Ok, lets find the tk source trees so we can use the headers | |
1692 | # If the directory (presumably symlink) named "tk" exists, use that one | |
1693 | # in preference to any others. Same logic is used when choosing library | |
1694 | # and again with Tcl. | |
1695 | # | |
1696 | echo "checking for Tk source directory" 1>&6 | |
1697 | TKHDIR="" | |
1698 | for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do | |
1699 | if test -f $i/tk.h ; then | |
1700 | TKHDIR="-I$i" | |
1701 | fi | |
1702 | done | |
1703 | # if we can't find it, see if one is installed | |
1704 | if test x"$TKHDIR" = x ; then | |
1705 | installed=0 | |
1706 | if test -f $prefix/include/tk.h; then | |
1707 | installed=1 TKHDIR="-I$prefix/include" | |
1708 | else | |
1709 | ac_safe=`echo "tk.h" | tr './\055' '___'` | |
1710 | echo $ac_n "checking for tk.h""... $ac_c" 1>&6 | |
1711 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1712 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1713 | else | |
1714 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1715 | #line 1716 "configure" |
5436fc65 C |
1716 | #include "confdefs.h" |
1717 | #include <tk.h> | |
1718 | EOF | |
1719 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1720 | ac_err=`grep -v '^ *+' conftest.out` | |
1721 | if test -z "$ac_err"; then | |
1722 | rm -rf conftest* | |
1723 | eval "ac_cv_header_$ac_safe=yes" | |
1724 | else | |
1725 | echo "$ac_err" >&5 | |
1726 | rm -rf conftest* | |
1727 | eval "ac_cv_header_$ac_safe=no" | |
1728 | fi | |
1729 | rm -f conftest* | |
1730 | fi | |
1731 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1732 | echo "$ac_t""yes" 1>&6 | |
1733 | installed=1 | |
1734 | else | |
1735 | echo "$ac_t""no" 1>&6 | |
1736 | fi | |
1737 | ||
1738 | fi | |
1739 | if test $installed -eq 0 ; then | |
1740 | TKHDIR="# no Tk directory found" | |
1741 | echo "configure: warning: Can't find Tk directory" 1>&2 | |
1742 | fi | |
1743 | fi | |
1744 | if test x"$TKHDIR" != x ; then | |
1745 | echo "$ac_t""Setting TKHDIR to be $i" 1>&6 | |
1746 | fi | |
1747 | ||
1748 | # | |
1749 | # Ok, lets find the tk library | |
1750 | # First, look for one uninstalled. | |
1751 | # | |
1752 | TKLIB="" | |
1753 | echo "checking for Tk library" 1>&6 | |
1754 | for i in `ls -d ../tk* 2>/dev/null` ../tk ; do | |
1755 | if test -f "$i/Makefile" ; then | |
1756 | TKLIB=$i/libtk.a | |
1757 | fi | |
1758 | done | |
1759 | # If not found, look for installed version | |
1760 | if test x"$TKLIB" = x ; then | |
1761 | if test -f $prefix/lib/libtk.a; then | |
1762 | installed=1 | |
1763 | else | |
1764 | installed=0 | |
1765 | fi | |
1766 | if test $installed -eq 1 ; then | |
1767 | TKLIB="-ltk" | |
1768 | fi | |
1769 | fi | |
1770 | ||
1771 | # If still not found, assume Tk simply hasn't been built yet | |
1772 | if test x"$TKLIB" = x ; then | |
1773 | for i in `ls -d ../tk* 2>/dev/null` ../tk ; do | |
1774 | if test -f "$i/tk.h" ; then | |
1775 | TKLIB=$i/libtk.a | |
1776 | fi | |
1777 | done | |
1778 | fi | |
1779 | ||
1780 | if test x"$TKLIB" = x ; then | |
1781 | TKLIB="# no Tk library found" | |
1782 | echo "configure: warning: Can't find Tk library" 1>&2 | |
1783 | else | |
1784 | echo "$ac_t""setting TKLIB to be $TKLIB" 1>&6 | |
1785 | no_tk= | |
1786 | fi | |
1787 | ||
1788 | ||
1789 | ||
1790 | ||
a2b63bbd | 1791 | |
5436fc65 C |
1792 | # |
1793 | # Ok, lets find the tcl source trees so we can use the headers | |
1794 | # | |
1795 | # Warning: transition of version 9 to 10 will break this algorithm | |
1796 | # because 10 sorts before 9. | |
1797 | # | |
1798 | echo "checking for Tcl source directory" 1>&6 | |
1799 | TCLHDIR="" | |
1800 | for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do | |
1801 | if test -f $i/tclInt.h ; then | |
1802 | TCLHDIR="-I$i" | |
1803 | fi | |
1804 | done | |
1805 | # if we can't find it, see if one is installed | |
1806 | if test x"$TCLHDIR" = x ; then | |
1807 | installed=0 | |
1808 | if test -f $prefix/include/tclInt.h; then | |
1809 | installed=1 TCLHDIR="-I$prefix/include" | |
1810 | else | |
1811 | ac_safe=`echo "tclInt.h" | tr './\055' '___'` | |
1812 | echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6 | |
1813 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1814 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1815 | else | |
1816 | cat > conftest.$ac_ext <<EOF | |
3c0bf315 | 1817 | #line 1818 "configure" |
5436fc65 C |
1818 | #include "confdefs.h" |
1819 | #include <tclInt.h> | |
1820 | EOF | |
1821 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1822 | ac_err=`grep -v '^ *+' conftest.out` | |
1823 | if test -z "$ac_err"; then | |
1824 | rm -rf conftest* | |
1825 | eval "ac_cv_header_$ac_safe=yes" | |
1826 | else | |
1827 | echo "$ac_err" >&5 | |
1828 | rm -rf conftest* | |
1829 | eval "ac_cv_header_$ac_safe=no" | |
1830 | fi | |
1831 | rm -f conftest* | |
1832 | fi | |
1833 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1834 | echo "$ac_t""yes" 1>&6 | |
1835 | installed=1 | |
1836 | else | |
1837 | echo "$ac_t""no" 1>&6 | |
1838 | fi | |
1839 | ||
1840 | fi | |
1841 | if test $installed -eq 0 ; then | |
1842 | TCLHDIR="# no Tcl directory found" | |
1843 | echo "configure: warning: Can't find Tcl directory" 1>&2 | |
1844 | fi | |
1845 | else | |
1846 | echo "$ac_t""setting TCLHDIR to be $i" 1>&6 | |
1847 | fi | |
1848 | ||
1849 | # | |
1850 | # Ok, lets find the tcl library | |
1851 | # First, look for the latest uninstalled | |
1852 | # | |
1853 | TCLLIB="" | |
1854 | echo "checking for Tcl library" 1>&6 | |
1855 | for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do | |
1856 | if test -f "$i/Makefile" ; then | |
1857 | TCLLIB=$i/libtcl.a | |
1858 | fi | |
1859 | done | |
1860 | # If not found, look for installed version | |
1861 | if test x"$TCLLIB" = x ; then | |
1862 | if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi | |
1863 | if test $installed -eq 1 ; then | |
1864 | TCLLIB="-ltcl" | |
1865 | fi | |
1866 | fi | |
1867 | # If still not found, assume Tcl simply hasn't been built yet | |
1868 | if test x"$TCLLIB" = x ; then | |
1869 | for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do | |
1870 | if test -f "$i/tcl.h" ; then | |
1871 | TCLLIB=$i/libtcl.a | |
1872 | fi | |
1873 | done | |
1874 | fi | |
1875 | ||
1876 | if test x"$TCLLIB" = x ; then | |
1877 | TCLLIB="# no Tcl library found" | |
1878 | echo "configure: warning: Can't find Tcl library" 1>&2 | |
1879 | else | |
1880 | echo "$ac_t""setting TCLLIB to be $TCLLIB" 1>&6 | |
1881 | fi | |
1882 | ||
1883 | ||
1884 | ||
1885 | ||
1886 | ||
a2b63bbd | 1887 | ENABLE_GDBTK=1 |
66efdff9 | 1888 | |
a2b63bbd JM |
1889 | if test "x$no_x" != "xyes"; then |
1890 | if test "x$x_includes" != "x" ; | |
1891 | then | |
1892 | X_CFLAGS="-I$x_includes" | |
1893 | else | |
1894 | X_CFLAGS="" | |
1895 | fi | |
1896 | ||
1897 | if test "x$x_libraries" != "x" ; | |
1898 | then | |
1899 | X_LDFLAGS="-L$x_libraries" | |
1900 | else | |
1901 | X_LDFLAGS="" | |
1902 | fi | |
1903 | ||
1904 | case "$host" in | |
1905 | # | |
1906 | # gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic | |
1907 | # | |
1908 | sparc-sun-solaris2*) | |
1909 | if test "x$GCC" = "xyes"; | |
1910 | then | |
1911 | X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic" | |
1912 | else | |
1913 | if test "x$x_libraries" != "x" ; | |
1914 | then | |
1915 | X_LDFLAGS="$X_LDFLAGS -R$x_libraries" | |
1916 | fi | |
1917 | X_LIBS="-lX11 -lXext -lX11" | |
1918 | fi ;; | |
1919 | # | |
1920 | # gdb linked statically w/ SunOS or HPUX | |
1921 | # | |
1922 | m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*) | |
1923 | if test "x$x_libraries" != "x" ; | |
1924 | then | |
1925 | X_LIBS="$x_libraries/libX11.a" | |
1926 | else | |
1927 | X_LIBS="/usr/lib/libX11.a" | |
1928 | fi ;; | |
1929 | # | |
1930 | # default is to link dynamically | |
1931 | # | |
1932 | *) | |
1933 | X_LIBS="-lX11" ;; | |
1934 | esac | |
1935 | else | |
1936 | X_LDLAGS="" | |
1937 | X_CFLAGS="" | |
1938 | X_LIBS="" | |
1939 | echo "configure: warning: No X based programs will be built" 1>&2 | |
1940 | fi | |
1941 | ||
1942 | TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)' | |
1943 | ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm" | |
1944 | ENABLE_OBS="${ENABLE_OBS} gdbtk.o" | |
1945 | fi | |
66efdff9 | 1946 | |
66efdff9 | 1947 | |
5436fc65 | 1948 | |
66efdff9 JM |
1949 | |
1950 | ||
5436fc65 C |
1951 | # end-sanitize-gdbtk |
1952 | ||
1953 | ||
1954 | ||
1955 | ||
1956 | ||
1957 | ||
1958 | configdirs="doc testsuite" | |
1959 | ||
1960 | ||
1961 | # Map host cpu into the config cpu subdirectory name. | |
1962 | # The default is $host_cpu. | |
1963 | ||
1964 | case "${host_cpu}" in | |
1965 | ||
1966 | c[12]) gdb_host_cpu=convex ;; | |
1967 | hppa*) gdb_host_cpu=pa ;; | |
1968 | i[345]86) gdb_host_cpu=i386 ;; | |
1969 | m68*) gdb_host_cpu=m68k ;; | |
1970 | m88*) gdb_host_cpu=m88k ;; | |
1971 | np1) gdb_host_cpu=gould ;; | |
1972 | pyramid) gdb_host_cpu=pyr ;; | |
1973 | powerpc*) gdb_host_cpu=powerpc ;; | |
1974 | *) gdb_host_cpu=$host_cpu ;; | |
1975 | ||
1976 | esac | |
1977 | ||
1978 | # map host info into gdb names. | |
1979 | ||
1980 | case "${host}" in | |
1981 | ||
1982 | a29k-*-*) gdb_host=ultra3 ;; | |
1983 | ||
1984 | alpha-*-osf1*) gdb_host=alpha-osf1 ;; | |
b8ea4fec PS |
1985 | alpha-*-osf2*) gdb_host=alpha-osf2 ;; |
1986 | alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;; | |
5436fc65 C |
1987 | |
1988 | arm-*-*) gdb_host=arm ;; | |
1989 | ||
1990 | c[12]-*-*) gdb_host=convex ;; | |
1991 | ||
1992 | hppa*-*-bsd*) gdb_host=hppabsd ;; | |
1993 | hppa*-*-hiux*) gdb_host=hppahpux ;; | |
1994 | hppa*-*-hpux*) gdb_host=hppahpux ;; | |
1995 | hppa*-*-osf*) gdb_host=hppaosf ;; | |
1996 | ||
1997 | i[345]86-ncr-*) gdb_host=ncr3000 ;; | |
1998 | i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix | |
1999 | i[345]86-sequent-sysv4*) gdb_host=ptx4 ;; | |
2000 | i[345]86-sequent-sysv*) gdb_host=ptx ;; | |
2001 | i[345]86-*-aix*) gdb_host=i386aix ;; | |
2002 | i[345]86-*-bsd*) gdb_host=i386bsd ;; | |
2003 | i[345]86-*-freebsd*) gdb_host=fbsd ;; | |
2004 | i[345]86-*-netbsd*) gdb_host=nbsd ;; | |
2005 | i[345]86-*-go32*) gdb_host=go32 ;; | |
2006 | i[345]86-*-linux*) gdb_host=linux ;; | |
2007 | i[345]86-*-lynxos*) gdb_host=i386lynx ;; | |
2008 | i[345]86-*-mach3*) gdb_host=i386m3 ;; | |
2009 | i[345]86-*-mach*) gdb_host=i386mach ;; | |
2010 | i[345]86-*-osf1mk*) gdb_host=osf1mk ;; | |
2011 | i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;; | |
2012 | i[345]86-*-sco*) gdb_host=i386sco ;; | |
2013 | i[345]86-*-solaris*) gdb_host=i386sol2 ;; | |
2014 | i[345]86-*-sunos*) gdb_host=sun386 ;; | |
2015 | i[345]86-*-sysv3.2*) gdb_host=i386v32 ;; | |
2016 | i[345]86-*-sysv32*) gdb_host=i386v32 ;; | |
2017 | i[345]86-*-sysv4*) gdb_host=i386v4 ;; | |
2018 | i[345]86-*-unixware) gdb_host=i386v4 ;; | |
2019 | i[345]86-*-sysv*) gdb_host=i386v ;; | |
2020 | i[345]86-*-isc*) gdb_host=i386v32 ;; | |
2021 | i[345]86-*-os9k) gdb_host=i386os9k ;; | |
24e60978 | 2022 | i[345]86-*-win32*) gdb_host=win32 ;; |
5436fc65 C |
2023 | m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;; |
2024 | m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;; | |
2025 | m68030-sony-*) gdb_host=news1000 ;; | |
2026 | ||
2027 | m68*-altos-*) gdb_host=altos ;; | |
2028 | m68*-apollo*-sysv*) gdb_host=apollo68v ;; | |
2029 | m68*-apollo*-bsd*) gdb_host=apollo68b ;; | |
2030 | m68*-att-*) gdb_host=3b1 ;; | |
2031 | m68*-bull*-sysv*) gdb_host=dpx2 ;; | |
2032 | m68*-hp-bsd*) gdb_host=hp300bsd ;; | |
2033 | m68*-hp-hpux*) gdb_host=hp300hpux ;; | |
2034 | m68*-isi-*) gdb_host=isi ;; | |
2035 | m68*-*-lynxos*) gdb_host=m68klynx ;; | |
2036 | m68*-*-sysv4*) gdb_host=m68kv4 ;; | |
2037 | m68*-motorola-*) gdb_host=delta68 ;; | |
2038 | m68*-sony-*) gdb_host=news ;; | |
2039 | m68*-sun-sunos3*) gdb_host=sun3os3 ;; | |
2040 | m68*-sun-sunos4*) gdb_host=sun3os4 ;; | |
2041 | m68*-sun-*) gdb_host=sun3os4 ;; | |
2042 | ||
2043 | m88*-harris-cxux*) gdb_host=cxux ;; | |
2044 | m88*-motorola-sysv4*) gdb_host=delta88v4 ;; | |
2045 | m88*-motorola-sysv*) gdb_host=delta88 ;; | |
2046 | m88*-*-mach3*) gdb_host=mach3 ;; | |
2047 | m88*-*-*) gdb_host=m88k ;; | |
2048 | ||
2049 | mips-dec-mach3*) gdb_host=mach3 ;; | |
2050 | mips-dec-*) gdb_host=decstation ;; | |
2051 | mips-little-*) gdb_host=littlemips ;; | |
2052 | mips-sgi-irix3*) gdb_host=irix3 ;; | |
2053 | mips-sgi-irix4*) gdb_host=irix4 ;; | |
2054 | mips-sgi-irix5*) gdb_host=irix5 ;; | |
2055 | mips-sony-*) gdb_host=news-mips ;; | |
2056 | mips-*-mach3*) gdb_host=mach3 ;; | |
2057 | mips-*-sysv4*) gdb_host=mipsv4 ;; | |
2058 | mips-*-sysv*) gdb_host=riscos ;; | |
2059 | mips-*-riscos*) gdb_host=riscos ;; | |
2060 | ||
2061 | none-*-*) gdb_host=none ;; | |
2062 | ||
2063 | np1-*-*) gdb_host=np1 ;; | |
2064 | ||
2065 | ns32k-*-mach3*) gdb_host=mach3 ;; | |
2066 | ns32k-*-netbsd*) gdb_host=nbsd ;; | |
2067 | ns32k-umax-*) gdb_host=umax ;; | |
2068 | ns32k-utek-sysv*) gdb_host=merlin ;; | |
2069 | ||
fbc3f191 JL |
2070 | powerpc-*-aix*) gdb_host=aix ;; |
2071 | ||
5436fc65 C |
2072 | pn-*-*) gdb_host=pn ;; |
2073 | ||
2074 | pyramid-*-*) gdb_host=pyramid ;; | |
2075 | ||
2076 | romp-*-*) gdb_host=rtbsd ;; | |
2077 | ||
2078 | rs6000-*-lynxos*) gdb_host=rs6000lynx ;; | |
2079 | rs6000-*-*) gdb_host=rs6000 ;; | |
2080 | ||
2081 | sparc-*-lynxos*) gdb_host=sparclynx ;; | |
2082 | sparc-*-netbsd*) gdb_host=nbsd ;; | |
2083 | sparc-*-solaris2*) gdb_host=sun4sol2 ;; | |
2084 | sparc-*-sunos4*) gdb_host=sun4os4 ;; | |
2085 | sparc-*-sunos5*) gdb_host=sun4sol2 ;; | |
2086 | sparc-*-*) gdb_host=sun4os4 ;; | |
2087 | ||
2088 | tahoe-*-*) gdb_host=tahoe ;; | |
2089 | ||
2090 | vax-*-bsd*) gdb_host=vaxbsd ;; | |
2091 | vax-*-ultrix2*) gdb_host=vaxult2 ;; | |
2092 | vax-*-ultrix*) gdb_host=vaxult ;; | |
2093 | ||
2094 | w65-*-*) gdb_host=w65 ;; | |
2095 | ||
2096 | esac | |
2097 | ||
2098 | ||
2099 | # Map target cpu into the config cpu subdirectory name. | |
2100 | # The default is $target_cpu. | |
2101 | ||
2102 | case "${target_cpu}" in | |
2103 | ||
2104 | alpha) gdb_target_cpu=alpha ;; | |
2105 | c[12]) gdb_target_cpu=convex ;; | |
2106 | hppa*) gdb_target_cpu=pa ;; | |
2107 | i[345]86) gdb_target_cpu=i386 ;; | |
2108 | m68*) gdb_target_cpu=m68k ;; | |
2109 | m88*) gdb_target_cpu=m88k ;; | |
2110 | mips*) gdb_target_cpu=mips ;; | |
2111 | np1) gdb_target_cpu=gould ;; | |
2112 | powerpc*) gdb_target_cpu=powerpc ;; | |
2113 | pn) gdb_target_cpu=gould ;; | |
2114 | pyramid) gdb_target_cpu=pyr ;; | |
5436fc65 C |
2115 | sparc*) gdb_target_cpu=sparc ;; |
2116 | *) gdb_target_cpu=$target_cpu ;; | |
2117 | ||
2118 | esac | |
2119 | ||
2120 | # map target info into gdb names. | |
2121 | ||
2122 | case "${target}" in | |
2123 | ||
2124 | a29k-*-aout*) gdb_target=a29k ;; | |
2125 | a29k-*-coff*) gdb_target=a29k ;; | |
2126 | a29k-*-elf*) gdb_target=a29k ;; | |
2127 | a29k-*-ebmon*) gdb_target=a29k ;; | |
2128 | a29k-*-kern*) gdb_target=a29k-kern ;; | |
2129 | a29k-*-none*) gdb_target=a29k ;; | |
2130 | a29k-*-sym1*) gdb_target=ultra3 ;; | |
2131 | a29k-*-udi*) gdb_target=a29k-udi ;; | |
2132 | a29k-*-vxworks*) gdb_target=vx29k ;; | |
2133 | ||
2134 | alpha-*-osf*) gdb_target=alpha-osf1 ;; | |
2135 | ||
2136 | # start-sanitize-arc | |
2137 | arc-*-*) gdb_target=arc ;; | |
2138 | # end-sanitize-arc | |
2139 | ||
2140 | arm-*-*) gdb_target=arm ;; | |
2141 | ||
2142 | c1-*-*) gdb_target=convex ;; | |
2143 | c2-*-*) gdb_target=convex ;; | |
2144 | ||
fb506180 SS |
2145 | h8300-*-*) gdb_target=h8300 ;; |
2146 | h8500-*-*) gdb_target=h8500 ;; | |
5436fc65 C |
2147 | |
2148 | sh-*-*) gdb_target=sh ;; | |
2149 | ||
2150 | # start-sanitize-r16 | |
2151 | r16-*-*) gdb_target=r16 ;; | |
2152 | # end-sanitize-r16 | |
2153 | ||
2154 | hppa*-*-bsd*) gdb_target=hppabsd ;; | |
2155 | hppa*-*-pro*) gdb_target=hppapro ;; | |
2156 | hppa*-*-hpux*) gdb_target=hppahpux ;; | |
2157 | hppa*-*-hiux*) gdb_target=hppahpux ;; | |
2158 | hppa*-*-osf*) gdb_target=hppaosf ;; | |
2159 | ||
2160 | i[345]86-sequent-bsd*) gdb_target=symmetry ;; | |
2161 | i[345]86-sequent-sysv4*) gdb_target=ptx4 ;; | |
2162 | i[345]86-sequent-sysv*) gdb_target=ptx ;; | |
2163 | i[345]86-ncr-*) gdb_target=ncr3000 ;; | |
2164 | i[345]86-*-aout*) gdb_target=i386aout ;; | |
2165 | i[345]86-*-coff*) gdb_target=i386v ;; | |
2166 | i[345]86-*-elf*) gdb_target=i386v ;; | |
2167 | i[345]86-*-aix*) gdb_target=i386aix ;; | |
2168 | i[345]86-*-bsd*) gdb_target=i386bsd ;; | |
2169 | i[345]86-*-freebsd*) gdb_target=fbsd ;; | |
2170 | i[345]86-*-netbsd*) gdb_target=nbsd ;; | |
2171 | i[345]86-*-os9k) gdb_target=i386os9k ;; | |
2172 | i[345]86-*-go32*) gdb_target=i386aout ;; | |
2173 | i[345]86-*-lynxos*) gdb_target=i386lynx | |
2174 | configdirs="${configdirs} gdbserver" ;; | |
2175 | i[345]86-*-solaris*) gdb_target=i386sol2 ;; | |
2176 | i[345]86-*-sunos*) gdb_target=sun386 ;; | |
2177 | i[345]86-*-sysv4*) gdb_target=i386v4 ;; | |
2178 | i[345]86-*-sco*) gdb_target=i386v ;; | |
2179 | i[345]86-*-sysv*) gdb_target=i386v ;; | |
2180 | i[345]86-*-linux*) gdb_target=linux ;; | |
2181 | i[345]86-*-isc*) gdb_target=i386v ;; | |
2182 | i[345]86-*-mach3*) gdb_target=i386m3 ;; | |
2183 | i[345]86-*-mach*) gdb_target=i386mach ;; | |
2184 | i[345]86-*-netware*) gdb_target=i386nw | |
2185 | configdirs="${configdirs} nlm" ;; | |
2186 | i[345]86-*-osf1mk*) gdb_target=i386mk ;; | |
24e60978 | 2187 | i[345]86-*-win32) gdb_target=win32 ;; |
5436fc65 C |
2188 | |
2189 | i960-*-bout*) gdb_target=vxworks960 ;; | |
2190 | i960-*-coff*) gdb_target=nindy960 ;; | |
2191 | i960-*-elf*) gdb_target=nindy960 ;; | |
2192 | ||
2193 | i960-*-nindy*) gdb_target=nindy960 ;; | |
2194 | i960-*-vxworks*) gdb_target=vxworks960 ;; | |
2195 | ||
2196 | m68000-*-sunos3*) gdb_target=sun2os3 ;; | |
2197 | m68000-*-sunos4*) gdb_target=sun2os4 ;; | |
2198 | ||
2199 | m68*-apollo*-bsd*) gdb_target=apollo68b ;; | |
2200 | m68*-bull-sysv*) gdb_target=dpx2 ;; | |
2201 | m68*-hp-bsd*) gdb_target=hp300bsd ;; | |
2202 | m68*-hp-hpux*) gdb_target=hp300hpux ;; | |
2203 | m68*-altos-*) gdb_target=altos ;; | |
2204 | m68*-att-*) gdb_target=3b1 ;; | |
2205 | m68*-cisco*-*) gdb_target=cisco ;; | |
2206 | m68*-ericsson-*) gdb_target=es1800 ;; | |
2207 | m68*-isi-*) gdb_target=isi ;; | |
2208 | m68*-motorola-*) gdb_target=delta68 ;; | |
2209 | m68*-netx-*) gdb_target=vxworks68 ;; | |
2210 | m68*-sony-*) gdb_target=news ;; | |
2211 | m68*-tandem-*) gdb_target=st2000 ;; | |
2212 | m68*-rom68k-*) gdb_target=monitor ;; | |
2213 | m68*-*bug-*) gdb_target=monitor ;; | |
2214 | m68*-monitor-*) gdb_target=monitor ;; | |
949e2bbf | 2215 | m68*-est-*) gdb_target=monitor ;; |
5436fc65 C |
2216 | m68*-*-aout*) gdb_target=monitor ;; |
2217 | m68*-*-coff*) gdb_target=monitor ;; | |
2218 | m68*-*-elf*) gdb_target=monitor ;; | |
2219 | m68*-*-lynxos*) gdb_target=m68klynx | |
2220 | configdirs="${configdirs} gdbserver" ;; | |
2221 | m68*-*-os68k*) gdb_target=os68k ;; | |
2222 | m68*-*-sunos3*) gdb_target=sun3os3 ;; | |
2223 | m68*-*-sunos4*) gdb_target=sun3os4 ;; | |
2224 | m68*-*-sysv4*) gdb_target=m68kv4 ;; | |
2225 | m68*-*-vxworks*) gdb_target=vxworks68 ;; | |
2226 | ||
2227 | m88*-harris-cxux*) gdb_target=cxux ;; | |
2228 | m88*-motorola-sysv4*) gdb_target=delta88v4 ;; | |
2229 | m88*-*-mach3*) gdb_target=mach3 ;; | |
2230 | m88*-motorola-*) gdb_target=delta88 ;; | |
2231 | m88*-*-*) gdb_target=m88k ;; | |
2232 | ||
2233 | mips64*-big-*) gdb_target=bigmips64 ;; | |
2234 | mips*-big-*) gdb_target=bigmips ;; | |
2235 | mips*-dec-mach3*) gdb_target=mach3 ;; | |
2236 | mips*-dec-*) gdb_target=decstation ;; | |
2237 | mips64*el-*-ecoff*) gdb_target=idtl64 ;; | |
2238 | mips64*-idt-ecoff*) gdb_target=idt64 ;; | |
0e3a4b1e JSC |
2239 | mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;; |
2240 | mips64*vr4300*-*-elf*) gdb_target=vr4300 ;; | |
5436fc65 C |
2241 | mips64*el-*-elf*) gdb_target=idtl64 ;; |
2242 | mips64*-*-elf*) gdb_target=idt64 ;; | |
2243 | mips*el-*-ecoff*) gdb_target=idtl ;; | |
2244 | mips*-*-ecoff*) gdb_target=idt ;; | |
cd10c7e3 | 2245 | # start-sanitize-gm |
188c635f | 2246 | mips*-*-magic*) gdb_target=idt ;; |
cd10c7e3 | 2247 | # end-sanitize-gm |
5436fc65 C |
2248 | mips*el-*-elf*) gdb_target=idtl ;; |
2249 | mips*-*-elf*) gdb_target=idt ;; | |
2250 | mips*-little-*) gdb_target=littlemips ;; | |
2251 | mips*-sgi-irix5*) gdb_target=irix5 ;; | |
2252 | mips*-sgi-*) gdb_target=irix3 ;; | |
2253 | mips*-sony-*) gdb_target=bigmips ;; | |
2254 | mips*-*-mach3*) gdb_target=mach3 ;; | |
2255 | mips*-*-sysv4*) gdb_target=mipsv4 ;; | |
2256 | mips*-*-sysv*) gdb_target=bigmips ;; | |
2257 | mips*-*-riscos*) gdb_target=bigmips ;; | |
2258 | ||
2259 | none-*-*) gdb_target=none ;; | |
2260 | ||
2261 | np1-*-*) gdb_target=np1 ;; | |
2262 | ||
2263 | ns32k-*-mach3*) gdb_target=mach3 ;; | |
2264 | ns32k-*-netbsd*) gdb_target=nbsd ;; | |
2265 | ns32k-utek-sysv*) gdb_target=merlin ;; | |
2266 | ns32k-utek-*) gdb_target=umax ;; | |
2267 | ||
2268 | pn-*-*) gdb_target=pn ;; | |
2269 | powerpc-*-netware*) gdb_target=ppc-nw | |
2270 | configdirs="${configdirs} nlm" ;; | |
2271 | ||
65eaea27 | 2272 | powerpc-*-aix4*) gdb_target=aix4 ;; |
fbc3f191 | 2273 | powerpc-*-aix*) gdb_target=aix ;; |
3c0bf315 MM |
2274 | powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then |
2275 | gdb_target=ppc-sim | |
2276 | else | |
2277 | gdb_target=ppc-eabi | |
2278 | fi ;; | |
2279 | powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then | |
2280 | gdb_target=ppcle-sim | |
2281 | else | |
2282 | gdb_target=ppcle-eabi | |
2283 | fi ;; | |
5436fc65 C |
2284 | |
2285 | pyramid-*-*) gdb_target=pyramid ;; | |
2286 | ||
2287 | rs6000-*-lynxos*) gdb_target=rs6000lynx ;; | |
65eaea27 | 2288 | rs6000-*-aix4*) gdb_target=aix4 ;; |
5436fc65 C |
2289 | rs6000-*-*) gdb_target=rs6000 ;; |
2290 | ||
2291 | sparc-*-aout*) gdb_target=sparc-em ;; | |
2292 | sparc-*-coff*) gdb_target=sparc-em ;; | |
2293 | sparc-*-elf*) gdb_target=sparc-em ;; | |
2294 | sparc-*-lynxos*) gdb_target=sparclynx | |
2295 | configdirs="${configdirs} gdbserver" ;; | |
2296 | sparc-*-netbsd*) gdb_target=nbsd ;; | |
2297 | sparc-*-solaris2*) gdb_target=sun4sol2 ;; | |
2298 | sparc-*-sunos4*) gdb_target=sun4os4 ;; | |
2299 | sparc-*-sunos5*) gdb_target=sun4sol2 ;; | |
2300 | sparc-*-vxworks*) gdb_target=vxsparc ;; | |
2301 | sparc-*-*) gdb_target=sun4os4 ;; | |
2302 | sparclite*-*-*) gdb_target=sparclite ;; | |
2303 | sparc64-*-*) gdb_target=sp64 ;; | |
2304 | ||
2305 | tahoe-*-*) gdb_target=tahoe ;; | |
2306 | ||
2307 | vax-*-*) gdb_target=vax ;; | |
2308 | ||
2309 | w65-*-*) gdb_target=w65 ;; | |
2310 | ||
fb506180 | 2311 | z8k-*-coff*) gdb_target=z8k ;; |
5436fc65 C |
2312 | |
2313 | esac | |
2314 | ||
2315 | ||
5f107900 | 2316 | frags= |
5436fc65 C |
2317 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
2318 | if test ! -f ${host_makefile_frag}; then | |
2319 | { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; } | |
2320 | fi | |
5f107900 | 2321 | frags="$frags $host_makefile_frag" |
5436fc65 C |
2322 | |
2323 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
2324 | if test ! -f ${target_makefile_frag}; then | |
2325 | { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; } | |
2326 | fi | |
5f107900 | 2327 | frags="$frags $target_makefile_frag" |
5436fc65 C |
2328 | |
2329 | ||
2330 | ||
2331 | ||
2332 | ||
094fd4ae C |
2333 | hostfile=`sed -n ' |
2334 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
2335 | ' ${host_makefile_frag}` | |
5436fc65 | 2336 | |
094fd4ae C |
2337 | targetfile=`sed -n ' |
2338 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
2339 | ' ${target_makefile_frag}` | |
5436fc65 C |
2340 | |
2341 | # these really aren't orthogonal true/false values of the same condition, | |
2342 | # but shells are slow enough that I like to reuse the test conditions | |
2343 | # whenever possible | |
2344 | if test "${target}" = "${host}"; then | |
094fd4ae C |
2345 | nativefile=`sed -n ' |
2346 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
2347 | ' ${host_makefile_frag}` | |
5436fc65 C |
2348 | else |
2349 | # GDBserver is only useful in a "native" enviroment | |
2350 | configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
2351 | fi | |
2352 | ||
094fd4ae | 2353 | |
5436fc65 C |
2354 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
2355 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
2356 | # corresponding links. But we have to remove the xm.h files and tm.h | |
2357 | # files anyway, e.g. when switching from "configure host" to | |
2358 | # "configure none". | |
2359 | ||
2360 | files= | |
2361 | links= | |
2362 | rm -f xm.h | |
2363 | if test "${hostfile}" != ""; then | |
2364 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
2365 | links="${links} xm.h" | |
2366 | fi | |
2367 | rm -f tm.h | |
2368 | if test "${targetfile}" != ""; then | |
2369 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
2370 | links="${links} tm.h" | |
2371 | fi | |
2372 | rm -f nm.h | |
2373 | if test "${nativefile}" != ""; then | |
2374 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
2375 | links="${links} nm.h" | |
2376 | else | |
2377 | # A cross-only configuration. | |
2378 | files="${files} config/nm-empty.h" | |
2379 | links="${links} nm.h" | |
2380 | fi | |
2381 | # start-sanitize-gdbtk | |
2382 | ||
2383 | # Make it possible to use the GUI without doing a full install | |
2384 | if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then | |
2385 | files="${files} gdbtk.tcl" | |
2386 | links="${links} gdbtk.tcl" | |
2387 | fi | |
2388 | # end-sanitize-gdbtk | |
2389 | ||
2390 | ||
2391 | ||
2392 | subdirs="$configdirs" | |
2393 | ||
2394 | trap '' 1 2 15 | |
2395 | cat > confcache <<\EOF | |
2396 | # This file is a shell script that caches the results of configure | |
2397 | # tests run on this system so they can be shared between configure | |
2398 | # scripts and configure runs. It is not useful on other systems. | |
2399 | # If it contains results you don't want to keep, you may remove or edit it. | |
2400 | # | |
2401 | # By default, configure uses ./config.cache as the cache file, | |
2402 | # creating it if it does not exist already. You can give configure | |
2403 | # the --cache-file=FILE option to use a different cache file; that is | |
2404 | # what configure does when it calls configure scripts in | |
2405 | # subdirectories, so they share the cache. | |
2406 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2407 | # config.status only pays attention to the cache file if you give it the | |
2408 | # --recheck option to rerun configure. | |
2409 | # | |
2410 | EOF | |
2411 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
2412 | # and sets the high bit in the cache file unless we assign to the vars. | |
2413 | (set) 2>&1 | | |
2414 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ | |
2415 | >> confcache | |
2416 | if cmp -s $cache_file confcache; then | |
2417 | : | |
2418 | else | |
2419 | if test -w $cache_file; then | |
2420 | echo "updating cache $cache_file" | |
2421 | cat confcache > $cache_file | |
2422 | else | |
2423 | echo "not updating unwritable cache $cache_file" | |
2424 | fi | |
2425 | fi | |
2426 | rm -f confcache | |
2427 | ||
2428 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
2429 | ||
2430 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
2431 | # Let make expand exec_prefix. | |
2432 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2433 | ||
2434 | # Any assignment to VPATH causes Sun make to only execute | |
2435 | # the first set of double-colon rules, so remove it if not needed. | |
2436 | # If there is a colon in the path, we need to keep it. | |
2437 | if test "x$srcdir" = x.; then | |
2438 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
2439 | fi | |
2440 | ||
2441 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
2442 | ||
2443 | # Transform confdefs.h into DEFS. | |
2444 | # Protect against shell expansion while executing Makefile rules. | |
2445 | # Protect against Makefile macro expansion. | |
2446 | cat > conftest.defs <<\EOF | |
2447 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g | |
2448 | s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g | |
2449 | s%\[%\\&%g | |
2450 | s%\]%\\&%g | |
2451 | s%\$%$$%g | |
2452 | EOF | |
2453 | DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` | |
2454 | rm -f conftest.defs | |
2455 | ||
2456 | ||
2457 | # Without the "./", some shells look in PATH for config.status. | |
2458 | : ${CONFIG_STATUS=./config.status} | |
2459 | ||
2460 | echo creating $CONFIG_STATUS | |
2461 | rm -f $CONFIG_STATUS | |
2462 | cat > $CONFIG_STATUS <<EOF | |
2463 | #! /bin/sh | |
2464 | # Generated automatically by configure. | |
2465 | # Run this file to recreate the current configuration. | |
2466 | # This directory was configured as follows, | |
2467 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
2468 | # | |
2469 | # $0 $ac_configure_args | |
2470 | # | |
2471 | # Compiler output produced by configure, useful for debugging | |
2472 | # configure, is in ./config.log if it exists. | |
2473 | ||
2474 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
2475 | for ac_option | |
2476 | do | |
2477 | case "\$ac_option" in | |
2478 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
2479 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
2480 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
2481 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
da3d57e3 | 2482 | echo "$CONFIG_STATUS generated by autoconf version 2.4" |
5436fc65 C |
2483 | exit 0 ;; |
2484 | -help | --help | --hel | --he | --h) | |
2485 | echo "\$ac_cs_usage"; exit 0 ;; | |
2486 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
2487 | esac | |
2488 | done | |
2489 | ||
2490 | ac_given_srcdir=$srcdir | |
2491 | ac_given_INSTALL="$INSTALL" | |
2492 | ||
2493 | trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
2494 | ||
2495 | # Protect against being on the right side of a sed subst in config.status. | |
2496 | sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; | |
2497 | s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF | |
2498 | $ac_vpsub | |
2499 | $extrasub | |
2500 | s%@CFLAGS@%$CFLAGS%g | |
2501 | s%@CPPFLAGS@%$CPPFLAGS%g | |
2502 | s%@CXXFLAGS@%$CXXFLAGS%g | |
2503 | s%@DEFS@%$DEFS%g | |
2504 | s%@LDFLAGS@%$LDFLAGS%g | |
2505 | s%@LIBS@%$LIBS%g | |
2506 | s%@exec_prefix@%$exec_prefix%g | |
2507 | s%@prefix@%$prefix%g | |
2508 | s%@program_transform_name@%$program_transform_name%g | |
2509 | s%@CC@%$CC%g | |
2510 | s%@CPP@%$CPP%g | |
2511 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
2512 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
2513 | s%@RANLIB@%$RANLIB%g | |
204c8825 | 2514 | s%@YACC@%$YACC%g |
5436fc65 C |
2515 | s%@host@%$host%g |
2516 | s%@host_alias@%$host_alias%g | |
2517 | s%@host_cpu@%$host_cpu%g | |
2518 | s%@host_vendor@%$host_vendor%g | |
2519 | s%@host_os@%$host_os%g | |
2520 | s%@target@%$target%g | |
2521 | s%@target_alias@%$target_alias%g | |
2522 | s%@target_cpu@%$target_cpu%g | |
2523 | s%@target_vendor@%$target_vendor%g | |
2524 | s%@target_os@%$target_os%g | |
2525 | s%@build@%$build%g | |
2526 | s%@build_alias@%$build_alias%g | |
2527 | s%@build_cpu@%$build_cpu%g | |
2528 | s%@build_vendor@%$build_vendor%g | |
2529 | s%@build_os@%$build_os%g | |
2530 | s%@X_CFLAGS@%$X_CFLAGS%g | |
2531 | s%@X_PRE_LIBS@%$X_PRE_LIBS%g | |
2532 | s%@X_LIBS@%$X_LIBS%g | |
2533 | s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g | |
2534 | s%@TKHDIR@%$TKHDIR%g | |
2535 | s%@TKLIB@%$TKLIB%g | |
2536 | s%@TCLHDIR@%$TCLHDIR%g | |
2537 | s%@TCLLIB@%$TCLLIB%g | |
2538 | s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g | |
a2b63bbd JM |
2539 | s%@X_CLFAGS@%$X_CLFAGS%g |
2540 | s%@X_LDFLAGS@%$X_LDFLAGS%g | |
5436fc65 C |
2541 | s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g |
2542 | s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g | |
2543 | s%@ENABLE_OBS@%$ENABLE_OBS%g | |
5436fc65 C |
2544 | /@host_makefile_frag@/r $host_makefile_frag |
2545 | s%@host_makefile_frag@%%g | |
2546 | /@target_makefile_frag@/r $target_makefile_frag | |
2547 | s%@target_makefile_frag@%%g | |
5f107900 | 2548 | s%@frags@%$frags%g |
5436fc65 C |
2549 | s%@subdirs@%$subdirs%g |
2550 | ||
2551 | CEOF | |
2552 | EOF | |
2553 | cat >> $CONFIG_STATUS <<EOF | |
2554 | ||
2555 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"} | |
2556 | EOF | |
2557 | cat >> $CONFIG_STATUS <<\EOF | |
2558 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
2559 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
2560 | case "$ac_file" in | |
2561 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
2562 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
2563 | *) ac_file_in="${ac_file}.in" ;; | |
2564 | esac | |
2565 | ||
2566 | # Adjust relative srcdir, etc. for subdirectories. | |
2567 | ||
2568 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2569 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2570 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2571 | # The file is in a subdirectory. | |
2572 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2573 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
2574 | # A "../" for each directory in $ac_dir_suffix. | |
2575 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
2576 | else | |
2577 | ac_dir_suffix= ac_dots= | |
2578 | fi | |
2579 | ||
2580 | case "$ac_given_srcdir" in | |
2581 | .) srcdir=. | |
2582 | if test -z "$ac_dots"; then top_srcdir=. | |
2583 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
2584 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
2585 | *) # Relative path. | |
2586 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
2587 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
2588 | esac | |
2589 | ||
2590 | case "$ac_given_INSTALL" in | |
2591 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
2592 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
2593 | esac | |
2594 | echo creating "$ac_file" | |
2595 | rm -f "$ac_file" | |
2596 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
2597 | case "$ac_file" in | |
2598 | *Makefile*) ac_comsub="1i\\ | |
2599 | # $configure_input" ;; | |
2600 | *) ac_comsub= ;; | |
2601 | esac | |
2602 | sed -e "$ac_comsub | |
2603 | s%@configure_input@%$configure_input%g | |
2604 | s%@srcdir@%$srcdir%g | |
2605 | s%@top_srcdir@%$top_srcdir%g | |
2606 | s%@INSTALL@%$INSTALL%g | |
2607 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file | |
2608 | fi; done | |
2609 | rm -f conftest.subs | |
2610 | ||
2611 | EOF | |
2612 | ||
2613 | cat >> $CONFIG_STATUS <<EOF | |
2614 | ac_sources="$files" | |
2615 | ac_dests="$links" | |
2616 | EOF | |
2617 | ||
2618 | cat >> $CONFIG_STATUS <<\EOF | |
2619 | srcdir=$ac_given_srcdir | |
2620 | while test -n "$ac_sources"; do | |
2621 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
2622 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
2623 | ||
2624 | echo "linking $srcdir/$ac_source to $ac_dest" | |
2625 | ||
2626 | if test ! -r $srcdir/$ac_source; then | |
2627 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
2628 | fi | |
2629 | rm -f $ac_dest | |
2630 | ||
2631 | # Make relative symlinks. | |
2632 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2633 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
2634 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
2635 | # The dest file is in a subdirectory. | |
2636 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
2637 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
2638 | # A "../" for each directory in $ac_dest_dir_suffix. | |
2639 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
2640 | else | |
2641 | ac_dest_dir_suffix= ac_dots= | |
2642 | fi | |
2643 | ||
2644 | case "$srcdir" in | |
2645 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
2646 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
2647 | esac | |
2648 | ||
2649 | # Make a symlink if possible; otherwise try a hard link. | |
2650 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
2651 | ln $srcdir/$ac_source $ac_dest; then : | |
2652 | else | |
2653 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
2654 | fi | |
2655 | done | |
0a5a1821 C |
2656 | EOF |
2657 | cat >> $CONFIG_STATUS <<EOF | |
5436fc65 | 2658 | |
0a5a1821 C |
2659 | gdb_host_cpu=$gdb_host_cpu |
2660 | gdb_target_cpu=$gdb_target_cpu | |
2661 | nativefile=$nativefile | |
2662 | ||
2663 | EOF | |
2664 | cat >> $CONFIG_STATUS <<\EOF | |
5436fc65 C |
2665 | |
2666 | if test "${nativefile}" = ""; then | |
2667 | sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \ | |
2668 | < Makefile > Makefile.tem | |
2669 | mv -f Makefile.tem Makefile | |
2670 | fi | |
2671 | ||
2672 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
2673 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
2674 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
2675 | mv -f Makefile.tmp Makefile | |
2676 | ||
2677 | case ${srcdir} in | |
2678 | .) | |
2679 | ;; | |
2680 | *) | |
2681 | grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \ | |
2682 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
2683 | esac | |
2684 | ||
2685 | exit 0 | |
2686 | EOF | |
2687 | chmod +x $CONFIG_STATUS | |
2688 | rm -fr confdefs* $ac_clean_files | |
2689 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
2690 | ||
2691 | if test "$no_recursion" != yes; then | |
2692 | ||
2693 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
2694 | ac_sub_configure_args= | |
2695 | ac_prev= | |
2696 | for ac_arg in $ac_configure_args; do | |
2697 | if test -n "$ac_prev"; then | |
2698 | ac_prev= | |
2699 | continue | |
2700 | fi | |
2701 | case "$ac_arg" in | |
2702 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
2703 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
2704 | ac_prev=cache_file ;; | |
2705 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
2706 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
2707 | ;; | |
2708 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
2709 | ac_prev=srcdir ;; | |
2710 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
2711 | ;; | |
2712 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
2713 | esac | |
2714 | done | |
2715 | ||
2716 | for ac_config_dir in $configdirs; do | |
2717 | ||
2718 | # Do not complain, so a configure script can configure whichever | |
2719 | # parts of a large source tree are present. | |
2720 | if test ! -d $srcdir/$ac_config_dir; then | |
2721 | continue | |
2722 | fi | |
2723 | ||
2724 | echo configuring in $ac_config_dir | |
2725 | ||
2726 | case "$srcdir" in | |
2727 | .) ;; | |
2728 | *) | |
2729 | if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; | |
2730 | else | |
2731 | { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } | |
2732 | fi | |
2733 | ;; | |
2734 | esac | |
2735 | ||
2736 | ac_popdir=`pwd` | |
2737 | cd $ac_config_dir | |
2738 | ||
2739 | case "$srcdir" in | |
2740 | .) # No --srcdir option. We are building in place. | |
2741 | ac_sub_srcdir=$srcdir ;; | |
2742 | /*) # Absolute path. | |
2743 | ac_sub_srcdir=$srcdir/$ac_config_dir ;; | |
2744 | *) # Relative path. | |
2745 | ac_sub_srcdir=../$srcdir/$ac_config_dir ;; | |
2746 | esac | |
2747 | ||
2748 | # Check for guested configure; otherwise get Cygnus style configure. | |
2749 | if test -f $ac_sub_srcdir/configure; then | |
2750 | ac_sub_configure=$ac_sub_srcdir/configure | |
2751 | elif test -f $ac_sub_srcdir/configure.in; then | |
2752 | ac_sub_configure=$ac_configure | |
2753 | else | |
2754 | echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 | |
2755 | ac_sub_configure= | |
2756 | fi | |
2757 | ||
2758 | # The recursion is here. | |
2759 | if test -n "$ac_sub_configure"; then | |
2760 | ||
2761 | # Make the cache file name correct relative to the subdirectory. | |
2762 | # A "../" for each directory in /$ac_config_dir. | |
2763 | ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` | |
2764 | case "$cache_file" in | |
2765 | /*) ac_sub_cache_file=$cache_file ;; | |
2766 | *) # Relative path. | |
2767 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
2768 | esac | |
2769 | case "$ac_given_INSTALL" in | |
2770 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
2771 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
2772 | esac | |
2773 | ||
2774 | echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" | |
2775 | # The eval makes quoting arguments work. | |
2776 | if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir | |
2777 | then : | |
2778 | else | |
2779 | { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } | |
2780 | fi | |
2781 | fi | |
2782 | ||
2783 | cd $ac_popdir | |
2784 | done | |
2785 | fi | |
2786 | ||
5e711e7f PS |
2787 | |
2788 | exit 0 |