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