]> www.ginac.de Git - ginac.git/blob - configure
- added "check.h" to sources
[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 GINACLIB_MAJOR_VERSION=0
538 GINACLIB_MINOR_VERSION=4
539 GINACLIB_MICRO_VERSION=0
540 GINACLIB_INTERFACE_AGE=0
541 GINACLIB_BINARY_AGE=0
542 GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
543
544
545
546
547
548
549
550
551 LT_RELEASE=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION
552 LT_CURRENT=`expr $GINACLIB_MICRO_VERSION - $GINACLIB_INTERFACE_AGE`
553 LT_REVISION=$GINACLIB_INTERFACE_AGE
554 LT_AGE=`expr $GINACLIB_BINARY_AGE - $GINACLIB_INTERFACE_AGE`
555
556
557
558
559
560
561
562
563
564 ac_aux_dir=
565 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
566   if test -f $ac_dir/install-sh; then
567     ac_aux_dir=$ac_dir
568     ac_install_sh="$ac_aux_dir/install-sh -c"
569     break
570   elif test -f $ac_dir/install.sh; then
571     ac_aux_dir=$ac_dir
572     ac_install_sh="$ac_aux_dir/install.sh -c"
573     break
574   fi
575 done
576 if test -z "$ac_aux_dir"; then
577   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
578 fi
579 ac_config_guess=$ac_aux_dir/config.guess
580 ac_config_sub=$ac_aux_dir/config.sub
581 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
582
583 # Find a good install program.  We prefer a C program (faster),
584 # so one script is as good as another.  But avoid the broken or
585 # incompatible versions:
586 # SysV /etc/install, /usr/sbin/install
587 # SunOS /usr/etc/install
588 # IRIX /sbin/install
589 # AIX /bin/install
590 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
591 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
592 # ./install, which can be erroneously created by make from ./install.sh.
593 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
594 echo "configure:595: checking for a BSD compatible install" >&5
595 if test -z "$INSTALL"; then
596 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
597   echo $ac_n "(cached) $ac_c" 1>&6
598 else
599     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
600   for ac_dir in $PATH; do
601     # Account for people who put trailing slashes in PATH elements.
602     case "$ac_dir/" in
603     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
604     *)
605       # OSF1 and SCO ODT 3.0 have their own names for install.
606       for ac_prog in ginstall installbsd scoinst install; do
607         if test -f $ac_dir/$ac_prog; then
608           if test $ac_prog = install &&
609             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
610             # AIX install.  It has an incompatible calling convention.
611             # OSF/1 installbsd also uses dspmsg, but is usable.
612             :
613           else
614             ac_cv_path_install="$ac_dir/$ac_prog -c"
615             break 2
616           fi
617         fi
618       done
619       ;;
620     esac
621   done
622   IFS="$ac_save_IFS"
623
624 fi
625   if test "${ac_cv_path_install+set}" = set; then
626     INSTALL="$ac_cv_path_install"
627   else
628     # As a last resort, use the slow shell script.  We don't cache a
629     # path for INSTALL within a source directory, because that will
630     # break other packages using the cache if that directory is
631     # removed, or if the path is relative.
632     INSTALL="$ac_install_sh"
633   fi
634 fi
635 echo "$ac_t""$INSTALL" 1>&6
636
637 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
638 # It thinks the first close brace ends the variable substitution.
639 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
640
641 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
642
643
644 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
645
646 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
647 echo "configure:648: checking whether build environment is sane" >&5
648 # Just in case
649 sleep 1
650 echo timestamp > conftestfile
651 # Do `set' in a subshell so we don't clobber the current shell's
652 # arguments.  Must try -L first in case configure is actually a
653 # symlink; some systems play weird games with the mod time of symlinks
654 # (eg FreeBSD returns the mod time of the symlink's containing
655 # directory).
656 if (
657    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
658    if test "$*" = "X"; then
659       # -L didn't work.
660       set X `ls -t $srcdir/configure conftestfile`
661    fi
662    if test "$*" != "X $srcdir/configure conftestfile" \
663       && test "$*" != "X conftestfile $srcdir/configure"; then
664
665       # If neither matched, then we have a broken ls.  This can happen
666       # if, for instance, CONFIG_SHELL is bash and it inherits a
667       # broken ls alias from the environment.  This has actually
668       # happened.  Such a system could not be considered "sane".
669       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
670 alias in your environment" 1>&2; exit 1; }
671    fi
672
673    test "$2" = conftestfile
674    )
675 then
676    # Ok.
677    :
678 else
679    { echo "configure: error: newly created file is older than distributed files!
680 Check your system clock" 1>&2; exit 1; }
681 fi
682 rm -f conftest*
683 echo "$ac_t""yes" 1>&6
684 if test "$program_transform_name" = s,x,x,; then
685   program_transform_name=
686 else
687   # Double any \ or $.  echo might interpret backslashes.
688   cat <<\EOF_SED > conftestsed
689 s,\\,\\\\,g; s,\$,$$,g
690 EOF_SED
691   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
692   rm -f conftestsed
693 fi
694 test "$program_prefix" != NONE &&
695   program_transform_name="s,^,${program_prefix},; $program_transform_name"
696 # Use a double $ so make ignores it.
697 test "$program_suffix" != NONE &&
698   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
699
700 # sed with no file args requires a program.
701 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
702
703 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
704 echo "configure:705: checking whether ${MAKE-make} sets \${MAKE}" >&5
705 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
706 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
707   echo $ac_n "(cached) $ac_c" 1>&6
708 else
709   cat > conftestmake <<\EOF
710 all:
711         @echo 'ac_maketemp="${MAKE}"'
712 EOF
713 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
714 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
715 if test -n "$ac_maketemp"; then
716   eval ac_cv_prog_make_${ac_make}_set=yes
717 else
718   eval ac_cv_prog_make_${ac_make}_set=no
719 fi
720 rm -f conftestmake
721 fi
722 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
723   echo "$ac_t""yes" 1>&6
724   SET_MAKE=
725 else
726   echo "$ac_t""no" 1>&6
727   SET_MAKE="MAKE=${MAKE-make}"
728 fi
729
730
731 PACKAGE=GiNaC
732
733 VERSION=$GINACLIB_VERSION
734
735 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
736   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
737 fi
738 cat >> confdefs.h <<EOF
739 #define PACKAGE "$PACKAGE"
740 EOF
741
742 cat >> confdefs.h <<EOF
743 #define VERSION "$VERSION"
744 EOF
745
746
747
748 missing_dir=`cd $ac_aux_dir && pwd`
749 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
750 echo "configure:751: checking for working aclocal" >&5
751 # Run test in a subshell; some versions of sh will print an error if
752 # an executable is not found, even if stderr is redirected.
753 # Redirect stdin to placate older versions of autoconf.  Sigh.
754 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
755    ACLOCAL=aclocal
756    echo "$ac_t""found" 1>&6
757 else
758    ACLOCAL="$missing_dir/missing aclocal"
759    echo "$ac_t""missing" 1>&6
760 fi
761
762 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
763 echo "configure:764: checking for working autoconf" >&5
764 # Run test in a subshell; some versions of sh will print an error if
765 # an executable is not found, even if stderr is redirected.
766 # Redirect stdin to placate older versions of autoconf.  Sigh.
767 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
768    AUTOCONF=autoconf
769    echo "$ac_t""found" 1>&6
770 else
771    AUTOCONF="$missing_dir/missing autoconf"
772    echo "$ac_t""missing" 1>&6
773 fi
774
775 echo $ac_n "checking for working automake""... $ac_c" 1>&6
776 echo "configure:777: checking for working automake" >&5
777 # Run test in a subshell; some versions of sh will print an error if
778 # an executable is not found, even if stderr is redirected.
779 # Redirect stdin to placate older versions of autoconf.  Sigh.
780 if (automake --version) < /dev/null > /dev/null 2>&1; then
781    AUTOMAKE=automake
782    echo "$ac_t""found" 1>&6
783 else
784    AUTOMAKE="$missing_dir/missing automake"
785    echo "$ac_t""missing" 1>&6
786 fi
787
788 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
789 echo "configure:790: checking for working autoheader" >&5
790 # Run test in a subshell; some versions of sh will print an error if
791 # an executable is not found, even if stderr is redirected.
792 # Redirect stdin to placate older versions of autoconf.  Sigh.
793 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
794    AUTOHEADER=autoheader
795    echo "$ac_t""found" 1>&6
796 else
797    AUTOHEADER="$missing_dir/missing autoheader"
798    echo "$ac_t""missing" 1>&6
799 fi
800
801 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
802 echo "configure:803: checking for working makeinfo" >&5
803 # Run test in a subshell; some versions of sh will print an error if
804 # an executable is not found, even if stderr is redirected.
805 # Redirect stdin to placate older versions of autoconf.  Sigh.
806 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
807    MAKEINFO=makeinfo
808    echo "$ac_t""found" 1>&6
809 else
810    MAKEINFO="$missing_dir/missing makeinfo"
811    echo "$ac_t""missing" 1>&6
812 fi
813
814
815 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
816 echo "configure:817: checking whether to enable maintainer-specific portions of Makefiles" >&5
817     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
818 if test "${enable_maintainer_mode+set}" = set; then
819   enableval="$enable_maintainer_mode"
820   USE_MAINTAINER_MODE=$enableval
821 else
822   USE_MAINTAINER_MODE=no
823 fi
824
825   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
826   if test $USE_MAINTAINER_MODE = yes; then
827     MAINT=
828   else
829     MAINT='#M#'
830   fi
831   
832
833
834 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
835 do
836 # Extract the first word of "$ac_prog", so it can be a program name with args.
837 set dummy $ac_prog; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 echo "configure:840: checking for $ac_word" >&5
840 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
843   if test -n "$CXX"; then
844   ac_cv_prog_CXX="$CXX" # Let the user override the test.
845 else
846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
847   for ac_dir in $PATH; do
848     test -z "$ac_dir" && ac_dir=.
849     if test -f $ac_dir/$ac_word; then
850       ac_cv_prog_CXX="$ac_prog"
851       break
852     fi
853   done
854   IFS="$ac_save_ifs"
855 fi
856 fi
857 CXX="$ac_cv_prog_CXX"
858 if test -n "$CXX"; then
859   echo "$ac_t""$CXX" 1>&6
860 else
861   echo "$ac_t""no" 1>&6
862 fi
863
864 test -n "$CXX" && break
865 done
866 test -n "$CXX" || CXX="gcc"
867
868
869 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
870 echo "configure:871: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
871
872 ac_ext=C
873 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
874 ac_cpp='$CXXCPP $CPPFLAGS'
875 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
876 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
877 cross_compiling=$ac_cv_prog_cxx_cross
878
879 cat > conftest.$ac_ext <<EOF
880 #line 881 "configure"
881 #include "confdefs.h"
882 main(){return(0);}
883 EOF
884 if { (eval echo configure:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
885   ac_cv_prog_cxx_works=yes
886   # If we can't run a trivial program, we are probably using a cross compiler.
887   if (./conftest; exit) 2>/dev/null; then
888     ac_cv_prog_cxx_cross=no
889   else
890     ac_cv_prog_cxx_cross=yes
891   fi
892 else
893   echo "configure: failed program was:" >&5
894   cat conftest.$ac_ext >&5
895   ac_cv_prog_cxx_works=no
896 fi
897 rm -fr conftest*
898 ac_ext=c
899 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
900 ac_cpp='$CPP $CPPFLAGS'
901 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
902 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
903 cross_compiling=$ac_cv_prog_cc_cross
904
905 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
906 if test $ac_cv_prog_cxx_works = no; then
907   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
908 fi
909 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
910 echo "configure:911: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
911 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
912 cross_compiling=$ac_cv_prog_cxx_cross
913
914 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
915 echo "configure:916: checking whether we are using GNU C++" >&5
916 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
917   echo $ac_n "(cached) $ac_c" 1>&6
918 else
919   cat > conftest.C <<EOF
920 #ifdef __GNUC__
921   yes;
922 #endif
923 EOF
924 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
925   ac_cv_prog_gxx=yes
926 else
927   ac_cv_prog_gxx=no
928 fi
929 fi
930
931 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
932
933 if test $ac_cv_prog_gxx = yes; then
934   GXX=yes
935   ac_test_CXXFLAGS="${CXXFLAGS+set}"
936   ac_save_CXXFLAGS="$CXXFLAGS"
937   CXXFLAGS=
938   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
939 echo "configure:940: checking whether ${CXX-g++} accepts -g" >&5
940 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
941   echo $ac_n "(cached) $ac_c" 1>&6
942 else
943   echo 'void f(){}' > conftest.cc
944 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
945   ac_cv_prog_cxx_g=yes
946 else
947   ac_cv_prog_cxx_g=no
948 fi
949 rm -f conftest*
950
951 fi
952
953 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
954   if test "$ac_test_CXXFLAGS" = set; then
955     CXXFLAGS="$ac_save_CXXFLAGS"
956   elif test $ac_cv_prog_cxx_g = yes; then
957     CXXFLAGS="-g -O2"
958   else
959     CXXFLAGS="-O2"
960   fi
961 else
962   GXX=
963   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
964 fi
965
966 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
967 echo "configure:968: checking how to run the C++ preprocessor" >&5
968 if test -z "$CXXCPP"; then
969 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
970   echo $ac_n "(cached) $ac_c" 1>&6
971 else
972   ac_ext=C
973 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
974 ac_cpp='$CXXCPP $CPPFLAGS'
975 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
976 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
977 cross_compiling=$ac_cv_prog_cxx_cross
978   CXXCPP="${CXX-g++} -E"
979   cat > conftest.$ac_ext <<EOF
980 #line 981 "configure"
981 #include "confdefs.h"
982 #include <stdlib.h>
983 EOF
984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
985 { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
986 ac_err=`grep -v '^ *+' conftest.out`
987 if test -z "$ac_err"; then
988   :
989 else
990   echo "$ac_err" >&5
991   echo "configure: failed program was:" >&5
992   cat conftest.$ac_ext >&5
993   rm -rf conftest*
994   CXXCPP=/lib/cpp
995 fi
996 rm -f conftest*
997   ac_cv_prog_CXXCPP="$CXXCPP"
998 ac_ext=c
999 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1000 ac_cpp='$CPP $CPPFLAGS'
1001 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1002 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1003 cross_compiling=$ac_cv_prog_cc_cross
1004 fi
1005 fi
1006 CXXCPP="$ac_cv_prog_CXXCPP"
1007 echo "$ac_t""$CXXCPP" 1>&6
1008
1009
1010 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1011
1012 # Check whether --enable-shared or --disable-shared was given.
1013 if test "${enable_shared+set}" = set; then
1014   enableval="$enable_shared"
1015   p=${PACKAGE-default}
1016 case "$enableval" in
1017 yes) enable_shared=yes ;;
1018 no) enable_shared=no ;;
1019 *)
1020   enable_shared=no
1021   # Look at the argument we got.  We use all the common list separators.
1022   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1023   for pkg in $enableval; do
1024     if test "X$pkg" = "X$p"; then
1025       enable_shared=yes
1026     fi
1027   done
1028   IFS="$ac_save_ifs"
1029   ;;
1030 esac
1031 else
1032   enable_shared=yes
1033 fi
1034
1035 # Check whether --enable-static or --disable-static was given.
1036 if test "${enable_static+set}" = set; then
1037   enableval="$enable_static"
1038   p=${PACKAGE-default}
1039 case "$enableval" in
1040 yes) enable_static=yes ;;
1041 no) enable_static=no ;;
1042 *)
1043   enable_static=no
1044   # Look at the argument we got.  We use all the common list separators.
1045   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1046   for pkg in $enableval; do
1047     if test "X$pkg" = "X$p"; then
1048       enable_static=yes
1049     fi
1050   done
1051   IFS="$ac_save_ifs"
1052   ;;
1053 esac
1054 else
1055   enable_static=yes
1056 fi
1057
1058
1059 # Make sure we can run config.sub.
1060 if $ac_config_sub sun4 >/dev/null 2>&1; then :
1061 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1062 fi
1063
1064 echo $ac_n "checking host system type""... $ac_c" 1>&6
1065 echo "configure:1066: checking host system type" >&5
1066
1067 host_alias=$host
1068 case "$host_alias" in
1069 NONE)
1070   case $nonopt in
1071   NONE)
1072     if host_alias=`$ac_config_guess`; then :
1073     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1074     fi ;;
1075   *) host_alias=$nonopt ;;
1076   esac ;;
1077 esac
1078
1079 host=`$ac_config_sub $host_alias`
1080 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1081 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1082 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1083 echo "$ac_t""$host" 1>&6
1084
1085 # Extract the first word of "ranlib", so it can be a program name with args.
1086 set dummy ranlib; ac_word=$2
1087 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1088 echo "configure:1089: checking for $ac_word" >&5
1089 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1090   echo $ac_n "(cached) $ac_c" 1>&6
1091 else
1092   if test -n "$RANLIB"; then
1093   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1094 else
1095   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1096   for ac_dir in $PATH; do
1097     test -z "$ac_dir" && ac_dir=.
1098     if test -f $ac_dir/$ac_word; then
1099       ac_cv_prog_RANLIB="ranlib"
1100       break
1101     fi
1102   done
1103   IFS="$ac_save_ifs"
1104   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1105 fi
1106 fi
1107 RANLIB="$ac_cv_prog_RANLIB"
1108 if test -n "$RANLIB"; then
1109   echo "$ac_t""$RANLIB" 1>&6
1110 else
1111   echo "$ac_t""no" 1>&6
1112 fi
1113
1114 # Extract the first word of "gcc", so it can be a program name with args.
1115 set dummy gcc; ac_word=$2
1116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1117 echo "configure:1118: checking for $ac_word" >&5
1118 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1119   echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121   if test -n "$CC"; then
1122   ac_cv_prog_CC="$CC" # Let the user override the test.
1123 else
1124   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1125   for ac_dir in $PATH; do
1126     test -z "$ac_dir" && ac_dir=.
1127     if test -f $ac_dir/$ac_word; then
1128       ac_cv_prog_CC="gcc"
1129       break
1130     fi
1131   done
1132   IFS="$ac_save_ifs"
1133 fi
1134 fi
1135 CC="$ac_cv_prog_CC"
1136 if test -n "$CC"; then
1137   echo "$ac_t""$CC" 1>&6
1138 else
1139   echo "$ac_t""no" 1>&6
1140 fi
1141
1142 if test -z "$CC"; then
1143   # Extract the first word of "cc", so it can be a program name with args.
1144 set dummy cc; ac_word=$2
1145 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1146 echo "configure:1147: checking for $ac_word" >&5
1147 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1148   echo $ac_n "(cached) $ac_c" 1>&6
1149 else
1150   if test -n "$CC"; then
1151   ac_cv_prog_CC="$CC" # Let the user override the test.
1152 else
1153   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1154   ac_prog_rejected=no
1155   for ac_dir in $PATH; do
1156     test -z "$ac_dir" && ac_dir=.
1157     if test -f $ac_dir/$ac_word; then
1158       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1159         ac_prog_rejected=yes
1160         continue
1161       fi
1162       ac_cv_prog_CC="cc"
1163       break
1164     fi
1165   done
1166   IFS="$ac_save_ifs"
1167 if test $ac_prog_rejected = yes; then
1168   # We found a bogon in the path, so make sure we never use it.
1169   set dummy $ac_cv_prog_CC
1170   shift
1171   if test $# -gt 0; then
1172     # We chose a different compiler from the bogus one.
1173     # However, it has the same basename, so the bogon will be chosen
1174     # first if we set CC to just the basename; use the full file name.
1175     shift
1176     set dummy "$ac_dir/$ac_word" "$@"
1177     shift
1178     ac_cv_prog_CC="$@"
1179   fi
1180 fi
1181 fi
1182 fi
1183 CC="$ac_cv_prog_CC"
1184 if test -n "$CC"; then
1185   echo "$ac_t""$CC" 1>&6
1186 else
1187   echo "$ac_t""no" 1>&6
1188 fi
1189
1190   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1191 fi
1192
1193 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1195
1196 ac_ext=c
1197 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1198 ac_cpp='$CPP $CPPFLAGS'
1199 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1200 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1201 cross_compiling=$ac_cv_prog_cc_cross
1202
1203 cat > conftest.$ac_ext <<EOF
1204 #line 1205 "configure"
1205 #include "confdefs.h"
1206 main(){return(0);}
1207 EOF
1208 if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1209   ac_cv_prog_cc_works=yes
1210   # If we can't run a trivial program, we are probably using a cross compiler.
1211   if (./conftest; exit) 2>/dev/null; then
1212     ac_cv_prog_cc_cross=no
1213   else
1214     ac_cv_prog_cc_cross=yes
1215   fi
1216 else
1217   echo "configure: failed program was:" >&5
1218   cat conftest.$ac_ext >&5
1219   ac_cv_prog_cc_works=no
1220 fi
1221 rm -fr conftest*
1222
1223 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1224 if test $ac_cv_prog_cc_works = no; then
1225   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1226 fi
1227 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1228 echo "configure:1229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1229 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1230 cross_compiling=$ac_cv_prog_cc_cross
1231
1232 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1233 echo "configure:1234: checking whether we are using GNU C" >&5
1234 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1235   echo $ac_n "(cached) $ac_c" 1>&6
1236 else
1237   cat > conftest.c <<EOF
1238 #ifdef __GNUC__
1239   yes;
1240 #endif
1241 EOF
1242 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1243   ac_cv_prog_gcc=yes
1244 else
1245   ac_cv_prog_gcc=no
1246 fi
1247 fi
1248
1249 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1250
1251 if test $ac_cv_prog_gcc = yes; then
1252   GCC=yes
1253   ac_test_CFLAGS="${CFLAGS+set}"
1254   ac_save_CFLAGS="$CFLAGS"
1255   CFLAGS=
1256   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1257 echo "configure:1258: checking whether ${CC-cc} accepts -g" >&5
1258 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1259   echo $ac_n "(cached) $ac_c" 1>&6
1260 else
1261   echo 'void f(){}' > conftest.c
1262 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1263   ac_cv_prog_cc_g=yes
1264 else
1265   ac_cv_prog_cc_g=no
1266 fi
1267 rm -f conftest*
1268
1269 fi
1270
1271 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1272   if test "$ac_test_CFLAGS" = set; then
1273     CFLAGS="$ac_save_CFLAGS"
1274   elif test $ac_cv_prog_cc_g = yes; then
1275     CFLAGS="-g -O2"
1276   else
1277     CFLAGS="-O2"
1278   fi
1279 else
1280   GCC=
1281   test "${CFLAGS+set}" = set || CFLAGS="-g"
1282 fi
1283
1284 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1285 if test "${with_gnu_ld+set}" = set; then
1286   withval="$with_gnu_ld"
1287   test "$withval" = no || with_gnu_ld=yes
1288 else
1289   with_gnu_ld=no
1290 fi
1291
1292
1293 ac_prog=ld
1294 if test "$ac_cv_prog_gcc" = yes; then
1295   # Check if gcc -print-prog-name=ld gives a path.
1296   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1297 echo "configure:1298: checking for ld used by GCC" >&5
1298   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1299   case "$ac_prog" in
1300   # Accept absolute paths.
1301   /* | A-Za-z:\\*)
1302     test -z "$LD" && LD="$ac_prog"
1303     ;;
1304   "")
1305     # If it fails, then pretend we aren't using GCC.
1306     ac_prog=ld
1307     ;;
1308   *)
1309     # If it is relative, then search for the first ld in PATH.
1310     with_gnu_ld=unknown
1311     ;;
1312   esac
1313 elif test "$with_gnu_ld" = yes; then
1314   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1315 echo "configure:1316: checking for GNU ld" >&5
1316 else
1317   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1318 echo "configure:1319: checking for non-GNU ld" >&5
1319 fi
1320 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1321   echo $ac_n "(cached) $ac_c" 1>&6
1322 else
1323   if test -z "$LD"; then
1324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1325   for ac_dir in $PATH; do
1326     test -z "$ac_dir" && ac_dir=.
1327     if test -f "$ac_dir/$ac_prog"; then
1328       ac_cv_path_LD="$ac_dir/$ac_prog"
1329       # Check to see if the program is GNU ld.  I'd rather use --version,
1330       # but apparently some GNU ld's only accept -v.
1331       # Break only if it was the GNU/non-GNU ld that we prefer.
1332       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1333         test "$with_gnu_ld" != no && break
1334       else
1335         test "$with_gnu_ld" != yes && break
1336       fi
1337     fi
1338   done
1339   IFS="$ac_save_ifs"
1340 else
1341   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1342 fi
1343 fi
1344
1345 LD="$ac_cv_path_LD"
1346 if test -n "$LD"; then
1347   echo "$ac_t""$LD" 1>&6
1348 else
1349   echo "$ac_t""no" 1>&6
1350 fi
1351 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1352
1353 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1354 echo "configure:1355: checking if the linker ($LD) is GNU ld" >&5
1355 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1356   echo $ac_n "(cached) $ac_c" 1>&6
1357 else
1358   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1359 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1360   ac_cv_prog_gnu_ld=yes
1361 else
1362   ac_cv_prog_gnu_ld=no
1363 fi
1364 fi
1365
1366 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1367
1368
1369 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1370 echo "configure:1371: checking for BSD-compatible nm" >&5
1371 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1372   echo $ac_n "(cached) $ac_c" 1>&6
1373 else
1374   case "$NM" in
1375 /* | A-Za-z:\\*)
1376   ac_cv_path_NM="$NM" # Let the user override the test with a path.
1377   ;;
1378 *)
1379   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1380   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1381     test -z "$ac_dir" && ac_dir=.
1382     if test -f $ac_dir/nm; then
1383       # Check to see if the nm accepts a BSD-compat flag.
1384       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1385       #   nm: unknown option "B" ignored
1386       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1387         ac_cv_path_NM="$ac_dir/nm -B"
1388       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1389         ac_cv_path_NM="$ac_dir/nm -p"
1390       else
1391         ac_cv_path_NM="$ac_dir/nm"
1392       fi
1393       break
1394     fi
1395   done
1396   IFS="$ac_save_ifs"
1397   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1398   ;;
1399 esac
1400 fi
1401
1402 NM="$ac_cv_path_NM"
1403 echo "$ac_t""$NM" 1>&6
1404
1405
1406 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1407 echo "configure:1408: checking whether ln -s works" >&5
1408 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1409   echo $ac_n "(cached) $ac_c" 1>&6
1410 else
1411   rm -f conftestdata
1412 if ln -s X conftestdata 2>/dev/null
1413 then
1414   rm -f conftestdata
1415   ac_cv_prog_LN_S="ln -s"
1416 else
1417   ac_cv_prog_LN_S=ln
1418 fi
1419 fi
1420 LN_S="$ac_cv_prog_LN_S"
1421 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1422   echo "$ac_t""yes" 1>&6
1423 else
1424   echo "$ac_t""no" 1>&6
1425 fi
1426
1427 # Always use our own libtool.
1428 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1429
1430 # Check for any special flags to pass to ltconfig.
1431 libtool_flags=
1432 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1433 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1434 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1435 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1436 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1437
1438 # Some flags need to be propagated to the compiler or linker for good
1439 # libtool support.
1440 case "$host" in
1441 *-*-irix6*)
1442   # Find out which ABI we are using.
1443   echo '#line 1444 "configure"' > conftest.$ac_ext
1444   if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1445     case "`/usr/bin/file conftest.o`" in
1446     *32-bit*)
1447       LD="${LD-ld} -32"
1448       ;;
1449     *N32*)
1450       LD="${LD-ld} -n32"
1451       ;;
1452     *64-bit*)
1453       LD="${LD-ld} -64"
1454       ;;
1455     esac
1456   fi
1457   rm -rf conftest*
1458   ;;
1459
1460 *-*-sco3.2v5*)
1461   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1462   CFLAGS="$CFLAGS -belf"
1463   ;;
1464 esac
1465
1466 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1467 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1468 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1469 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1470 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1471 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1472
1473 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1474 echo "configure:1475: checking how to run the C preprocessor" >&5
1475 # On Suns, sometimes $CPP names a directory.
1476 if test -n "$CPP" && test -d "$CPP"; then
1477   CPP=
1478 fi
1479 if test -z "$CPP"; then
1480 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1481   echo $ac_n "(cached) $ac_c" 1>&6
1482 else
1483     # This must be in double quotes, not single quotes, because CPP may get
1484   # substituted into the Makefile and "${CC-cc}" will confuse make.
1485   CPP="${CC-cc} -E"
1486   # On the NeXT, cc -E runs the code through the compiler's parser,
1487   # not just through cpp.
1488   cat > conftest.$ac_ext <<EOF
1489 #line 1490 "configure"
1490 #include "confdefs.h"
1491 #include <assert.h>
1492 Syntax Error
1493 EOF
1494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1495 { (eval echo configure:1496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1496 ac_err=`grep -v '^ *+' conftest.out`
1497 if test -z "$ac_err"; then
1498   :
1499 else
1500   echo "$ac_err" >&5
1501   echo "configure: failed program was:" >&5
1502   cat conftest.$ac_ext >&5
1503   rm -rf conftest*
1504   CPP="${CC-cc} -E -traditional-cpp"
1505   cat > conftest.$ac_ext <<EOF
1506 #line 1507 "configure"
1507 #include "confdefs.h"
1508 #include <assert.h>
1509 Syntax Error
1510 EOF
1511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1512 { (eval echo configure:1513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1513 ac_err=`grep -v '^ *+' conftest.out`
1514 if test -z "$ac_err"; then
1515   :
1516 else
1517   echo "$ac_err" >&5
1518   echo "configure: failed program was:" >&5
1519   cat conftest.$ac_ext >&5
1520   rm -rf conftest*
1521   CPP=/lib/cpp
1522 fi
1523 rm -f conftest*
1524 fi
1525 rm -f conftest*
1526   ac_cv_prog_CPP="$CPP"
1527 fi
1528   CPP="$ac_cv_prog_CPP"
1529 else
1530   ac_cv_prog_CPP="$CPP"
1531 fi
1532 echo "$ac_t""$CPP" 1>&6
1533
1534 missing_dir=`cd $ac_aux_dir && pwd`
1535 for ac_prog in flex lex
1536 do
1537 # Extract the first word of "$ac_prog", so it can be a program name with args.
1538 set dummy $ac_prog; ac_word=$2
1539 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1540 echo "configure:1541: checking for $ac_word" >&5
1541 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1542   echo $ac_n "(cached) $ac_c" 1>&6
1543 else
1544   if test -n "$LEX"; then
1545   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1546 else
1547   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1548   for ac_dir in $PATH; do
1549     test -z "$ac_dir" && ac_dir=.
1550     if test -f $ac_dir/$ac_word; then
1551       ac_cv_prog_LEX="$ac_prog"
1552       break
1553     fi
1554   done
1555   IFS="$ac_save_ifs"
1556 fi
1557 fi
1558 LEX="$ac_cv_prog_LEX"
1559 if test -n "$LEX"; then
1560   echo "$ac_t""$LEX" 1>&6
1561 else
1562   echo "$ac_t""no" 1>&6
1563 fi
1564
1565 test -n "$LEX" && break
1566 done
1567 test -n "$LEX" || LEX=""$missing_dir/missing flex""
1568
1569 # Extract the first word of "flex", so it can be a program name with args.
1570 set dummy flex; ac_word=$2
1571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1572 echo "configure:1573: checking for $ac_word" >&5
1573 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1574   echo $ac_n "(cached) $ac_c" 1>&6
1575 else
1576   if test -n "$LEX"; then
1577   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1578 else
1579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1580   for ac_dir in $PATH; do
1581     test -z "$ac_dir" && ac_dir=.
1582     if test -f $ac_dir/$ac_word; then
1583       ac_cv_prog_LEX="flex"
1584       break
1585     fi
1586   done
1587   IFS="$ac_save_ifs"
1588   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1589 fi
1590 fi
1591 LEX="$ac_cv_prog_LEX"
1592 if test -n "$LEX"; then
1593   echo "$ac_t""$LEX" 1>&6
1594 else
1595   echo "$ac_t""no" 1>&6
1596 fi
1597
1598 if test -z "$LEXLIB"
1599 then
1600   case "$LEX" in
1601   flex*) ac_lib=fl ;;
1602   *) ac_lib=l ;;
1603   esac
1604   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1605 echo "configure:1606: checking for yywrap in -l$ac_lib" >&5
1606 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1608   echo $ac_n "(cached) $ac_c" 1>&6
1609 else
1610   ac_save_LIBS="$LIBS"
1611 LIBS="-l$ac_lib  $LIBS"
1612 cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1615 /* Override any gcc2 internal prototype to avoid an error.  */
1616 /* We use char because int might match the return type of a gcc2
1617     builtin and then its argument prototype would still apply.  */
1618 char yywrap();
1619
1620 int main() {
1621 yywrap()
1622 ; return 0; }
1623 EOF
1624 if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1625   rm -rf conftest*
1626   eval "ac_cv_lib_$ac_lib_var=yes"
1627 else
1628   echo "configure: failed program was:" >&5
1629   cat conftest.$ac_ext >&5
1630   rm -rf conftest*
1631   eval "ac_cv_lib_$ac_lib_var=no"
1632 fi
1633 rm -f conftest*
1634 LIBS="$ac_save_LIBS"
1635
1636 fi
1637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1638   echo "$ac_t""yes" 1>&6
1639   LEXLIB="-l$ac_lib"
1640 else
1641   echo "$ac_t""no" 1>&6
1642 fi
1643
1644 fi
1645
1646 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1647 echo "configure:1648: checking lex output file root" >&5
1648 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1649   echo $ac_n "(cached) $ac_c" 1>&6
1650 else
1651   # The minimal lex program is just a single line: %%.  But some broken lexes
1652 # (Solaris, I think it was) want two %% lines, so accommodate them.
1653 echo '%%
1654 %%' | $LEX
1655 if test -f lex.yy.c; then
1656   ac_cv_prog_lex_root=lex.yy
1657 elif test -f lexyy.c; then
1658   ac_cv_prog_lex_root=lexyy
1659 else
1660   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1661 fi
1662 fi
1663
1664 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1665 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1666
1667 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1668 echo "configure:1669: checking whether yytext is a pointer" >&5
1669 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1670   echo $ac_n "(cached) $ac_c" 1>&6
1671 else
1672   # POSIX says lex can declare yytext either as a pointer or an array; the
1673 # default is implementation-dependent. Figure out which it is, since
1674 # not all implementations provide the %pointer and %array declarations.
1675 ac_cv_prog_lex_yytext_pointer=no
1676 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1677 ac_save_LIBS="$LIBS"
1678 LIBS="$LIBS $LEXLIB"
1679 cat > conftest.$ac_ext <<EOF
1680 #line 1681 "configure"
1681 #include "confdefs.h"
1682 `cat $LEX_OUTPUT_ROOT.c`
1683 int main() {
1684
1685 ; return 0; }
1686 EOF
1687 if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1688   rm -rf conftest*
1689   ac_cv_prog_lex_yytext_pointer=yes
1690 else
1691   echo "configure: failed program was:" >&5
1692   cat conftest.$ac_ext >&5
1693 fi
1694 rm -f conftest*
1695 LIBS="$ac_save_LIBS"
1696 rm -f "${LEX_OUTPUT_ROOT}.c"
1697
1698 fi
1699
1700 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1701 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1702   cat >> confdefs.h <<\EOF
1703 #define YYTEXT_POINTER 1
1704 EOF
1705
1706 fi
1707
1708 for ac_prog in 'bison -y' byacc
1709 do
1710 # Extract the first word of "$ac_prog", so it can be a program name with args.
1711 set dummy $ac_prog; ac_word=$2
1712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1713 echo "configure:1714: checking for $ac_word" >&5
1714 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1715   echo $ac_n "(cached) $ac_c" 1>&6
1716 else
1717   if test -n "$YACC"; then
1718   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1719 else
1720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1721   for ac_dir in $PATH; do
1722     test -z "$ac_dir" && ac_dir=.
1723     if test -f $ac_dir/$ac_word; then
1724       ac_cv_prog_YACC="$ac_prog"
1725       break
1726     fi
1727   done
1728   IFS="$ac_save_ifs"
1729 fi
1730 fi
1731 YACC="$ac_cv_prog_YACC"
1732 if test -n "$YACC"; then
1733   echo "$ac_t""$YACC" 1>&6
1734 else
1735   echo "$ac_t""no" 1>&6
1736 fi
1737
1738 test -n "$YACC" && break
1739 done
1740 test -n "$YACC" || YACC="yacc"
1741
1742
1743 ac_ext=C
1744 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1745 ac_cpp='$CXXCPP $CPPFLAGS'
1746 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1747 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1748 cross_compiling=$ac_cv_prog_cxx_cross
1749
1750
1751 echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6
1752 echo "configure:1753: checking for cout in -lstdc++" >&5
1753 ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'`
1754 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1755   echo $ac_n "(cached) $ac_c" 1>&6
1756 else
1757   ac_save_LIBS="$LIBS"
1758 LIBS="-lstdc++  $LIBS"
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 /* Override any gcc2 internal prototype to avoid an error.  */
1763 #ifdef __cplusplus
1764 extern "C"
1765 #endif
1766 /* We use char because int might match the return type of a gcc2
1767     builtin and then its argument prototype would still apply.  */
1768 char cout();
1769
1770 int main() {
1771 cout()
1772 ; return 0; }
1773 EOF
1774 if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1775   rm -rf conftest*
1776   eval "ac_cv_lib_$ac_lib_var=yes"
1777 else
1778   echo "configure: failed program was:" >&5
1779   cat conftest.$ac_ext >&5
1780   rm -rf conftest*
1781   eval "ac_cv_lib_$ac_lib_var=no"
1782 fi
1783 rm -f conftest*
1784 LIBS="$ac_save_LIBS"
1785
1786 fi
1787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1788   echo "$ac_t""yes" 1>&6
1789     ac_tr_lib=HAVE_LIB`echo stdc++ | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1790     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1791   cat >> confdefs.h <<EOF
1792 #define $ac_tr_lib 1
1793 EOF
1794
1795   LIBS="-lstdc++ $LIBS"
1796
1797 else
1798   echo "$ac_t""no" 1>&6
1799 fi
1800
1801
1802 for ac_hdr in iostream vector map string list typeinfo iterator strstream stdexcept algorithm
1803 do
1804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1806 echo "configure:1807: checking for $ac_hdr" >&5
1807 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1808   echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810   cat > conftest.$ac_ext <<EOF
1811 #line 1812 "configure"
1812 #include "confdefs.h"
1813 #include <$ac_hdr>
1814 EOF
1815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1816 { (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1817 ac_err=`grep -v '^ *+' conftest.out`
1818 if test -z "$ac_err"; then
1819   rm -rf conftest*
1820   eval "ac_cv_header_$ac_safe=yes"
1821 else
1822   echo "$ac_err" >&5
1823   echo "configure: failed program was:" >&5
1824   cat conftest.$ac_ext >&5
1825   rm -rf conftest*
1826   eval "ac_cv_header_$ac_safe=no"
1827 fi
1828 rm -f conftest*
1829 fi
1830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1831   echo "$ac_t""yes" 1>&6
1832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1833   cat >> confdefs.h <<EOF
1834 #define $ac_tr_hdr 1
1835 EOF
1836  
1837 else
1838   echo "$ac_t""no" 1>&6
1839 { echo "configure: error: need to have ANSI compliant headers" 1>&2; exit 1; }
1840 fi
1841 done
1842
1843
1844
1845     for ac_hdr in CLN/cln.h
1846 do
1847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_hdr" >&5
1850 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   cat > conftest.$ac_ext <<EOF
1854 #line 1855 "configure"
1855 #include "confdefs.h"
1856 #include <$ac_hdr>
1857 EOF
1858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1859 { (eval echo configure:1860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1860 ac_err=`grep -v '^ *+' conftest.out`
1861 if test -z "$ac_err"; then
1862   rm -rf conftest*
1863   eval "ac_cv_header_$ac_safe=yes"
1864 else
1865   echo "$ac_err" >&5
1866   echo "configure: failed program was:" >&5
1867   cat conftest.$ac_ext >&5
1868   rm -rf conftest*
1869   eval "ac_cv_header_$ac_safe=no"
1870 fi
1871 rm -f conftest*
1872 fi
1873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1874   echo "$ac_t""yes" 1>&6
1875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1876   cat >> confdefs.h <<EOF
1877 #define $ac_tr_hdr 1
1878 EOF
1879  
1880 else
1881   echo "$ac_t""no" 1>&6
1882 for ac_hdr in cln.h
1883 do
1884 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1885 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1886 echo "configure:1887: checking for $ac_hdr" >&5
1887 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1888   echo $ac_n "(cached) $ac_c" 1>&6
1889 else
1890   cat > conftest.$ac_ext <<EOF
1891 #line 1892 "configure"
1892 #include "confdefs.h"
1893 #include <$ac_hdr>
1894 EOF
1895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1896 { (eval echo configure:1897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1897 ac_err=`grep -v '^ *+' conftest.out`
1898 if test -z "$ac_err"; then
1899   rm -rf conftest*
1900   eval "ac_cv_header_$ac_safe=yes"
1901 else
1902   echo "$ac_err" >&5
1903   echo "configure: failed program was:" >&5
1904   cat conftest.$ac_ext >&5
1905   rm -rf conftest*
1906   eval "ac_cv_header_$ac_safe=no"
1907 fi
1908 rm -f conftest*
1909 fi
1910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1911   echo "$ac_t""yes" 1>&6
1912     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1913   cat >> confdefs.h <<EOF
1914 #define $ac_tr_hdr 1
1915 EOF
1916  
1917 else
1918   echo "$ac_t""no" 1>&6
1919 { echo "configure: error: cannot find header for Bruno Haible's CLN" 1>&2; exit 1; };
1920         
1921 fi
1922 done
1923
1924     
1925 fi
1926 done
1927
1928
1929
1930     echo $ac_n "checking how to link with libcln""... $ac_c" 1>&6
1931 echo "configure:1932: checking how to link with libcln" >&5
1932     saved_LIBS="${LIBS}"
1933     if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then
1934   echo $ac_n "(cached) $ac_c" 1>&6
1935 else
1936   LIBS="-lcln"
1937         case "${ac_cv_header_CLN_cln_h}" in
1938         "yes")
1939             cat > conftest.$ac_ext <<EOF
1940 #line 1941 "configure"
1941 #include "confdefs.h"
1942 #include <CLN/cln.h>
1943 int main() {
1944 factorial(1);
1945 ; return 0; }
1946 EOF
1947 if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1948   rm -rf conftest*
1949   ginac_cv_lib_cln_link="-lcln"
1950 else
1951   echo "configure: failed program was:" >&5
1952   cat conftest.$ac_ext >&5
1953   rm -rf conftest*
1954   ginac_cv_lib_cln_link="fail"
1955 fi
1956 rm -f conftest*
1957             ;;
1958         *)
1959             cat > conftest.$ac_ext <<EOF
1960 #line 1961 "configure"
1961 #include "confdefs.h"
1962 #include <cln.h>
1963 int main() {
1964 factorial(1);
1965 ; return 0; }
1966 EOF
1967 if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1968   rm -rf conftest*
1969   ginac_cv_lib_cln_link="-lcln"
1970 else
1971   echo "configure: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   rm -rf conftest*
1974   ginac_cv_lib_cln_link="fail"
1975 fi
1976 rm -f conftest*
1977             ;;
1978         esac
1979     
1980 fi
1981
1982     case "${ginac_cv_lib_cln_link}" in
1983     "-lcln")
1984         LIBS="-lcln ${saved_LIBS}"
1985         echo "$ac_t""-lcln" 1>&6
1986         
1987     echo $ac_n "checking whether libcln behaves sane""... $ac_c" 1>&6
1988 echo "configure:1989: checking whether libcln behaves sane" >&5
1989     if eval "test \"`echo '$''{'ginac_cv_lib_cln_integrity'+set}'`\" = set"; then
1990   echo $ac_n "(cached) $ac_c" 1>&6
1991 else
1992   
1993         case "${ac_cv_header_CLN_cln_h}" in
1994         "yes")
1995             if test "$cross_compiling" = yes; then
1996   ginac_cv_lib_cln_integrity="guessing sane"
1997 else
1998   cat > conftest.$ac_ext <<EOF
1999 #line 2000 "configure"
2000 #include "confdefs.h"
2001 #ifdef __cplusplus
2002 extern "C" void exit(int);
2003 #endif
2004 #include <CLN/cln.h>
2005 int main() {
2006 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
2007 if (q+p != 3) return 1; else return 0;
2008 }
2009 EOF
2010 if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2011 then
2012   ginac_cv_lib_cln_integrity="sane"
2013 else
2014   echo "configure: failed program was:" >&5
2015   cat conftest.$ac_ext >&5
2016   rm -fr conftest*
2017   ginac_cv_lib_cln_integrity="insane"
2018 fi
2019 rm -fr conftest*
2020 fi
2021
2022             ;;
2023         *)
2024             if test "$cross_compiling" = yes; then
2025   ginac_cv_lib_cln_integrity="guessing sane"
2026 else
2027   cat > conftest.$ac_ext <<EOF
2028 #line 2029 "configure"
2029 #include "confdefs.h"
2030 #ifdef __cplusplus
2031 extern "C" void exit(int);
2032 #endif
2033 #include <cln.h>
2034 int main() {
2035 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
2036 if (q+p != 3) return 1; else return 0;
2037 }
2038 EOF
2039 if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2040 then
2041   ginac_cv_lib_cln_integrity="sane"
2042 else
2043   echo "configure: failed program was:" >&5
2044   cat conftest.$ac_ext >&5
2045   rm -fr conftest*
2046   ginac_cv_lib_cln_integrity="insane"
2047 fi
2048 rm -fr conftest*
2049 fi
2050
2051             ;;
2052         esac
2053     
2054 fi
2055
2056     case "${ginac_cv_lib_cln_integrity}" in
2057     "sane")
2058         echo "$ac_t""yes" 1>&6
2059     ;;
2060     "insane")
2061         echo "$ac_t""no" 1>&6
2062         echo "configure: warning: maybe version of libcln is older than 1.0.2?" 1>&2
2063     ;;
2064     "guessing sane")
2065         echo "$ac_t""hopefully" 1>&6
2066     ;;
2067     *)
2068         echo "configure: warning: you found a bug in the configure script!" 1>&2
2069     ;;
2070     esac
2071
2072     ;;
2073     "fail")
2074         LIBS="${saved_LIBS}"
2075         echo "$ac_t""" 1>&6
2076         echo "configure: warning: linking with libcln failed" 1>&2
2077     ;;
2078     *)
2079         LIBS="${saved_LIBS}"
2080     ;;
2081     esac
2082
2083
2084 for ac_hdr in unistd.h
2085 do
2086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2088 echo "configure:2089: checking for $ac_hdr" >&5
2089 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2090   echo $ac_n "(cached) $ac_c" 1>&6
2091 else
2092   cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <$ac_hdr>
2096 EOF
2097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2098 { (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2099 ac_err=`grep -v '^ *+' conftest.out`
2100 if test -z "$ac_err"; then
2101   rm -rf conftest*
2102   eval "ac_cv_header_$ac_safe=yes"
2103 else
2104   echo "$ac_err" >&5
2105   echo "configure: failed program was:" >&5
2106   cat conftest.$ac_ext >&5
2107   rm -rf conftest*
2108   eval "ac_cv_header_$ac_safe=no"
2109 fi
2110 rm -f conftest*
2111 fi
2112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2113   echo "$ac_t""yes" 1>&6
2114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2115   cat >> confdefs.h <<EOF
2116 #define $ac_tr_hdr 1
2117 EOF
2118  
2119 else
2120   echo "$ac_t""no" 1>&6
2121 fi
2122 done
2123
2124 for ac_func in strdup
2125 do
2126 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2127 echo "configure:2128: checking for $ac_func" >&5
2128 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2129   echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131   cat > conftest.$ac_ext <<EOF
2132 #line 2133 "configure"
2133 #include "confdefs.h"
2134 /* System header to define __stub macros and hopefully few prototypes,
2135     which can conflict with char $ac_func(); below.  */
2136 #include <assert.h>
2137 /* Override any gcc2 internal prototype to avoid an error.  */
2138 #ifdef __cplusplus
2139 extern "C"
2140 #endif
2141 /* We use char because int might match the return type of a gcc2
2142     builtin and then its argument prototype would still apply.  */
2143 char $ac_func();
2144
2145 int main() {
2146
2147 /* The GNU C library defines this for functions which it implements
2148     to always fail with ENOSYS.  Some functions are actually named
2149     something starting with __ and the normal name is an alias.  */
2150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2151 choke me
2152 #else
2153 $ac_func();
2154 #endif
2155
2156 ; return 0; }
2157 EOF
2158 if { (eval echo configure:2159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2159   rm -rf conftest*
2160   eval "ac_cv_func_$ac_func=yes"
2161 else
2162   echo "configure: failed program was:" >&5
2163   cat conftest.$ac_ext >&5
2164   rm -rf conftest*
2165   eval "ac_cv_func_$ac_func=no"
2166 fi
2167 rm -f conftest*
2168 fi
2169
2170 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2171   echo "$ac_t""yes" 1>&6
2172     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2173   cat >> confdefs.h <<EOF
2174 #define $ac_tr_func 1
2175 EOF
2176  
2177 else
2178   echo "$ac_t""no" 1>&6
2179 LIBOBJS="$LIBOBJS ${ac_func}.o"
2180 fi
2181 done
2182
2183
2184 for ac_hdr in readline/readline.h readline/history.h
2185 do
2186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2188 echo "configure:2189: checking for $ac_hdr" >&5
2189 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2190   echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192   cat > conftest.$ac_ext <<EOF
2193 #line 2194 "configure"
2194 #include "confdefs.h"
2195 #include <$ac_hdr>
2196 EOF
2197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2198 { (eval echo configure:2199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2199 ac_err=`grep -v '^ *+' conftest.out`
2200 if test -z "$ac_err"; then
2201   rm -rf conftest*
2202   eval "ac_cv_header_$ac_safe=yes"
2203 else
2204   echo "$ac_err" >&5
2205   echo "configure: failed program was:" >&5
2206   cat conftest.$ac_ext >&5
2207   rm -rf conftest*
2208   eval "ac_cv_header_$ac_safe=no"
2209 fi
2210 rm -f conftest*
2211 fi
2212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2213   echo "$ac_t""yes" 1>&6
2214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2215   cat >> confdefs.h <<EOF
2216 #define $ac_tr_hdr 1
2217 EOF
2218  
2219 else
2220   echo "$ac_t""no" 1>&6
2221 fi
2222 done
2223
2224 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2225 echo "configure:2226: checking for readline in -lreadline" >&5
2226 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2228   echo $ac_n "(cached) $ac_c" 1>&6
2229 else
2230   ac_save_LIBS="$LIBS"
2231 LIBS="-lreadline  $LIBS"
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 /* Override any gcc2 internal prototype to avoid an error.  */
2236 #ifdef __cplusplus
2237 extern "C"
2238 #endif
2239 /* We use char because int might match the return type of a gcc2
2240     builtin and then its argument prototype would still apply.  */
2241 char readline();
2242
2243 int main() {
2244 readline()
2245 ; return 0; }
2246 EOF
2247 if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2248   rm -rf conftest*
2249   eval "ac_cv_lib_$ac_lib_var=yes"
2250 else
2251   echo "configure: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   rm -rf conftest*
2254   eval "ac_cv_lib_$ac_lib_var=no"
2255 fi
2256 rm -f conftest*
2257 LIBS="$ac_save_LIBS"
2258
2259 fi
2260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2261   echo "$ac_t""yes" 1>&6
2262     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2263     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2264   cat >> confdefs.h <<EOF
2265 #define $ac_tr_lib 1
2266 EOF
2267
2268   LIBS="-lreadline $LIBS"
2269
2270 else
2271   echo "$ac_t""no" 1>&6
2272 fi
2273
2274
2275 # Extract the first word of "doxygen", so it can be a program name with args.
2276 set dummy doxygen; ac_word=$2
2277 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2278 echo "configure:2279: checking for $ac_word" >&5
2279 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
2280   echo $ac_n "(cached) $ac_c" 1>&6
2281 else
2282   case "$DOXYGEN" in
2283   /*)
2284   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
2285   ;;
2286   *)
2287   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2288   for ac_dir in $PATH; do
2289     test -z "$ac_dir" && ac_dir=.
2290     if test -f $ac_dir/$ac_word; then
2291       ac_cv_path_DOXYGEN="$ac_dir/$ac_word"
2292       break
2293     fi
2294   done
2295   IFS="$ac_save_ifs"
2296   test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=""""
2297   ;;
2298 esac
2299 fi
2300 DOXYGEN="$ac_cv_path_DOXYGEN"
2301 if test -n "$DOXYGEN"; then
2302   echo "$ac_t""$DOXYGEN" 1>&6
2303 else
2304   echo "$ac_t""no" 1>&6
2305 fi
2306
2307 # Extract the first word of "latex", so it can be a program name with args.
2308 set dummy latex; ac_word=$2
2309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2310 echo "configure:2311: checking for $ac_word" >&5
2311 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
2312   echo $ac_n "(cached) $ac_c" 1>&6
2313 else
2314   case "$LATEX" in
2315   /*)
2316   ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path.
2317   ;;
2318   *)
2319   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2320   for ac_dir in $PATH; do
2321     test -z "$ac_dir" && ac_dir=.
2322     if test -f $ac_dir/$ac_word; then
2323       ac_cv_path_LATEX="$ac_dir/$ac_word"
2324       break
2325     fi
2326   done
2327   IFS="$ac_save_ifs"
2328   test -z "$ac_cv_path_LATEX" && ac_cv_path_LATEX=""""
2329   ;;
2330 esac
2331 fi
2332 LATEX="$ac_cv_path_LATEX"
2333 if test -n "$LATEX"; then
2334   echo "$ac_t""$LATEX" 1>&6
2335 else
2336   echo "$ac_t""no" 1>&6
2337 fi
2338
2339 # Extract the first word of "makeindex", so it can be a program name with args.
2340 set dummy makeindex; ac_word=$2
2341 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2342 echo "configure:2343: checking for $ac_word" >&5
2343 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then
2344   echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346   case "$MAKEINDEX" in
2347   /*)
2348   ac_cv_path_MAKEINDEX="$MAKEINDEX" # Let the user override the test with a path.
2349   ;;
2350   *)
2351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2352   for ac_dir in $PATH; do
2353     test -z "$ac_dir" && ac_dir=.
2354     if test -f $ac_dir/$ac_word; then
2355       ac_cv_path_MAKEINDEX="$ac_dir/$ac_word"
2356       break
2357     fi
2358   done
2359   IFS="$ac_save_ifs"
2360   test -z "$ac_cv_path_MAKEINDEX" && ac_cv_path_MAKEINDEX=""""
2361   ;;
2362 esac
2363 fi
2364 MAKEINDEX="$ac_cv_path_MAKEINDEX"
2365 if test -n "$MAKEINDEX"; then
2366   echo "$ac_t""$MAKEINDEX" 1>&6
2367 else
2368   echo "$ac_t""no" 1>&6
2369 fi
2370
2371 # Extract the first word of "dvips", so it can be a program name with args.
2372 set dummy dvips; ac_word=$2
2373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2374 echo "configure:2375: checking for $ac_word" >&5
2375 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
2376   echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378   case "$DVIPS" in
2379   /*)
2380   ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
2381   ;;
2382   *)
2383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2384   for ac_dir in $PATH; do
2385     test -z "$ac_dir" && ac_dir=.
2386     if test -f $ac_dir/$ac_word; then
2387       ac_cv_path_DVIPS="$ac_dir/$ac_word"
2388       break
2389     fi
2390   done
2391   IFS="$ac_save_ifs"
2392   test -z "$ac_cv_path_DVIPS" && ac_cv_path_DVIPS=""""
2393   ;;
2394 esac
2395 fi
2396 DVIPS="$ac_cv_path_DVIPS"
2397 if test -n "$DVIPS"; then
2398   echo "$ac_t""$DVIPS" 1>&6
2399 else
2400   echo "$ac_t""no" 1>&6
2401 fi
2402
2403 # Extract the first word of "fig2dev", so it can be a program name with args.
2404 set dummy fig2dev; ac_word=$2
2405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2406 echo "configure:2407: checking for $ac_word" >&5
2407 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then
2408   echo $ac_n "(cached) $ac_c" 1>&6
2409 else
2410   case "$FIG2DEV" in
2411   /*)
2412   ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a path.
2413   ;;
2414   *)
2415   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2416   for ac_dir in $PATH; do
2417     test -z "$ac_dir" && ac_dir=.
2418     if test -f $ac_dir/$ac_word; then
2419       ac_cv_path_FIG2DEV="$ac_dir/$ac_word"
2420       break
2421     fi
2422   done
2423   IFS="$ac_save_ifs"
2424   test -z "$ac_cv_path_FIG2DEV" && ac_cv_path_FIG2DEV=""""
2425   ;;
2426 esac
2427 fi
2428 FIG2DEV="$ac_cv_path_FIG2DEV"
2429 if test -n "$FIG2DEV"; then
2430   echo "$ac_t""$FIG2DEV" 1>&6
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434
2435 # Extract the first word of "jade", so it can be a program name with args.
2436 set dummy jade; ac_word=$2
2437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2438 echo "configure:2439: checking for $ac_word" >&5
2439 if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   case "$JADE" in
2443   /*)
2444   ac_cv_path_JADE="$JADE" # Let the user override the test with a path.
2445   ;;
2446   *)
2447   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2448   for ac_dir in $PATH; do
2449     test -z "$ac_dir" && ac_dir=.
2450     if test -f $ac_dir/$ac_word; then
2451       ac_cv_path_JADE="$ac_dir/$ac_word"
2452       break
2453     fi
2454   done
2455   IFS="$ac_save_ifs"
2456   test -z "$ac_cv_path_JADE" && ac_cv_path_JADE=""""
2457   ;;
2458 esac
2459 fi
2460 JADE="$ac_cv_path_JADE"
2461 if test -n "$JADE"; then
2462   echo "$ac_t""$JADE" 1>&6
2463 else
2464   echo "$ac_t""no" 1>&6
2465 fi
2466
2467 # Extract the first word of "jadetex", so it can be a program name with args.
2468 set dummy jadetex; ac_word=$2
2469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2470 echo "configure:2471: checking for $ac_word" >&5
2471 if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then
2472   echo $ac_n "(cached) $ac_c" 1>&6
2473 else
2474   case "$JADETEX" in
2475   /*)
2476   ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a path.
2477   ;;
2478   *)
2479   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2480   for ac_dir in $PATH; do
2481     test -z "$ac_dir" && ac_dir=.
2482     if test -f $ac_dir/$ac_word; then
2483       ac_cv_path_JADETEX="$ac_dir/$ac_word"
2484       break
2485     fi
2486   done
2487   IFS="$ac_save_ifs"
2488   test -z "$ac_cv_path_JADETEX" && ac_cv_path_JADETEX=""""
2489   ;;
2490 esac
2491 fi
2492 JADETEX="$ac_cv_path_JADETEX"
2493 if test -n "$JADETEX"; then
2494   echo "$ac_t""$JADETEX" 1>&6
2495 else
2496   echo "$ac_t""no" 1>&6
2497 fi
2498
2499
2500 trap '' 1 2 15
2501 cat > confcache <<\EOF
2502 # This file is a shell script that caches the results of configure
2503 # tests run on this system so they can be shared between configure
2504 # scripts and configure runs.  It is not useful on other systems.
2505 # If it contains results you don't want to keep, you may remove or edit it.
2506 #
2507 # By default, configure uses ./config.cache as the cache file,
2508 # creating it if it does not exist already.  You can give configure
2509 # the --cache-file=FILE option to use a different cache file; that is
2510 # what configure does when it calls configure scripts in
2511 # subdirectories, so they share the cache.
2512 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2513 # config.status only pays attention to the cache file if you give it the
2514 # --recheck option to rerun configure.
2515 #
2516 EOF
2517 # The following way of writing the cache mishandles newlines in values,
2518 # but we know of no workaround that is simple, portable, and efficient.
2519 # So, don't put newlines in cache variables' values.
2520 # Ultrix sh set writes to stderr and can't be redirected directly,
2521 # and sets the high bit in the cache file unless we assign to the vars.
2522 (set) 2>&1 |
2523   case `(ac_space=' '; set) 2>&1` in
2524   *ac_space=\ *)
2525     # `set' does not quote correctly, so add quotes (double-quote substitution
2526     # turns \\\\ into \\, and sed turns \\ into \).
2527     sed -n \
2528       -e "s/'/'\\\\''/g" \
2529       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2530     ;;
2531   *)
2532     # `set' quotes correctly as required by POSIX, so do not add quotes.
2533     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2534     ;;
2535   esac >> confcache
2536 if cmp -s $cache_file confcache; then
2537   :
2538 else
2539   if test -w $cache_file; then
2540     echo "updating cache $cache_file"
2541     cat confcache > $cache_file
2542   else
2543     echo "not updating unwritable cache $cache_file"
2544   fi
2545 fi
2546 rm -f confcache
2547
2548 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2549
2550 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2551 # Let make expand exec_prefix.
2552 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2553
2554 # Any assignment to VPATH causes Sun make to only execute
2555 # the first set of double-colon rules, so remove it if not needed.
2556 # If there is a colon in the path, we need to keep it.
2557 if test "x$srcdir" = x.; then
2558   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2559 fi
2560
2561 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2562
2563 DEFS=-DHAVE_CONFIG_H
2564
2565 # Without the "./", some shells look in PATH for config.status.
2566 : ${CONFIG_STATUS=./config.status}
2567
2568 echo creating $CONFIG_STATUS
2569 rm -f $CONFIG_STATUS
2570 cat > $CONFIG_STATUS <<EOF
2571 #! /bin/sh
2572 # Generated automatically by configure.
2573 # Run this file to recreate the current configuration.
2574 # This directory was configured as follows,
2575 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2576 #
2577 # $0 $ac_configure_args
2578 #
2579 # Compiler output produced by configure, useful for debugging
2580 # configure, is in ./config.log if it exists.
2581
2582 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2583 for ac_option
2584 do
2585   case "\$ac_option" in
2586   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2587     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2588     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2589   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2590     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2591     exit 0 ;;
2592   -help | --help | --hel | --he | --h)
2593     echo "\$ac_cs_usage"; exit 0 ;;
2594   *) echo "\$ac_cs_usage"; exit 1 ;;
2595   esac
2596 done
2597
2598 ac_given_srcdir=$srcdir
2599 ac_given_INSTALL="$INSTALL"
2600
2601 trap 'rm -fr `echo "Makefile ginac/Makefile check/Makefile ginsh/Makefile doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2602 EOF
2603 cat >> $CONFIG_STATUS <<EOF
2604
2605 # Protect against being on the right side of a sed subst in config.status.
2606 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2607  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2608 $ac_vpsub
2609 $extrasub
2610 s%@CFLAGS@%$CFLAGS%g
2611 s%@CPPFLAGS@%$CPPFLAGS%g
2612 s%@CXXFLAGS@%$CXXFLAGS%g
2613 s%@DEFS@%$DEFS%g
2614 s%@LDFLAGS@%$LDFLAGS%g
2615 s%@LIBS@%$LIBS%g
2616 s%@exec_prefix@%$exec_prefix%g
2617 s%@prefix@%$prefix%g
2618 s%@program_transform_name@%$program_transform_name%g
2619 s%@bindir@%$bindir%g
2620 s%@sbindir@%$sbindir%g
2621 s%@libexecdir@%$libexecdir%g
2622 s%@datadir@%$datadir%g
2623 s%@sysconfdir@%$sysconfdir%g
2624 s%@sharedstatedir@%$sharedstatedir%g
2625 s%@localstatedir@%$localstatedir%g
2626 s%@libdir@%$libdir%g
2627 s%@includedir@%$includedir%g
2628 s%@oldincludedir@%$oldincludedir%g
2629 s%@infodir@%$infodir%g
2630 s%@mandir@%$mandir%g
2631 s%@GINACLIB_MAJOR_VERSION@%$GINACLIB_MAJOR_VERSION%g
2632 s%@GINACLIB_MINOR_VERSION@%$GINACLIB_MINOR_VERSION%g
2633 s%@GINACLIB_MICRO_VERSION@%$GINACLIB_MICRO_VERSION%g
2634 s%@GINACLIB_INTERFACE_AGE@%$GINACLIB_INTERFACE_AGE%g
2635 s%@GINACLIB_BINARY_AGE@%$GINACLIB_BINARY_AGE%g
2636 s%@GINACLIB_VERSION@%$GINACLIB_VERSION%g
2637 s%@LT_RELEASE@%$LT_RELEASE%g
2638 s%@LT_CURRENT@%$LT_CURRENT%g
2639 s%@LT_REVISION@%$LT_REVISION%g
2640 s%@LT_AGE@%$LT_AGE%g
2641 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2642 s%@INSTALL_DATA@%$INSTALL_DATA%g
2643 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2644 s%@PACKAGE@%$PACKAGE%g
2645 s%@VERSION@%$VERSION%g
2646 s%@ACLOCAL@%$ACLOCAL%g
2647 s%@AUTOCONF@%$AUTOCONF%g
2648 s%@AUTOMAKE@%$AUTOMAKE%g
2649 s%@AUTOHEADER@%$AUTOHEADER%g
2650 s%@MAKEINFO@%$MAKEINFO%g
2651 s%@SET_MAKE@%$SET_MAKE%g
2652 s%@MAINT@%$MAINT%g
2653 s%@CXX@%$CXX%g
2654 s%@CXXCPP@%$CXXCPP%g
2655 s%@host@%$host%g
2656 s%@host_alias@%$host_alias%g
2657 s%@host_cpu@%$host_cpu%g
2658 s%@host_vendor@%$host_vendor%g
2659 s%@host_os@%$host_os%g
2660 s%@RANLIB@%$RANLIB%g
2661 s%@CC@%$CC%g
2662 s%@LD@%$LD%g
2663 s%@NM@%$NM%g
2664 s%@LN_S@%$LN_S%g
2665 s%@LIBTOOL@%$LIBTOOL%g
2666 s%@LEX@%$LEX%g
2667 s%@LEXLIB@%$LEXLIB%g
2668 s%@CPP@%$CPP%g
2669 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2670 s%@YACC@%$YACC%g
2671 s%@LIBOBJS@%$LIBOBJS%g
2672 s%@DOXYGEN@%$DOXYGEN%g
2673 s%@LATEX@%$LATEX%g
2674 s%@MAKEINDEX@%$MAKEINDEX%g
2675 s%@DVIPS@%$DVIPS%g
2676 s%@FIG2DEV@%$FIG2DEV%g
2677 s%@JADE@%$JADE%g
2678 s%@JADETEX@%$JADETEX%g
2679
2680 CEOF
2681 EOF
2682
2683 cat >> $CONFIG_STATUS <<\EOF
2684
2685 # Split the substitutions into bite-sized pieces for seds with
2686 # small command number limits, like on Digital OSF/1 and HP-UX.
2687 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2688 ac_file=1 # Number of current file.
2689 ac_beg=1 # First line for current file.
2690 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2691 ac_more_lines=:
2692 ac_sed_cmds=""
2693 while $ac_more_lines; do
2694   if test $ac_beg -gt 1; then
2695     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2696   else
2697     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2698   fi
2699   if test ! -s conftest.s$ac_file; then
2700     ac_more_lines=false
2701     rm -f conftest.s$ac_file
2702   else
2703     if test -z "$ac_sed_cmds"; then
2704       ac_sed_cmds="sed -f conftest.s$ac_file"
2705     else
2706       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2707     fi
2708     ac_file=`expr $ac_file + 1`
2709     ac_beg=$ac_end
2710     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2711   fi
2712 done
2713 if test -z "$ac_sed_cmds"; then
2714   ac_sed_cmds=cat
2715 fi
2716 EOF
2717
2718 cat >> $CONFIG_STATUS <<EOF
2719
2720 CONFIG_FILES=\${CONFIG_FILES-"Makefile ginac/Makefile check/Makefile ginsh/Makefile doc/Makefile"}
2721 EOF
2722 cat >> $CONFIG_STATUS <<\EOF
2723 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2724   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2725   case "$ac_file" in
2726   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2727        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2728   *) ac_file_in="${ac_file}.in" ;;
2729   esac
2730
2731   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2732
2733   # Remove last slash and all that follows it.  Not all systems have dirname.
2734   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2735   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2736     # The file is in a subdirectory.
2737     test ! -d "$ac_dir" && mkdir "$ac_dir"
2738     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2739     # A "../" for each directory in $ac_dir_suffix.
2740     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2741   else
2742     ac_dir_suffix= ac_dots=
2743   fi
2744
2745   case "$ac_given_srcdir" in
2746   .)  srcdir=.
2747       if test -z "$ac_dots"; then top_srcdir=.
2748       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2749   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2750   *) # Relative path.
2751     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2752     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2753   esac
2754
2755   case "$ac_given_INSTALL" in
2756   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2757   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2758   esac
2759
2760   echo creating "$ac_file"
2761   rm -f "$ac_file"
2762   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2763   case "$ac_file" in
2764   *Makefile*) ac_comsub="1i\\
2765 # $configure_input" ;;
2766   *) ac_comsub= ;;
2767   esac
2768
2769   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2770   sed -e "$ac_comsub
2771 s%@configure_input@%$configure_input%g
2772 s%@srcdir@%$srcdir%g
2773 s%@top_srcdir@%$top_srcdir%g
2774 s%@INSTALL@%$INSTALL%g
2775 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2776 fi; done
2777 rm -f conftest.s*
2778
2779 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2780 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2781 #
2782 # ac_d sets the value in "#define NAME VALUE" lines.
2783 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2784 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2785 ac_dC='\3'
2786 ac_dD='%g'
2787 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2788 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2789 ac_uB='\([      ]\)%\1#\2define\3'
2790 ac_uC=' '
2791 ac_uD='\4%g'
2792 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2793 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2794 ac_eB='$%\1#\2define\3'
2795 ac_eC=' '
2796 ac_eD='%g'
2797
2798 if test "${CONFIG_HEADERS+set}" != set; then
2799 EOF
2800 cat >> $CONFIG_STATUS <<EOF
2801   CONFIG_HEADERS="config.h"
2802 EOF
2803 cat >> $CONFIG_STATUS <<\EOF
2804 fi
2805 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2806   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2807   case "$ac_file" in
2808   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2809        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2810   *) ac_file_in="${ac_file}.in" ;;
2811   esac
2812
2813   echo creating $ac_file
2814
2815   rm -f conftest.frag conftest.in conftest.out
2816   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2817   cat $ac_file_inputs > conftest.in
2818
2819 EOF
2820
2821 # Transform confdefs.h into a sed script conftest.vals that substitutes
2822 # the proper values into config.h.in to produce config.h.  And first:
2823 # Protect against being on the right side of a sed subst in config.status.
2824 # Protect against being in an unquoted here document in config.status.
2825 rm -f conftest.vals
2826 cat > conftest.hdr <<\EOF
2827 s/[\\&%]/\\&/g
2828 s%[\\$`]%\\&%g
2829 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2830 s%ac_d%ac_u%gp
2831 s%ac_u%ac_e%gp
2832 EOF
2833 sed -n -f conftest.hdr confdefs.h > conftest.vals
2834 rm -f conftest.hdr
2835
2836 # This sed command replaces #undef with comments.  This is necessary, for
2837 # example, in the case of _POSIX_SOURCE, which is predefined and required
2838 # on some systems where configure will not decide to define it.
2839 cat >> conftest.vals <<\EOF
2840 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2841 EOF
2842
2843 # Break up conftest.vals because some shells have a limit on
2844 # the size of here documents, and old seds have small limits too.
2845
2846 rm -f conftest.tail
2847 while :
2848 do
2849   ac_lines=`grep -c . conftest.vals`
2850   # grep -c gives empty output for an empty file on some AIX systems.
2851   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2852   # Write a limited-size here document to conftest.frag.
2853   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2854   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2855   echo 'CEOF
2856   sed -f conftest.frag conftest.in > conftest.out
2857   rm -f conftest.in
2858   mv conftest.out conftest.in
2859 ' >> $CONFIG_STATUS
2860   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2861   rm -f conftest.vals
2862   mv conftest.tail conftest.vals
2863 done
2864 rm -f conftest.vals
2865
2866 cat >> $CONFIG_STATUS <<\EOF
2867   rm -f conftest.frag conftest.h
2868   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2869   cat conftest.in >> conftest.h
2870   rm -f conftest.in
2871   if cmp -s $ac_file conftest.h 2>/dev/null; then
2872     echo "$ac_file is unchanged"
2873     rm -f conftest.h
2874   else
2875     # Remove last slash and all that follows it.  Not all systems have dirname.
2876       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2877       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2878       # The file is in a subdirectory.
2879       test ! -d "$ac_dir" && mkdir "$ac_dir"
2880     fi
2881     rm -f $ac_file
2882     mv conftest.h $ac_file
2883   fi
2884 fi; done
2885
2886 EOF
2887 cat >> $CONFIG_STATUS <<EOF
2888
2889
2890 EOF
2891 cat >> $CONFIG_STATUS <<\EOF
2892 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2893
2894 exit 0
2895 EOF
2896 chmod +x $CONFIG_STATUS
2897 rm -fr confdefs* $ac_clean_files
2898 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2899
2900 echo "Configuration done. Now type \"make\"."