]> www.ginac.de Git - ginac.git/blob - configure
- switched to automake build environment
[ginac.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-maintainer-mode enable make rules and dependencies not useful
16                           (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18   --enable-shared         build shared libraries [default=yes]
19   --enable-shared=PKGS    only build shared libraries if the current package
20                           appears as an element in the PKGS list"
21 ac_help="$ac_help
22   --enable-static         build static libraries [default=yes]
23   --enable-static=PKGS    only build shared libraries if the current package
24                           appears as an element in the PKGS list"
25 ac_help="$ac_help
26   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
27
28 # Initialize some variables set by options.
29 # The variables have the same names as the options, with
30 # dashes changed to underlines.
31 build=NONE
32 cache_file=./config.cache
33 exec_prefix=NONE
34 host=NONE
35 no_create=
36 nonopt=NONE
37 no_recursion=
38 prefix=NONE
39 program_prefix=NONE
40 program_suffix=NONE
41 program_transform_name=s,x,x,
42 silent=
43 site=
44 srcdir=
45 target=NONE
46 verbose=
47 x_includes=NONE
48 x_libraries=NONE
49 bindir='${exec_prefix}/bin'
50 sbindir='${exec_prefix}/sbin'
51 libexecdir='${exec_prefix}/libexec'
52 datadir='${prefix}/share'
53 sysconfdir='${prefix}/etc'
54 sharedstatedir='${prefix}/com'
55 localstatedir='${prefix}/var'
56 libdir='${exec_prefix}/lib'
57 includedir='${prefix}/include'
58 oldincludedir='/usr/include'
59 infodir='${prefix}/info'
60 mandir='${prefix}/man'
61
62 # Initialize some other variables.
63 subdirs=
64 MFLAGS= MAKEFLAGS=
65 # Maximum number of lines to put in a shell here document.
66 ac_max_here_lines=12
67
68 ac_prev=
69 for ac_option
70 do
71
72   # If the previous option needs an argument, assign it.
73   if test -n "$ac_prev"; then
74     eval "$ac_prev=\$ac_option"
75     ac_prev=
76     continue
77   fi
78
79   case "$ac_option" in
80   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81   *) ac_optarg= ;;
82   esac
83
84   # Accept the important Cygnus configure options, so we can diagnose typos.
85
86   case "$ac_option" in
87
88   -bindir | --bindir | --bindi | --bind | --bin | --bi)
89     ac_prev=bindir ;;
90   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91     bindir="$ac_optarg" ;;
92
93   -build | --build | --buil | --bui | --bu)
94     ac_prev=build ;;
95   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96     build="$ac_optarg" ;;
97
98   -cache-file | --cache-file | --cache-fil | --cache-fi \
99   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100     ac_prev=cache_file ;;
101   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103     cache_file="$ac_optarg" ;;
104
105   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106     ac_prev=datadir ;;
107   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108   | --da=*)
109     datadir="$ac_optarg" ;;
110
111   -disable-* | --disable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     eval "enable_${ac_feature}=no" ;;
119
120   -enable-* | --enable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     case "$ac_option" in
128       *=*) ;;
129       *) ac_optarg=yes ;;
130     esac
131     eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135   | --exec | --exe | --ex)
136     ac_prev=exec_prefix ;;
137   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139   | --exec=* | --exe=* | --ex=*)
140     exec_prefix="$ac_optarg" ;;
141
142   -gas | --gas | --ga | --g)
143     # Obsolete; use --with-gas.
144     with_gas=yes ;;
145
146   -help | --help | --hel | --he)
147     # Omit some internal or obsolete options to make the list less imposing.
148     # This message is too long to be a string in the A/UX 3.1 sh.
149     cat << EOF
150 Usage: configure [options] [host]
151 Options: [defaults in brackets after descriptions]
152 Configuration:
153   --cache-file=FILE       cache test results in FILE
154   --help                  print this message
155   --no-create             do not create output files
156   --quiet, --silent       do not print \`checking...' messages
157   --version               print the version of autoconf that created configure
158 Directory and file names:
159   --prefix=PREFIX         install architecture-independent files in PREFIX
160                           [$ac_default_prefix]
161   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
162                           [same as prefix]
163   --bindir=DIR            user executables in DIR [EPREFIX/bin]
164   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
165   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
166   --datadir=DIR           read-only architecture-independent data in DIR
167                           [PREFIX/share]
168   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
169   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
170                           [PREFIX/com]
171   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
172   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
173   --includedir=DIR        C header files in DIR [PREFIX/include]
174   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
175   --infodir=DIR           info documentation in DIR [PREFIX/info]
176   --mandir=DIR            man documentation in DIR [PREFIX/man]
177   --srcdir=DIR            find the sources in DIR [configure dir or ..]
178   --program-prefix=PREFIX prepend PREFIX to installed program names
179   --program-suffix=SUFFIX append SUFFIX to installed program names
180   --program-transform-name=PROGRAM
181                           run sed PROGRAM on installed program names
182 EOF
183     cat << EOF
184 Host type:
185   --build=BUILD           configure for building on BUILD [BUILD=HOST]
186   --host=HOST             configure for HOST [guessed]
187   --target=TARGET         configure for TARGET [TARGET=HOST]
188 Features and packages:
189   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
190   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
191   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
192   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
193   --x-includes=DIR        X include files are in DIR
194   --x-libraries=DIR       X library files are in DIR
195 EOF
196     if test -n "$ac_help"; then
197       echo "--enable and --with options recognized:$ac_help"
198     fi
199     exit 0 ;;
200
201   -host | --host | --hos | --ho)
202     ac_prev=host ;;
203   -host=* | --host=* | --hos=* | --ho=*)
204     host="$ac_optarg" ;;
205
206   -includedir | --includedir | --includedi | --included | --include \
207   | --includ | --inclu | --incl | --inc)
208     ac_prev=includedir ;;
209   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210   | --includ=* | --inclu=* | --incl=* | --inc=*)
211     includedir="$ac_optarg" ;;
212
213   -infodir | --infodir | --infodi | --infod | --info | --inf)
214     ac_prev=infodir ;;
215   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216     infodir="$ac_optarg" ;;
217
218   -libdir | --libdir | --libdi | --libd)
219     ac_prev=libdir ;;
220   -libdir=* | --libdir=* | --libdi=* | --libd=*)
221     libdir="$ac_optarg" ;;
222
223   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224   | --libexe | --libex | --libe)
225     ac_prev=libexecdir ;;
226   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227   | --libexe=* | --libex=* | --libe=*)
228     libexecdir="$ac_optarg" ;;
229
230   -localstatedir | --localstatedir | --localstatedi | --localstated \
231   | --localstate | --localstat | --localsta | --localst \
232   | --locals | --local | --loca | --loc | --lo)
233     ac_prev=localstatedir ;;
234   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237     localstatedir="$ac_optarg" ;;
238
239   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240     ac_prev=mandir ;;
241   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242     mandir="$ac_optarg" ;;
243
244   -nfp | --nfp | --nf)
245     # Obsolete; use --without-fp.
246     with_fp=no ;;
247
248   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249   | --no-cr | --no-c)
250     no_create=yes ;;
251
252   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254     no_recursion=yes ;;
255
256   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258   | --oldin | --oldi | --old | --ol | --o)
259     ac_prev=oldincludedir ;;
260   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263     oldincludedir="$ac_optarg" ;;
264
265   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266     ac_prev=prefix ;;
267   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268     prefix="$ac_optarg" ;;
269
270   -program-prefix | --program-prefix | --program-prefi | --program-pref \
271   | --program-pre | --program-pr | --program-p)
272     ac_prev=program_prefix ;;
273   -program-prefix=* | --program-prefix=* | --program-prefi=* \
274   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275     program_prefix="$ac_optarg" ;;
276
277   -program-suffix | --program-suffix | --program-suffi | --program-suff \
278   | --program-suf | --program-su | --program-s)
279     ac_prev=program_suffix ;;
280   -program-suffix=* | --program-suffix=* | --program-suffi=* \
281   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282     program_suffix="$ac_optarg" ;;
283
284   -program-transform-name | --program-transform-name \
285   | --program-transform-nam | --program-transform-na \
286   | --program-transform-n | --program-transform- \
287   | --program-transform | --program-transfor \
288   | --program-transfo | --program-transf \
289   | --program-trans | --program-tran \
290   | --progr-tra | --program-tr | --program-t)
291     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
300
301   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302   | -silent | --silent | --silen | --sile | --sil)
303     silent=yes ;;
304
305   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306     ac_prev=sbindir ;;
307   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308   | --sbi=* | --sb=*)
309     sbindir="$ac_optarg" ;;
310
311   -sharedstatedir | --sharedstatedir | --sharedstatedi \
312   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313   | --sharedst | --shareds | --shared | --share | --shar \
314   | --sha | --sh)
315     ac_prev=sharedstatedir ;;
316   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319   | --sha=* | --sh=*)
320     sharedstatedir="$ac_optarg" ;;
321
322   -site | --site | --sit)
323     ac_prev=site ;;
324   -site=* | --site=* | --sit=*)
325     site="$ac_optarg" ;;
326
327   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328     ac_prev=srcdir ;;
329   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330     srcdir="$ac_optarg" ;;
331
332   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333   | --syscon | --sysco | --sysc | --sys | --sy)
334     ac_prev=sysconfdir ;;
335   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337     sysconfdir="$ac_optarg" ;;
338
339   -target | --target | --targe | --targ | --tar | --ta | --t)
340     ac_prev=target ;;
341   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342     target="$ac_optarg" ;;
343
344   -v | -verbose | --verbose | --verbos | --verbo | --verb)
345     verbose=yes ;;
346
347   -version | --version | --versio | --versi | --vers)
348     echo "configure generated by autoconf version 2.12"
349     exit 0 ;;
350
351   -with-* | --with-*)
352     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353     # Reject names that are not valid shell variable names.
354     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356     fi
357     ac_package=`echo $ac_package| sed 's/-/_/g'`
358     case "$ac_option" in
359       *=*) ;;
360       *) ac_optarg=yes ;;
361     esac
362     eval "with_${ac_package}='$ac_optarg'" ;;
363
364   -without-* | --without-*)
365     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366     # Reject names that are not valid shell variable names.
367     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369     fi
370     ac_package=`echo $ac_package| sed 's/-/_/g'`
371     eval "with_${ac_package}=no" ;;
372
373   --x)
374     # Obsolete; use --with-x.
375     with_x=yes ;;
376
377   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378   | --x-incl | --x-inc | --x-in | --x-i)
379     ac_prev=x_includes ;;
380   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382     x_includes="$ac_optarg" ;;
383
384   -x-libraries | --x-libraries | --x-librarie | --x-librari \
385   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386     ac_prev=x_libraries ;;
387   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389     x_libraries="$ac_optarg" ;;
390
391   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392     ;;
393
394   *)
395     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396       echo "configure: warning: $ac_option: invalid host type" 1>&2
397     fi
398     if test "x$nonopt" != xNONE; then
399       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400     fi
401     nonopt="$ac_option"
402     ;;
403
404   esac
405 done
406
407 if test -n "$ac_prev"; then
408   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 fi
410
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413 # File descriptor usage:
414 # 0 standard input
415 # 1 file creation
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
422   exec 6>/dev/null
423 else
424   exec 6>&1
425 fi
426 exec 5>./config.log
427
428 echo "\
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
431 " 1>&5
432
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
435 ac_configure_args=
436 for ac_arg
437 do
438   case "$ac_arg" in
439   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440   | --no-cr | --no-c) ;;
441   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446   esac
447 done
448
449 # NLS nuisances.
450 # Only set these to C if already set.  These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
458
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 echo > confdefs.h
463
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=ginac/basic.cpp
467
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470   ac_srcdir_defaulted=yes
471   # Try the directory containing this script, then its parent.
472   ac_prog=$0
473   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475   srcdir=$ac_confdir
476   if test ! -r $srcdir/$ac_unique_file; then
477     srcdir=..
478   fi
479 else
480   ac_srcdir_defaulted=no
481 fi
482 if test ! -r $srcdir/$ac_unique_file; then
483   if test "$ac_srcdir_defaulted" = yes; then
484     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485   else
486     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487   fi
488 fi
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493   if test "x$prefix" != xNONE; then
494     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495   else
496     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497   fi
498 fi
499 for ac_site_file in $CONFIG_SITE; do
500   if test -r "$ac_site_file"; then
501     echo "loading site script $ac_site_file"
502     . "$ac_site_file"
503   fi
504 done
505
506 if test -r "$cache_file"; then
507   echo "loading cache $cache_file"
508   . $cache_file
509 else
510   echo "creating cache $cache_file"
511   > $cache_file
512 fi
513
514 ac_ext=c
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
520
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524     ac_n= ac_c='
525 ' ac_t='        '
526   else
527     ac_n=-n ac_c= ac_t=
528   fi
529 else
530   ac_n= ac_c='\c' ac_t=
531 fi
532
533
534
535
536
537
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 # Find a good install program.  We prefer a C program (faster),
559 # so one script is as good as another.  But avoid the broken or
560 # incompatible versions:
561 # SysV /etc/install, /usr/sbin/install
562 # SunOS /usr/etc/install
563 # IRIX /sbin/install
564 # AIX /bin/install
565 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
566 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
567 # ./install, which can be erroneously created by make from ./install.sh.
568 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
569 echo "configure:570: checking for a BSD compatible install" >&5
570 if test -z "$INSTALL"; then
571 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
572   echo $ac_n "(cached) $ac_c" 1>&6
573 else
574     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
575   for ac_dir in $PATH; do
576     # Account for people who put trailing slashes in PATH elements.
577     case "$ac_dir/" in
578     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
579     *)
580       # OSF1 and SCO ODT 3.0 have their own names for install.
581       for ac_prog in ginstall installbsd scoinst install; do
582         if test -f $ac_dir/$ac_prog; then
583           if test $ac_prog = install &&
584             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
585             # AIX install.  It has an incompatible calling convention.
586             # OSF/1 installbsd also uses dspmsg, but is usable.
587             :
588           else
589             ac_cv_path_install="$ac_dir/$ac_prog -c"
590             break 2
591           fi
592         fi
593       done
594       ;;
595     esac
596   done
597   IFS="$ac_save_IFS"
598
599 fi
600   if test "${ac_cv_path_install+set}" = set; then
601     INSTALL="$ac_cv_path_install"
602   else
603     # As a last resort, use the slow shell script.  We don't cache a
604     # path for INSTALL within a source directory, because that will
605     # break other packages using the cache if that directory is
606     # removed, or if the path is relative.
607     INSTALL="$ac_install_sh"
608   fi
609 fi
610 echo "$ac_t""$INSTALL" 1>&6
611
612 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
613 # It thinks the first close brace ends the variable substitution.
614 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
615
616 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
617
618
619 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
620
621 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
622 echo "configure:623: checking whether build environment is sane" >&5
623 # Just in case
624 sleep 1
625 echo timestamp > conftestfile
626 # Do `set' in a subshell so we don't clobber the current shell's
627 # arguments.  Must try -L first in case configure is actually a
628 # symlink; some systems play weird games with the mod time of symlinks
629 # (eg FreeBSD returns the mod time of the symlink's containing
630 # directory).
631 if (
632    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
633    if test "$*" = "X"; then
634       # -L didn't work.
635       set X `ls -t $srcdir/configure conftestfile`
636    fi
637    if test "$*" != "X $srcdir/configure conftestfile" \
638       && test "$*" != "X conftestfile $srcdir/configure"; then
639
640       # If neither matched, then we have a broken ls.  This can happen
641       # if, for instance, CONFIG_SHELL is bash and it inherits a
642       # broken ls alias from the environment.  This has actually
643       # happened.  Such a system could not be considered "sane".
644       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
645 alias in your environment" 1>&2; exit 1; }
646    fi
647
648    test "$2" = conftestfile
649    )
650 then
651    # Ok.
652    :
653 else
654    { echo "configure: error: newly created file is older than distributed files!
655 Check your system clock" 1>&2; exit 1; }
656 fi
657 rm -f conftest*
658 echo "$ac_t""yes" 1>&6
659 if test "$program_transform_name" = s,x,x,; then
660   program_transform_name=
661 else
662   # Double any \ or $.  echo might interpret backslashes.
663   cat <<\EOF_SED > conftestsed
664 s,\\,\\\\,g; s,\$,$$,g
665 EOF_SED
666   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
667   rm -f conftestsed
668 fi
669 test "$program_prefix" != NONE &&
670   program_transform_name="s,^,${program_prefix},; $program_transform_name"
671 # Use a double $ so make ignores it.
672 test "$program_suffix" != NONE &&
673   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
674
675 # sed with no file args requires a program.
676 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
677
678 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
679 echo "configure:680: checking whether ${MAKE-make} sets \${MAKE}" >&5
680 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
681 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
682   echo $ac_n "(cached) $ac_c" 1>&6
683 else
684   cat > conftestmake <<\EOF
685 all:
686         @echo 'ac_maketemp="${MAKE}"'
687 EOF
688 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
689 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
690 if test -n "$ac_maketemp"; then
691   eval ac_cv_prog_make_${ac_make}_set=yes
692 else
693   eval ac_cv_prog_make_${ac_make}_set=no
694 fi
695 rm -f conftestmake
696 fi
697 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
698   echo "$ac_t""yes" 1>&6
699   SET_MAKE=
700 else
701   echo "$ac_t""no" 1>&6
702   SET_MAKE="MAKE=${MAKE-make}"
703 fi
704
705
706 PACKAGE=GiNaC
707
708 VERSION=0.4
709
710 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
711   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
712 fi
713 cat >> confdefs.h <<EOF
714 #define PACKAGE "$PACKAGE"
715 EOF
716
717 cat >> confdefs.h <<EOF
718 #define VERSION "$VERSION"
719 EOF
720
721
722
723 missing_dir=`cd $ac_aux_dir && pwd`
724 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
725 echo "configure:726: checking for working aclocal" >&5
726 # Run test in a subshell; some versions of sh will print an error if
727 # an executable is not found, even if stderr is redirected.
728 # Redirect stdin to placate older versions of autoconf.  Sigh.
729 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
730    ACLOCAL=aclocal
731    echo "$ac_t""found" 1>&6
732 else
733    ACLOCAL="$missing_dir/missing aclocal"
734    echo "$ac_t""missing" 1>&6
735 fi
736
737 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
738 echo "configure:739: checking for working autoconf" >&5
739 # Run test in a subshell; some versions of sh will print an error if
740 # an executable is not found, even if stderr is redirected.
741 # Redirect stdin to placate older versions of autoconf.  Sigh.
742 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
743    AUTOCONF=autoconf
744    echo "$ac_t""found" 1>&6
745 else
746    AUTOCONF="$missing_dir/missing autoconf"
747    echo "$ac_t""missing" 1>&6
748 fi
749
750 echo $ac_n "checking for working automake""... $ac_c" 1>&6
751 echo "configure:752: checking for working automake" >&5
752 # Run test in a subshell; some versions of sh will print an error if
753 # an executable is not found, even if stderr is redirected.
754 # Redirect stdin to placate older versions of autoconf.  Sigh.
755 if (automake --version) < /dev/null > /dev/null 2>&1; then
756    AUTOMAKE=automake
757    echo "$ac_t""found" 1>&6
758 else
759    AUTOMAKE="$missing_dir/missing automake"
760    echo "$ac_t""missing" 1>&6
761 fi
762
763 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
764 echo "configure:765: checking for working autoheader" >&5
765 # Run test in a subshell; some versions of sh will print an error if
766 # an executable is not found, even if stderr is redirected.
767 # Redirect stdin to placate older versions of autoconf.  Sigh.
768 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
769    AUTOHEADER=autoheader
770    echo "$ac_t""found" 1>&6
771 else
772    AUTOHEADER="$missing_dir/missing autoheader"
773    echo "$ac_t""missing" 1>&6
774 fi
775
776 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
777 echo "configure:778: checking for working makeinfo" >&5
778 # Run test in a subshell; some versions of sh will print an error if
779 # an executable is not found, even if stderr is redirected.
780 # Redirect stdin to placate older versions of autoconf.  Sigh.
781 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
782    MAKEINFO=makeinfo
783    echo "$ac_t""found" 1>&6
784 else
785    MAKEINFO="$missing_dir/missing makeinfo"
786    echo "$ac_t""missing" 1>&6
787 fi
788
789
790 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
791 echo "configure:792: checking whether to enable maintainer-specific portions of Makefiles" >&5
792     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
793 if test "${enable_maintainer_mode+set}" = set; then
794   enableval="$enable_maintainer_mode"
795   USE_MAINTAINER_MODE=$enableval
796 else
797   USE_MAINTAINER_MODE=no
798 fi
799
800   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
801   if test $USE_MAINTAINER_MODE = yes; then
802     MAINT=
803   else
804     MAINT='#M#'
805   fi
806   
807
808
809 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
810 do
811 # Extract the first word of "$ac_prog", so it can be a program name with args.
812 set dummy $ac_prog; ac_word=$2
813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
814 echo "configure:815: checking for $ac_word" >&5
815 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
816   echo $ac_n "(cached) $ac_c" 1>&6
817 else
818   if test -n "$CXX"; then
819   ac_cv_prog_CXX="$CXX" # Let the user override the test.
820 else
821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
822   for ac_dir in $PATH; do
823     test -z "$ac_dir" && ac_dir=.
824     if test -f $ac_dir/$ac_word; then
825       ac_cv_prog_CXX="$ac_prog"
826       break
827     fi
828   done
829   IFS="$ac_save_ifs"
830 fi
831 fi
832 CXX="$ac_cv_prog_CXX"
833 if test -n "$CXX"; then
834   echo "$ac_t""$CXX" 1>&6
835 else
836   echo "$ac_t""no" 1>&6
837 fi
838
839 test -n "$CXX" && break
840 done
841 test -n "$CXX" || CXX="gcc"
842
843
844 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
845 echo "configure:846: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
846
847 ac_ext=C
848 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
849 ac_cpp='$CXXCPP $CPPFLAGS'
850 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
851 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
852 cross_compiling=$ac_cv_prog_cxx_cross
853
854 cat > conftest.$ac_ext <<EOF
855 #line 856 "configure"
856 #include "confdefs.h"
857 main(){return(0);}
858 EOF
859 if { (eval echo configure:860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
860   ac_cv_prog_cxx_works=yes
861   # If we can't run a trivial program, we are probably using a cross compiler.
862   if (./conftest; exit) 2>/dev/null; then
863     ac_cv_prog_cxx_cross=no
864   else
865     ac_cv_prog_cxx_cross=yes
866   fi
867 else
868   echo "configure: failed program was:" >&5
869   cat conftest.$ac_ext >&5
870   ac_cv_prog_cxx_works=no
871 fi
872 rm -fr conftest*
873 ac_ext=c
874 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
875 ac_cpp='$CPP $CPPFLAGS'
876 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
877 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
878 cross_compiling=$ac_cv_prog_cc_cross
879
880 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
881 if test $ac_cv_prog_cxx_works = no; then
882   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
883 fi
884 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
885 echo "configure:886: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
886 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
887 cross_compiling=$ac_cv_prog_cxx_cross
888
889 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
890 echo "configure:891: checking whether we are using GNU C++" >&5
891 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
892   echo $ac_n "(cached) $ac_c" 1>&6
893 else
894   cat > conftest.C <<EOF
895 #ifdef __GNUC__
896   yes;
897 #endif
898 EOF
899 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
900   ac_cv_prog_gxx=yes
901 else
902   ac_cv_prog_gxx=no
903 fi
904 fi
905
906 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
907
908 if test $ac_cv_prog_gxx = yes; then
909   GXX=yes
910   ac_test_CXXFLAGS="${CXXFLAGS+set}"
911   ac_save_CXXFLAGS="$CXXFLAGS"
912   CXXFLAGS=
913   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
914 echo "configure:915: checking whether ${CXX-g++} accepts -g" >&5
915 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
916   echo $ac_n "(cached) $ac_c" 1>&6
917 else
918   echo 'void f(){}' > conftest.cc
919 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
920   ac_cv_prog_cxx_g=yes
921 else
922   ac_cv_prog_cxx_g=no
923 fi
924 rm -f conftest*
925
926 fi
927
928 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
929   if test "$ac_test_CXXFLAGS" = set; then
930     CXXFLAGS="$ac_save_CXXFLAGS"
931   elif test $ac_cv_prog_cxx_g = yes; then
932     CXXFLAGS="-g -O2"
933   else
934     CXXFLAGS="-O2"
935   fi
936 else
937   GXX=
938   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
939 fi
940
941 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
942 echo "configure:943: checking how to run the C++ preprocessor" >&5
943 if test -z "$CXXCPP"; then
944 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
945   echo $ac_n "(cached) $ac_c" 1>&6
946 else
947   ac_ext=C
948 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
949 ac_cpp='$CXXCPP $CPPFLAGS'
950 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
951 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
952 cross_compiling=$ac_cv_prog_cxx_cross
953   CXXCPP="${CXX-g++} -E"
954   cat > conftest.$ac_ext <<EOF
955 #line 956 "configure"
956 #include "confdefs.h"
957 #include <stdlib.h>
958 EOF
959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
960 { (eval echo configure:961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
961 ac_err=`grep -v '^ *+' conftest.out`
962 if test -z "$ac_err"; then
963   :
964 else
965   echo "$ac_err" >&5
966   echo "configure: failed program was:" >&5
967   cat conftest.$ac_ext >&5
968   rm -rf conftest*
969   CXXCPP=/lib/cpp
970 fi
971 rm -f conftest*
972   ac_cv_prog_CXXCPP="$CXXCPP"
973 ac_ext=c
974 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
975 ac_cpp='$CPP $CPPFLAGS'
976 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
977 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
978 cross_compiling=$ac_cv_prog_cc_cross
979 fi
980 fi
981 CXXCPP="$ac_cv_prog_CXXCPP"
982 echo "$ac_t""$CXXCPP" 1>&6
983
984
985 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
986
987 # Check whether --enable-shared or --disable-shared was given.
988 if test "${enable_shared+set}" = set; then
989   enableval="$enable_shared"
990   p=${PACKAGE-default}
991 case "$enableval" in
992 yes) enable_shared=yes ;;
993 no) enable_shared=no ;;
994 *)
995   enable_shared=no
996   # Look at the argument we got.  We use all the common list separators.
997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
998   for pkg in $enableval; do
999     if test "X$pkg" = "X$p"; then
1000       enable_shared=yes
1001     fi
1002   done
1003   IFS="$ac_save_ifs"
1004   ;;
1005 esac
1006 else
1007   enable_shared=yes
1008 fi
1009
1010 # Check whether --enable-static or --disable-static was given.
1011 if test "${enable_static+set}" = set; then
1012   enableval="$enable_static"
1013   p=${PACKAGE-default}
1014 case "$enableval" in
1015 yes) enable_static=yes ;;
1016 no) enable_static=no ;;
1017 *)
1018   enable_static=no
1019   # Look at the argument we got.  We use all the common list separators.
1020   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1021   for pkg in $enableval; do
1022     if test "X$pkg" = "X$p"; then
1023       enable_static=yes
1024     fi
1025   done
1026   IFS="$ac_save_ifs"
1027   ;;
1028 esac
1029 else
1030   enable_static=yes
1031 fi
1032
1033
1034 # Make sure we can run config.sub.
1035 if $ac_config_sub sun4 >/dev/null 2>&1; then :
1036 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1037 fi
1038
1039 echo $ac_n "checking host system type""... $ac_c" 1>&6
1040 echo "configure:1041: checking host system type" >&5
1041
1042 host_alias=$host
1043 case "$host_alias" in
1044 NONE)
1045   case $nonopt in
1046   NONE)
1047     if host_alias=`$ac_config_guess`; then :
1048     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1049     fi ;;
1050   *) host_alias=$nonopt ;;
1051   esac ;;
1052 esac
1053
1054 host=`$ac_config_sub $host_alias`
1055 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1056 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1057 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1058 echo "$ac_t""$host" 1>&6
1059
1060 # Extract the first word of "ranlib", so it can be a program name with args.
1061 set dummy ranlib; ac_word=$2
1062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1063 echo "configure:1064: checking for $ac_word" >&5
1064 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1065   echo $ac_n "(cached) $ac_c" 1>&6
1066 else
1067   if test -n "$RANLIB"; then
1068   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1069 else
1070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1071   for ac_dir in $PATH; do
1072     test -z "$ac_dir" && ac_dir=.
1073     if test -f $ac_dir/$ac_word; then
1074       ac_cv_prog_RANLIB="ranlib"
1075       break
1076     fi
1077   done
1078   IFS="$ac_save_ifs"
1079   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1080 fi
1081 fi
1082 RANLIB="$ac_cv_prog_RANLIB"
1083 if test -n "$RANLIB"; then
1084   echo "$ac_t""$RANLIB" 1>&6
1085 else
1086   echo "$ac_t""no" 1>&6
1087 fi
1088
1089 # Extract the first word of "gcc", so it can be a program name with args.
1090 set dummy gcc; ac_word=$2
1091 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1092 echo "configure:1093: checking for $ac_word" >&5
1093 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1094   echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096   if test -n "$CC"; then
1097   ac_cv_prog_CC="$CC" # Let the user override the test.
1098 else
1099   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1100   for ac_dir in $PATH; do
1101     test -z "$ac_dir" && ac_dir=.
1102     if test -f $ac_dir/$ac_word; then
1103       ac_cv_prog_CC="gcc"
1104       break
1105     fi
1106   done
1107   IFS="$ac_save_ifs"
1108 fi
1109 fi
1110 CC="$ac_cv_prog_CC"
1111 if test -n "$CC"; then
1112   echo "$ac_t""$CC" 1>&6
1113 else
1114   echo "$ac_t""no" 1>&6
1115 fi
1116
1117 if test -z "$CC"; then
1118   # Extract the first word of "cc", so it can be a program name with args.
1119 set dummy cc; ac_word=$2
1120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1121 echo "configure:1122: checking for $ac_word" >&5
1122 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1123   echo $ac_n "(cached) $ac_c" 1>&6
1124 else
1125   if test -n "$CC"; then
1126   ac_cv_prog_CC="$CC" # Let the user override the test.
1127 else
1128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1129   ac_prog_rejected=no
1130   for ac_dir in $PATH; do
1131     test -z "$ac_dir" && ac_dir=.
1132     if test -f $ac_dir/$ac_word; then
1133       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1134         ac_prog_rejected=yes
1135         continue
1136       fi
1137       ac_cv_prog_CC="cc"
1138       break
1139     fi
1140   done
1141   IFS="$ac_save_ifs"
1142 if test $ac_prog_rejected = yes; then
1143   # We found a bogon in the path, so make sure we never use it.
1144   set dummy $ac_cv_prog_CC
1145   shift
1146   if test $# -gt 0; then
1147     # We chose a different compiler from the bogus one.
1148     # However, it has the same basename, so the bogon will be chosen
1149     # first if we set CC to just the basename; use the full file name.
1150     shift
1151     set dummy "$ac_dir/$ac_word" "$@"
1152     shift
1153     ac_cv_prog_CC="$@"
1154   fi
1155 fi
1156 fi
1157 fi
1158 CC="$ac_cv_prog_CC"
1159 if test -n "$CC"; then
1160   echo "$ac_t""$CC" 1>&6
1161 else
1162   echo "$ac_t""no" 1>&6
1163 fi
1164
1165   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1166 fi
1167
1168 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1169 echo "configure:1170: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1170
1171 ac_ext=c
1172 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1173 ac_cpp='$CPP $CPPFLAGS'
1174 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1175 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1176 cross_compiling=$ac_cv_prog_cc_cross
1177
1178 cat > conftest.$ac_ext <<EOF
1179 #line 1180 "configure"
1180 #include "confdefs.h"
1181 main(){return(0);}
1182 EOF
1183 if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1184   ac_cv_prog_cc_works=yes
1185   # If we can't run a trivial program, we are probably using a cross compiler.
1186   if (./conftest; exit) 2>/dev/null; then
1187     ac_cv_prog_cc_cross=no
1188   else
1189     ac_cv_prog_cc_cross=yes
1190   fi
1191 else
1192   echo "configure: failed program was:" >&5
1193   cat conftest.$ac_ext >&5
1194   ac_cv_prog_cc_works=no
1195 fi
1196 rm -fr conftest*
1197
1198 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1199 if test $ac_cv_prog_cc_works = no; then
1200   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1201 fi
1202 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1203 echo "configure:1204: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1204 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1205 cross_compiling=$ac_cv_prog_cc_cross
1206
1207 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1208 echo "configure:1209: checking whether we are using GNU C" >&5
1209 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1210   echo $ac_n "(cached) $ac_c" 1>&6
1211 else
1212   cat > conftest.c <<EOF
1213 #ifdef __GNUC__
1214   yes;
1215 #endif
1216 EOF
1217 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1218   ac_cv_prog_gcc=yes
1219 else
1220   ac_cv_prog_gcc=no
1221 fi
1222 fi
1223
1224 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1225
1226 if test $ac_cv_prog_gcc = yes; then
1227   GCC=yes
1228   ac_test_CFLAGS="${CFLAGS+set}"
1229   ac_save_CFLAGS="$CFLAGS"
1230   CFLAGS=
1231   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1232 echo "configure:1233: checking whether ${CC-cc} accepts -g" >&5
1233 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1234   echo $ac_n "(cached) $ac_c" 1>&6
1235 else
1236   echo 'void f(){}' > conftest.c
1237 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1238   ac_cv_prog_cc_g=yes
1239 else
1240   ac_cv_prog_cc_g=no
1241 fi
1242 rm -f conftest*
1243
1244 fi
1245
1246 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1247   if test "$ac_test_CFLAGS" = set; then
1248     CFLAGS="$ac_save_CFLAGS"
1249   elif test $ac_cv_prog_cc_g = yes; then
1250     CFLAGS="-g -O2"
1251   else
1252     CFLAGS="-O2"
1253   fi
1254 else
1255   GCC=
1256   test "${CFLAGS+set}" = set || CFLAGS="-g"
1257 fi
1258
1259 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1260 if test "${with_gnu_ld+set}" = set; then
1261   withval="$with_gnu_ld"
1262   test "$withval" = no || with_gnu_ld=yes
1263 else
1264   with_gnu_ld=no
1265 fi
1266
1267
1268 ac_prog=ld
1269 if test "$ac_cv_prog_gcc" = yes; then
1270   # Check if gcc -print-prog-name=ld gives a path.
1271   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1272 echo "configure:1273: checking for ld used by GCC" >&5
1273   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1274   case "$ac_prog" in
1275   # Accept absolute paths.
1276   /* | A-Za-z:\\*)
1277     test -z "$LD" && LD="$ac_prog"
1278     ;;
1279   "")
1280     # If it fails, then pretend we aren't using GCC.
1281     ac_prog=ld
1282     ;;
1283   *)
1284     # If it is relative, then search for the first ld in PATH.
1285     with_gnu_ld=unknown
1286     ;;
1287   esac
1288 elif test "$with_gnu_ld" = yes; then
1289   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1290 echo "configure:1291: checking for GNU ld" >&5
1291 else
1292   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1293 echo "configure:1294: checking for non-GNU ld" >&5
1294 fi
1295 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1296   echo $ac_n "(cached) $ac_c" 1>&6
1297 else
1298   if test -z "$LD"; then
1299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1300   for ac_dir in $PATH; do
1301     test -z "$ac_dir" && ac_dir=.
1302     if test -f "$ac_dir/$ac_prog"; then
1303       ac_cv_path_LD="$ac_dir/$ac_prog"
1304       # Check to see if the program is GNU ld.  I'd rather use --version,
1305       # but apparently some GNU ld's only accept -v.
1306       # Break only if it was the GNU/non-GNU ld that we prefer.
1307       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1308         test "$with_gnu_ld" != no && break
1309       else
1310         test "$with_gnu_ld" != yes && break
1311       fi
1312     fi
1313   done
1314   IFS="$ac_save_ifs"
1315 else
1316   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1317 fi
1318 fi
1319
1320 LD="$ac_cv_path_LD"
1321 if test -n "$LD"; then
1322   echo "$ac_t""$LD" 1>&6
1323 else
1324   echo "$ac_t""no" 1>&6
1325 fi
1326 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1327
1328 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1329 echo "configure:1330: checking if the linker ($LD) is GNU ld" >&5
1330 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1331   echo $ac_n "(cached) $ac_c" 1>&6
1332 else
1333   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1334 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1335   ac_cv_prog_gnu_ld=yes
1336 else
1337   ac_cv_prog_gnu_ld=no
1338 fi
1339 fi
1340
1341 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1342
1343
1344 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1345 echo "configure:1346: checking for BSD-compatible nm" >&5
1346 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1347   echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349   case "$NM" in
1350 /* | A-Za-z:\\*)
1351   ac_cv_path_NM="$NM" # Let the user override the test with a path.
1352   ;;
1353 *)
1354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1355   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1356     test -z "$ac_dir" && ac_dir=.
1357     if test -f $ac_dir/nm; then
1358       # Check to see if the nm accepts a BSD-compat flag.
1359       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1360       #   nm: unknown option "B" ignored
1361       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1362         ac_cv_path_NM="$ac_dir/nm -B"
1363       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1364         ac_cv_path_NM="$ac_dir/nm -p"
1365       else
1366         ac_cv_path_NM="$ac_dir/nm"
1367       fi
1368       break
1369     fi
1370   done
1371   IFS="$ac_save_ifs"
1372   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1373   ;;
1374 esac
1375 fi
1376
1377 NM="$ac_cv_path_NM"
1378 echo "$ac_t""$NM" 1>&6
1379
1380
1381 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1382 echo "configure:1383: checking whether ln -s works" >&5
1383 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1384   echo $ac_n "(cached) $ac_c" 1>&6
1385 else
1386   rm -f conftestdata
1387 if ln -s X conftestdata 2>/dev/null
1388 then
1389   rm -f conftestdata
1390   ac_cv_prog_LN_S="ln -s"
1391 else
1392   ac_cv_prog_LN_S=ln
1393 fi
1394 fi
1395 LN_S="$ac_cv_prog_LN_S"
1396 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1397   echo "$ac_t""yes" 1>&6
1398 else
1399   echo "$ac_t""no" 1>&6
1400 fi
1401
1402 # Always use our own libtool.
1403 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1404
1405 # Check for any special flags to pass to ltconfig.
1406 libtool_flags=
1407 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1408 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1409 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1410 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1411 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1412
1413 # Some flags need to be propagated to the compiler or linker for good
1414 # libtool support.
1415 case "$host" in
1416 *-*-irix6*)
1417   # Find out which ABI we are using.
1418   echo '#line 1419 "configure"' > conftest.$ac_ext
1419   if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1420     case "`/usr/bin/file conftest.o`" in
1421     *32-bit*)
1422       LD="${LD-ld} -32"
1423       ;;
1424     *N32*)
1425       LD="${LD-ld} -n32"
1426       ;;
1427     *64-bit*)
1428       LD="${LD-ld} -64"
1429       ;;
1430     esac
1431   fi
1432   rm -rf conftest*
1433   ;;
1434
1435 *-*-sco3.2v5*)
1436   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1437   CFLAGS="$CFLAGS -belf"
1438   ;;
1439 esac
1440
1441 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1442 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1443 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1444 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1445 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1446 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1447
1448 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1449 echo "configure:1450: checking how to run the C preprocessor" >&5
1450 # On Suns, sometimes $CPP names a directory.
1451 if test -n "$CPP" && test -d "$CPP"; then
1452   CPP=
1453 fi
1454 if test -z "$CPP"; then
1455 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1456   echo $ac_n "(cached) $ac_c" 1>&6
1457 else
1458     # This must be in double quotes, not single quotes, because CPP may get
1459   # substituted into the Makefile and "${CC-cc}" will confuse make.
1460   CPP="${CC-cc} -E"
1461   # On the NeXT, cc -E runs the code through the compiler's parser,
1462   # not just through cpp.
1463   cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1466 #include <assert.h>
1467 Syntax Error
1468 EOF
1469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1470 { (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1471 ac_err=`grep -v '^ *+' conftest.out`
1472 if test -z "$ac_err"; then
1473   :
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   CPP="${CC-cc} -E -traditional-cpp"
1480   cat > conftest.$ac_ext <<EOF
1481 #line 1482 "configure"
1482 #include "confdefs.h"
1483 #include <assert.h>
1484 Syntax Error
1485 EOF
1486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1487 { (eval echo configure:1488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1488 ac_err=`grep -v '^ *+' conftest.out`
1489 if test -z "$ac_err"; then
1490   :
1491 else
1492   echo "$ac_err" >&5
1493   echo "configure: failed program was:" >&5
1494   cat conftest.$ac_ext >&5
1495   rm -rf conftest*
1496   CPP=/lib/cpp
1497 fi
1498 rm -f conftest*
1499 fi
1500 rm -f conftest*
1501   ac_cv_prog_CPP="$CPP"
1502 fi
1503   CPP="$ac_cv_prog_CPP"
1504 else
1505   ac_cv_prog_CPP="$CPP"
1506 fi
1507 echo "$ac_t""$CPP" 1>&6
1508
1509 missing_dir=`cd $ac_aux_dir && pwd`
1510 for ac_prog in flex lex
1511 do
1512 # Extract the first word of "$ac_prog", so it can be a program name with args.
1513 set dummy $ac_prog; ac_word=$2
1514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1515 echo "configure:1516: checking for $ac_word" >&5
1516 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1517   echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519   if test -n "$LEX"; then
1520   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1521 else
1522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1523   for ac_dir in $PATH; do
1524     test -z "$ac_dir" && ac_dir=.
1525     if test -f $ac_dir/$ac_word; then
1526       ac_cv_prog_LEX="$ac_prog"
1527       break
1528     fi
1529   done
1530   IFS="$ac_save_ifs"
1531 fi
1532 fi
1533 LEX="$ac_cv_prog_LEX"
1534 if test -n "$LEX"; then
1535   echo "$ac_t""$LEX" 1>&6
1536 else
1537   echo "$ac_t""no" 1>&6
1538 fi
1539
1540 test -n "$LEX" && break
1541 done
1542 test -n "$LEX" || LEX=""$missing_dir/missing flex""
1543
1544 # Extract the first word of "flex", so it can be a program name with args.
1545 set dummy flex; ac_word=$2
1546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1547 echo "configure:1548: checking for $ac_word" >&5
1548 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1549   echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551   if test -n "$LEX"; then
1552   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1553 else
1554   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1555   for ac_dir in $PATH; do
1556     test -z "$ac_dir" && ac_dir=.
1557     if test -f $ac_dir/$ac_word; then
1558       ac_cv_prog_LEX="flex"
1559       break
1560     fi
1561   done
1562   IFS="$ac_save_ifs"
1563   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1564 fi
1565 fi
1566 LEX="$ac_cv_prog_LEX"
1567 if test -n "$LEX"; then
1568   echo "$ac_t""$LEX" 1>&6
1569 else
1570   echo "$ac_t""no" 1>&6
1571 fi
1572
1573 if test -z "$LEXLIB"
1574 then
1575   case "$LEX" in
1576   flex*) ac_lib=fl ;;
1577   *) ac_lib=l ;;
1578   esac
1579   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1580 echo "configure:1581: checking for yywrap in -l$ac_lib" >&5
1581 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1582 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1583   echo $ac_n "(cached) $ac_c" 1>&6
1584 else
1585   ac_save_LIBS="$LIBS"
1586 LIBS="-l$ac_lib  $LIBS"
1587 cat > conftest.$ac_ext <<EOF
1588 #line 1589 "configure"
1589 #include "confdefs.h"
1590 /* Override any gcc2 internal prototype to avoid an error.  */
1591 /* We use char because int might match the return type of a gcc2
1592     builtin and then its argument prototype would still apply.  */
1593 char yywrap();
1594
1595 int main() {
1596 yywrap()
1597 ; return 0; }
1598 EOF
1599 if { (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1600   rm -rf conftest*
1601   eval "ac_cv_lib_$ac_lib_var=yes"
1602 else
1603   echo "configure: failed program was:" >&5
1604   cat conftest.$ac_ext >&5
1605   rm -rf conftest*
1606   eval "ac_cv_lib_$ac_lib_var=no"
1607 fi
1608 rm -f conftest*
1609 LIBS="$ac_save_LIBS"
1610
1611 fi
1612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1613   echo "$ac_t""yes" 1>&6
1614   LEXLIB="-l$ac_lib"
1615 else
1616   echo "$ac_t""no" 1>&6
1617 fi
1618
1619 fi
1620
1621 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1622 echo "configure:1623: checking lex output file root" >&5
1623 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1624   echo $ac_n "(cached) $ac_c" 1>&6
1625 else
1626   # The minimal lex program is just a single line: %%.  But some broken lexes
1627 # (Solaris, I think it was) want two %% lines, so accommodate them.
1628 echo '%%
1629 %%' | $LEX
1630 if test -f lex.yy.c; then
1631   ac_cv_prog_lex_root=lex.yy
1632 elif test -f lexyy.c; then
1633   ac_cv_prog_lex_root=lexyy
1634 else
1635   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1636 fi
1637 fi
1638
1639 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1640 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1641
1642 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1643 echo "configure:1644: checking whether yytext is a pointer" >&5
1644 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1645   echo $ac_n "(cached) $ac_c" 1>&6
1646 else
1647   # POSIX says lex can declare yytext either as a pointer or an array; the
1648 # default is implementation-dependent. Figure out which it is, since
1649 # not all implementations provide the %pointer and %array declarations.
1650 ac_cv_prog_lex_yytext_pointer=no
1651 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1652 ac_save_LIBS="$LIBS"
1653 LIBS="$LIBS $LEXLIB"
1654 cat > conftest.$ac_ext <<EOF
1655 #line 1656 "configure"
1656 #include "confdefs.h"
1657 `cat $LEX_OUTPUT_ROOT.c`
1658 int main() {
1659
1660 ; return 0; }
1661 EOF
1662 if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1663   rm -rf conftest*
1664   ac_cv_prog_lex_yytext_pointer=yes
1665 else
1666   echo "configure: failed program was:" >&5
1667   cat conftest.$ac_ext >&5
1668 fi
1669 rm -f conftest*
1670 LIBS="$ac_save_LIBS"
1671 rm -f "${LEX_OUTPUT_ROOT}.c"
1672
1673 fi
1674
1675 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1676 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1677   cat >> confdefs.h <<\EOF
1678 #define YYTEXT_POINTER 1
1679 EOF
1680
1681 fi
1682
1683 for ac_prog in 'bison -y' byacc
1684 do
1685 # Extract the first word of "$ac_prog", so it can be a program name with args.
1686 set dummy $ac_prog; ac_word=$2
1687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1688 echo "configure:1689: checking for $ac_word" >&5
1689 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1690   echo $ac_n "(cached) $ac_c" 1>&6
1691 else
1692   if test -n "$YACC"; then
1693   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1694 else
1695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1696   for ac_dir in $PATH; do
1697     test -z "$ac_dir" && ac_dir=.
1698     if test -f $ac_dir/$ac_word; then
1699       ac_cv_prog_YACC="$ac_prog"
1700       break
1701     fi
1702   done
1703   IFS="$ac_save_ifs"
1704 fi
1705 fi
1706 YACC="$ac_cv_prog_YACC"
1707 if test -n "$YACC"; then
1708   echo "$ac_t""$YACC" 1>&6
1709 else
1710   echo "$ac_t""no" 1>&6
1711 fi
1712
1713 test -n "$YACC" && break
1714 done
1715 test -n "$YACC" || YACC="yacc"
1716
1717
1718 ac_ext=C
1719 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1720 ac_cpp='$CXXCPP $CPPFLAGS'
1721 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1722 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1723 cross_compiling=$ac_cv_prog_cxx_cross
1724
1725
1726 echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6
1727 echo "configure:1728: checking for cout in -lstdc++" >&5
1728 ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'`
1729 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1730   echo $ac_n "(cached) $ac_c" 1>&6
1731 else
1732   ac_save_LIBS="$LIBS"
1733 LIBS="-lstdc++  $LIBS"
1734 cat > conftest.$ac_ext <<EOF
1735 #line 1736 "configure"
1736 #include "confdefs.h"
1737 /* Override any gcc2 internal prototype to avoid an error.  */
1738 #ifdef __cplusplus
1739 extern "C"
1740 #endif
1741 /* We use char because int might match the return type of a gcc2
1742     builtin and then its argument prototype would still apply.  */
1743 char cout();
1744
1745 int main() {
1746 cout()
1747 ; return 0; }
1748 EOF
1749 if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1750   rm -rf conftest*
1751   eval "ac_cv_lib_$ac_lib_var=yes"
1752 else
1753   echo "configure: failed program was:" >&5
1754   cat conftest.$ac_ext >&5
1755   rm -rf conftest*
1756   eval "ac_cv_lib_$ac_lib_var=no"
1757 fi
1758 rm -f conftest*
1759 LIBS="$ac_save_LIBS"
1760
1761 fi
1762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1763   echo "$ac_t""yes" 1>&6
1764     ac_tr_lib=HAVE_LIB`echo stdc++ | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1765     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1766   cat >> confdefs.h <<EOF
1767 #define $ac_tr_lib 1
1768 EOF
1769
1770   LIBS="-lstdc++ $LIBS"
1771
1772 else
1773   echo "$ac_t""no" 1>&6
1774 fi
1775
1776
1777 for ac_hdr in iostream vector map string list typeinfo iterator strstream stdexcept algorithm
1778 do
1779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1781 echo "configure:1782: checking for $ac_hdr" >&5
1782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1783   echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785   cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 #include <$ac_hdr>
1789 EOF
1790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1791 { (eval echo configure:1792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1792 ac_err=`grep -v '^ *+' conftest.out`
1793 if test -z "$ac_err"; then
1794   rm -rf conftest*
1795   eval "ac_cv_header_$ac_safe=yes"
1796 else
1797   echo "$ac_err" >&5
1798   echo "configure: failed program was:" >&5
1799   cat conftest.$ac_ext >&5
1800   rm -rf conftest*
1801   eval "ac_cv_header_$ac_safe=no"
1802 fi
1803 rm -f conftest*
1804 fi
1805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1806   echo "$ac_t""yes" 1>&6
1807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1808   cat >> confdefs.h <<EOF
1809 #define $ac_tr_hdr 1
1810 EOF
1811  
1812 else
1813   echo "$ac_t""no" 1>&6
1814 { echo "configure: error: need to have ANSI compliant headers" 1>&2; exit 1; }
1815 fi
1816 done
1817
1818
1819
1820     for ac_hdr in CLN/cln.h
1821 do
1822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1824 echo "configure:1825: checking for $ac_hdr" >&5
1825 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1826   echo $ac_n "(cached) $ac_c" 1>&6
1827 else
1828   cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 #include <$ac_hdr>
1832 EOF
1833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1834 { (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1835 ac_err=`grep -v '^ *+' conftest.out`
1836 if test -z "$ac_err"; then
1837   rm -rf conftest*
1838   eval "ac_cv_header_$ac_safe=yes"
1839 else
1840   echo "$ac_err" >&5
1841   echo "configure: failed program was:" >&5
1842   cat conftest.$ac_ext >&5
1843   rm -rf conftest*
1844   eval "ac_cv_header_$ac_safe=no"
1845 fi
1846 rm -f conftest*
1847 fi
1848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1849   echo "$ac_t""yes" 1>&6
1850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1851   cat >> confdefs.h <<EOF
1852 #define $ac_tr_hdr 1
1853 EOF
1854  
1855 else
1856   echo "$ac_t""no" 1>&6
1857 for ac_hdr in cln.h
1858 do
1859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1861 echo "configure:1862: checking for $ac_hdr" >&5
1862 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1863   echo $ac_n "(cached) $ac_c" 1>&6
1864 else
1865   cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1868 #include <$ac_hdr>
1869 EOF
1870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1871 { (eval echo configure:1872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1872 ac_err=`grep -v '^ *+' conftest.out`
1873 if test -z "$ac_err"; then
1874   rm -rf conftest*
1875   eval "ac_cv_header_$ac_safe=yes"
1876 else
1877   echo "$ac_err" >&5
1878   echo "configure: failed program was:" >&5
1879   cat conftest.$ac_ext >&5
1880   rm -rf conftest*
1881   eval "ac_cv_header_$ac_safe=no"
1882 fi
1883 rm -f conftest*
1884 fi
1885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1886   echo "$ac_t""yes" 1>&6
1887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1888   cat >> confdefs.h <<EOF
1889 #define $ac_tr_hdr 1
1890 EOF
1891  
1892 else
1893   echo "$ac_t""no" 1>&6
1894 { echo "configure: error: cannot find header for Bruno Haible's CLN" 1>&2; exit 1; };
1895         
1896 fi
1897 done
1898
1899     
1900 fi
1901 done
1902
1903
1904
1905     echo $ac_n "checking how to link with libcln""... $ac_c" 1>&6
1906 echo "configure:1907: checking how to link with libcln" >&5
1907     saved_LIBS="${LIBS}"
1908     if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   LIBS="-lcln"
1912         case "${ac_cv_header_CLN_cln_h}" in
1913         "yes")
1914             cat > conftest.$ac_ext <<EOF
1915 #line 1916 "configure"
1916 #include "confdefs.h"
1917 #include <CLN/cln.h>
1918 int main() {
1919 factorial(1);
1920 ; return 0; }
1921 EOF
1922 if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1923   rm -rf conftest*
1924   ginac_cv_lib_cln_link="-lcln"
1925 else
1926   echo "configure: failed program was:" >&5
1927   cat conftest.$ac_ext >&5
1928   rm -rf conftest*
1929   ginac_cv_lib_cln_link="fail"
1930 fi
1931 rm -f conftest*
1932             ;;
1933         *)
1934             cat > conftest.$ac_ext <<EOF
1935 #line 1936 "configure"
1936 #include "confdefs.h"
1937 #include <cln.h>
1938 int main() {
1939 factorial(1);
1940 ; return 0; }
1941 EOF
1942 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1943   rm -rf conftest*
1944   ginac_cv_lib_cln_link="-lcln"
1945 else
1946   echo "configure: failed program was:" >&5
1947   cat conftest.$ac_ext >&5
1948   rm -rf conftest*
1949   ginac_cv_lib_cln_link="fail"
1950 fi
1951 rm -f conftest*
1952             ;;
1953         esac
1954     
1955 fi
1956
1957     case "${ginac_cv_lib_cln_link}" in
1958     "-lcln")
1959         LIBS="-lcln ${saved_LIBS}"
1960         echo "$ac_t""-lcln" 1>&6
1961         
1962     echo $ac_n "checking whether libcln behaves sane""... $ac_c" 1>&6
1963 echo "configure:1964: checking whether libcln behaves sane" >&5
1964     if eval "test \"`echo '$''{'ginac_cv_lib_cln_integrity'+set}'`\" = set"; then
1965   echo $ac_n "(cached) $ac_c" 1>&6
1966 else
1967   
1968         case "${ac_cv_header_CLN_cln_h}" in
1969         "yes")
1970             if test "$cross_compiling" = yes; then
1971   ginac_cv_lib_cln_integrity="guessing sane"
1972 else
1973   cat > conftest.$ac_ext <<EOF
1974 #line 1975 "configure"
1975 #include "confdefs.h"
1976 #ifdef __cplusplus
1977 extern "C" void exit(int);
1978 #endif
1979 #include <CLN/cln.h>
1980 int main() {
1981 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
1982 if (q+p != 3) return 1; else return 0;
1983 }
1984 EOF
1985 if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1986 then
1987   ginac_cv_lib_cln_integrity="sane"
1988 else
1989   echo "configure: failed program was:" >&5
1990   cat conftest.$ac_ext >&5
1991   rm -fr conftest*
1992   ginac_cv_lib_cln_integrity="insane"
1993 fi
1994 rm -fr conftest*
1995 fi
1996
1997             ;;
1998         *)
1999             if test "$cross_compiling" = yes; then
2000   ginac_cv_lib_cln_integrity="guessing sane"
2001 else
2002   cat > conftest.$ac_ext <<EOF
2003 #line 2004 "configure"
2004 #include "confdefs.h"
2005 #ifdef __cplusplus
2006 extern "C" void exit(int);
2007 #endif
2008 #include <cln.h>
2009 int main() {
2010 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
2011 if (q+p != 3) return 1; else return 0;
2012 }
2013 EOF
2014 if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2015 then
2016   ginac_cv_lib_cln_integrity="sane"
2017 else
2018   echo "configure: failed program was:" >&5
2019   cat conftest.$ac_ext >&5
2020   rm -fr conftest*
2021   ginac_cv_lib_cln_integrity="insane"
2022 fi
2023 rm -fr conftest*
2024 fi
2025
2026             ;;
2027         esac
2028     
2029 fi
2030
2031     case "${ginac_cv_lib_cln_integrity}" in
2032     "sane")
2033         echo "$ac_t""yes" 1>&6
2034     ;;
2035     "insane")
2036         echo "$ac_t""no" 1>&6
2037         echo "configure: warning: maybe version of libcln is older than 1.0.2?" 1>&2
2038     ;;
2039     "guessing sane")
2040         echo "$ac_t""hopefully" 1>&6
2041     ;;
2042     *)
2043         echo "configure: warning: you found a bug in the configure script!" 1>&2
2044     ;;
2045     esac
2046
2047     ;;
2048     "fail")
2049         LIBS="${saved_LIBS}"
2050         echo "$ac_t""" 1>&6
2051         echo "configure: warning: linking with libcln failed" 1>&2
2052     ;;
2053     *)
2054         LIBS="${saved_LIBS}"
2055     ;;
2056     esac
2057
2058
2059 for ac_hdr in unistd.h
2060 do
2061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2063 echo "configure:2064: checking for $ac_hdr" >&5
2064 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2065   echo $ac_n "(cached) $ac_c" 1>&6
2066 else
2067   cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <$ac_hdr>
2071 EOF
2072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2073 { (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2074 ac_err=`grep -v '^ *+' conftest.out`
2075 if test -z "$ac_err"; then
2076   rm -rf conftest*
2077   eval "ac_cv_header_$ac_safe=yes"
2078 else
2079   echo "$ac_err" >&5
2080   echo "configure: failed program was:" >&5
2081   cat conftest.$ac_ext >&5
2082   rm -rf conftest*
2083   eval "ac_cv_header_$ac_safe=no"
2084 fi
2085 rm -f conftest*
2086 fi
2087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2088   echo "$ac_t""yes" 1>&6
2089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2090   cat >> confdefs.h <<EOF
2091 #define $ac_tr_hdr 1
2092 EOF
2093  
2094 else
2095   echo "$ac_t""no" 1>&6
2096 fi
2097 done
2098
2099 for ac_func in strdup
2100 do
2101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2102 echo "configure:2103: checking for $ac_func" >&5
2103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109 /* System header to define __stub macros and hopefully few prototypes,
2110     which can conflict with char $ac_func(); below.  */
2111 #include <assert.h>
2112 /* Override any gcc2 internal prototype to avoid an error.  */
2113 #ifdef __cplusplus
2114 extern "C"
2115 #endif
2116 /* We use char because int might match the return type of a gcc2
2117     builtin and then its argument prototype would still apply.  */
2118 char $ac_func();
2119
2120 int main() {
2121
2122 /* The GNU C library defines this for functions which it implements
2123     to always fail with ENOSYS.  Some functions are actually named
2124     something starting with __ and the normal name is an alias.  */
2125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2126 choke me
2127 #else
2128 $ac_func();
2129 #endif
2130
2131 ; return 0; }
2132 EOF
2133 if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2134   rm -rf conftest*
2135   eval "ac_cv_func_$ac_func=yes"
2136 else
2137   echo "configure: failed program was:" >&5
2138   cat conftest.$ac_ext >&5
2139   rm -rf conftest*
2140   eval "ac_cv_func_$ac_func=no"
2141 fi
2142 rm -f conftest*
2143 fi
2144
2145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2146   echo "$ac_t""yes" 1>&6
2147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2148   cat >> confdefs.h <<EOF
2149 #define $ac_tr_func 1
2150 EOF
2151  
2152 else
2153   echo "$ac_t""no" 1>&6
2154 LIBOBJS="$LIBOBJS ${ac_func}.o"
2155 fi
2156 done
2157
2158
2159 for ac_hdr in readline/readline.h readline/history.h
2160 do
2161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2163 echo "configure:2164: checking for $ac_hdr" >&5
2164 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2165   echo $ac_n "(cached) $ac_c" 1>&6
2166 else
2167   cat > conftest.$ac_ext <<EOF
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170 #include <$ac_hdr>
2171 EOF
2172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2173 { (eval echo configure:2174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2174 ac_err=`grep -v '^ *+' conftest.out`
2175 if test -z "$ac_err"; then
2176   rm -rf conftest*
2177   eval "ac_cv_header_$ac_safe=yes"
2178 else
2179   echo "$ac_err" >&5
2180   echo "configure: failed program was:" >&5
2181   cat conftest.$ac_ext >&5
2182   rm -rf conftest*
2183   eval "ac_cv_header_$ac_safe=no"
2184 fi
2185 rm -f conftest*
2186 fi
2187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2188   echo "$ac_t""yes" 1>&6
2189     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2190   cat >> confdefs.h <<EOF
2191 #define $ac_tr_hdr 1
2192 EOF
2193  
2194 else
2195   echo "$ac_t""no" 1>&6
2196 fi
2197 done
2198
2199 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2200 echo "configure:2201: checking for readline in -lreadline" >&5
2201 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2202 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2203   echo $ac_n "(cached) $ac_c" 1>&6
2204 else
2205   ac_save_LIBS="$LIBS"
2206 LIBS="-lreadline  $LIBS"
2207 cat > conftest.$ac_ext <<EOF
2208 #line 2209 "configure"
2209 #include "confdefs.h"
2210 /* Override any gcc2 internal prototype to avoid an error.  */
2211 #ifdef __cplusplus
2212 extern "C"
2213 #endif
2214 /* We use char because int might match the return type of a gcc2
2215     builtin and then its argument prototype would still apply.  */
2216 char readline();
2217
2218 int main() {
2219 readline()
2220 ; return 0; }
2221 EOF
2222 if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2223   rm -rf conftest*
2224   eval "ac_cv_lib_$ac_lib_var=yes"
2225 else
2226   echo "configure: failed program was:" >&5
2227   cat conftest.$ac_ext >&5
2228   rm -rf conftest*
2229   eval "ac_cv_lib_$ac_lib_var=no"
2230 fi
2231 rm -f conftest*
2232 LIBS="$ac_save_LIBS"
2233
2234 fi
2235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2236   echo "$ac_t""yes" 1>&6
2237     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2239   cat >> confdefs.h <<EOF
2240 #define $ac_tr_lib 1
2241 EOF
2242
2243   LIBS="-lreadline $LIBS"
2244
2245 else
2246   echo "$ac_t""no" 1>&6
2247 fi
2248
2249
2250 # Extract the first word of "doxygen", so it can be a program name with args.
2251 set dummy doxygen; ac_word=$2
2252 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2253 echo "configure:2254: checking for $ac_word" >&5
2254 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
2255   echo $ac_n "(cached) $ac_c" 1>&6
2256 else
2257   case "$DOXYGEN" in
2258   /*)
2259   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
2260   ;;
2261   *)
2262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2263   for ac_dir in $PATH; do
2264     test -z "$ac_dir" && ac_dir=.
2265     if test -f $ac_dir/$ac_word; then
2266       ac_cv_path_DOXYGEN="$ac_dir/$ac_word"
2267       break
2268     fi
2269   done
2270   IFS="$ac_save_ifs"
2271   test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=""""
2272   ;;
2273 esac
2274 fi
2275 DOXYGEN="$ac_cv_path_DOXYGEN"
2276 if test -n "$DOXYGEN"; then
2277   echo "$ac_t""$DOXYGEN" 1>&6
2278 else
2279   echo "$ac_t""no" 1>&6
2280 fi
2281
2282 # Extract the first word of "latex", so it can be a program name with args.
2283 set dummy latex; ac_word=$2
2284 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2285 echo "configure:2286: checking for $ac_word" >&5
2286 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
2287   echo $ac_n "(cached) $ac_c" 1>&6
2288 else
2289   case "$LATEX" in
2290   /*)
2291   ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path.
2292   ;;
2293   *)
2294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2295   for ac_dir in $PATH; do
2296     test -z "$ac_dir" && ac_dir=.
2297     if test -f $ac_dir/$ac_word; then
2298       ac_cv_path_LATEX="$ac_dir/$ac_word"
2299       break
2300     fi
2301   done
2302   IFS="$ac_save_ifs"
2303   test -z "$ac_cv_path_LATEX" && ac_cv_path_LATEX=""""
2304   ;;
2305 esac
2306 fi
2307 LATEX="$ac_cv_path_LATEX"
2308 if test -n "$LATEX"; then
2309   echo "$ac_t""$LATEX" 1>&6
2310 else
2311   echo "$ac_t""no" 1>&6
2312 fi
2313
2314 # Extract the first word of "makeindex", so it can be a program name with args.
2315 set dummy makeindex; ac_word=$2
2316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2317 echo "configure:2318: checking for $ac_word" >&5
2318 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then
2319   echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321   case "$MAKEINDEX" in
2322   /*)
2323   ac_cv_path_MAKEINDEX="$MAKEINDEX" # Let the user override the test with a path.
2324   ;;
2325   *)
2326   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2327   for ac_dir in $PATH; do
2328     test -z "$ac_dir" && ac_dir=.
2329     if test -f $ac_dir/$ac_word; then
2330       ac_cv_path_MAKEINDEX="$ac_dir/$ac_word"
2331       break
2332     fi
2333   done
2334   IFS="$ac_save_ifs"
2335   test -z "$ac_cv_path_MAKEINDEX" && ac_cv_path_MAKEINDEX=""""
2336   ;;
2337 esac
2338 fi
2339 MAKEINDEX="$ac_cv_path_MAKEINDEX"
2340 if test -n "$MAKEINDEX"; then
2341   echo "$ac_t""$MAKEINDEX" 1>&6
2342 else
2343   echo "$ac_t""no" 1>&6
2344 fi
2345
2346 # Extract the first word of "dvips", so it can be a program name with args.
2347 set dummy dvips; ac_word=$2
2348 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2349 echo "configure:2350: checking for $ac_word" >&5
2350 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
2351   echo $ac_n "(cached) $ac_c" 1>&6
2352 else
2353   case "$DVIPS" in
2354   /*)
2355   ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
2356   ;;
2357   *)
2358   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2359   for ac_dir in $PATH; do
2360     test -z "$ac_dir" && ac_dir=.
2361     if test -f $ac_dir/$ac_word; then
2362       ac_cv_path_DVIPS="$ac_dir/$ac_word"
2363       break
2364     fi
2365   done
2366   IFS="$ac_save_ifs"
2367   test -z "$ac_cv_path_DVIPS" && ac_cv_path_DVIPS=""""
2368   ;;
2369 esac
2370 fi
2371 DVIPS="$ac_cv_path_DVIPS"
2372 if test -n "$DVIPS"; then
2373   echo "$ac_t""$DVIPS" 1>&6
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377
2378 # Extract the first word of "fig2dev", so it can be a program name with args.
2379 set dummy fig2dev; ac_word=$2
2380 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2381 echo "configure:2382: checking for $ac_word" >&5
2382 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   case "$FIG2DEV" in
2386   /*)
2387   ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a path.
2388   ;;
2389   *)
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2391   for ac_dir in $PATH; do
2392     test -z "$ac_dir" && ac_dir=.
2393     if test -f $ac_dir/$ac_word; then
2394       ac_cv_path_FIG2DEV="$ac_dir/$ac_word"
2395       break
2396     fi
2397   done
2398   IFS="$ac_save_ifs"
2399   test -z "$ac_cv_path_FIG2DEV" && ac_cv_path_FIG2DEV=""""
2400   ;;
2401 esac
2402 fi
2403 FIG2DEV="$ac_cv_path_FIG2DEV"
2404 if test -n "$FIG2DEV"; then
2405   echo "$ac_t""$FIG2DEV" 1>&6
2406 else
2407   echo "$ac_t""no" 1>&6
2408 fi
2409
2410 # Extract the first word of "jade", so it can be a program name with args.
2411 set dummy jade; ac_word=$2
2412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2413 echo "configure:2414: checking for $ac_word" >&5
2414 if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then
2415   echo $ac_n "(cached) $ac_c" 1>&6
2416 else
2417   case "$JADE" in
2418   /*)
2419   ac_cv_path_JADE="$JADE" # Let the user override the test with a path.
2420   ;;
2421   *)
2422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2423   for ac_dir in $PATH; do
2424     test -z "$ac_dir" && ac_dir=.
2425     if test -f $ac_dir/$ac_word; then
2426       ac_cv_path_JADE="$ac_dir/$ac_word"
2427       break
2428     fi
2429   done
2430   IFS="$ac_save_ifs"
2431   test -z "$ac_cv_path_JADE" && ac_cv_path_JADE=""""
2432   ;;
2433 esac
2434 fi
2435 JADE="$ac_cv_path_JADE"
2436 if test -n "$JADE"; then
2437   echo "$ac_t""$JADE" 1>&6
2438 else
2439   echo "$ac_t""no" 1>&6
2440 fi
2441
2442 # Extract the first word of "jadetex", so it can be a program name with args.
2443 set dummy jadetex; ac_word=$2
2444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2445 echo "configure:2446: checking for $ac_word" >&5
2446 if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then
2447   echo $ac_n "(cached) $ac_c" 1>&6
2448 else
2449   case "$JADETEX" in
2450   /*)
2451   ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a path.
2452   ;;
2453   *)
2454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2455   for ac_dir in $PATH; do
2456     test -z "$ac_dir" && ac_dir=.
2457     if test -f $ac_dir/$ac_word; then
2458       ac_cv_path_JADETEX="$ac_dir/$ac_word"
2459       break
2460     fi
2461   done
2462   IFS="$ac_save_ifs"
2463   test -z "$ac_cv_path_JADETEX" && ac_cv_path_JADETEX=""""
2464   ;;
2465 esac
2466 fi
2467 JADETEX="$ac_cv_path_JADETEX"
2468 if test -n "$JADETEX"; then
2469   echo "$ac_t""$JADETEX" 1>&6
2470 else
2471   echo "$ac_t""no" 1>&6
2472 fi
2473
2474
2475 trap '' 1 2 15
2476 cat > confcache <<\EOF
2477 # This file is a shell script that caches the results of configure
2478 # tests run on this system so they can be shared between configure
2479 # scripts and configure runs.  It is not useful on other systems.
2480 # If it contains results you don't want to keep, you may remove or edit it.
2481 #
2482 # By default, configure uses ./config.cache as the cache file,
2483 # creating it if it does not exist already.  You can give configure
2484 # the --cache-file=FILE option to use a different cache file; that is
2485 # what configure does when it calls configure scripts in
2486 # subdirectories, so they share the cache.
2487 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2488 # config.status only pays attention to the cache file if you give it the
2489 # --recheck option to rerun configure.
2490 #
2491 EOF
2492 # The following way of writing the cache mishandles newlines in values,
2493 # but we know of no workaround that is simple, portable, and efficient.
2494 # So, don't put newlines in cache variables' values.
2495 # Ultrix sh set writes to stderr and can't be redirected directly,
2496 # and sets the high bit in the cache file unless we assign to the vars.
2497 (set) 2>&1 |
2498   case `(ac_space=' '; set) 2>&1` in
2499   *ac_space=\ *)
2500     # `set' does not quote correctly, so add quotes (double-quote substitution
2501     # turns \\\\ into \\, and sed turns \\ into \).
2502     sed -n \
2503       -e "s/'/'\\\\''/g" \
2504       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2505     ;;
2506   *)
2507     # `set' quotes correctly as required by POSIX, so do not add quotes.
2508     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2509     ;;
2510   esac >> confcache
2511 if cmp -s $cache_file confcache; then
2512   :
2513 else
2514   if test -w $cache_file; then
2515     echo "updating cache $cache_file"
2516     cat confcache > $cache_file
2517   else
2518     echo "not updating unwritable cache $cache_file"
2519   fi
2520 fi
2521 rm -f confcache
2522
2523 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2524
2525 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2526 # Let make expand exec_prefix.
2527 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2528
2529 # Any assignment to VPATH causes Sun make to only execute
2530 # the first set of double-colon rules, so remove it if not needed.
2531 # If there is a colon in the path, we need to keep it.
2532 if test "x$srcdir" = x.; then
2533   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2534 fi
2535
2536 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2537
2538 DEFS=-DHAVE_CONFIG_H
2539
2540 # Without the "./", some shells look in PATH for config.status.
2541 : ${CONFIG_STATUS=./config.status}
2542
2543 echo creating $CONFIG_STATUS
2544 rm -f $CONFIG_STATUS
2545 cat > $CONFIG_STATUS <<EOF
2546 #! /bin/sh
2547 # Generated automatically by configure.
2548 # Run this file to recreate the current configuration.
2549 # This directory was configured as follows,
2550 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2551 #
2552 # $0 $ac_configure_args
2553 #
2554 # Compiler output produced by configure, useful for debugging
2555 # configure, is in ./config.log if it exists.
2556
2557 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2558 for ac_option
2559 do
2560   case "\$ac_option" in
2561   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2562     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2563     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2564   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2565     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2566     exit 0 ;;
2567   -help | --help | --hel | --he | --h)
2568     echo "\$ac_cs_usage"; exit 0 ;;
2569   *) echo "\$ac_cs_usage"; exit 1 ;;
2570   esac
2571 done
2572
2573 ac_given_srcdir=$srcdir
2574 ac_given_INSTALL="$INSTALL"
2575
2576 trap 'rm -fr `echo "Makefile ginac/Makefile check/Makefile ginsh/Makefile doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2577 EOF
2578 cat >> $CONFIG_STATUS <<EOF
2579
2580 # Protect against being on the right side of a sed subst in config.status.
2581 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2582  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2583 $ac_vpsub
2584 $extrasub
2585 s%@CFLAGS@%$CFLAGS%g
2586 s%@CPPFLAGS@%$CPPFLAGS%g
2587 s%@CXXFLAGS@%$CXXFLAGS%g
2588 s%@DEFS@%$DEFS%g
2589 s%@LDFLAGS@%$LDFLAGS%g
2590 s%@LIBS@%$LIBS%g
2591 s%@exec_prefix@%$exec_prefix%g
2592 s%@prefix@%$prefix%g
2593 s%@program_transform_name@%$program_transform_name%g
2594 s%@bindir@%$bindir%g
2595 s%@sbindir@%$sbindir%g
2596 s%@libexecdir@%$libexecdir%g
2597 s%@datadir@%$datadir%g
2598 s%@sysconfdir@%$sysconfdir%g
2599 s%@sharedstatedir@%$sharedstatedir%g
2600 s%@localstatedir@%$localstatedir%g
2601 s%@libdir@%$libdir%g
2602 s%@includedir@%$includedir%g
2603 s%@oldincludedir@%$oldincludedir%g
2604 s%@infodir@%$infodir%g
2605 s%@mandir@%$mandir%g
2606 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2607 s%@INSTALL_DATA@%$INSTALL_DATA%g
2608 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2609 s%@PACKAGE@%$PACKAGE%g
2610 s%@VERSION@%$VERSION%g
2611 s%@ACLOCAL@%$ACLOCAL%g
2612 s%@AUTOCONF@%$AUTOCONF%g
2613 s%@AUTOMAKE@%$AUTOMAKE%g
2614 s%@AUTOHEADER@%$AUTOHEADER%g
2615 s%@MAKEINFO@%$MAKEINFO%g
2616 s%@SET_MAKE@%$SET_MAKE%g
2617 s%@MAINT@%$MAINT%g
2618 s%@CXX@%$CXX%g
2619 s%@CXXCPP@%$CXXCPP%g
2620 s%@host@%$host%g
2621 s%@host_alias@%$host_alias%g
2622 s%@host_cpu@%$host_cpu%g
2623 s%@host_vendor@%$host_vendor%g
2624 s%@host_os@%$host_os%g
2625 s%@RANLIB@%$RANLIB%g
2626 s%@CC@%$CC%g
2627 s%@LD@%$LD%g
2628 s%@NM@%$NM%g
2629 s%@LN_S@%$LN_S%g
2630 s%@LIBTOOL@%$LIBTOOL%g
2631 s%@LEX@%$LEX%g
2632 s%@LEXLIB@%$LEXLIB%g
2633 s%@CPP@%$CPP%g
2634 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2635 s%@YACC@%$YACC%g
2636 s%@LIBOBJS@%$LIBOBJS%g
2637 s%@DOXYGEN@%$DOXYGEN%g
2638 s%@LATEX@%$LATEX%g
2639 s%@MAKEINDEX@%$MAKEINDEX%g
2640 s%@DVIPS@%$DVIPS%g
2641 s%@FIG2DEV@%$FIG2DEV%g
2642 s%@JADE@%$JADE%g
2643 s%@JADETEX@%$JADETEX%g
2644
2645 CEOF
2646 EOF
2647
2648 cat >> $CONFIG_STATUS <<\EOF
2649
2650 # Split the substitutions into bite-sized pieces for seds with
2651 # small command number limits, like on Digital OSF/1 and HP-UX.
2652 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2653 ac_file=1 # Number of current file.
2654 ac_beg=1 # First line for current file.
2655 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2656 ac_more_lines=:
2657 ac_sed_cmds=""
2658 while $ac_more_lines; do
2659   if test $ac_beg -gt 1; then
2660     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2661   else
2662     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2663   fi
2664   if test ! -s conftest.s$ac_file; then
2665     ac_more_lines=false
2666     rm -f conftest.s$ac_file
2667   else
2668     if test -z "$ac_sed_cmds"; then
2669       ac_sed_cmds="sed -f conftest.s$ac_file"
2670     else
2671       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2672     fi
2673     ac_file=`expr $ac_file + 1`
2674     ac_beg=$ac_end
2675     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2676   fi
2677 done
2678 if test -z "$ac_sed_cmds"; then
2679   ac_sed_cmds=cat
2680 fi
2681 EOF
2682
2683 cat >> $CONFIG_STATUS <<EOF
2684
2685 CONFIG_FILES=\${CONFIG_FILES-"Makefile ginac/Makefile check/Makefile ginsh/Makefile doc/Makefile"}
2686 EOF
2687 cat >> $CONFIG_STATUS <<\EOF
2688 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2689   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2690   case "$ac_file" in
2691   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2692        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2693   *) ac_file_in="${ac_file}.in" ;;
2694   esac
2695
2696   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2697
2698   # Remove last slash and all that follows it.  Not all systems have dirname.
2699   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2700   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2701     # The file is in a subdirectory.
2702     test ! -d "$ac_dir" && mkdir "$ac_dir"
2703     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2704     # A "../" for each directory in $ac_dir_suffix.
2705     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2706   else
2707     ac_dir_suffix= ac_dots=
2708   fi
2709
2710   case "$ac_given_srcdir" in
2711   .)  srcdir=.
2712       if test -z "$ac_dots"; then top_srcdir=.
2713       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2714   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2715   *) # Relative path.
2716     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2717     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2718   esac
2719
2720   case "$ac_given_INSTALL" in
2721   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2722   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2723   esac
2724
2725   echo creating "$ac_file"
2726   rm -f "$ac_file"
2727   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2728   case "$ac_file" in
2729   *Makefile*) ac_comsub="1i\\
2730 # $configure_input" ;;
2731   *) ac_comsub= ;;
2732   esac
2733
2734   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2735   sed -e "$ac_comsub
2736 s%@configure_input@%$configure_input%g
2737 s%@srcdir@%$srcdir%g
2738 s%@top_srcdir@%$top_srcdir%g
2739 s%@INSTALL@%$INSTALL%g
2740 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2741 fi; done
2742 rm -f conftest.s*
2743
2744 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2745 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2746 #
2747 # ac_d sets the value in "#define NAME VALUE" lines.
2748 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2749 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2750 ac_dC='\3'
2751 ac_dD='%g'
2752 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2753 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2754 ac_uB='\([      ]\)%\1#\2define\3'
2755 ac_uC=' '
2756 ac_uD='\4%g'
2757 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2758 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2759 ac_eB='$%\1#\2define\3'
2760 ac_eC=' '
2761 ac_eD='%g'
2762
2763 if test "${CONFIG_HEADERS+set}" != set; then
2764 EOF
2765 cat >> $CONFIG_STATUS <<EOF
2766   CONFIG_HEADERS="config.h"
2767 EOF
2768 cat >> $CONFIG_STATUS <<\EOF
2769 fi
2770 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2771   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2772   case "$ac_file" in
2773   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2774        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2775   *) ac_file_in="${ac_file}.in" ;;
2776   esac
2777
2778   echo creating $ac_file
2779
2780   rm -f conftest.frag conftest.in conftest.out
2781   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2782   cat $ac_file_inputs > conftest.in
2783
2784 EOF
2785
2786 # Transform confdefs.h into a sed script conftest.vals that substitutes
2787 # the proper values into config.h.in to produce config.h.  And first:
2788 # Protect against being on the right side of a sed subst in config.status.
2789 # Protect against being in an unquoted here document in config.status.
2790 rm -f conftest.vals
2791 cat > conftest.hdr <<\EOF
2792 s/[\\&%]/\\&/g
2793 s%[\\$`]%\\&%g
2794 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2795 s%ac_d%ac_u%gp
2796 s%ac_u%ac_e%gp
2797 EOF
2798 sed -n -f conftest.hdr confdefs.h > conftest.vals
2799 rm -f conftest.hdr
2800
2801 # This sed command replaces #undef with comments.  This is necessary, for
2802 # example, in the case of _POSIX_SOURCE, which is predefined and required
2803 # on some systems where configure will not decide to define it.
2804 cat >> conftest.vals <<\EOF
2805 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2806 EOF
2807
2808 # Break up conftest.vals because some shells have a limit on
2809 # the size of here documents, and old seds have small limits too.
2810
2811 rm -f conftest.tail
2812 while :
2813 do
2814   ac_lines=`grep -c . conftest.vals`
2815   # grep -c gives empty output for an empty file on some AIX systems.
2816   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2817   # Write a limited-size here document to conftest.frag.
2818   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2819   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2820   echo 'CEOF
2821   sed -f conftest.frag conftest.in > conftest.out
2822   rm -f conftest.in
2823   mv conftest.out conftest.in
2824 ' >> $CONFIG_STATUS
2825   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2826   rm -f conftest.vals
2827   mv conftest.tail conftest.vals
2828 done
2829 rm -f conftest.vals
2830
2831 cat >> $CONFIG_STATUS <<\EOF
2832   rm -f conftest.frag conftest.h
2833   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2834   cat conftest.in >> conftest.h
2835   rm -f conftest.in
2836   if cmp -s $ac_file conftest.h 2>/dev/null; then
2837     echo "$ac_file is unchanged"
2838     rm -f conftest.h
2839   else
2840     # Remove last slash and all that follows it.  Not all systems have dirname.
2841       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2842       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2843       # The file is in a subdirectory.
2844       test ! -d "$ac_dir" && mkdir "$ac_dir"
2845     fi
2846     rm -f $ac_file
2847     mv conftest.h $ac_file
2848   fi
2849 fi; done
2850
2851 EOF
2852 cat >> $CONFIG_STATUS <<EOF
2853
2854
2855 EOF
2856 cat >> $CONFIG_STATUS <<\EOF
2857 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2858
2859 exit 0
2860 EOF
2861 chmod +x $CONFIG_STATUS
2862 rm -fr confdefs* $ac_clean_files
2863 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2864
2865 echo "Configuration done. Now type \"make\"."