source: trunk/src/gcc/libiberty/configure@ 46

Last change on this file since 46 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 104.0 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-target-subdir=SUBDIR Configuring in a subdirectory"
16ac_help="$ac_help
17 --with-cross-host=HOST Configuring with a cross compiler"
18ac_help="$ac_help
19 --with-newlib Configuring with newlib"
20ac_help="$ac_help
21 --enable-maintainer-mode
22 enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24
25# Initialize some variables set by options.
26# The variables have the same names as the options, with
27# dashes changed to underlines.
28build=NONE
29cache_file=./config.cache
30exec_prefix=NONE
31host=NONE
32no_create=
33nonopt=NONE
34no_recursion=
35prefix=NONE
36program_prefix=NONE
37program_suffix=NONE
38program_transform_name=s,x,x,
39silent=
40site=
41srcdir=
42target=NONE
43verbose=
44x_includes=NONE
45x_libraries=NONE
46bindir='${exec_prefix}/bin'
47sbindir='${exec_prefix}/sbin'
48libexecdir='${exec_prefix}/libexec'
49datadir='${prefix}/share'
50sysconfdir='${prefix}/etc'
51sharedstatedir='${prefix}/com'
52localstatedir='${prefix}/var'
53libdir='${exec_prefix}/lib'
54includedir='${prefix}/include'
55oldincludedir='/usr/include'
56infodir='${prefix}/info'
57mandir='${prefix}/man'
58
59# Initialize some other variables.
60subdirs=
61MFLAGS= MAKEFLAGS=
62SHELL=${CONFIG_SHELL-/bin/sh}
63# Maximum number of lines to put in a shell here document.
64ac_max_here_lines=12
65
66ac_prev=
67for ac_option
68do
69
70 # If the previous option needs an argument, assign it.
71 if test -n "$ac_prev"; then
72 eval "$ac_prev=\$ac_option"
73 ac_prev=
74 continue
75 fi
76
77 case "$ac_option" in
78 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
79 *) ac_optarg= ;;
80 esac
81
82 # Accept the important Cygnus configure options, so we can diagnose typos.
83
84 case "$ac_option" in
85
86 -bindir | --bindir | --bindi | --bind | --bin | --bi)
87 ac_prev=bindir ;;
88 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
89 bindir="$ac_optarg" ;;
90
91 -build | --build | --buil | --bui | --bu)
92 ac_prev=build ;;
93 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94 build="$ac_optarg" ;;
95
96 -cache-file | --cache-file | --cache-fil | --cache-fi \
97 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
98 ac_prev=cache_file ;;
99 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
100 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
101 cache_file="$ac_optarg" ;;
102
103 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
104 ac_prev=datadir ;;
105 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
106 | --da=*)
107 datadir="$ac_optarg" ;;
108
109 -disable-* | --disable-*)
110 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
111 # Reject names that are not valid shell variable names.
112 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
113 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 fi
115 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116 eval "enable_${ac_feature}=no" ;;
117
118 -enable-* | --enable-*)
119 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
120 # Reject names that are not valid shell variable names.
121 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
122 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123 fi
124 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125 case "$ac_option" in
126 *=*) ;;
127 *) ac_optarg=yes ;;
128 esac
129 eval "enable_${ac_feature}='$ac_optarg'" ;;
130
131 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
132 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
133 | --exec | --exe | --ex)
134 ac_prev=exec_prefix ;;
135 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
136 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
137 | --exec=* | --exe=* | --ex=*)
138 exec_prefix="$ac_optarg" ;;
139
140 -gas | --gas | --ga | --g)
141 # Obsolete; use --with-gas.
142 with_gas=yes ;;
143
144 -help | --help | --hel | --he)
145 # Omit some internal or obsolete options to make the list less imposing.
146 # This message is too long to be a string in the A/UX 3.1 sh.
147 cat << EOF
148Usage: configure [options] [host]
149Options: [defaults in brackets after descriptions]
150Configuration:
151 --cache-file=FILE cache test results in FILE
152 --help print this message
153 --no-create do not create output files
154 --quiet, --silent do not print \`checking...' messages
155 --version print the version of autoconf that created configure
156Directory and file names:
157 --prefix=PREFIX install architecture-independent files in PREFIX
158 [$ac_default_prefix]
159 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
160 [same as prefix]
161 --bindir=DIR user executables in DIR [EPREFIX/bin]
162 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
163 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
164 --datadir=DIR read-only architecture-independent data in DIR
165 [PREFIX/share]
166 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
167 --sharedstatedir=DIR modifiable architecture-independent data in DIR
168 [PREFIX/com]
169 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
170 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
171 --includedir=DIR C header files in DIR [PREFIX/include]
172 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
173 --infodir=DIR info documentation in DIR [PREFIX/info]
174 --mandir=DIR man documentation in DIR [PREFIX/man]
175 --srcdir=DIR find the sources in DIR [configure dir or ..]
176 --program-prefix=PREFIX prepend PREFIX to installed program names
177 --program-suffix=SUFFIX append SUFFIX to installed program names
178 --program-transform-name=PROGRAM
179 run sed PROGRAM on installed program names
180EOF
181 cat << EOF
182Host type:
183 --build=BUILD configure for building on BUILD [BUILD=HOST]
184 --host=HOST configure for HOST [guessed]
185 --target=TARGET configure for TARGET [TARGET=HOST]
186Features and packages:
187 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
188 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
189 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
190 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
191 --x-includes=DIR X include files are in DIR
192 --x-libraries=DIR X library files are in DIR
193EOF
194 if test -n "$ac_help"; then
195 echo "--enable and --with options recognized:$ac_help"
196 fi
197 exit 0 ;;
198
199 -host | --host | --hos | --ho)
200 ac_prev=host ;;
201 -host=* | --host=* | --hos=* | --ho=*)
202 host="$ac_optarg" ;;
203
204 -includedir | --includedir | --includedi | --included | --include \
205 | --includ | --inclu | --incl | --inc)
206 ac_prev=includedir ;;
207 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208 | --includ=* | --inclu=* | --incl=* | --inc=*)
209 includedir="$ac_optarg" ;;
210
211 -infodir | --infodir | --infodi | --infod | --info | --inf)
212 ac_prev=infodir ;;
213 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214 infodir="$ac_optarg" ;;
215
216 -libdir | --libdir | --libdi | --libd)
217 ac_prev=libdir ;;
218 -libdir=* | --libdir=* | --libdi=* | --libd=*)
219 libdir="$ac_optarg" ;;
220
221 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222 | --libexe | --libex | --libe)
223 ac_prev=libexecdir ;;
224 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225 | --libexe=* | --libex=* | --libe=*)
226 libexecdir="$ac_optarg" ;;
227
228 -localstatedir | --localstatedir | --localstatedi | --localstated \
229 | --localstate | --localstat | --localsta | --localst \
230 | --locals | --local | --loca | --loc | --lo)
231 ac_prev=localstatedir ;;
232 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235 localstatedir="$ac_optarg" ;;
236
237 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
238 ac_prev=mandir ;;
239 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240 mandir="$ac_optarg" ;;
241
242 -nfp | --nfp | --nf)
243 # Obsolete; use --without-fp.
244 with_fp=no ;;
245
246 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
247 | --no-cr | --no-c)
248 no_create=yes ;;
249
250 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252 no_recursion=yes ;;
253
254 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256 | --oldin | --oldi | --old | --ol | --o)
257 ac_prev=oldincludedir ;;
258 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261 oldincludedir="$ac_optarg" ;;
262
263 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
264 ac_prev=prefix ;;
265 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266 prefix="$ac_optarg" ;;
267
268 -program-prefix | --program-prefix | --program-prefi | --program-pref \
269 | --program-pre | --program-pr | --program-p)
270 ac_prev=program_prefix ;;
271 -program-prefix=* | --program-prefix=* | --program-prefi=* \
272 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273 program_prefix="$ac_optarg" ;;
274
275 -program-suffix | --program-suffix | --program-suffi | --program-suff \
276 | --program-suf | --program-su | --program-s)
277 ac_prev=program_suffix ;;
278 -program-suffix=* | --program-suffix=* | --program-suffi=* \
279 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280 program_suffix="$ac_optarg" ;;
281
282 -program-transform-name | --program-transform-name \
283 | --program-transform-nam | --program-transform-na \
284 | --program-transform-n | --program-transform- \
285 | --program-transform | --program-transfor \
286 | --program-transfo | --program-transf \
287 | --program-trans | --program-tran \
288 | --progr-tra | --program-tr | --program-t)
289 ac_prev=program_transform_name ;;
290 -program-transform-name=* | --program-transform-name=* \
291 | --program-transform-nam=* | --program-transform-na=* \
292 | --program-transform-n=* | --program-transform-=* \
293 | --program-transform=* | --program-transfor=* \
294 | --program-transfo=* | --program-transf=* \
295 | --program-trans=* | --program-tran=* \
296 | --progr-tra=* | --program-tr=* | --program-t=*)
297 program_transform_name="$ac_optarg" ;;
298
299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300 | -silent | --silent | --silen | --sile | --sil)
301 silent=yes ;;
302
303 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
304 ac_prev=sbindir ;;
305 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
306 | --sbi=* | --sb=*)
307 sbindir="$ac_optarg" ;;
308
309 -sharedstatedir | --sharedstatedir | --sharedstatedi \
310 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311 | --sharedst | --shareds | --shared | --share | --shar \
312 | --sha | --sh)
313 ac_prev=sharedstatedir ;;
314 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
317 | --sha=* | --sh=*)
318 sharedstatedir="$ac_optarg" ;;
319
320 -site | --site | --sit)
321 ac_prev=site ;;
322 -site=* | --site=* | --sit=*)
323 site="$ac_optarg" ;;
324
325 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
326 ac_prev=srcdir ;;
327 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328 srcdir="$ac_optarg" ;;
329
330 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331 | --syscon | --sysco | --sysc | --sys | --sy)
332 ac_prev=sysconfdir ;;
333 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335 sysconfdir="$ac_optarg" ;;
336
337 -target | --target | --targe | --targ | --tar | --ta | --t)
338 ac_prev=target ;;
339 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340 target="$ac_optarg" ;;
341
342 -v | -verbose | --verbose | --verbos | --verbo | --verb)
343 verbose=yes ;;
344
345 -version | --version | --versio | --versi | --vers)
346 echo "configure generated by autoconf version 2.13"
347 exit 0 ;;
348
349 -with-* | --with-*)
350 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351 # Reject names that are not valid shell variable names.
352 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
354 fi
355 ac_package=`echo $ac_package| sed 's/-/_/g'`
356 case "$ac_option" in
357 *=*) ;;
358 *) ac_optarg=yes ;;
359 esac
360 eval "with_${ac_package}='$ac_optarg'" ;;
361
362 -without-* | --without-*)
363 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364 # Reject names that are not valid shell variable names.
365 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
367 fi
368 ac_package=`echo $ac_package| sed 's/-/_/g'`
369 eval "with_${ac_package}=no" ;;
370
371 --x)
372 # Obsolete; use --with-x.
373 with_x=yes ;;
374
375 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376 | --x-incl | --x-inc | --x-in | --x-i)
377 ac_prev=x_includes ;;
378 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380 x_includes="$ac_optarg" ;;
381
382 -x-libraries | --x-libraries | --x-librarie | --x-librari \
383 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384 ac_prev=x_libraries ;;
385 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387 x_libraries="$ac_optarg" ;;
388
389 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
390 ;;
391
392 *)
393 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394 echo "configure: warning: $ac_option: invalid host type" 1>&2
395 fi
396 if test "x$nonopt" != xNONE; then
397 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
398 fi
399 nonopt="$ac_option"
400 ;;
401
402 esac
403done
404
405if test -n "$ac_prev"; then
406 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407fi
408
409trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
410
411# File descriptor usage:
412# 0 standard input
413# 1 file creation
414# 2 errors and warnings
415# 3 some systems may open it to /dev/tty
416# 4 used on the Kubota Titan
417# 6 checking for... messages and results
418# 5 compiler messages saved in config.log
419if test "$silent" = yes; then
420 exec 6>/dev/null
421else
422 exec 6>&1
423fi
424exec 5>./config.log
425
426echo "\
427This file contains any messages produced by compilers while
428running configure, to aid debugging if configure makes a mistake.
429" 1>&5
430
431# Strip out --no-create and --no-recursion so they do not pile up.
432# Also quote any args containing shell metacharacters.
433ac_configure_args=
434for ac_arg
435do
436 case "$ac_arg" in
437 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438 | --no-cr | --no-c) ;;
439 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
444 esac
445done
446
447# NLS nuisances.
448# Only set these to C if already set. These must not be set unconditionally
449# because not all systems understand e.g. LANG=C (notably SCO).
450# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451# Non-C LC_CTYPE values break the ctype check.
452if test "${LANG+set}" = set; then LANG=C; export LANG; fi
453if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
456
457# confdefs.h avoids OS command line length limits that DEFS can exceed.
458rm -rf conftest* confdefs.h
459# AIX cpp loses on an empty file, so make sure it contains at least a newline.
460echo > confdefs.h
461
462# A filename unique to this package, relative to the directory that
463# configure is in, which we can look for to find out if srcdir is correct.
464ac_unique_file=pexecute.c
465
466# Find the source files, if location was not specified.
467if test -z "$srcdir"; then
468 ac_srcdir_defaulted=yes
469 # Try the directory containing this script, then its parent.
470 ac_prog=$0
471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473 srcdir=$ac_confdir
474 if test ! -r $srcdir/$ac_unique_file; then
475 srcdir=..
476 fi
477else
478 ac_srcdir_defaulted=no
479fi
480if test ! -r $srcdir/$ac_unique_file; then
481 if test "$ac_srcdir_defaulted" = yes; then
482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483 else
484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485 fi
486fi
487srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489# Prefer explicitly selected file to automatically selected ones.
490if test -z "$CONFIG_SITE"; then
491 if test "x$prefix" != xNONE; then
492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493 else
494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495 fi
496fi
497for ac_site_file in $CONFIG_SITE; do
498 if test -r "$ac_site_file"; then
499 echo "loading site script $ac_site_file"
500 . "$ac_site_file"
501 fi
502done
503
504if test -r "$cache_file"; then
505 echo "loading cache $cache_file"
506 . $cache_file
507else
508 echo "creating cache $cache_file"
509 > $cache_file
510fi
511
512ac_ext=c
513# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514ac_cpp='$CPP $CPPFLAGS'
515ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517cross_compiling=$ac_cv_prog_cc_cross
518
519ac_exeext=
520ac_objext=o
521if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says [email protected].
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='
525' ac_t=' '
526 else
527 ac_n=-n ac_c= ac_t=
528 fi
529else
530 ac_n= ac_c='\c' ac_t=
531fi
532
533
534
535# This works around the fact that libtool configuration may change LD
536# for this particular configuration, but some shells, instead of
537# keeping the changes in LD private, export them just because LD is
538# exported. We don't use libtool yet, but some day we might, so...
539ORIGINAL_LD_FOR_MULTILIBS=$LD
540
541# Check whether --with-target-subdir or --without-target-subdir was given.
542if test "${with_target_subdir+set}" = set; then
543 withval="$with_target_subdir"
544 :
545fi
546
547# Check whether --with-cross-host or --without-cross-host was given.
548if test "${with_cross_host+set}" = set; then
549 withval="$with_cross_host"
550 :
551fi
552
553# Check whether --with-newlib or --without-newlib was given.
554if test "${with_newlib+set}" = set; then
555 withval="$with_newlib"
556 :
557fi
558
559
560if test "${srcdir}" = "."; then
561 if test -z "${with_target_subdir}"; then
562 libiberty_topdir="${srcdir}/.."
563 else
564 if test "${with_target_subdir}" != "."; then
565 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
566 else
567 libiberty_topdir="${srcdir}/${with_multisrctop}.."
568 fi
569 fi
570else
571 libiberty_topdir="${srcdir}/.."
572fi
573
574ac_aux_dir=
575for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
576 if test -f $ac_dir/install-sh; then
577 ac_aux_dir=$ac_dir
578 ac_install_sh="$ac_aux_dir/install-sh -c"
579 break
580 elif test -f $ac_dir/install.sh; then
581 ac_aux_dir=$ac_dir
582 ac_install_sh="$ac_aux_dir/install.sh -c"
583 break
584 fi
585done
586if test -z "$ac_aux_dir"; then
587 { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; }
588fi
589ac_config_guess=$ac_aux_dir/config.guess
590ac_config_sub=$ac_aux_dir/config.sub
591ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
592
593
594
595echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
596echo "configure:597: checking whether to enable maintainer-specific portions of Makefiles" >&5
597 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
598if test "${enable_maintainer_mode+set}" = set; then
599 enableval="$enable_maintainer_mode"
600 maintainer_mode=$enableval
601else
602 maintainer_mode=no
603fi
604
605
606echo "$ac_t""$maintainer_mode" 1>&6
607
608if test "$maintainer_mode" = "yes"; then
609 MAINT=''
610 NOTMAINT='#'
611else
612 MAINT='#'
613 NOTMAINT=''
614fi
615
616# Do we have a single-tree copy of texinfo? Even if we do, we can't
617# rely on it - libiberty is built before texinfo.
618# Extract the first word of "makeinfo", so it can be a program name with args.
619set dummy makeinfo; ac_word=$2
620echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
621echo "configure:622: checking for $ac_word" >&5
622if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
623 echo $ac_n "(cached) $ac_c" 1>&6
624else
625 if test -n "$MAKEINFO"; then
626 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
627else
628 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
629 ac_dummy="$PATH"
630 for ac_dir in $ac_dummy; do
631 test -z "$ac_dir" && ac_dir=.
632 if test -f $ac_dir/$ac_word; then
633 ac_cv_prog_MAKEINFO="makeinfo"
634 break
635 fi
636 done
637 IFS="$ac_save_ifs"
638fi
639fi
640MAKEINFO="$ac_cv_prog_MAKEINFO"
641if test -n "$MAKEINFO"; then
642 echo "$ac_t""$MAKEINFO" 1>&6
643else
644 echo "$ac_t""no" 1>&6
645fi
646
647if test "x$MAKEINFO" = "x"; then
648 MAKEINFO="@echo makeinfo missing; true"
649 BUILD_INFO=
650else
651 BUILD_INFO=info
652 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
653 x*\ [1-3].* )
654 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
655 BUILD_INFO=
656 echo "configure: warning:
657*** Makeinfo is too old. Info documentation will not be built." 1>&2
658 ;;
659 esac
660fi
661
662
663
664# Extract the first word of "perl", so it can be a program name with args.
665set dummy perl; ac_word=$2
666echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
667echo "configure:668: checking for $ac_word" >&5
668if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
669 echo $ac_n "(cached) $ac_c" 1>&6
670else
671 if test -n "$PERL"; then
672 ac_cv_prog_PERL="$PERL" # Let the user override the test.
673else
674 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
675 ac_dummy="$PATH"
676 for ac_dir in $ac_dummy; do
677 test -z "$ac_dir" && ac_dir=.
678 if test -f $ac_dir/$ac_word; then
679 ac_cv_prog_PERL="perl"
680 break
681 fi
682 done
683 IFS="$ac_save_ifs"
684fi
685fi
686PERL="$ac_cv_prog_PERL"
687if test -n "$PERL"; then
688 echo "$ac_t""$PERL" 1>&6
689else
690 echo "$ac_t""no" 1>&6
691fi
692
693if test x"$PERL" = x""; then
694 HAVE_PERL='#'
695else
696 HAVE_PERL=''
697fi
698
699
700
701# Make sure we can run config.sub.
702if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
703else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
704fi
705
706echo $ac_n "checking host system type""... $ac_c" 1>&6
707echo "configure:708: checking host system type" >&5
708
709host_alias=$host
710case "$host_alias" in
711NONE)
712 case $nonopt in
713 NONE)
714 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
715 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
716 fi ;;
717 *) host_alias=$nonopt ;;
718 esac ;;
719esac
720
721host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
722host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
723host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
724host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
725echo "$ac_t""$host" 1>&6
726
727
728
729echo $ac_n "checking build system type""... $ac_c" 1>&6
730echo "configure:731: checking build system type" >&5
731
732build_alias=$build
733case "$build_alias" in
734NONE)
735 case $nonopt in
736 NONE) build_alias=$host_alias ;;
737 *) build_alias=$nonopt ;;
738 esac ;;
739esac
740
741build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
742build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
743build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
744build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
745echo "$ac_t""$build" 1>&6
746
747if test $host != $build; then
748 ac_tool_prefix=${host_alias}-
749else
750 ac_tool_prefix=
751fi
752
753# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
754set dummy ${ac_tool_prefix}ar; ac_word=$2
755echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
756echo "configure:757: checking for $ac_word" >&5
757if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
758 echo $ac_n "(cached) $ac_c" 1>&6
759else
760 if test -n "$AR"; then
761 ac_cv_prog_AR="$AR" # Let the user override the test.
762else
763 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
764 ac_dummy="$PATH"
765 for ac_dir in $ac_dummy; do
766 test -z "$ac_dir" && ac_dir=.
767 if test -f $ac_dir/$ac_word; then
768 ac_cv_prog_AR="${ac_tool_prefix}ar"
769 break
770 fi
771 done
772 IFS="$ac_save_ifs"
773 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
774fi
775fi
776AR="$ac_cv_prog_AR"
777if test -n "$AR"; then
778 echo "$ac_t""$AR" 1>&6
779else
780 echo "$ac_t""no" 1>&6
781fi
782
783
784
785# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
786set dummy ${ac_tool_prefix}ranlib; ac_word=$2
787echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
788echo "configure:789: checking for $ac_word" >&5
789if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
790 echo $ac_n "(cached) $ac_c" 1>&6
791else
792 if test -n "$RANLIB"; then
793 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
794else
795 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
796 ac_dummy="$PATH"
797 for ac_dir in $ac_dummy; do
798 test -z "$ac_dir" && ac_dir=.
799 if test -f $ac_dir/$ac_word; then
800 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
801 break
802 fi
803 done
804 IFS="$ac_save_ifs"
805fi
806fi
807RANLIB="$ac_cv_prog_RANLIB"
808if test -n "$RANLIB"; then
809 echo "$ac_t""$RANLIB" 1>&6
810else
811 echo "$ac_t""no" 1>&6
812fi
813
814
815if test -z "$ac_cv_prog_RANLIB"; then
816if test -n "$ac_tool_prefix"; then
817 # Extract the first word of "ranlib", so it can be a program name with args.
818set dummy ranlib; ac_word=$2
819echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
820echo "configure:821: checking for $ac_word" >&5
821if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
822 echo $ac_n "(cached) $ac_c" 1>&6
823else
824 if test -n "$RANLIB"; then
825 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
826else
827 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
828 ac_dummy="$PATH"
829 for ac_dir in $ac_dummy; do
830 test -z "$ac_dir" && ac_dir=.
831 if test -f $ac_dir/$ac_word; then
832 ac_cv_prog_RANLIB="ranlib"
833 break
834 fi
835 done
836 IFS="$ac_save_ifs"
837 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
838fi
839fi
840RANLIB="$ac_cv_prog_RANLIB"
841if test -n "$RANLIB"; then
842 echo "$ac_t""$RANLIB" 1>&6
843else
844 echo "$ac_t""no" 1>&6
845fi
846
847else
848 RANLIB=":"
849fi
850fi
851
852
853
854# Extract the first word of "gcc", so it can be a program name with args.
855set dummy gcc; ac_word=$2
856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857echo "configure:858: checking for $ac_word" >&5
858if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859 echo $ac_n "(cached) $ac_c" 1>&6
860else
861 if test -n "$CC"; then
862 ac_cv_prog_CC="$CC" # Let the user override the test.
863else
864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
865 ac_dummy="$PATH"
866 for ac_dir in $ac_dummy; do
867 test -z "$ac_dir" && ac_dir=.
868 if test -f $ac_dir/$ac_word; then
869 ac_cv_prog_CC="gcc"
870 break
871 fi
872 done
873 IFS="$ac_save_ifs"
874fi
875fi
876CC="$ac_cv_prog_CC"
877if test -n "$CC"; then
878 echo "$ac_t""$CC" 1>&6
879else
880 echo "$ac_t""no" 1>&6
881fi
882
883if test -z "$CC"; then
884 # Extract the first word of "cc", so it can be a program name with args.
885set dummy cc; ac_word=$2
886echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
887echo "configure:888: checking for $ac_word" >&5
888if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
889 echo $ac_n "(cached) $ac_c" 1>&6
890else
891 if test -n "$CC"; then
892 ac_cv_prog_CC="$CC" # Let the user override the test.
893else
894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
895 ac_prog_rejected=no
896 ac_dummy="$PATH"
897 for ac_dir in $ac_dummy; do
898 test -z "$ac_dir" && ac_dir=.
899 if test -f $ac_dir/$ac_word; then
900 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
901 ac_prog_rejected=yes
902 continue
903 fi
904 ac_cv_prog_CC="cc"
905 break
906 fi
907 done
908 IFS="$ac_save_ifs"
909if test $ac_prog_rejected = yes; then
910 # We found a bogon in the path, so make sure we never use it.
911 set dummy $ac_cv_prog_CC
912 shift
913 if test $# -gt 0; then
914 # We chose a different compiler from the bogus one.
915 # However, it has the same basename, so the bogon will be chosen
916 # first if we set CC to just the basename; use the full file name.
917 shift
918 set dummy "$ac_dir/$ac_word" "$@"
919 shift
920 ac_cv_prog_CC="$@"
921 fi
922fi
923fi
924fi
925CC="$ac_cv_prog_CC"
926if test -n "$CC"; then
927 echo "$ac_t""$CC" 1>&6
928else
929 echo "$ac_t""no" 1>&6
930fi
931
932 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
933fi
934
935echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
936echo "configure:937: checking whether we are using GNU C" >&5
937if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
938 echo $ac_n "(cached) $ac_c" 1>&6
939else
940 cat > conftest.c <<EOF
941#ifdef __GNUC__
942 yes;
943#endif
944EOF
945if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
946 ac_cv_prog_gcc=yes
947else
948 ac_cv_prog_gcc=no
949fi
950fi
951
952echo "$ac_t""$ac_cv_prog_gcc" 1>&6
953
954if test $ac_cv_prog_gcc = yes; then
955 GCC=yes
956 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
957 ac_test_CFLAGS="${CFLAGS+set}"
958 ac_save_CFLAGS="$CFLAGS"
959 CFLAGS=
960 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
961echo "configure:962: checking whether ${CC-cc} accepts -g" >&5
962if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
964else
965 echo 'void f(){}' > conftest.c
966if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
967 ac_cv_prog_cc_g=yes
968else
969 ac_cv_prog_cc_g=no
970fi
971rm -f conftest*
972
973fi
974
975echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
976 if test "$ac_test_CFLAGS" = set; then
977 CFLAGS="$ac_save_CFLAGS"
978 elif test $ac_cv_prog_cc_g = yes; then
979 CFLAGS="-g -O2"
980 else
981 CFLAGS="-O2"
982 fi
983else
984 GCC=
985 ac_libiberty_warn_cflags=
986 test "${CFLAGS+set}" = set || CFLAGS="-g"
987fi
988
989
990
991echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
992echo "configure:993: checking for POSIXized ISC" >&5
993if test -d /etc/conf/kconfig.d &&
994 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
995then
996 echo "$ac_t""yes" 1>&6
997 ISC=yes # If later tests want to check for ISC.
998 cat >> confdefs.h <<\EOF
999#define _POSIX_SOURCE 1
1000EOF
1001
1002 if test "$GCC" = yes; then
1003 CC="$CC -posix"
1004 else
1005 CC="$CC -Xp"
1006 fi
1007else
1008 echo "$ac_t""no" 1>&6
1009 ISC=
1010fi
1011
1012echo $ac_n "checking for working const""... $ac_c" 1>&6
1013echo "configure:1014: checking for working const" >&5
1014if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1015 echo $ac_n "(cached) $ac_c" 1>&6
1016else
1017 cat > conftest.$ac_ext <<EOF
1018#line 1019 "configure"
1019#include "confdefs.h"
1020
1021int main() {
1022
1023/* Ultrix mips cc rejects this. */
1024typedef int charset[2]; const charset x;
1025/* SunOS 4.1.1 cc rejects this. */
1026char const *const *ccp;
1027char **p;
1028/* NEC SVR4.0.2 mips cc rejects this. */
1029struct point {int x, y;};
1030static struct point const zero = {0,0};
1031/* AIX XL C 1.02.0.0 rejects this.
1032 It does not let you subtract one const X* pointer from another in an arm
1033 of an if-expression whose if-part is not a constant expression */
1034const char *g = "string";
1035ccp = &g + (g ? g-g : 0);
1036/* HPUX 7.0 cc rejects these. */
1037++ccp;
1038p = (char**) ccp;
1039ccp = (char const *const *) p;
1040{ /* SCO 3.2v4 cc rejects this. */
1041 char *t;
1042 char const *s = 0 ? (char *) 0 : (char const *) 0;
1043
1044 *t++ = 0;
1045}
1046{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1047 int x[] = {25, 17};
1048 const int *foo = &x[0];
1049 ++foo;
1050}
1051{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1052 typedef const int *iptr;
1053 iptr p = 0;
1054 ++p;
1055}
1056{ /* AIX XL C 1.02.0.0 rejects this saying
1057 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1058 struct s { int j; const int *ap[3]; };
1059 struct s *b; b->j = 5;
1060}
1061{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1062 const int foo = 10;
1063}
1064
1065; return 0; }
1066EOF
1067if { (eval echo configure:1068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1068 rm -rf conftest*
1069 ac_cv_c_const=yes
1070else
1071 echo "configure: failed program was:" >&5
1072 cat conftest.$ac_ext >&5
1073 rm -rf conftest*
1074 ac_cv_c_const=no
1075fi
1076rm -f conftest*
1077fi
1078
1079echo "$ac_t""$ac_cv_c_const" 1>&6
1080if test $ac_cv_c_const = no; then
1081 cat >> confdefs.h <<\EOF
1082#define const
1083EOF
1084
1085fi
1086
1087echo $ac_n "checking for inline""... $ac_c" 1>&6
1088echo "configure:1089: checking for inline" >&5
1089if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1090 echo $ac_n "(cached) $ac_c" 1>&6
1091else
1092 ac_cv_c_inline=no
1093for ac_kw in inline __inline__ __inline; do
1094 cat > conftest.$ac_ext <<EOF
1095#line 1096 "configure"
1096#include "confdefs.h"
1097
1098int main() {
1099} $ac_kw foo() {
1100; return 0; }
1101EOF
1102if { (eval echo configure:1103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1103 rm -rf conftest*
1104 ac_cv_c_inline=$ac_kw; break
1105else
1106 echo "configure: failed program was:" >&5
1107 cat conftest.$ac_ext >&5
1108fi
1109rm -f conftest*
1110done
1111
1112fi
1113
1114echo "$ac_t""$ac_cv_c_inline" 1>&6
1115case "$ac_cv_c_inline" in
1116 inline | yes) ;;
1117 no) cat >> confdefs.h <<\EOF
1118#define inline
1119EOF
1120 ;;
1121 *) cat >> confdefs.h <<EOF
1122#define inline $ac_cv_c_inline
1123EOF
1124 ;;