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