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