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