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