OSDN Git Service

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