* mips.h (FP_S, FP_D): Define. Bitmasks indicating if an insn
[deliverable/binutils-gdb.git] / opcodes / configure
CommitLineData
c62d1274
ILT
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
9c03036a 4# Generated automatically using autoconf version 2.12
e3659cbf 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
c62d1274
ILT
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 --enable-targets alternative target configurations"
e0bf1022
ILT
16ac_help="$ac_help
17 --enable-shared build shared opcodes library"
18ac_help="$ac_help
19 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
c62d1274
ILT
20
21# Initialize some variables set by options.
22# The variables have the same names as the options, with
23# dashes changed to underlines.
24build=NONE
25cache_file=./config.cache
26exec_prefix=NONE
27host=NONE
28no_create=
29nonopt=NONE
30no_recursion=
31prefix=NONE
32program_prefix=NONE
33program_suffix=NONE
34program_transform_name=s,x,x,
35silent=
36site=
37srcdir=
38target=NONE
39verbose=
40x_includes=NONE
41x_libraries=NONE
00103dfa
ILT
42bindir='${exec_prefix}/bin'
43sbindir='${exec_prefix}/sbin'
44libexecdir='${exec_prefix}/libexec'
45datadir='${prefix}/share'
46sysconfdir='${prefix}/etc'
47sharedstatedir='${prefix}/com'
48localstatedir='${prefix}/var'
49libdir='${exec_prefix}/lib'
50includedir='${prefix}/include'
51oldincludedir='/usr/include'
52infodir='${prefix}/info'
53mandir='${prefix}/man'
c62d1274
ILT
54
55# Initialize some other variables.
56subdirs=
00103dfa 57MFLAGS= MAKEFLAGS=
9c03036a
DE
58# Maximum number of lines to put in a shell here document.
59ac_max_here_lines=12
c62d1274
ILT
60
61ac_prev=
62for ac_option
63do
64
65 # If the previous option needs an argument, assign it.
66 if test -n "$ac_prev"; then
67 eval "$ac_prev=\$ac_option"
68 ac_prev=
69 continue
70 fi
71
72 case "$ac_option" in
73 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
74 *) ac_optarg= ;;
75 esac
76
77 # Accept the important Cygnus configure options, so we can diagnose typos.
78
79 case "$ac_option" in
80
00103dfa
ILT
81 -bindir | --bindir | --bindi | --bind | --bin | --bi)
82 ac_prev=bindir ;;
83 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84 bindir="$ac_optarg" ;;
85
86 -build | --build | --buil | --bui | --bu)
c62d1274 87 ac_prev=build ;;
00103dfa 88 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
c62d1274
ILT
89 build="$ac_optarg" ;;
90
91 -cache-file | --cache-file | --cache-fil | --cache-fi \
92 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93 ac_prev=cache_file ;;
94 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96 cache_file="$ac_optarg" ;;
97
00103dfa
ILT
98 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99 ac_prev=datadir ;;
100 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101 | --da=*)
102 datadir="$ac_optarg" ;;
103
c62d1274
ILT
104 -disable-* | --disable-*)
105 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106 # Reject names that are not valid shell variable names.
107 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109 fi
110 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111 eval "enable_${ac_feature}=no" ;;
112
113 -enable-* | --enable-*)
114 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115 # Reject names that are not valid shell variable names.
116 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 fi
119 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 case "$ac_option" in
121 *=*) ;;
122 *) ac_optarg=yes ;;
123 esac
124 eval "enable_${ac_feature}='$ac_optarg'" ;;
125
126 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128 | --exec | --exe | --ex)
129 ac_prev=exec_prefix ;;
130 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132 | --exec=* | --exe=* | --ex=*)
133 exec_prefix="$ac_optarg" ;;
134
135 -gas | --gas | --ga | --g)
136 # Obsolete; use --with-gas.
137 with_gas=yes ;;
138
139 -help | --help | --hel | --he)
140 # Omit some internal or obsolete options to make the list less imposing.
141 # This message is too long to be a string in the A/UX 3.1 sh.
142 cat << EOF
143Usage: configure [options] [host]
144Options: [defaults in brackets after descriptions]
145Configuration:
146 --cache-file=FILE cache test results in FILE
147 --help print this message
148 --no-create do not create output files
149 --quiet, --silent do not print \`checking...' messages
150 --version print the version of autoconf that created configure
151Directory and file names:
152 --prefix=PREFIX install architecture-independent files in PREFIX
153 [$ac_default_prefix]
00103dfa 154 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
c62d1274 155 [same as prefix]
00103dfa
ILT
156 --bindir=DIR user executables in DIR [EPREFIX/bin]
157 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
158 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
159 --datadir=DIR read-only architecture-independent data in DIR
160 [PREFIX/share]
161 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
162 --sharedstatedir=DIR modifiable architecture-independent data in DIR
163 [PREFIX/com]
164 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
165 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
166 --includedir=DIR C header files in DIR [PREFIX/include]
167 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
168 --infodir=DIR info documentation in DIR [PREFIX/info]
169 --mandir=DIR man documentation in DIR [PREFIX/man]
c62d1274
ILT
170 --srcdir=DIR find the sources in DIR [configure dir or ..]
171 --program-prefix=PREFIX prepend PREFIX to installed program names
172 --program-suffix=SUFFIX append SUFFIX to installed program names
00103dfa
ILT
173 --program-transform-name=PROGRAM
174 run sed PROGRAM on installed program names
175EOF
176 cat << EOF
c62d1274
ILT
177Host type:
178 --build=BUILD configure for building on BUILD [BUILD=HOST]
179 --host=HOST configure for HOST [guessed]
180 --target=TARGET configure for TARGET [TARGET=HOST]
181Features and packages:
182 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
183 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
184 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
185 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
186 --x-includes=DIR X include files are in DIR
187 --x-libraries=DIR X library files are in DIR
c62d1274 188EOF
00103dfa
ILT
189 if test -n "$ac_help"; then
190 echo "--enable and --with options recognized:$ac_help"
191 fi
c62d1274
ILT
192 exit 0 ;;
193
194 -host | --host | --hos | --ho)
195 ac_prev=host ;;
196 -host=* | --host=* | --hos=* | --ho=*)
197 host="$ac_optarg" ;;
198
00103dfa
ILT
199 -includedir | --includedir | --includedi | --included | --include \
200 | --includ | --inclu | --incl | --inc)
201 ac_prev=includedir ;;
202 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203 | --includ=* | --inclu=* | --incl=* | --inc=*)
204 includedir="$ac_optarg" ;;
205
206 -infodir | --infodir | --infodi | --infod | --info | --inf)
207 ac_prev=infodir ;;
208 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209 infodir="$ac_optarg" ;;
210
211 -libdir | --libdir | --libdi | --libd)
212 ac_prev=libdir ;;
213 -libdir=* | --libdir=* | --libdi=* | --libd=*)
214 libdir="$ac_optarg" ;;
215
216 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217 | --libexe | --libex | --libe)
218 ac_prev=libexecdir ;;
219 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220 | --libexe=* | --libex=* | --libe=*)
221 libexecdir="$ac_optarg" ;;
222
223 -localstatedir | --localstatedir | --localstatedi | --localstated \
224 | --localstate | --localstat | --localsta | --localst \
225 | --locals | --local | --loca | --loc | --lo)
226 ac_prev=localstatedir ;;
227 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230 localstatedir="$ac_optarg" ;;
231
232 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233 ac_prev=mandir ;;
234 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235 mandir="$ac_optarg" ;;
236
c62d1274
ILT
237 -nfp | --nfp | --nf)
238 # Obsolete; use --without-fp.
239 with_fp=no ;;
240
241 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
242 | --no-cr | --no-c)
243 no_create=yes ;;
244
245 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
247 no_recursion=yes ;;
248
00103dfa
ILT
249 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251 | --oldin | --oldi | --old | --ol | --o)
252 ac_prev=oldincludedir ;;
253 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256 oldincludedir="$ac_optarg" ;;
257
c62d1274
ILT
258 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259 ac_prev=prefix ;;
260 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261 prefix="$ac_optarg" ;;
262
263 -program-prefix | --program-prefix | --program-prefi | --program-pref \
264 | --program-pre | --program-pr | --program-p)
265 ac_prev=program_prefix ;;
266 -program-prefix=* | --program-prefix=* | --program-prefi=* \
267 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268 program_prefix="$ac_optarg" ;;
269
270 -program-suffix | --program-suffix | --program-suffi | --program-suff \
271 | --program-suf | --program-su | --program-s)
272 ac_prev=program_suffix ;;
273 -program-suffix=* | --program-suffix=* | --program-suffi=* \
274 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275 program_suffix="$ac_optarg" ;;
276
277 -program-transform-name | --program-transform-name \
278 | --program-transform-nam | --program-transform-na \
279 | --program-transform-n | --program-transform- \
280 | --program-transform | --program-transfor \
281 | --program-transfo | --program-transf \
282 | --program-trans | --program-tran \
283 | --progr-tra | --program-tr | --program-t)
284 ac_prev=program_transform_name ;;
285 -program-transform-name=* | --program-transform-name=* \
286 | --program-transform-nam=* | --program-transform-na=* \
287 | --program-transform-n=* | --program-transform-=* \
288 | --program-transform=* | --program-transfor=* \
289 | --program-transfo=* | --program-transf=* \
290 | --program-trans=* | --program-tran=* \
291 | --progr-tra=* | --program-tr=* | --program-t=*)
292 program_transform_name="$ac_optarg" ;;
293
294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295 | -silent | --silent | --silen | --sile | --sil)
296 silent=yes ;;
297
00103dfa
ILT
298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299 ac_prev=sbindir ;;
300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301 | --sbi=* | --sb=*)
302 sbindir="$ac_optarg" ;;
303
304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306 | --sharedst | --shareds | --shared | --share | --shar \
307 | --sha | --sh)
308 ac_prev=sharedstatedir ;;
309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312 | --sha=* | --sh=*)
313 sharedstatedir="$ac_optarg" ;;
314
c62d1274
ILT
315 -site | --site | --sit)
316 ac_prev=site ;;
317 -site=* | --site=* | --sit=*)
318 site="$ac_optarg" ;;
319
320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321 ac_prev=srcdir ;;
322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323 srcdir="$ac_optarg" ;;
324
00103dfa
ILT
325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326 | --syscon | --sysco | --sysc | --sys | --sy)
327 ac_prev=sysconfdir ;;
328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330 sysconfdir="$ac_optarg" ;;
331
c62d1274
ILT
332 -target | --target | --targe | --targ | --tar | --ta | --t)
333 ac_prev=target ;;
334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335 target="$ac_optarg" ;;
336
337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
338 verbose=yes ;;
339
340 -version | --version | --versio | --versi | --vers)
9c03036a 341 echo "configure generated by autoconf version 2.12"
c62d1274
ILT
342 exit 0 ;;
343
344 -with-* | --with-*)
345 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346 # Reject names that are not valid shell variable names.
347 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349 fi
350 ac_package=`echo $ac_package| sed 's/-/_/g'`
351 case "$ac_option" in
352 *=*) ;;
353 *) ac_optarg=yes ;;
354 esac
355 eval "with_${ac_package}='$ac_optarg'" ;;
356
357 -without-* | --without-*)
358 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359 # Reject names that are not valid shell variable names.
360 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 fi
363 ac_package=`echo $ac_package| sed 's/-/_/g'`
364 eval "with_${ac_package}=no" ;;
365
366 --x)
367 # Obsolete; use --with-x.
368 with_x=yes ;;
369
370 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371 | --x-incl | --x-inc | --x-in | --x-i)
372 ac_prev=x_includes ;;
373 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375 x_includes="$ac_optarg" ;;
376
377 -x-libraries | --x-libraries | --x-librarie | --x-librari \
378 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379 ac_prev=x_libraries ;;
380 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382 x_libraries="$ac_optarg" ;;
383
384 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
385 ;;
386
00103dfa 387 *)
c62d1274
ILT
388 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389 echo "configure: warning: $ac_option: invalid host type" 1>&2
390 fi
391 if test "x$nonopt" != xNONE; then
392 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
393 fi
394 nonopt="$ac_option"
395 ;;
396
397 esac
398done
399
400if test -n "$ac_prev"; then
401 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402fi
403
404trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405
406# File descriptor usage:
407# 0 standard input
408# 1 file creation
409# 2 errors and warnings
410# 3 some systems may open it to /dev/tty
411# 4 used on the Kubota Titan
412# 6 checking for... messages and results
413# 5 compiler messages saved in config.log
414if test "$silent" = yes; then
415 exec 6>/dev/null
416else
417 exec 6>&1
418fi
419exec 5>./config.log
420
421echo "\
422This file contains any messages produced by compilers while
423running configure, to aid debugging if configure makes a mistake.
424" 1>&5
425
426# Strip out --no-create and --no-recursion so they do not pile up.
427# Also quote any args containing shell metacharacters.
428ac_configure_args=
429for ac_arg
430do
431 case "$ac_arg" in
432 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433 | --no-cr | --no-c) ;;
434 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
439 esac
440done
441
442# NLS nuisances.
9c03036a
DE
443# Only set these to C if already set. These must not be set unconditionally
444# because not all systems understand e.g. LANG=C (notably SCO).
445# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
446# Non-C LC_CTYPE values break the ctype check.
c62d1274 447if test "${LANG+set}" = set; then LANG=C; export LANG; fi
9c03036a
DE
448if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
c62d1274
ILT
451
452# confdefs.h avoids OS command line length limits that DEFS can exceed.
453rm -rf conftest* confdefs.h
454# AIX cpp loses on an empty file, so make sure it contains at least a newline.
455echo > confdefs.h
456
457# A filename unique to this package, relative to the directory that
458# configure is in, which we can look for to find out if srcdir is correct.
459ac_unique_file=z8k-dis.c
460
461# Find the source files, if location was not specified.
462if test -z "$srcdir"; then
463 ac_srcdir_defaulted=yes
464 # Try the directory containing this script, then its parent.
465 ac_prog=$0
466 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
467 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468 srcdir=$ac_confdir
469 if test ! -r $srcdir/$ac_unique_file; then
470 srcdir=..
471 fi
472else
473 ac_srcdir_defaulted=no
474fi
475if test ! -r $srcdir/$ac_unique_file; then
476 if test "$ac_srcdir_defaulted" = yes; then
477 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478 else
479 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
480 fi
481fi
482srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484# Prefer explicitly selected file to automatically selected ones.
485if test -z "$CONFIG_SITE"; then
486 if test "x$prefix" != xNONE; then
487 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488 else
489 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
490 fi
491fi
492for ac_site_file in $CONFIG_SITE; do
493 if test -r "$ac_site_file"; then
494 echo "loading site script $ac_site_file"
495 . "$ac_site_file"
496 fi
497done
498
499if test -r "$cache_file"; then
500 echo "loading cache $cache_file"
501 . $cache_file
502else
503 echo "creating cache $cache_file"
504 > $cache_file
505fi
506
507ac_ext=c
508# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7919b9ec
ILT
509ac_cpp='$CPP $CPPFLAGS'
510ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
9c03036a 512cross_compiling=$ac_cv_prog_cc_cross
c62d1274
ILT
513
514if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517 ac_n= ac_c='
518' ac_t=' '
519 else
520 ac_n=-n ac_c= ac_t=
521 fi
522else
523 ac_n= ac_c='\c' ac_t=
524fi
525
526
527# configure.in script for the opcodes library.
7919b9ec 528# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
c62d1274
ILT
529# Written by Cygnus Support.
530#
531# This program is free software; you can redistribute it and/or modify
532# it under the terms of the GNU General Public License as published by
533# the Free Software Foundation; either version 2 of the License, or
534# (at your option) any later version.
535#
536# This program is distributed in the hope that it will be useful,
537# but WITHOUT ANY WARRANTY; without even the implied warranty of
538# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
539# GNU General Public License for more details.
540#
541# You should have received a copy of the GNU General Public License
542# along with this program; if not, write to the Free Software
543# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
544
545# Check whether --enable-targets or --disable-targets was given.
00103dfa
ILT
546if test "${enable_targets+set}" = set; then
547 enableval="$enable_targets"
c62d1274
ILT
548 case "${enableval}" in
549 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
550 ;;
551 no) enable_targets= ;;
552 *) enable_targets=$enableval ;;
553esac
554fi
e0bf1022
ILT
555# Check whether --enable-shared or --disable-shared was given.
556if test "${enable_shared+set}" = set; then
557 enableval="$enable_shared"
558 case "${enableval}" in
559 yes) shared=true ;;
560 no) shared=false ;;
639b5a09
ILT
561 *opcodes*) shared=true ;;
562 *) shared=false ;;
e0bf1022
ILT
563esac
564fi
565# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
566if test "${enable_commonbfdlib+set}" = set; then
567 enableval="$enable_commonbfdlib"
568 case "${enableval}" in
569 yes) commonbfdlib=true ;;
570 no) commonbfdlib=false ;;
571 *) { echo "configure: error: bad value ${enableval} for opcodes commonbfdlib option" 1>&2; exit 1; } ;;
572esac
573fi
c62d1274 574
824155e8
ILT
575
576
577ac_aux_dir=
578for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
579 if test -f $ac_dir/install-sh; then
580 ac_aux_dir=$ac_dir
581 ac_install_sh="$ac_aux_dir/install-sh -c"
582 break
583 elif test -f $ac_dir/install.sh; then
584 ac_aux_dir=$ac_dir
585 ac_install_sh="$ac_aux_dir/install.sh -c"
586 break
587 fi
588done
589if test -z "$ac_aux_dir"; then
590 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; }
591fi
592ac_config_guess=$ac_aux_dir/config.guess
593ac_config_sub=$ac_aux_dir/config.sub
594ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
595
596
597# Do some error checking and defaulting for the host and target type.
598# The inputs are:
599# configure --host=HOST --target=TARGET --build=BUILD NONOPT
600#
601# The rules are:
602# 1. You are not allowed to specify --host, --target, and nonopt at the
00103dfa 603# same time.
824155e8
ILT
604# 2. Host defaults to nonopt.
605# 3. If nonopt is not specified, then host defaults to the current host,
606# as determined by config.guess.
607# 4. Target and build default to nonopt.
608# 5. If nonopt is not specified, then target and build default to host.
609
610# The aliases save the names the user supplied, while $host etc.
611# will get canonicalized.
612case $host---$target---$nonopt in
613NONE---*---* | *---NONE---* | *---*---NONE) ;;
614*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
615esac
616
617
618# Make sure we can run config.sub.
619if $ac_config_sub sun4 >/dev/null 2>&1; then :
620else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
621fi
622
623echo $ac_n "checking host system type""... $ac_c" 1>&6
9c03036a 624echo "configure:625: checking host system type" >&5
824155e8
ILT
625
626host_alias=$host
627case "$host_alias" in
628NONE)
629 case $nonopt in
630 NONE)
631 if host_alias=`$ac_config_guess`; then :
632 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
633 fi ;;
634 *) host_alias=$nonopt ;;
635 esac ;;
636esac
637
638host=`$ac_config_sub $host_alias`
9c03036a
DE
639host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
640host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
641host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
824155e8
ILT
642echo "$ac_t""$host" 1>&6
643
644echo $ac_n "checking target system type""... $ac_c" 1>&6
9c03036a 645echo "configure:646: checking target system type" >&5
824155e8
ILT
646
647target_alias=$target
648case "$target_alias" in
649NONE)
650 case $nonopt in
651 NONE) target_alias=$host_alias ;;
652 *) target_alias=$nonopt ;;
653 esac ;;
654esac
655
656target=`$ac_config_sub $target_alias`
9c03036a
DE
657target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
658target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
659target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
824155e8
ILT
660echo "$ac_t""$target" 1>&6
661
662echo $ac_n "checking build system type""... $ac_c" 1>&6
9c03036a 663echo "configure:664: checking build system type" >&5
824155e8
ILT
664
665build_alias=$build
666case "$build_alias" in
667NONE)
668 case $nonopt in
669 NONE) build_alias=$host_alias ;;
670 *) build_alias=$nonopt ;;
671 esac ;;
672esac
673
674build=`$ac_config_sub $build_alias`
9c03036a
DE
675build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
676build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
677build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
824155e8
ILT
678echo "$ac_t""$build" 1>&6
679
680test "$host_alias" != "$target_alias" &&
681 test "$program_prefix$program_suffix$program_transform_name" = \
682 NONENONEs,x,x, &&
683 program_prefix=${target_alias}-
684
685if test -z "$target" ; then
686 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
687fi
46bcd2ec
ILT
688if test "$program_transform_name" = s,x,x,; then
689 program_transform_name=
690else
691 # Double any \ or $. echo might interpret backslashes.
692 cat <<\EOF_SED > conftestsed
693s,\\,\\\\,g; s,\$,$$,g
694EOF_SED
695 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
696 rm -f conftestsed
697fi
698test "$program_prefix" != NONE &&
699 program_transform_name="s,^,${program_prefix},; $program_transform_name"
700# Use a double $ so make ignores it.
701test "$program_suffix" != NONE &&
702 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
703
704# sed with no file args requires a program.
705test "$program_transform_name" = "" && program_transform_name="s,x,x,"
706
824155e8 707
c62d1274
ILT
708# host-specific stuff:
709
9b17e0ea 710ALLLIBS='$(TARGETLIB)'
e0bf1022 711PICFLAG=
7919b9ec
ILT
712SHLIB=unused-shlib
713SHLINK=unused-shlink
e0bf1022
ILT
714if test "${shared}" = "true"; then
715 ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
716 PICFLAG=-fpic
717 if test "${commonbfdlib}" = "true"; then
718 SHLIB=../bfd/libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/../bfd/VERSION`
719 SHLINK=../bfd/libbfd.so
720 else
721 SHLIB=libopcodes.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/../bfd/VERSION`
722 SHLINK=libopcodes.so
723 fi
724fi
725
00103dfa
ILT
726# Extract the first word of "gcc", so it can be a program name with args.
727set dummy gcc; ac_word=$2
728echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c03036a 729echo "configure:730: checking for $ac_word" >&5
00103dfa
ILT
730if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
731 echo $ac_n "(cached) $ac_c" 1>&6
732else
733 if test -n "$CC"; then
734 ac_cv_prog_CC="$CC" # Let the user override the test.
735else
736 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
737 for ac_dir in $PATH; do
738 test -z "$ac_dir" && ac_dir=.
739 if test -f $ac_dir/$ac_word; then
740 ac_cv_prog_CC="gcc"
741 break
742 fi
743 done
744 IFS="$ac_save_ifs"
00103dfa
ILT
745fi
746fi
747CC="$ac_cv_prog_CC"
748if test -n "$CC"; then
749 echo "$ac_t""$CC" 1>&6
750else
751 echo "$ac_t""no" 1>&6
752fi
753
7919b9ec
ILT
754if test -z "$CC"; then
755 # Extract the first word of "cc", so it can be a program name with args.
756set dummy cc; ac_word=$2
757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c03036a 758echo "configure:759: checking for $ac_word" >&5
7919b9ec
ILT
759if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
761else
762 if test -n "$CC"; then
763 ac_cv_prog_CC="$CC" # Let the user override the test.
764else
765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
766 ac_prog_rejected=no
767 for ac_dir in $PATH; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
771 ac_prog_rejected=yes
772 continue
773 fi
774 ac_cv_prog_CC="cc"
775 break
776 fi
777 done
778 IFS="$ac_save_ifs"
779if test $ac_prog_rejected = yes; then
780 # We found a bogon in the path, so make sure we never use it.
781 set dummy $ac_cv_prog_CC
782 shift
783 if test $# -gt 0; then
784 # We chose a different compiler from the bogus one.
785 # However, it has the same basename, so the bogon will be chosen
786 # first if we set CC to just the basename; use the full file name.
787 shift
788 set dummy "$ac_dir/$ac_word" "$@"
789 shift
790 ac_cv_prog_CC="$@"
791 fi
792fi
793fi
794fi
795CC="$ac_cv_prog_CC"
796if test -n "$CC"; then
797 echo "$ac_t""$CC" 1>&6
798else
799 echo "$ac_t""no" 1>&6
800fi
801
802 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
803fi
c62d1274 804
9c03036a
DE
805echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
806echo "configure:807: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
807
808ac_ext=c
809# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810ac_cpp='$CPP $CPPFLAGS'
811ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813cross_compiling=$ac_cv_prog_cc_cross
814
815cat > conftest.$ac_ext <<EOF
816#line 817 "configure"
817#include "confdefs.h"
818main(){return(0);}
819EOF
820if { (eval echo configure:821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
821 ac_cv_prog_cc_works=yes
822 # If we can't run a trivial program, we are probably using a cross compiler.
823 if (./conftest; exit) 2>/dev/null; then
824 ac_cv_prog_cc_cross=no
825 else
826 ac_cv_prog_cc_cross=yes
827 fi
828else
829 echo "configure: failed program was:" >&5
830 cat conftest.$ac_ext >&5
831 ac_cv_prog_cc_works=no
832fi
833rm -fr conftest*
834
835echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
836if test $ac_cv_prog_cc_works = no; then
837 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
838fi
839echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
840echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
841echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
842cross_compiling=$ac_cv_prog_cc_cross
843
00103dfa 844echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
9c03036a 845echo "configure:846: checking whether we are using GNU C" >&5
00103dfa
ILT
846if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
847 echo $ac_n "(cached) $ac_c" 1>&6
848else
849 cat > conftest.c <<EOF
c62d1274
ILT
850#ifdef __GNUC__
851 yes;
852#endif
853EOF
9c03036a 854if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
00103dfa
ILT
855 ac_cv_prog_gcc=yes
856else
857 ac_cv_prog_gcc=no
858fi
859fi
860
861echo "$ac_t""$ac_cv_prog_gcc" 1>&6
9c03036a 862
00103dfa 863if test $ac_cv_prog_gcc = yes; then
c62d1274 864 GCC=yes
9c03036a
DE
865 ac_test_CFLAGS="${CFLAGS+set}"
866 ac_save_CFLAGS="$CFLAGS"
867 CFLAGS=
868 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
869echo "configure:870: checking whether ${CC-cc} accepts -g" >&5
870if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
00103dfa
ILT
871 echo $ac_n "(cached) $ac_c" 1>&6
872else
873 echo 'void f(){}' > conftest.c
874if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
9c03036a 875 ac_cv_prog_cc_g=yes
00103dfa 876else
9c03036a 877 ac_cv_prog_cc_g=no
00103dfa
ILT
878fi
879rm -f conftest*
880
881fi
882
9c03036a
DE
883echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
884 if test "$ac_test_CFLAGS" = set; then
885 CFLAGS="$ac_save_CFLAGS"
886 elif test $ac_cv_prog_cc_g = yes; then
887 CFLAGS="-g -O2"
888 else
889 CFLAGS="-O2"
c62d1274
ILT
890 fi
891else
892 GCC=
893 test "${CFLAGS+set}" = set || CFLAGS="-g"
894fi
9b65d522
ILT
895
896
46bcd2ec
ILT
897. ${srcdir}/../bfd/configure.host
898
40db6118 899
7919b9ec
ILT
900if test $host != $build; then
901 ac_tool_prefix=${host_alias}-
902else
903 ac_tool_prefix=
904fi
905
906# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
907set dummy ${ac_tool_prefix}ar; ac_word=$2
00103dfa 908echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c03036a 909echo "configure:910: checking for $ac_word" >&5
00103dfa
ILT
910if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
911 echo $ac_n "(cached) $ac_c" 1>&6
912else
913 if test -n "$AR"; then
914 ac_cv_prog_AR="$AR" # Let the user override the test.
915else
916 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
917 for ac_dir in $PATH; do
918 test -z "$ac_dir" && ac_dir=.
919 if test -f $ac_dir/$ac_word; then
7919b9ec 920 ac_cv_prog_AR="${ac_tool_prefix}ar"
00103dfa
ILT
921 break
922 fi
923 done
924 IFS="$ac_save_ifs"
7919b9ec 925 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
00103dfa
ILT
926fi
927fi
928AR="$ac_cv_prog_AR"
929if test -n "$AR"; then
930 echo "$ac_t""$AR" 1>&6
931else
932 echo "$ac_t""no" 1>&6
933fi
c62d1274 934
7919b9ec
ILT
935
936
937# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
938set dummy ${ac_tool_prefix}ranlib; ac_word=$2
939echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c03036a 940echo "configure:941: checking for $ac_word" >&5
7919b9ec
ILT
941if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
942 echo $ac_n "(cached) $ac_c" 1>&6
943else
944 if test -n "$RANLIB"; then
945 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
946else
947 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
948 for ac_dir in $PATH; do
949 test -z "$ac_dir" && ac_dir=.
950 if test -f $ac_dir/$ac_word; then
951 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
952 break
953 fi
954 done
955 IFS="$ac_save_ifs"
956fi
957fi
958RANLIB="$ac_cv_prog_RANLIB"
959if test -n "$RANLIB"; then
960 echo "$ac_t""$RANLIB" 1>&6
961else
962 echo "$ac_t""no" 1>&6
963fi
964
965
966if test -z "$ac_cv_prog_RANLIB"; then
967if test -n "$ac_tool_prefix"; then
968 # Extract the first word of "ranlib", so it can be a program name with args.
c62d1274
ILT
969set dummy ranlib; ac_word=$2
970echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c03036a 971echo "configure:972: checking for $ac_word" >&5
c62d1274
ILT
972if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
973 echo $ac_n "(cached) $ac_c" 1>&6
974else
975 if test -n "$RANLIB"; then
976 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
977else
978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
979 for ac_dir in $PATH; do
980 test -z "$ac_dir" && ac_dir=.
981 if test -f $ac_dir/$ac_word; then
982 ac_cv_prog_RANLIB="ranlib"
983 break
984 fi
985 done
986 IFS="$ac_save_ifs"
987 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
988fi
989fi
990RANLIB="$ac_cv_prog_RANLIB"
991if test -n "$RANLIB"; then
992 echo "$ac_t""$RANLIB" 1>&6
993else
994 echo "$ac_t""no" 1>&6
995fi
996
7919b9ec
ILT
997else
998 RANLIB=":"
999fi
1000fi
1001
9b65d522
ILT
1002# Find a good install program. We prefer a C program (faster),
1003# so one script is as good as another. But avoid the broken or
1004# incompatible versions:
1005# SysV /etc/install, /usr/sbin/install
1006# SunOS /usr/etc/install
1007# IRIX /sbin/install
1008# AIX /bin/install
1009# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1010# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1011# ./install, which can be erroneously created by make from ./install.sh.
1012echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
9c03036a 1013echo "configure:1014: checking for a BSD compatible install" >&5
9b65d522
ILT
1014if test -z "$INSTALL"; then
1015if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1016 echo $ac_n "(cached) $ac_c" 1>&6
1017else
9c03036a 1018 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
9b65d522
ILT
1019 for ac_dir in $PATH; do
1020 # Account for people who put trailing slashes in PATH elements.
1021 case "$ac_dir/" in
1022 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1023 *)
1024 # OSF1 and SCO ODT 3.0 have their own names for install.
1025 for ac_prog in ginstall installbsd scoinst install; do
1026 if test -f $ac_dir/$ac_prog; then
1027 if test $ac_prog = install &&
1028 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1029 # AIX install. It has an incompatible calling convention.
1030 # OSF/1 installbsd also uses dspmsg, but is usable.
1031 :
1032 else
1033 ac_cv_path_install="$ac_dir/$ac_prog -c"
1034 break 2
1035 fi
1036 fi
1037 done
1038 ;;
1039 esac
1040 done
9c03036a 1041 IFS="$ac_save_IFS"
00103dfa 1042
9b65d522 1043fi
00103dfa
ILT
1044 if test "${ac_cv_path_install+set}" = set; then
1045 INSTALL="$ac_cv_path_install"
1046 else
1047 # As a last resort, use the slow shell script. We don't cache a
1048 # path for INSTALL within a source directory, because that will
1049 # break other packages using the cache if that directory is
1050 # removed, or if the path is relative.
1051 INSTALL="$ac_install_sh"
1052 fi
9b65d522
ILT
1053fi
1054echo "$ac_t""$INSTALL" 1>&6
1055
1056# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1057# It thinks the first close brace ends the variable substitution.
1058test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1059
1060test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1061
1062
e0bf1022
ILT
1063if test "${shared}" = "true"; then
1064 if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
1065 echo "configure: warning: opcodes --enable-shared only supported when using gcc" 1>&2
1066 shared=false
7919b9ec 1067 ALLLIBS='$(TARGETLIB)'
e0bf1022 1068 PICFLAG=
7919b9ec 1069 SHLIB=unused-shlib
e0bf1022
ILT
1070 fi
1071fi
1072
1073
1074
1075
1076
1077
b4aa23f2 1078
e0bf1022
ILT
1079if test "${commonbfdlib}" = "true"; then
1080 COMMON_SHLIB=yes
7919b9ec
ILT
1081 # Rebuild the shared library if libiberty or libbfd changes.
1082 SHLIB_DEP="../libiberty/libiberty.a ../bfd/libbfd.a"
e3659cbf 1083 BFD_PICLIST=../bfd/piclist
e0bf1022
ILT
1084else
1085 COMMON_SHLIB=
7919b9ec 1086 SHLIB_DEP=
e3659cbf 1087 BFD_PICLIST=
e0bf1022
ILT
1088fi
1089
1090
1091
7919b9ec 1092
e3659cbf 1093
e7c50cef 1094
c62d1274 1095echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
b4aa23f2 1096echo "configure:1097: checking how to run the C preprocessor" >&5
c62d1274
ILT
1097# On Suns, sometimes $CPP names a directory.
1098if test -n "$CPP" && test -d "$CPP"; then
1099 CPP=
1100fi
1101if test -z "$CPP"; then
1102if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1103 echo $ac_n "(cached) $ac_c" 1>&6
1104else
1105 # This must be in double quotes, not single quotes, because CPP may get
1106 # substituted into the Makefile and "${CC-cc}" will confuse make.
1107 CPP="${CC-cc} -E"
1108 # On the NeXT, cc -E runs the code through the compiler's parser,
1109 # not just through cpp.
1110 cat > conftest.$ac_ext <<EOF
b4aa23f2 1111#line 1112 "configure"
c62d1274
ILT
1112#include "confdefs.h"
1113#include <assert.h>
1114Syntax Error
1115EOF
7919b9ec 1116ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b4aa23f2 1117{ (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c62d1274
ILT
1118ac_err=`grep -v '^ *+' conftest.out`
1119if test -z "$ac_err"; then
1120 :
1121else
1122 echo "$ac_err" >&5
9c03036a
DE
1123 echo "configure: failed program was:" >&5
1124 cat conftest.$ac_ext >&5
c62d1274
ILT
1125 rm -rf conftest*
1126 CPP="${CC-cc} -E -traditional-cpp"
1127 cat > conftest.$ac_ext <<EOF
b4aa23f2 1128#line 1129 "configure"
c62d1274
ILT
1129#include "confdefs.h"
1130#include <assert.h>
1131Syntax Error
1132EOF
7919b9ec 1133ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b4aa23f2 1134{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c62d1274
ILT
1135ac_err=`grep -v '^ *+' conftest.out`
1136if test -z "$ac_err"; then
1137 :
1138else
1139 echo "$ac_err" >&5
9c03036a
DE
1140 echo "configure: failed program was:" >&5
1141 cat conftest.$ac_ext >&5
c62d1274
ILT
1142 rm -rf conftest*
1143 CPP=/lib/cpp
1144fi
1145rm -f conftest*
1146fi
1147rm -f conftest*
1148 ac_cv_prog_CPP="$CPP"
1149fi
1150 CPP="$ac_cv_prog_CPP"
1151else
1152 ac_cv_prog_CPP="$CPP"
1153fi
1154echo "$ac_t""$CPP" 1>&6
1155
9c03036a 1156for ac_hdr in string.h strings.h stdlib.h
c62d1274 1157do
9c03036a 1158ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
c62d1274 1159echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b4aa23f2 1160echo "configure:1161: checking for $ac_hdr" >&5
c62d1274
ILT
1161if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
1163else
1164 cat > conftest.$ac_ext <<EOF
b4aa23f2 1165#line 1166 "configure"
c62d1274
ILT
1166#include "confdefs.h"
1167#include <$ac_hdr>
1168EOF
7919b9ec 1169ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b4aa23f2 1170{ (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c62d1274
ILT
1171ac_err=`grep -v '^ *+' conftest.out`
1172if test -z "$ac_err"; then
1173 rm -rf conftest*
1174 eval "ac_cv_header_$ac_safe=yes"
1175else
1176 echo "$ac_err" >&5
9c03036a
DE
1177 echo "configure: failed program was:" >&5
1178 cat conftest.$ac_ext >&5
c62d1274
ILT
1179 rm -rf conftest*
1180 eval "ac_cv_header_$ac_safe=no"
1181fi
1182rm -f conftest*
1183fi
1184if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1185 echo "$ac_t""yes" 1>&6
9c03036a 1186 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
c62d1274
ILT
1187 cat >> confdefs.h <<EOF
1188#define $ac_tr_hdr 1
1189EOF
1190
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194done
1195
1196
c62d1274
ILT
1197# target-specific stuff:
1198
1199# Canonicalize the secondary target names.
1200if test -n "$enable_targets" ; then
1201 for targ in `echo $enable_targets | sed 's/,/ /g'`
1202 do
1203 result=`$ac_config_sub $targ 2>/dev/null`
1204 if test -n "$result" ; then
1205 canon_targets="$canon_targets $result"
1206 else
1207 # Allow targets that config.sub doesn't recognize, like "all".
1208 canon_targets="$canon_targets $targ"
1209 fi
1210 done
1211fi
1212
1213all_targets=false
1214selarchs=
1215for targ in $target $canon_targets
1216do
1217 if test "x$targ" = "xall" ; then
1218 all_targets=true
1219 else
1220 . $srcdir/../bfd/config.bfd
1221 selarchs="$selarchs $targ_archs"
1222 fi
1223done
1224
9c03036a
DE
1225# Utility var, documents generic cgen support files.
1226
1227cgen_files="cgen-opc.o cgen-asm.o cgen-dis.o"
1228
c62d1274
ILT
1229# We don't do any links based on the target system, just makefile config.
1230
1231if test x${all_targets} = xfalse ; then
1232
1233 # Target architecture .o files.
1234 ta=
1235
1236 for arch in $selarchs
1237 do
1238 ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g`
1239 archdefs="$archdefs -DARCH_$ad"
1240 case "$arch" in
1241 bfd_a29k_arch) ta="$ta a29k-dis.o" ;;
00103dfa 1242 bfd_alliant_arch) ;;
e3659cbf 1243 bfd_alpha_arch) ta="$ta alpha-dis.o alpha-opc.o" ;;
c62d1274
ILT
1244# start-sanitize-arc
1245 bfd_arc_arch) ta="$ta arc-dis.o arc-opc.o" ;;
1246# end-sanitize-arc
1247 bfd_arm_arch) ta="$ta arm-dis.o" ;;
00103dfa 1248 bfd_convex_arch) ;;
e7c50cef 1249 bfd_d10v_arch) ta="$ta d10v-dis.o d10v-opc.o" ;;
b2e3f844
MH
1250# start-sanitize-d30v
1251 bfd_d30v_arch) ta="$ta d30v-dis.o d30v-opc.o" ;;
1252# end-sanitize-d30v
c62d1274
ILT
1253 bfd_h8300_arch) ta="$ta h8300-dis.o" ;;
1254 bfd_h8500_arch) ta="$ta h8500-dis.o" ;;
1255 bfd_hppa_arch) ta="$ta hppa-dis.o" ;;
1256 bfd_i386_arch) ta="$ta i386-dis.o" ;;
f98c3369 1257 bfd_i860_arch) ;;
c62d1274 1258 bfd_i960_arch) ta="$ta i960-dis.o" ;;
9c03036a 1259 bfd_m32r_arch) ta="$ta $cgen_files m32r-opc.o m32r-asm.o m32r-dis.o" ;;
c62d1274
ILT
1260 bfd_m68k_arch) ta="$ta m68k-dis.o m68k-opc.o" ;;
1261 bfd_m88k_arch) ta="$ta m88k-dis.o" ;;
8d67dc30 1262 bfd_mips_arch) ta="$ta mips-dis.o mips-opc.o mips16-opc.o" ;;
e358a062
ILT
1263 bfd_mn10200_arch) ta="$ta m10200-dis.o m10200-opc.o" ;;
1264 bfd_mn10300_arch) ta="$ta m10300-dis.o m10300-opc.o" ;;
c62d1274
ILT
1265 bfd_ns32k_arch) ta="$ta ns32k-dis.o" ;;
1266 bfd_powerpc_arch) ta="$ta ppc-dis.o ppc-opc.o" ;;
00103dfa
ILT
1267 bfd_pyramid_arch) ;;
1268 bfd_romp_arch) ;;
c62d1274 1269 bfd_rs6000_arch) ta="$ta ppc-dis.o ppc-opc.o" ;;
00103dfa 1270 bfd_sh_arch) ta="$ta sh-dis.o" ;;
c62d1274 1271 bfd_sparc_arch) ta="$ta sparc-dis.o sparc-opc.o" ;;
00103dfa 1272 bfd_tahoe_arch) ;;
b2e3f844
MH
1273# start-sanitize-tic80
1274 bfd_tic80_arch) ta="$ta tic80-dis.o tic80-opc.o" ;;
1275# end-sanitize-tic80
e7c50cef
JL
1276# start-sanitize-v850
1277 bfd_v850_arch) ta="$ta v850-opc.o v850-dis.o" ;;
1278# end-sanitize-v850
c62d1274 1279 bfd_vax_arch) ;;
00103dfa 1280 bfd_w65_arch) ta="$ta w65-dis.o" ;;
c62d1274
ILT
1281 bfd_we32k_arch) ;;
1282 bfd_z8k_arch) ta="$ta z8k-dis.o" ;;
c62d1274
ILT
1283
1284 "") ;;
1285 *) { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
1286 esac
1287 done
1288
1289 # Weed out duplicate .o files.
1290 f=""
1291 for i in $ta ; do
1292 case " $f " in
1293 *" $i "*) ;;
1294 *) f="$f $i" ;;
1295 esac
1296 done
1297 ta="$f"
1298
1299 # And duplicate -D flags.
1300 f=""
1301 for i in $archdefs ; do
1302 case " $f " in
1303 *" $i "*) ;;
1304 *) f="$f $i" ;;
1305 esac
1306 done
1307 archdefs="$f"
1308
1309 BFD_MACHINES="$ta"
1310
1311else # all_targets is true
1312 archdefs=-DARCH_all
1313 BFD_MACHINES='$(ALL_MACHINES)'
1314fi
1315
1316
1317
1318
c62d1274
ILT
1319trap '' 1 2 15
1320cat > confcache <<\EOF
1321# This file is a shell script that caches the results of configure
1322# tests run on this system so they can be shared between configure
1323# scripts and configure runs. It is not useful on other systems.
1324# If it contains results you don't want to keep, you may remove or edit it.
1325#
1326# By default, configure uses ./config.cache as the cache file,
1327# creating it if it does not exist already. You can give configure
1328# the --cache-file=FILE option to use a different cache file; that is
1329# what configure does when it calls configure scripts in
1330# subdirectories, so they share the cache.
1331# Giving --cache-file=/dev/null disables caching, for debugging configure.
1332# config.status only pays attention to the cache file if you give it the
1333# --recheck option to rerun configure.
1334#
1335EOF
9c03036a
DE
1336# The following way of writing the cache mishandles newlines in values,
1337# but we know of no workaround that is simple, portable, and efficient.
1338# So, don't put newlines in cache variables' values.
c62d1274
ILT
1339# Ultrix sh set writes to stderr and can't be redirected directly,
1340# and sets the high bit in the cache file unless we assign to the vars.
1341(set) 2>&1 |
9c03036a
DE
1342 case `(ac_space=' '; set) 2>&1` in
1343 *ac_space=\ *)
1344 # `set' does not quote correctly, so add quotes (double-quote substitution
1345 # turns \\\\ into \\, and sed turns \\ into \).
1346 sed -n \
1347 -e "s/'/'\\\\''/g" \
1348 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1349 ;;
1350 *)
1351 # `set' quotes correctly as required by POSIX, so do not add quotes.
1352 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1353 ;;
1354 esac >> confcache
c62d1274
ILT
1355if cmp -s $cache_file confcache; then
1356 :
1357else
1358 if test -w $cache_file; then
1359 echo "updating cache $cache_file"
1360 cat confcache > $cache_file
1361 else
1362 echo "not updating unwritable cache $cache_file"
1363 fi
1364fi
1365rm -f confcache
1366
1367trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1368
1369test "x$prefix" = xNONE && prefix=$ac_default_prefix
1370# Let make expand exec_prefix.
1371test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1372
1373# Any assignment to VPATH causes Sun make to only execute
1374# the first set of double-colon rules, so remove it if not needed.
1375# If there is a colon in the path, we need to keep it.
1376if test "x$srcdir" = x.; then
1377 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1378fi
1379
1380trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1381
1382DEFS=-DHAVE_CONFIG_H
1383
1384# Without the "./", some shells look in PATH for config.status.
1385: ${CONFIG_STATUS=./config.status}
1386
1387echo creating $CONFIG_STATUS
1388rm -f $CONFIG_STATUS
1389cat > $CONFIG_STATUS <<EOF
1390#! /bin/sh
1391# Generated automatically by configure.
1392# Run this file to recreate the current configuration.
1393# This directory was configured as follows,
1394# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1395#
1396# $0 $ac_configure_args
1397#
1398# Compiler output produced by configure, useful for debugging
1399# configure, is in ./config.log if it exists.
1400
1401ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1402for ac_option
1403do
1404 case "\$ac_option" in
1405 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1406 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1407 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1408 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9c03036a 1409 echo "$CONFIG_STATUS generated by autoconf version 2.12"
c62d1274
ILT
1410 exit 0 ;;
1411 -help | --help | --hel | --he | --h)
1412 echo "\$ac_cs_usage"; exit 0 ;;
1413 *) echo "\$ac_cs_usage"; exit 1 ;;
1414 esac
1415done
1416
1417ac_given_srcdir=$srcdir
9b65d522 1418ac_given_INSTALL="$INSTALL"
c62d1274
ILT
1419
1420trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
e0bf1022
ILT
1421EOF
1422cat >> $CONFIG_STATUS <<EOF
c62d1274 1423
00103dfa 1424# Protect against being on the right side of a sed subst in config.status.
e0bf1022
ILT
1425sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1426 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
c62d1274
ILT
1427$ac_vpsub
1428$extrasub
1429s%@CFLAGS@%$CFLAGS%g
1430s%@CPPFLAGS@%$CPPFLAGS%g
1431s%@CXXFLAGS@%$CXXFLAGS%g
1432s%@DEFS@%$DEFS%g
1433s%@LDFLAGS@%$LDFLAGS%g
1434s%@LIBS@%$LIBS%g
1435s%@exec_prefix@%$exec_prefix%g
1436s%@prefix@%$prefix%g
1437s%@program_transform_name@%$program_transform_name%g
00103dfa
ILT
1438s%@bindir@%$bindir%g
1439s%@sbindir@%$sbindir%g
1440s%@libexecdir@%$libexecdir%g
1441s%@datadir@%$datadir%g
1442s%@sysconfdir@%$sysconfdir%g
1443s%@sharedstatedir@%$sharedstatedir%g
1444s%@localstatedir@%$localstatedir%g
1445s%@libdir@%$libdir%g
1446s%@includedir@%$includedir%g
1447s%@oldincludedir@%$oldincludedir%g
1448s%@infodir@%$infodir%g
1449s%@mandir@%$mandir%g
c62d1274
ILT
1450s%@host@%$host%g
1451s%@host_alias@%$host_alias%g
1452s%@host_cpu@%$host_cpu%g
1453s%@host_vendor@%$host_vendor%g
1454s%@host_os@%$host_os%g
1455s%@target@%$target%g
1456s%@target_alias@%$target_alias%g
1457s%@target_cpu@%$target_cpu%g
1458s%@target_vendor@%$target_vendor%g
1459s%@target_os@%$target_os%g
1460s%@build@%$build%g
1461s%@build_alias@%$build_alias%g
1462s%@build_cpu@%$build_cpu%g
1463s%@build_vendor@%$build_vendor%g
1464s%@build_os@%$build_os%g
824155e8
ILT
1465s%@CC@%$CC%g
1466s%@HDEFINES@%$HDEFINES%g
1467s%@AR@%$AR%g
1468s%@RANLIB@%$RANLIB%g
1469s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1470s%@INSTALL_DATA@%$INSTALL_DATA%g
e0bf1022
ILT
1471s%@ALLLIBS@%$ALLLIBS%g
1472s%@PICFLAG@%$PICFLAG%g
1473s%@SHLIB@%$SHLIB%g
1474s%@SHLIB_CC@%$SHLIB_CC%g
1475s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
b4aa23f2 1476s%@SHLIB_LIBS@%$SHLIB_LIBS%g
e0bf1022 1477s%@COMMON_SHLIB@%$COMMON_SHLIB%g
7919b9ec 1478s%@SHLIB_DEP@%$SHLIB_DEP%g
e3659cbf 1479s%@BFD_PICLIST@%$BFD_PICLIST%g
e0bf1022 1480s%@SHLINK@%$SHLINK%g
e7c50cef 1481s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
824155e8 1482s%@CPP@%$CPP%g
c62d1274
ILT
1483s%@archdefs@%$archdefs%g
1484s%@BFD_MACHINES@%$BFD_MACHINES%g
1485
1486CEOF
1487EOF
9c03036a
DE
1488
1489cat >> $CONFIG_STATUS <<\EOF
1490
1491# Split the substitutions into bite-sized pieces for seds with
1492# small command number limits, like on Digital OSF/1 and HP-UX.
1493ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1494ac_file=1 # Number of current file.
1495ac_beg=1 # First line for current file.
1496ac_end=$ac_max_sed_cmds # Line after last line for current file.
1497ac_more_lines=:
1498ac_sed_cmds=""
1499while $ac_more_lines; do
1500 if test $ac_beg -gt 1; then
1501 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1502 else
1503 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1504 fi
1505 if test ! -s conftest.s$ac_file; then
1506 ac_more_lines=false
1507 rm -f conftest.s$ac_file
1508 else
1509 if test -z "$ac_sed_cmds"; then
1510 ac_sed_cmds="sed -f conftest.s$ac_file"
1511 else
1512 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1513 fi
1514 ac_file=`expr $ac_file + 1`
1515 ac_beg=$ac_end
1516 ac_end=`expr $ac_end + $ac_max_sed_cmds`
1517 fi
1518done
1519if test -z "$ac_sed_cmds"; then
1520 ac_sed_cmds=cat
1521fi
1522EOF
1523
c62d1274
ILT
1524cat >> $CONFIG_STATUS <<EOF
1525
1526CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1527EOF
1528cat >> $CONFIG_STATUS <<\EOF
1529for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9c03036a 1530 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
c62d1274 1531 case "$ac_file" in
9c03036a 1532 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
c62d1274
ILT
1533 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1534 *) ac_file_in="${ac_file}.in" ;;
1535 esac
1536
9c03036a 1537 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
c62d1274
ILT
1538
1539 # Remove last slash and all that follows it. Not all systems have dirname.
1540 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1541 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1542 # The file is in a subdirectory.
1543 test ! -d "$ac_dir" && mkdir "$ac_dir"
1544 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1545 # A "../" for each directory in $ac_dir_suffix.
1546 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1547 else
1548 ac_dir_suffix= ac_dots=
1549 fi
1550
1551 case "$ac_given_srcdir" in
1552 .) srcdir=.
1553 if test -z "$ac_dots"; then top_srcdir=.
1554 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1555 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1556 *) # Relative path.
1557 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1558 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1559 esac
1560
9b65d522
ILT
1561 case "$ac_given_INSTALL" in
1562 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1563 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1564 esac
9c03036a 1565
c62d1274
ILT
1566 echo creating "$ac_file"
1567 rm -f "$ac_file"
1568 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1569 case "$ac_file" in
1570 *Makefile*) ac_comsub="1i\\
1571# $configure_input" ;;
1572 *) ac_comsub= ;;
1573 esac
9c03036a
DE
1574
1575 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
c62d1274
ILT
1576 sed -e "$ac_comsub
1577s%@configure_input@%$configure_input%g
1578s%@srcdir@%$srcdir%g
1579s%@top_srcdir@%$top_srcdir%g
9b65d522 1580s%@INSTALL@%$INSTALL%g
9c03036a 1581" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
c62d1274 1582fi; done
9c03036a 1583rm -f conftest.s*
c62d1274
ILT
1584
1585# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1586# NAME is the cpp macro being defined and VALUE is the value it is being given.
1587#
1588# ac_d sets the value in "#define NAME VALUE" lines.
1589ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1590ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1591ac_dC='\3'
1592ac_dD='%g'
1593# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1594ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1595ac_uB='\([ ]\)%\1#\2define\3'
1596ac_uC=' '
1597ac_uD='\4%g'
1598# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1599ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1600ac_eB='$%\1#\2define\3'
1601ac_eC=' '
1602ac_eD='%g'
1603
9c03036a
DE
1604if test "${CONFIG_HEADERS+set}" != set; then
1605EOF
1606cat >> $CONFIG_STATUS <<EOF
1607 CONFIG_HEADERS="config.h:config.in"
1608EOF
1609cat >> $CONFIG_STATUS <<\EOF
1610fi
c62d1274 1611for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9c03036a 1612 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
c62d1274 1613 case "$ac_file" in
9c03036a 1614 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
c62d1274
ILT
1615 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1616 *) ac_file_in="${ac_file}.in" ;;
1617 esac
1618
1619 echo creating $ac_file
1620
1621 rm -f conftest.frag conftest.in conftest.out
9c03036a
DE
1622 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1623 cat $ac_file_inputs > conftest.in
c62d1274
ILT
1624
1625EOF
1626
1627# Transform confdefs.h into a sed script conftest.vals that substitutes
1628# the proper values into config.h.in to produce config.h. And first:
00103dfa 1629# Protect against being on the right side of a sed subst in config.status.
c62d1274
ILT
1630# Protect against being in an unquoted here document in config.status.
1631rm -f conftest.vals
1632cat > conftest.hdr <<\EOF
1633s/[\\&%]/\\&/g
1634s%[\\$`]%\\&%g
e3659cbf 1635s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
c62d1274
ILT
1636s%ac_d%ac_u%gp
1637s%ac_u%ac_e%gp
1638EOF
1639sed -n -f conftest.hdr confdefs.h > conftest.vals
1640rm -f conftest.hdr
1641
1642# This sed command replaces #undef with comments. This is necessary, for
1643# example, in the case of _POSIX_SOURCE, which is predefined and required
1644# on some systems where configure will not decide to define it.
1645cat >> conftest.vals <<\EOF
1646s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1647EOF
1648
1649# Break up conftest.vals because some shells have a limit on
1650# the size of here documents, and old seds have small limits too.
c62d1274
ILT
1651
1652rm -f conftest.tail
1653while :
1654do
1655 ac_lines=`grep -c . conftest.vals`
1656 # grep -c gives empty output for an empty file on some AIX systems.
1657 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1658 # Write a limited-size here document to conftest.frag.
1659 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1660 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1661 echo 'CEOF
1662 sed -f conftest.frag conftest.in > conftest.out
1663 rm -f conftest.in
1664 mv conftest.out conftest.in
1665' >> $CONFIG_STATUS
1666 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1667 rm -f conftest.vals
1668 mv conftest.tail conftest.vals
1669done
1670rm -f conftest.vals
1671
1672cat >> $CONFIG_STATUS <<\EOF
1673 rm -f conftest.frag conftest.h
1674 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1675 cat conftest.in >> conftest.h
1676 rm -f conftest.in
1677 if cmp -s $ac_file conftest.h 2>/dev/null; then
1678 echo "$ac_file is unchanged"
1679 rm -f conftest.h
1680 else
e3659cbf
MH
1681 # Remove last slash and all that follows it. Not all systems have dirname.
1682 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1683 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1684 # The file is in a subdirectory.
1685 test ! -d "$ac_dir" && mkdir "$ac_dir"
1686 fi
c62d1274
ILT
1687 rm -f $ac_file
1688 mv conftest.h $ac_file
1689 fi
1690fi; done
1691
9c03036a
DE
1692EOF
1693cat >> $CONFIG_STATUS <<EOF
c62d1274 1694
9c03036a
DE
1695EOF
1696cat >> $CONFIG_STATUS <<\EOF
824155e8 1697case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
c62d1274
ILT
1698exit 0
1699EOF
1700chmod +x $CONFIG_STATUS
1701rm -fr confdefs* $ac_clean_files
1702test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1703
This page took 0.148575 seconds and 4 git commands to generate.