* configure.in: Substitute SHLIB_LIBS.
[platform/upstream/binutils.git] / opcodes / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-targets        alternative target configurations"
16 ac_help="$ac_help
17   --enable-shared         build shared opcodes library"
18 ac_help="$ac_help
19   --enable-commonbfdlib   build shared BFD/opcodes/libiberty library"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 # Maximum number of lines to put in a shell here document.
59 ac_max_here_lines=12
60
61 ac_prev=
62 for ac_option
63 do
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
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)
87     ac_prev=build ;;
88   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
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
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
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
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
145 Configuration:
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
151 Directory and file names:
152   --prefix=PREFIX         install architecture-independent files in PREFIX
153                           [$ac_default_prefix]
154   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
155                           [same as prefix]
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]
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
173   --program-transform-name=PROGRAM
174                           run sed PROGRAM on installed program names
175 EOF
176     cat << EOF
177 Host 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]
181 Features 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
188 EOF
189     if test -n "$ac_help"; then
190       echo "--enable and --with options recognized:$ac_help"
191     fi
192     exit 0 ;;
193
194   -host | --host | --hos | --ho)
195     ac_prev=host ;;
196   -host=* | --host=* | --hos=* | --ho=*)
197     host="$ac_optarg" ;;
198
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
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
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
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
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
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
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
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)
341     echo "configure generated by autoconf version 2.12"
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
387   *)
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
398 done
399
400 if test -n "$ac_prev"; then
401   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402 fi
403
404 trap '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
414 if test "$silent" = yes; then
415   exec 6>/dev/null
416 else
417   exec 6>&1
418 fi
419 exec 5>./config.log
420
421 echo "\
422 This file contains any messages produced by compilers while
423 running 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.
428 ac_configure_args=
429 for ac_arg
430 do
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
440 done
441
442 # NLS nuisances.
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.
447 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
448 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
451
452 # confdefs.h avoids OS command line length limits that DEFS can exceed.
453 rm -rf conftest* confdefs.h
454 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
455 echo > 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.
459 ac_unique_file=z8k-dis.c
460
461 # Find the source files, if location was not specified.
462 if 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
472 else
473   ac_srcdir_defaulted=no
474 fi
475 if 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
481 fi
482 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484 # Prefer explicitly selected file to automatically selected ones.
485 if 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
491 fi
492 for 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
497 done
498
499 if test -r "$cache_file"; then
500   echo "loading cache $cache_file"
501   . $cache_file
502 else
503   echo "creating cache $cache_file"
504   > $cache_file
505 fi
506
507 ac_ext=c
508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
509 ac_cpp='$CPP $CPPFLAGS'
510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512 cross_compiling=$ac_cv_prog_cc_cross
513
514 if (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
522 else
523   ac_n= ac_c='\c' ac_t=
524 fi
525
526
527 #    configure.in script for the opcodes library.
528 #    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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.
546 if test "${enable_targets+set}" = set; then
547   enableval="$enable_targets"
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 ;;
553 esac
554 fi
555 # Check whether --enable-shared or --disable-shared was given.
556 if test "${enable_shared+set}" = set; then
557   enableval="$enable_shared"
558   case "${enableval}" in
559   yes) shared=true ;;
560   no)  shared=false ;;
561   *opcodes*) shared=true ;;
562   *) shared=false ;;
563 esac
564 fi
565 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
566 if 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; } ;;
572 esac
573 fi
574
575
576
577 ac_aux_dir=
578 for 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
588 done
589 if 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; }
591 fi
592 ac_config_guess=$ac_aux_dir/config.guess
593 ac_config_sub=$ac_aux_dir/config.sub
594 ac_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
603 #    same time.
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.
612 case $host---$target---$nonopt in
613 NONE---*---* | *---NONE---* | *---*---NONE) ;;
614 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
615 esac
616
617
618 # Make sure we can run config.sub.
619 if $ac_config_sub sun4 >/dev/null 2>&1; then :
620 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
621 fi
622
623 echo $ac_n "checking host system type""... $ac_c" 1>&6
624 echo "configure:625: checking host system type" >&5
625
626 host_alias=$host
627 case "$host_alias" in
628 NONE)
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 ;;
636 esac
637
638 host=`$ac_config_sub $host_alias`
639 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
640 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
641 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
642 echo "$ac_t""$host" 1>&6
643
644 echo $ac_n "checking target system type""... $ac_c" 1>&6
645 echo "configure:646: checking target system type" >&5
646
647 target_alias=$target
648 case "$target_alias" in
649 NONE)
650   case $nonopt in
651   NONE) target_alias=$host_alias ;;
652   *) target_alias=$nonopt ;;
653   esac ;;
654 esac
655
656 target=`$ac_config_sub $target_alias`
657 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
658 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
659 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
660 echo "$ac_t""$target" 1>&6
661
662 echo $ac_n "checking build system type""... $ac_c" 1>&6
663 echo "configure:664: checking build system type" >&5
664
665 build_alias=$build
666 case "$build_alias" in
667 NONE)
668   case $nonopt in
669   NONE) build_alias=$host_alias ;;
670   *) build_alias=$nonopt ;;
671   esac ;;
672 esac
673
674 build=`$ac_config_sub $build_alias`
675 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
676 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
677 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
678 echo "$ac_t""$build" 1>&6
679
680 test "$host_alias" != "$target_alias" &&
681   test "$program_prefix$program_suffix$program_transform_name" = \
682     NONENONEs,x,x, &&
683   program_prefix=${target_alias}-
684
685 if test -z "$target" ; then
686     { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
687 fi
688 if test "$program_transform_name" = s,x,x,; then
689   program_transform_name=
690 else
691   # Double any \ or $.  echo might interpret backslashes.
692   cat <<\EOF_SED > conftestsed
693 s,\\,\\\\,g; s,\$,$$,g
694 EOF_SED
695   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
696   rm -f conftestsed
697 fi
698 test "$program_prefix" != NONE &&
699   program_transform_name="s,^,${program_prefix},; $program_transform_name"
700 # Use a double $ so make ignores it.
701 test "$program_suffix" != NONE &&
702   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
703
704 # sed with no file args requires a program.
705 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
706
707
708 # host-specific stuff:
709
710 ALLLIBS='$(TARGETLIB)'
711 PICFLAG=
712 SHLIB=unused-shlib
713 SHLINK=unused-shlink
714 if 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
724 fi
725
726 # Extract the first word of "gcc", so it can be a program name with args.
727 set dummy gcc; ac_word=$2
728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
729 echo "configure:730: checking for $ac_word" >&5
730 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
731   echo $ac_n "(cached) $ac_c" 1>&6
732 else
733   if test -n "$CC"; then
734   ac_cv_prog_CC="$CC" # Let the user override the test.
735 else
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"
745 fi
746 fi
747 CC="$ac_cv_prog_CC"
748 if test -n "$CC"; then
749   echo "$ac_t""$CC" 1>&6
750 else
751   echo "$ac_t""no" 1>&6
752 fi
753
754 if test -z "$CC"; then
755   # Extract the first word of "cc", so it can be a program name with args.
756 set dummy cc; ac_word=$2
757 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
758 echo "configure:759: checking for $ac_word" >&5
759 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
760   echo $ac_n "(cached) $ac_c" 1>&6
761 else
762   if test -n "$CC"; then
763   ac_cv_prog_CC="$CC" # Let the user override the test.
764 else
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"
779 if 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
792 fi
793 fi
794 fi
795 CC="$ac_cv_prog_CC"
796 if test -n "$CC"; then
797   echo "$ac_t""$CC" 1>&6
798 else
799   echo "$ac_t""no" 1>&6
800 fi
801
802   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
803 fi
804
805 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
806 echo "configure:807: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 cat > conftest.$ac_ext <<EOF
816 #line 817 "configure"
817 #include "confdefs.h"
818 main(){return(0);}
819 EOF
820 if { (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
828 else
829   echo "configure: failed program was:" >&5
830   cat conftest.$ac_ext >&5
831   ac_cv_prog_cc_works=no
832 fi
833 rm -fr conftest*
834
835 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
836 if 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; }
838 fi
839 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
840 echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
841 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
842 cross_compiling=$ac_cv_prog_cc_cross
843
844 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
845 echo "configure:846: checking whether we are using GNU C" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
847   echo $ac_n "(cached) $ac_c" 1>&6
848 else
849   cat > conftest.c <<EOF
850 #ifdef __GNUC__
851   yes;
852 #endif
853 EOF
854 if { 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
855   ac_cv_prog_gcc=yes
856 else
857   ac_cv_prog_gcc=no
858 fi
859 fi
860
861 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
862
863 if test $ac_cv_prog_gcc = yes; then
864   GCC=yes
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
869 echo "configure:870: checking whether ${CC-cc} accepts -g" >&5
870 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
871   echo $ac_n "(cached) $ac_c" 1>&6
872 else
873   echo 'void f(){}' > conftest.c
874 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
875   ac_cv_prog_cc_g=yes
876 else
877   ac_cv_prog_cc_g=no
878 fi
879 rm -f conftest*
880
881 fi
882
883 echo "$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"
890   fi
891 else
892   GCC=
893   test "${CFLAGS+set}" = set || CFLAGS="-g"
894 fi
895
896
897 . ${srcdir}/../bfd/configure.host
898
899
900 if test $host != $build; then
901   ac_tool_prefix=${host_alias}-
902 else
903   ac_tool_prefix=
904 fi
905
906 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
907 set dummy ${ac_tool_prefix}ar; ac_word=$2
908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
909 echo "configure:910: checking for $ac_word" >&5
910 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
911   echo $ac_n "(cached) $ac_c" 1>&6
912 else
913   if test -n "$AR"; then
914   ac_cv_prog_AR="$AR" # Let the user override the test.
915 else
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
920       ac_cv_prog_AR="${ac_tool_prefix}ar"
921       break
922     fi
923   done
924   IFS="$ac_save_ifs"
925   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
926 fi
927 fi
928 AR="$ac_cv_prog_AR"
929 if test -n "$AR"; then
930   echo "$ac_t""$AR" 1>&6
931 else
932   echo "$ac_t""no" 1>&6
933 fi
934
935
936
937 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
938 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
940 echo "configure:941: checking for $ac_word" >&5
941 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
942   echo $ac_n "(cached) $ac_c" 1>&6
943 else
944   if test -n "$RANLIB"; then
945   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
946 else
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"
956 fi
957 fi
958 RANLIB="$ac_cv_prog_RANLIB"
959 if test -n "$RANLIB"; then
960   echo "$ac_t""$RANLIB" 1>&6
961 else
962   echo "$ac_t""no" 1>&6
963 fi
964
965
966 if test -z "$ac_cv_prog_RANLIB"; then
967 if test -n "$ac_tool_prefix"; then
968   # Extract the first word of "ranlib", so it can be a program name with args.
969 set dummy ranlib; ac_word=$2
970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
971 echo "configure:972: checking for $ac_word" >&5
972 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
973   echo $ac_n "(cached) $ac_c" 1>&6
974 else
975   if test -n "$RANLIB"; then
976   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
977 else
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=":"
988 fi
989 fi
990 RANLIB="$ac_cv_prog_RANLIB"
991 if test -n "$RANLIB"; then
992   echo "$ac_t""$RANLIB" 1>&6
993 else
994   echo "$ac_t""no" 1>&6
995 fi
996
997 else
998   RANLIB=":"
999 fi
1000 fi
1001
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.
1012 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1013 echo "configure:1014: checking for a BSD compatible install" >&5
1014 if test -z "$INSTALL"; then
1015 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1016   echo $ac_n "(cached) $ac_c" 1>&6
1017 else
1018     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
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
1041   IFS="$ac_save_IFS"
1042
1043 fi
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
1053 fi
1054 echo "$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.
1058 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1059
1060 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1061
1062
1063 if 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
1067     ALLLIBS='$(TARGETLIB)'
1068     PICFLAG=
1069     SHLIB=unused-shlib
1070   fi
1071 fi
1072
1073
1074
1075
1076
1077
1078
1079 if test "${commonbfdlib}" = "true"; then
1080   COMMON_SHLIB=yes
1081   # Rebuild the shared library if libiberty or libbfd changes.
1082   SHLIB_DEP="../libiberty/libiberty.a ../bfd/libbfd.a"
1083   BFD_PICLIST=../bfd/piclist
1084 else
1085   COMMON_SHLIB=
1086   SHLIB_DEP=
1087   BFD_PICLIST=
1088 fi
1089
1090
1091
1092
1093
1094
1095 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1096 echo "configure:1097: checking how to run the C preprocessor" >&5
1097 # On Suns, sometimes $CPP names a directory.
1098 if test -n "$CPP" && test -d "$CPP"; then
1099   CPP=
1100 fi
1101 if test -z "$CPP"; then
1102 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
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
1111 #line 1112 "configure"
1112 #include "confdefs.h"
1113 #include <assert.h>
1114 Syntax Error
1115 EOF
1116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1117 { (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1118 ac_err=`grep -v '^ *+' conftest.out`
1119 if test -z "$ac_err"; then
1120   :
1121 else
1122   echo "$ac_err" >&5
1123   echo "configure: failed program was:" >&5
1124   cat conftest.$ac_ext >&5
1125   rm -rf conftest*
1126   CPP="${CC-cc} -E -traditional-cpp"
1127   cat > conftest.$ac_ext <<EOF
1128 #line 1129 "configure"
1129 #include "confdefs.h"
1130 #include <assert.h>
1131 Syntax Error
1132 EOF
1133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1134 { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1135 ac_err=`grep -v '^ *+' conftest.out`
1136 if test -z "$ac_err"; then
1137   :
1138 else
1139   echo "$ac_err" >&5
1140   echo "configure: failed program was:" >&5
1141   cat conftest.$ac_ext >&5
1142   rm -rf conftest*
1143   CPP=/lib/cpp
1144 fi
1145 rm -f conftest*
1146 fi
1147 rm -f conftest*
1148   ac_cv_prog_CPP="$CPP"
1149 fi
1150   CPP="$ac_cv_prog_CPP"
1151 else
1152   ac_cv_prog_CPP="$CPP"
1153 fi
1154 echo "$ac_t""$CPP" 1>&6
1155
1156 for ac_hdr in string.h strings.h stdlib.h
1157 do
1158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1160 echo "configure:1161: checking for $ac_hdr" >&5
1161 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1162   echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164   cat > conftest.$ac_ext <<EOF
1165 #line 1166 "configure"
1166 #include "confdefs.h"
1167 #include <$ac_hdr>
1168 EOF
1169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1170 { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1171 ac_err=`grep -v '^ *+' conftest.out`
1172 if test -z "$ac_err"; then
1173   rm -rf conftest*
1174   eval "ac_cv_header_$ac_safe=yes"
1175 else
1176   echo "$ac_err" >&5
1177   echo "configure: failed program was:" >&5
1178   cat conftest.$ac_ext >&5
1179   rm -rf conftest*
1180   eval "ac_cv_header_$ac_safe=no"
1181 fi
1182 rm -f conftest*
1183 fi
1184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1185   echo "$ac_t""yes" 1>&6
1186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1187   cat >> confdefs.h <<EOF
1188 #define $ac_tr_hdr 1
1189 EOF
1190  
1191 else
1192   echo "$ac_t""no" 1>&6
1193 fi
1194 done
1195
1196
1197 # target-specific stuff:
1198
1199 # Canonicalize the secondary target names.
1200 if 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
1211 fi
1212
1213 all_targets=false
1214 selarchs=
1215 for targ in $target $canon_targets
1216 do
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
1223 done    
1224
1225 # Utility var, documents generic cgen support files.
1226
1227 cgen_files="cgen-opc.o cgen-asm.o cgen-dis.o"
1228
1229 # We don't do any links based on the target system, just makefile config.
1230
1231 if 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" ;;
1242         bfd_alliant_arch)       ;;
1243         bfd_alpha_arch)         ta="$ta alpha-dis.o alpha-opc.o" ;;
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" ;;
1248         bfd_convex_arch)        ;;
1249         bfd_d10v_arch)          ta="$ta d10v-dis.o d10v-opc.o" ;;
1250 # start-sanitize-d30v
1251         bfd_d30v_arch)          ta="$ta d30v-dis.o d30v-opc.o" ;;
1252 # end-sanitize-d30v
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" ;;
1257         bfd_i860_arch)          ;;
1258         bfd_i960_arch)          ta="$ta i960-dis.o" ;;
1259         bfd_m32r_arch)          ta="$ta $cgen_files m32r-opc.o m32r-asm.o m32r-dis.o" ;;
1260         bfd_m68k_arch)          ta="$ta m68k-dis.o m68k-opc.o" ;;
1261         bfd_m88k_arch)          ta="$ta m88k-dis.o" ;;
1262         bfd_mips_arch)          ta="$ta mips-dis.o mips-opc.o mips16-opc.o" ;;
1263         bfd_mn10200_arch)       ta="$ta m10200-dis.o m10200-opc.o" ;;
1264         bfd_mn10300_arch)       ta="$ta m10300-dis.o m10300-opc.o" ;;
1265         bfd_ns32k_arch)         ta="$ta ns32k-dis.o" ;;
1266         bfd_powerpc_arch)       ta="$ta ppc-dis.o ppc-opc.o" ;;
1267         bfd_pyramid_arch)       ;;
1268         bfd_romp_arch)          ;;
1269         bfd_rs6000_arch)        ta="$ta ppc-dis.o ppc-opc.o" ;;
1270         bfd_sh_arch)            ta="$ta sh-dis.o" ;;
1271         bfd_sparc_arch)         ta="$ta sparc-dis.o sparc-opc.o" ;;
1272         bfd_tahoe_arch)         ;;
1273 # start-sanitize-tic80
1274         bfd_tic80_arch)         ta="$ta tic80-dis.o tic80-opc.o" ;;
1275 # end-sanitize-tic80
1276 # start-sanitize-v850
1277         bfd_v850_arch)          ta="$ta v850-opc.o v850-dis.o" ;;
1278 # end-sanitize-v850
1279         bfd_vax_arch)           ;;
1280         bfd_w65_arch)           ta="$ta w65-dis.o" ;;
1281         bfd_we32k_arch)         ;;
1282         bfd_z8k_arch)           ta="$ta z8k-dis.o" ;;
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
1311 else    # all_targets is true
1312     archdefs=-DARCH_all
1313     BFD_MACHINES='$(ALL_MACHINES)'
1314 fi
1315
1316
1317
1318
1319 trap '' 1 2 15
1320 cat > 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 #
1335 EOF
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.
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 |
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
1355 if cmp -s $cache_file confcache; then
1356   :
1357 else
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
1364 fi
1365 rm -f confcache
1366
1367 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1368
1369 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1370 # Let make expand exec_prefix.
1371 test "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.
1376 if test "x$srcdir" = x.; then
1377   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1378 fi
1379
1380 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1381
1382 DEFS=-DHAVE_CONFIG_H
1383
1384 # Without the "./", some shells look in PATH for config.status.
1385 : ${CONFIG_STATUS=./config.status}
1386
1387 echo creating $CONFIG_STATUS
1388 rm -f $CONFIG_STATUS
1389 cat > $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
1401 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1402 for ac_option
1403 do
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)
1409     echo "$CONFIG_STATUS generated by autoconf version 2.12"
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
1415 done
1416
1417 ac_given_srcdir=$srcdir
1418 ac_given_INSTALL="$INSTALL"
1419
1420 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1421 EOF
1422 cat >> $CONFIG_STATUS <<EOF
1423
1424 # Protect against being on the right side of a sed subst in config.status.
1425 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1426  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1427 $ac_vpsub
1428 $extrasub
1429 s%@CFLAGS@%$CFLAGS%g
1430 s%@CPPFLAGS@%$CPPFLAGS%g
1431 s%@CXXFLAGS@%$CXXFLAGS%g
1432 s%@DEFS@%$DEFS%g
1433 s%@LDFLAGS@%$LDFLAGS%g
1434 s%@LIBS@%$LIBS%g
1435 s%@exec_prefix@%$exec_prefix%g
1436 s%@prefix@%$prefix%g
1437 s%@program_transform_name@%$program_transform_name%g
1438 s%@bindir@%$bindir%g
1439 s%@sbindir@%$sbindir%g
1440 s%@libexecdir@%$libexecdir%g
1441 s%@datadir@%$datadir%g
1442 s%@sysconfdir@%$sysconfdir%g
1443 s%@sharedstatedir@%$sharedstatedir%g
1444 s%@localstatedir@%$localstatedir%g
1445 s%@libdir@%$libdir%g
1446 s%@includedir@%$includedir%g
1447 s%@oldincludedir@%$oldincludedir%g
1448 s%@infodir@%$infodir%g
1449 s%@mandir@%$mandir%g
1450 s%@host@%$host%g
1451 s%@host_alias@%$host_alias%g
1452 s%@host_cpu@%$host_cpu%g
1453 s%@host_vendor@%$host_vendor%g
1454 s%@host_os@%$host_os%g
1455 s%@target@%$target%g
1456 s%@target_alias@%$target_alias%g
1457 s%@target_cpu@%$target_cpu%g
1458 s%@target_vendor@%$target_vendor%g
1459 s%@target_os@%$target_os%g
1460 s%@build@%$build%g
1461 s%@build_alias@%$build_alias%g
1462 s%@build_cpu@%$build_cpu%g
1463 s%@build_vendor@%$build_vendor%g
1464 s%@build_os@%$build_os%g
1465 s%@CC@%$CC%g
1466 s%@HDEFINES@%$HDEFINES%g
1467 s%@AR@%$AR%g
1468 s%@RANLIB@%$RANLIB%g
1469 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1470 s%@INSTALL_DATA@%$INSTALL_DATA%g
1471 s%@ALLLIBS@%$ALLLIBS%g
1472 s%@PICFLAG@%$PICFLAG%g
1473 s%@SHLIB@%$SHLIB%g
1474 s%@SHLIB_CC@%$SHLIB_CC%g
1475 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
1476 s%@SHLIB_LIBS@%$SHLIB_LIBS%g
1477 s%@COMMON_SHLIB@%$COMMON_SHLIB%g
1478 s%@SHLIB_DEP@%$SHLIB_DEP%g
1479 s%@BFD_PICLIST@%$BFD_PICLIST%g
1480 s%@SHLINK@%$SHLINK%g
1481 s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
1482 s%@CPP@%$CPP%g
1483 s%@archdefs@%$archdefs%g
1484 s%@BFD_MACHINES@%$BFD_MACHINES%g
1485
1486 CEOF
1487 EOF
1488
1489 cat >> $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.
1493 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1494 ac_file=1 # Number of current file.
1495 ac_beg=1 # First line for current file.
1496 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1497 ac_more_lines=:
1498 ac_sed_cmds=""
1499 while $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
1518 done
1519 if test -z "$ac_sed_cmds"; then
1520   ac_sed_cmds=cat
1521 fi
1522 EOF
1523
1524 cat >> $CONFIG_STATUS <<EOF
1525
1526 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1527 EOF
1528 cat >> $CONFIG_STATUS <<\EOF
1529 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1530   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1531   case "$ac_file" in
1532   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1533        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1534   *) ac_file_in="${ac_file}.in" ;;
1535   esac
1536
1537   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
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
1561   case "$ac_given_INSTALL" in
1562   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1563   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1564   esac
1565
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
1574
1575   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1576   sed -e "$ac_comsub
1577 s%@configure_input@%$configure_input%g
1578 s%@srcdir@%$srcdir%g
1579 s%@top_srcdir@%$top_srcdir%g
1580 s%@INSTALL@%$INSTALL%g
1581 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1582 fi; done
1583 rm -f conftest.s*
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.
1589 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1590 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1591 ac_dC='\3'
1592 ac_dD='%g'
1593 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1594 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1595 ac_uB='\([      ]\)%\1#\2define\3'
1596 ac_uC=' '
1597 ac_uD='\4%g'
1598 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1599 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1600 ac_eB='$%\1#\2define\3'
1601 ac_eC=' '
1602 ac_eD='%g'
1603
1604 if test "${CONFIG_HEADERS+set}" != set; then
1605 EOF
1606 cat >> $CONFIG_STATUS <<EOF
1607   CONFIG_HEADERS="config.h:config.in"
1608 EOF
1609 cat >> $CONFIG_STATUS <<\EOF
1610 fi
1611 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1612   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1613   case "$ac_file" in
1614   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
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
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
1624
1625 EOF
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:
1629 # Protect against being on the right side of a sed subst in config.status.
1630 # Protect against being in an unquoted here document in config.status.
1631 rm -f conftest.vals
1632 cat > conftest.hdr <<\EOF
1633 s/[\\&%]/\\&/g
1634 s%[\\$`]%\\&%g
1635 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1636 s%ac_d%ac_u%gp
1637 s%ac_u%ac_e%gp
1638 EOF
1639 sed -n -f conftest.hdr confdefs.h > conftest.vals
1640 rm -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.
1645 cat >> conftest.vals <<\EOF
1646 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1647 EOF
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.
1651
1652 rm -f conftest.tail
1653 while :
1654 do
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
1669 done
1670 rm -f conftest.vals
1671
1672 cat >> $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
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
1687     rm -f $ac_file
1688     mv conftest.h $ac_file
1689   fi
1690 fi; done
1691
1692 EOF
1693 cat >> $CONFIG_STATUS <<EOF
1694
1695 EOF
1696 cat >> $CONFIG_STATUS <<\EOF
1697 case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
1698 exit 0
1699 EOF
1700 chmod +x $CONFIG_STATUS
1701 rm -fr confdefs* $ac_clean_files
1702 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1703