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