]> www.ginac.de Git - ginac.git/blob - configure
- corrected meaning of "GiNaC" acronym
[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 ac_ext=C
1765 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1766 ac_cpp='$CXXCPP $CPPFLAGS'
1767 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1768 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1769 cross_compiling=$ac_cv_prog_cxx_cross
1770
1771
1772 echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6
1773 echo "configure:1774: checking for cout in -lstdc++" >&5
1774 ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'`
1775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1776   echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778   ac_save_LIBS="$LIBS"
1779 LIBS="-lstdc++  $LIBS"
1780 cat > conftest.$ac_ext <<EOF
1781 #line 1782 "configure"
1782 #include "confdefs.h"
1783 /* Override any gcc2 internal prototype to avoid an error.  */
1784 #ifdef __cplusplus
1785 extern "C"
1786 #endif
1787 /* We use char because int might match the return type of a gcc2
1788     builtin and then its argument prototype would still apply.  */
1789 char cout();
1790
1791 int main() {
1792 cout()
1793 ; return 0; }
1794 EOF
1795 if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1796   rm -rf conftest*
1797   eval "ac_cv_lib_$ac_lib_var=yes"
1798 else
1799   echo "configure: failed program was:" >&5
1800   cat conftest.$ac_ext >&5
1801   rm -rf conftest*
1802   eval "ac_cv_lib_$ac_lib_var=no"
1803 fi
1804 rm -f conftest*
1805 LIBS="$ac_save_LIBS"
1806
1807 fi
1808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1809   echo "$ac_t""yes" 1>&6
1810     ac_tr_lib=HAVE_LIB`echo stdc++ | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1811     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1812   cat >> confdefs.h <<EOF
1813 #define $ac_tr_lib 1
1814 EOF
1815
1816   LIBS="-lstdc++ $LIBS"
1817
1818 else
1819   echo "$ac_t""no" 1>&6
1820 fi
1821
1822
1823 for ac_hdr in iostream vector map string list typeinfo iterator strstream stdexcept algorithm
1824 do
1825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1827 echo "configure:1828: checking for $ac_hdr" >&5
1828 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1829   echo $ac_n "(cached) $ac_c" 1>&6
1830 else
1831   cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834 #include <$ac_hdr>
1835 EOF
1836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1837 { (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1838 ac_err=`grep -v '^ *+' conftest.out`
1839 if test -z "$ac_err"; then
1840   rm -rf conftest*
1841   eval "ac_cv_header_$ac_safe=yes"
1842 else
1843   echo "$ac_err" >&5
1844   echo "configure: failed program was:" >&5
1845   cat conftest.$ac_ext >&5
1846   rm -rf conftest*
1847   eval "ac_cv_header_$ac_safe=no"
1848 fi
1849 rm -f conftest*
1850 fi
1851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1852   echo "$ac_t""yes" 1>&6
1853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1854   cat >> confdefs.h <<EOF
1855 #define $ac_tr_hdr 1
1856 EOF
1857  
1858 else
1859   echo "$ac_t""no" 1>&6
1860 { echo "configure: error: need to have ANSI compliant headers" 1>&2; exit 1; }
1861 fi
1862 done
1863
1864
1865
1866     for ac_hdr in CLN/cln.h
1867 do
1868 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1869 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1870 echo "configure:1871: checking for $ac_hdr" >&5
1871 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1872   echo $ac_n "(cached) $ac_c" 1>&6
1873 else
1874   cat > conftest.$ac_ext <<EOF
1875 #line 1876 "configure"
1876 #include "confdefs.h"
1877 #include <$ac_hdr>
1878 EOF
1879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1880 { (eval echo configure:1881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1881 ac_err=`grep -v '^ *+' conftest.out`
1882 if test -z "$ac_err"; then
1883   rm -rf conftest*
1884   eval "ac_cv_header_$ac_safe=yes"
1885 else
1886   echo "$ac_err" >&5
1887   echo "configure: failed program was:" >&5
1888   cat conftest.$ac_ext >&5
1889   rm -rf conftest*
1890   eval "ac_cv_header_$ac_safe=no"
1891 fi
1892 rm -f conftest*
1893 fi
1894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1895   echo "$ac_t""yes" 1>&6
1896     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1897   cat >> confdefs.h <<EOF
1898 #define $ac_tr_hdr 1
1899 EOF
1900  
1901 else
1902   echo "$ac_t""no" 1>&6
1903 for ac_hdr in cln.h
1904 do
1905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_hdr" >&5
1908 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   cat > conftest.$ac_ext <<EOF
1912 #line 1913 "configure"
1913 #include "confdefs.h"
1914 #include <$ac_hdr>
1915 EOF
1916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1917 { (eval echo configure:1918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1918 ac_err=`grep -v '^ *+' conftest.out`
1919 if test -z "$ac_err"; then
1920   rm -rf conftest*
1921   eval "ac_cv_header_$ac_safe=yes"
1922 else
1923   echo "$ac_err" >&5
1924   echo "configure: failed program was:" >&5
1925   cat conftest.$ac_ext >&5
1926   rm -rf conftest*
1927   eval "ac_cv_header_$ac_safe=no"
1928 fi
1929 rm -f conftest*
1930 fi
1931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1932   echo "$ac_t""yes" 1>&6
1933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1934   cat >> confdefs.h <<EOF
1935 #define $ac_tr_hdr 1
1936 EOF
1937  
1938 else
1939   echo "$ac_t""no" 1>&6
1940 { echo "configure: error: cannot find header for Bruno Haible's CLN" 1>&2; exit 1; };
1941         
1942 fi
1943 done
1944
1945     
1946 fi
1947 done
1948
1949
1950
1951     echo $ac_n "checking how to link with libcln""... $ac_c" 1>&6
1952 echo "configure:1953: checking how to link with libcln" >&5
1953     saved_LIBS="${LIBS}"
1954     if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then
1955   echo $ac_n "(cached) $ac_c" 1>&6
1956 else
1957   LIBS="-lcln"
1958         case "${ac_cv_header_CLN_cln_h}" in
1959         "yes")
1960             cat > conftest.$ac_ext <<EOF
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1963 #include <CLN/cln.h>
1964 int main() {
1965 factorial(1);
1966 ; return 0; }
1967 EOF
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1969   rm -rf conftest*
1970   ginac_cv_lib_cln_link="-lcln"
1971 else
1972   echo "configure: failed program was:" >&5
1973   cat conftest.$ac_ext >&5
1974   rm -rf conftest*
1975   ginac_cv_lib_cln_link="fail"
1976 fi
1977 rm -f conftest*
1978             ;;
1979         *)
1980             cat > conftest.$ac_ext <<EOF
1981 #line 1982 "configure"
1982 #include "confdefs.h"
1983 #include <cln.h>
1984 int main() {
1985 factorial(1);
1986 ; return 0; }
1987 EOF
1988 if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1989   rm -rf conftest*
1990   ginac_cv_lib_cln_link="-lcln"
1991 else
1992   echo "configure: failed program was:" >&5
1993   cat conftest.$ac_ext >&5
1994   rm -rf conftest*
1995   ginac_cv_lib_cln_link="fail"
1996 fi
1997 rm -f conftest*
1998             ;;
1999         esac
2000     
2001 fi
2002
2003     case "${ginac_cv_lib_cln_link}" in
2004     "-lcln")
2005         LIBS="-lcln ${saved_LIBS}"
2006         echo "$ac_t""-lcln" 1>&6
2007         
2008     echo $ac_n "checking whether libcln behaves sane""... $ac_c" 1>&6
2009 echo "configure:2010: checking whether libcln behaves sane" >&5
2010     if eval "test \"`echo '$''{'ginac_cv_lib_cln_integrity'+set}'`\" = set"; then
2011   echo $ac_n "(cached) $ac_c" 1>&6
2012 else
2013   
2014         case "${ac_cv_header_CLN_cln_h}" in
2015         "yes")
2016             if test "$cross_compiling" = yes; then
2017   ginac_cv_lib_cln_integrity="guessing sane"
2018 else
2019   cat > conftest.$ac_ext <<EOF
2020 #line 2021 "configure"
2021 #include "confdefs.h"
2022 #ifdef __cplusplus
2023 extern "C" void exit(int);
2024 #endif
2025 #include <CLN/cln.h>
2026 int main() {
2027 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
2028 if (q+p != 3) return 1; else return 0;
2029 }
2030 EOF
2031 if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2032 then
2033   ginac_cv_lib_cln_integrity="sane"
2034 else
2035   echo "configure: failed program was:" >&5
2036   cat conftest.$ac_ext >&5
2037   rm -fr conftest*
2038   ginac_cv_lib_cln_integrity="insane"
2039 fi
2040 rm -fr conftest*
2041 fi
2042
2043             ;;
2044         *)
2045             if test "$cross_compiling" = yes; then
2046   ginac_cv_lib_cln_integrity="guessing sane"
2047 else
2048   cat > conftest.$ac_ext <<EOF
2049 #line 2050 "configure"
2050 #include "confdefs.h"
2051 #ifdef __cplusplus
2052 extern "C" void exit(int);
2053 #endif
2054 #include <cln.h>
2055 int main() {
2056 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
2057 if (q+p != 3) return 1; else return 0;
2058 }
2059 EOF
2060 if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2061 then
2062   ginac_cv_lib_cln_integrity="sane"
2063 else
2064   echo "configure: failed program was:" >&5
2065   cat conftest.$ac_ext >&5
2066   rm -fr conftest*
2067   ginac_cv_lib_cln_integrity="insane"
2068 fi
2069 rm -fr conftest*
2070 fi
2071
2072             ;;
2073         esac
2074     
2075 fi
2076
2077     case "${ginac_cv_lib_cln_integrity}" in
2078     "sane")
2079         echo "$ac_t""yes" 1>&6
2080     ;;
2081     "insane")
2082         echo "$ac_t""no" 1>&6
2083         echo "configure: warning: maybe version of libcln is older than 1.0.2?" 1>&2
2084     ;;
2085     "guessing sane")
2086         echo "$ac_t""hopefully" 1>&6
2087     ;;
2088     *)
2089         echo "configure: warning: you found a bug in the configure script!" 1>&2
2090     ;;
2091     esac
2092
2093     ;;
2094     "fail")
2095         LIBS="${saved_LIBS}"
2096         echo "$ac_t""" 1>&6
2097         echo "configure: warning: linking with libcln failed" 1>&2
2098     ;;
2099     *)
2100         LIBS="${saved_LIBS}"
2101     ;;
2102     esac
2103
2104
2105 for ac_hdr in unistd.h
2106 do
2107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2109 echo "configure:2110: checking for $ac_hdr" >&5
2110 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2111   echo $ac_n "(cached) $ac_c" 1>&6
2112 else
2113   cat > conftest.$ac_ext <<EOF
2114 #line 2115 "configure"
2115 #include "confdefs.h"
2116 #include <$ac_hdr>
2117 EOF
2118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2119 { (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2120 ac_err=`grep -v '^ *+' conftest.out`
2121 if test -z "$ac_err"; then
2122   rm -rf conftest*
2123   eval "ac_cv_header_$ac_safe=yes"
2124 else
2125   echo "$ac_err" >&5
2126   echo "configure: failed program was:" >&5
2127   cat conftest.$ac_ext >&5
2128   rm -rf conftest*
2129   eval "ac_cv_header_$ac_safe=no"
2130 fi
2131 rm -f conftest*
2132 fi
2133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2134   echo "$ac_t""yes" 1>&6
2135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2136   cat >> confdefs.h <<EOF
2137 #define $ac_tr_hdr 1
2138 EOF
2139  
2140 else
2141   echo "$ac_t""no" 1>&6
2142 fi
2143 done
2144
2145 for ac_hdr in readline/readline.h readline/history.h
2146 do
2147 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2148 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2149 echo "configure:2150: checking for $ac_hdr" >&5
2150 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2151   echo $ac_n "(cached) $ac_c" 1>&6
2152 else
2153   cat > conftest.$ac_ext <<EOF
2154 #line 2155 "configure"
2155 #include "confdefs.h"
2156 #include <$ac_hdr>
2157 EOF
2158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2159 { (eval echo configure:2160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2160 ac_err=`grep -v '^ *+' conftest.out`
2161 if test -z "$ac_err"; then
2162   rm -rf conftest*
2163   eval "ac_cv_header_$ac_safe=yes"
2164 else
2165   echo "$ac_err" >&5
2166   echo "configure: failed program was:" >&5
2167   cat conftest.$ac_ext >&5
2168   rm -rf conftest*
2169   eval "ac_cv_header_$ac_safe=no"
2170 fi
2171 rm -f conftest*
2172 fi
2173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2174   echo "$ac_t""yes" 1>&6
2175     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2176   cat >> confdefs.h <<EOF
2177 #define $ac_tr_hdr 1
2178 EOF
2179  
2180 else
2181   echo "$ac_t""no" 1>&6
2182 fi
2183 done
2184
2185 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2186 echo "configure:2187: checking for readline in -lreadline" >&5
2187 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2188 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2189   echo $ac_n "(cached) $ac_c" 1>&6
2190 else
2191   ac_save_LIBS="$LIBS"
2192 LIBS="-lreadline  $LIBS"
2193 cat > conftest.$ac_ext <<EOF
2194 #line 2195 "configure"
2195 #include "confdefs.h"
2196 /* Override any gcc2 internal prototype to avoid an error.  */
2197 #ifdef __cplusplus
2198 extern "C"
2199 #endif
2200 /* We use char because int might match the return type of a gcc2
2201     builtin and then its argument prototype would still apply.  */
2202 char readline();
2203
2204 int main() {
2205 readline()
2206 ; return 0; }
2207 EOF
2208 if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2209   rm -rf conftest*
2210   eval "ac_cv_lib_$ac_lib_var=yes"
2211 else
2212   echo "configure: failed program was:" >&5
2213   cat conftest.$ac_ext >&5
2214   rm -rf conftest*
2215   eval "ac_cv_lib_$ac_lib_var=no"
2216 fi
2217 rm -f conftest*
2218 LIBS="$ac_save_LIBS"
2219
2220 fi
2221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2222   echo "$ac_t""yes" 1>&6
2223     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2224     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2225   cat >> confdefs.h <<EOF
2226 #define $ac_tr_lib 1
2227 EOF
2228
2229   LIBS="-lreadline $LIBS"
2230
2231 else
2232   echo "$ac_t""no" 1>&6
2233 fi
2234
2235
2236 # Extract the first word of "doxygen", so it can be a program name with args.
2237 set dummy doxygen; ac_word=$2
2238 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2239 echo "configure:2240: checking for $ac_word" >&5
2240 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
2241   echo $ac_n "(cached) $ac_c" 1>&6
2242 else
2243   case "$DOXYGEN" in
2244   /*)
2245   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
2246   ;;
2247   *)
2248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2249   for ac_dir in $PATH; do
2250     test -z "$ac_dir" && ac_dir=.
2251     if test -f $ac_dir/$ac_word; then
2252       ac_cv_path_DOXYGEN="$ac_dir/$ac_word"
2253       break
2254     fi
2255   done
2256   IFS="$ac_save_ifs"
2257   test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=""""
2258   ;;
2259 esac
2260 fi
2261 DOXYGEN="$ac_cv_path_DOXYGEN"
2262 if test -n "$DOXYGEN"; then
2263   echo "$ac_t""$DOXYGEN" 1>&6
2264 else
2265   echo "$ac_t""no" 1>&6
2266 fi
2267
2268 # Extract the first word of "jade", so it can be a program name with args.
2269 set dummy jade; ac_word=$2
2270 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2271 echo "configure:2272: checking for $ac_word" >&5
2272 if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then
2273   echo $ac_n "(cached) $ac_c" 1>&6
2274 else
2275   case "$JADE" in
2276   /*)
2277   ac_cv_path_JADE="$JADE" # Let the user override the test with a path.
2278   ;;
2279   *)
2280   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2281   for ac_dir in $PATH; do
2282     test -z "$ac_dir" && ac_dir=.
2283     if test -f $ac_dir/$ac_word; then
2284       ac_cv_path_JADE="$ac_dir/$ac_word"
2285       break
2286     fi
2287   done
2288   IFS="$ac_save_ifs"
2289   test -z "$ac_cv_path_JADE" && ac_cv_path_JADE=""""
2290   ;;
2291 esac
2292 fi
2293 JADE="$ac_cv_path_JADE"
2294 if test -n "$JADE"; then
2295   echo "$ac_t""$JADE" 1>&6
2296 else
2297   echo "$ac_t""no" 1>&6
2298 fi
2299
2300 # Extract the first word of "jadetex", so it can be a program name with args.
2301 set dummy jadetex; ac_word=$2
2302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2303 echo "configure:2304: checking for $ac_word" >&5
2304 if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then
2305   echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307   case "$JADETEX" in
2308   /*)
2309   ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a path.
2310   ;;
2311   *)
2312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2313   for ac_dir in $PATH; do
2314     test -z "$ac_dir" && ac_dir=.
2315     if test -f $ac_dir/$ac_word; then
2316       ac_cv_path_JADETEX="$ac_dir/$ac_word"
2317       break
2318     fi
2319   done
2320   IFS="$ac_save_ifs"
2321   test -z "$ac_cv_path_JADETEX" && ac_cv_path_JADETEX=""""
2322   ;;
2323 esac
2324 fi
2325 JADETEX="$ac_cv_path_JADETEX"
2326 if test -n "$JADETEX"; then
2327   echo "$ac_t""$JADETEX" 1>&6
2328 else
2329   echo "$ac_t""no" 1>&6
2330 fi
2331
2332 # Extract the first word of "latex", so it can be a program name with args.
2333 set dummy latex; ac_word=$2
2334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2335 echo "configure:2336: checking for $ac_word" >&5
2336 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
2337   echo $ac_n "(cached) $ac_c" 1>&6
2338 else
2339   case "$LATEX" in
2340   /*)
2341   ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path.
2342   ;;
2343   *)
2344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2345   for ac_dir in $PATH; do
2346     test -z "$ac_dir" && ac_dir=.
2347     if test -f $ac_dir/$ac_word; then
2348       ac_cv_path_LATEX="$ac_dir/$ac_word"
2349       break
2350     fi
2351   done
2352   IFS="$ac_save_ifs"
2353   test -z "$ac_cv_path_LATEX" && ac_cv_path_LATEX=""""
2354   ;;
2355 esac
2356 fi
2357 LATEX="$ac_cv_path_LATEX"
2358 if test -n "$LATEX"; then
2359   echo "$ac_t""$LATEX" 1>&6
2360 else
2361   echo "$ac_t""no" 1>&6
2362 fi
2363
2364 # Extract the first word of "makeindex", so it can be a program name with args.
2365 set dummy makeindex; ac_word=$2
2366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2367 echo "configure:2368: checking for $ac_word" >&5
2368 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then
2369   echo $ac_n "(cached) $ac_c" 1>&6
2370 else
2371   case "$MAKEINDEX" in
2372   /*)
2373   ac_cv_path_MAKEINDEX="$MAKEINDEX" # Let the user override the test with a path.
2374   ;;
2375   *)
2376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2377   for ac_dir in $PATH; do
2378     test -z "$ac_dir" && ac_dir=.
2379     if test -f $ac_dir/$ac_word; then
2380       ac_cv_path_MAKEINDEX="$ac_dir/$ac_word"
2381       break
2382     fi
2383   done
2384   IFS="$ac_save_ifs"
2385   test -z "$ac_cv_path_MAKEINDEX" && ac_cv_path_MAKEINDEX=""""
2386   ;;
2387 esac
2388 fi
2389 MAKEINDEX="$ac_cv_path_MAKEINDEX"
2390 if test -n "$MAKEINDEX"; then
2391   echo "$ac_t""$MAKEINDEX" 1>&6
2392 else
2393   echo "$ac_t""no" 1>&6
2394 fi
2395
2396 # Extract the first word of "dvips", so it can be a program name with args.
2397 set dummy dvips; ac_word=$2
2398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2399 echo "configure:2400: checking for $ac_word" >&5
2400 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   case "$DVIPS" in
2404   /*)
2405   ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
2406   ;;
2407   *)
2408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2409   for ac_dir in $PATH; do
2410     test -z "$ac_dir" && ac_dir=.
2411     if test -f $ac_dir/$ac_word; then
2412       ac_cv_path_DVIPS="$ac_dir/$ac_word"
2413       break
2414     fi
2415   done
2416   IFS="$ac_save_ifs"
2417   test -z "$ac_cv_path_DVIPS" && ac_cv_path_DVIPS=""""
2418   ;;
2419 esac
2420 fi
2421 DVIPS="$ac_cv_path_DVIPS"
2422 if test -n "$DVIPS"; then
2423   echo "$ac_t""$DVIPS" 1>&6
2424 else
2425   echo "$ac_t""no" 1>&6
2426 fi
2427
2428 # Extract the first word of "fig2dev", so it can be a program name with args.
2429 set dummy fig2dev; ac_word=$2
2430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2431 echo "configure:2432: checking for $ac_word" >&5
2432 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   case "$FIG2DEV" in
2436   /*)
2437   ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a path.
2438   ;;
2439   *)
2440   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2441   for ac_dir in $PATH; do
2442     test -z "$ac_dir" && ac_dir=.
2443     if test -f $ac_dir/$ac_word; then
2444       ac_cv_path_FIG2DEV="$ac_dir/$ac_word"
2445       break
2446     fi
2447   done
2448   IFS="$ac_save_ifs"
2449   test -z "$ac_cv_path_FIG2DEV" && ac_cv_path_FIG2DEV=""""
2450   ;;
2451 esac
2452 fi
2453 FIG2DEV="$ac_cv_path_FIG2DEV"
2454 if test -n "$FIG2DEV"; then
2455   echo "$ac_t""$FIG2DEV" 1>&6
2456 else
2457   echo "$ac_t""no" 1>&6
2458 fi
2459
2460
2461 TUTORIAL_TARGETS=
2462 REFERENCE_TARGETS=
2463 if [ "x$enable_html_doc" = "xyes" ]; then
2464   TUTORIAL_TARGETS="$TUTORIAL_TARGETS index.html"
2465   REFERENCE_TARGETS="$REFERENCE_TARGETS index.html"
2466 fi
2467 if [ "x$enable_ps_doc" = "xyes" ]; then
2468 # currently doesn't work
2469 #  TUTORIAL_TARGETS="$TUTORIAL_TARGETS tutorial.ps"
2470   REFERENCE_TARGETS="$REFERENCE_TARGETS reference.ps"
2471 fi
2472
2473
2474
2475 trap '' 1 2 15
2476 cat > confcache <<\EOF
2477 # This file is a shell script that caches the results of configure
2478 # tests run on this system so they can be shared between configure
2479 # scripts and configure runs.  It is not useful on other systems.
2480 # If it contains results you don't want to keep, you may remove or edit it.
2481 #
2482 # By default, configure uses ./config.cache as the cache file,
2483 # creating it if it does not exist already.  You can give configure
2484 # the --cache-file=FILE option to use a different cache file; that is
2485 # what configure does when it calls configure scripts in
2486 # subdirectories, so they share the cache.
2487 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2488 # config.status only pays attention to the cache file if you give it the
2489 # --recheck option to rerun configure.
2490 #
2491 EOF
2492 # The following way of writing the cache mishandles newlines in values,
2493 # but we know of no workaround that is simple, portable, and efficient.
2494 # So, don't put newlines in cache variables' values.
2495 # Ultrix sh set writes to stderr and can't be redirected directly,
2496 # and sets the high bit in the cache file unless we assign to the vars.
2497 (set) 2>&1 |
2498   case `(ac_space=' '; set) 2>&1` in
2499   *ac_space=\ *)
2500     # `set' does not quote correctly, so add quotes (double-quote substitution
2501     # turns \\\\ into \\, and sed turns \\ into \).
2502     sed -n \
2503       -e "s/'/'\\\\''/g" \
2504       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2505     ;;
2506   *)
2507     # `set' quotes correctly as required by POSIX, so do not add quotes.
2508     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2509     ;;
2510   esac >> confcache
2511 if cmp -s $cache_file confcache; then
2512   :
2513 else
2514   if test -w $cache_file; then
2515     echo "updating cache $cache_file"
2516     cat confcache > $cache_file
2517   else
2518     echo "not updating unwritable cache $cache_file"
2519   fi
2520 fi
2521 rm -f confcache
2522
2523 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2524
2525 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2526 # Let make expand exec_prefix.
2527 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2528
2529 # Any assignment to VPATH causes Sun make to only execute
2530 # the first set of double-colon rules, so remove it if not needed.
2531 # If there is a colon in the path, we need to keep it.
2532 if test "x$srcdir" = x.; then
2533   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2534 fi
2535
2536 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2537
2538 DEFS=-DHAVE_CONFIG_H
2539
2540 # Without the "./", some shells look in PATH for config.status.
2541 : ${CONFIG_STATUS=./config.status}
2542
2543 echo creating $CONFIG_STATUS
2544 rm -f $CONFIG_STATUS
2545 cat > $CONFIG_STATUS <<EOF
2546 #! /bin/sh
2547 # Generated automatically by configure.
2548 # Run this file to recreate the current configuration.
2549 # This directory was configured as follows,
2550 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2551 #
2552 # $0 $ac_configure_args
2553 #
2554 # Compiler output produced by configure, useful for debugging
2555 # configure, is in ./config.log if it exists.
2556
2557 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2558 for ac_option
2559 do
2560   case "\$ac_option" in
2561   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2562     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2563     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2564   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2565     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2566     exit 0 ;;
2567   -help | --help | --hel | --he | --h)
2568     echo "\$ac_cs_usage"; exit 0 ;;
2569   *) echo "\$ac_cs_usage"; exit 1 ;;
2570   esac
2571 done
2572
2573 ac_given_srcdir=$srcdir
2574 ac_given_INSTALL="$INSTALL"
2575
2576 trap 'rm -fr `echo "
2577 Makefile
2578 GiNaC.spec
2579 ginac/Makefile
2580 check/Makefile
2581 ginsh/Makefile
2582 doc/Makefile
2583 doc/tutorial/Makefile
2584 doc/reference/Makefile
2585  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2586 EOF
2587 cat >> $CONFIG_STATUS <<EOF
2588
2589 # Protect against being on the right side of a sed subst in config.status.
2590 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2591  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2592 $ac_vpsub
2593 $extrasub
2594 s%@CFLAGS@%$CFLAGS%g
2595 s%@CPPFLAGS@%$CPPFLAGS%g
2596 s%@CXXFLAGS@%$CXXFLAGS%g
2597 s%@DEFS@%$DEFS%g
2598 s%@LDFLAGS@%$LDFLAGS%g
2599 s%@LIBS@%$LIBS%g
2600 s%@exec_prefix@%$exec_prefix%g
2601 s%@prefix@%$prefix%g
2602 s%@program_transform_name@%$program_transform_name%g
2603 s%@bindir@%$bindir%g
2604 s%@sbindir@%$sbindir%g
2605 s%@libexecdir@%$libexecdir%g
2606 s%@datadir@%$datadir%g
2607 s%@sysconfdir@%$sysconfdir%g
2608 s%@sharedstatedir@%$sharedstatedir%g
2609 s%@localstatedir@%$localstatedir%g
2610 s%@libdir@%$libdir%g
2611 s%@includedir@%$includedir%g
2612 s%@oldincludedir@%$oldincludedir%g
2613 s%@infodir@%$infodir%g
2614 s%@mandir@%$mandir%g
2615 s%@GINACLIB_MAJOR_VERSION@%$GINACLIB_MAJOR_VERSION%g
2616 s%@GINACLIB_MINOR_VERSION@%$GINACLIB_MINOR_VERSION%g
2617 s%@GINACLIB_MICRO_VERSION@%$GINACLIB_MICRO_VERSION%g
2618 s%@GINACLIB_INTERFACE_AGE@%$GINACLIB_INTERFACE_AGE%g
2619 s%@GINACLIB_BINARY_AGE@%$GINACLIB_BINARY_AGE%g
2620 s%@GINACLIB_VERSION@%$GINACLIB_VERSION%g
2621 s%@LT_RELEASE@%$LT_RELEASE%g
2622 s%@LT_CURRENT@%$LT_CURRENT%g
2623 s%@LT_REVISION@%$LT_REVISION%g
2624 s%@LT_AGE@%$LT_AGE%g
2625 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2626 s%@INSTALL_DATA@%$INSTALL_DATA%g
2627 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2628 s%@PACKAGE@%$PACKAGE%g
2629 s%@VERSION@%$VERSION%g
2630 s%@ACLOCAL@%$ACLOCAL%g
2631 s%@AUTOCONF@%$AUTOCONF%g
2632 s%@AUTOMAKE@%$AUTOMAKE%g
2633 s%@AUTOHEADER@%$AUTOHEADER%g
2634 s%@MAKEINFO@%$MAKEINFO%g
2635 s%@SET_MAKE@%$SET_MAKE%g
2636 s%@MAINT@%$MAINT%g
2637 s%@CXX@%$CXX%g
2638 s%@CXXCPP@%$CXXCPP%g
2639 s%@host@%$host%g
2640 s%@host_alias@%$host_alias%g
2641 s%@host_cpu@%$host_cpu%g
2642 s%@host_vendor@%$host_vendor%g
2643 s%@host_os@%$host_os%g
2644 s%@RANLIB@%$RANLIB%g
2645 s%@CC@%$CC%g
2646 s%@LD@%$LD%g
2647 s%@NM@%$NM%g
2648 s%@LN_S@%$LN_S%g
2649 s%@LIBTOOL@%$LIBTOOL%g
2650 s%@LEX@%$LEX%g
2651 s%@LEXLIB@%$LEXLIB%g
2652 s%@CPP@%$CPP%g
2653 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2654 s%@YACC@%$YACC%g
2655 s%@DOXYGEN@%$DOXYGEN%g
2656 s%@JADE@%$JADE%g
2657 s%@JADETEX@%$JADETEX%g
2658 s%@LATEX@%$LATEX%g
2659 s%@MAKEINDEX@%$MAKEINDEX%g
2660 s%@DVIPS@%$DVIPS%g
2661 s%@FIG2DEV@%$FIG2DEV%g
2662 s%@TUTORIAL_TARGETS@%$TUTORIAL_TARGETS%g
2663 s%@REFERENCE_TARGETS@%$REFERENCE_TARGETS%g
2664
2665 CEOF
2666 EOF
2667
2668 cat >> $CONFIG_STATUS <<\EOF
2669
2670 # Split the substitutions into bite-sized pieces for seds with
2671 # small command number limits, like on Digital OSF/1 and HP-UX.
2672 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2673 ac_file=1 # Number of current file.
2674 ac_beg=1 # First line for current file.
2675 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2676 ac_more_lines=:
2677 ac_sed_cmds=""
2678 while $ac_more_lines; do
2679   if test $ac_beg -gt 1; then
2680     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2681   else
2682     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2683   fi
2684   if test ! -s conftest.s$ac_file; then
2685     ac_more_lines=false
2686     rm -f conftest.s$ac_file
2687   else
2688     if test -z "$ac_sed_cmds"; then
2689       ac_sed_cmds="sed -f conftest.s$ac_file"
2690     else
2691       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2692     fi
2693     ac_file=`expr $ac_file + 1`
2694     ac_beg=$ac_end
2695     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2696   fi
2697 done
2698 if test -z "$ac_sed_cmds"; then
2699   ac_sed_cmds=cat
2700 fi
2701 EOF
2702
2703 cat >> $CONFIG_STATUS <<EOF
2704
2705 CONFIG_FILES=\${CONFIG_FILES-"Makefile
2706 GiNaC.spec
2707 ginac/Makefile
2708 check/Makefile
2709 ginsh/Makefile
2710 doc/Makefile
2711 doc/tutorial/Makefile
2712 doc/reference/Makefile
2713 "}
2714 EOF
2715 cat >> $CONFIG_STATUS <<\EOF
2716 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2717   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2718   case "$ac_file" in
2719   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2720        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2721   *) ac_file_in="${ac_file}.in" ;;
2722   esac
2723
2724   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2725
2726   # Remove last slash and all that follows it.  Not all systems have dirname.
2727   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2728   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2729     # The file is in a subdirectory.
2730     test ! -d "$ac_dir" && mkdir "$ac_dir"
2731     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2732     # A "../" for each directory in $ac_dir_suffix.
2733     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2734   else
2735     ac_dir_suffix= ac_dots=
2736   fi
2737
2738   case "$ac_given_srcdir" in
2739   .)  srcdir=.
2740       if test -z "$ac_dots"; then top_srcdir=.
2741       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2742   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2743   *) # Relative path.
2744     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2745     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2746   esac
2747
2748   case "$ac_given_INSTALL" in
2749   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2750   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2751   esac
2752
2753   echo creating "$ac_file"
2754   rm -f "$ac_file"
2755   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2756   case "$ac_file" in
2757   *Makefile*) ac_comsub="1i\\
2758 # $configure_input" ;;
2759   *) ac_comsub= ;;
2760   esac
2761
2762   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2763   sed -e "$ac_comsub
2764 s%@configure_input@%$configure_input%g
2765 s%@srcdir@%$srcdir%g
2766 s%@top_srcdir@%$top_srcdir%g
2767 s%@INSTALL@%$INSTALL%g
2768 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2769 fi; done
2770 rm -f conftest.s*
2771
2772 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2773 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2774 #
2775 # ac_d sets the value in "#define NAME VALUE" lines.
2776 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2777 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2778 ac_dC='\3'
2779 ac_dD='%g'
2780 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2781 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2782 ac_uB='\([      ]\)%\1#\2define\3'
2783 ac_uC=' '
2784 ac_uD='\4%g'
2785 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2786 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2787 ac_eB='$%\1#\2define\3'
2788 ac_eC=' '
2789 ac_eD='%g'
2790
2791 if test "${CONFIG_HEADERS+set}" != set; then
2792 EOF
2793 cat >> $CONFIG_STATUS <<EOF
2794   CONFIG_HEADERS="config.h"
2795 EOF
2796 cat >> $CONFIG_STATUS <<\EOF
2797 fi
2798 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2799   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2800   case "$ac_file" in
2801   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2802        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2803   *) ac_file_in="${ac_file}.in" ;;
2804   esac
2805
2806   echo creating $ac_file
2807
2808   rm -f conftest.frag conftest.in conftest.out
2809   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2810   cat $ac_file_inputs > conftest.in
2811
2812 EOF
2813
2814 # Transform confdefs.h into a sed script conftest.vals that substitutes
2815 # the proper values into config.h.in to produce config.h.  And first:
2816 # Protect against being on the right side of a sed subst in config.status.
2817 # Protect against being in an unquoted here document in config.status.
2818 rm -f conftest.vals
2819 cat > conftest.hdr <<\EOF
2820 s/[\\&%]/\\&/g
2821 s%[\\$`]%\\&%g
2822 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2823 s%ac_d%ac_u%gp
2824 s%ac_u%ac_e%gp
2825 EOF
2826 sed -n -f conftest.hdr confdefs.h > conftest.vals
2827 rm -f conftest.hdr
2828
2829 # This sed command replaces #undef with comments.  This is necessary, for
2830 # example, in the case of _POSIX_SOURCE, which is predefined and required
2831 # on some systems where configure will not decide to define it.
2832 cat >> conftest.vals <<\EOF
2833 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2834 EOF
2835
2836 # Break up conftest.vals because some shells have a limit on
2837 # the size of here documents, and old seds have small limits too.
2838
2839 rm -f conftest.tail
2840 while :
2841 do
2842   ac_lines=`grep -c . conftest.vals`
2843   # grep -c gives empty output for an empty file on some AIX systems.
2844   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2845   # Write a limited-size here document to conftest.frag.
2846   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2847   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2848   echo 'CEOF
2849   sed -f conftest.frag conftest.in > conftest.out
2850   rm -f conftest.in
2851   mv conftest.out conftest.in
2852 ' >> $CONFIG_STATUS
2853   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2854   rm -f conftest.vals
2855   mv conftest.tail conftest.vals
2856 done
2857 rm -f conftest.vals
2858
2859 cat >> $CONFIG_STATUS <<\EOF
2860   rm -f conftest.frag conftest.h
2861   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2862   cat conftest.in >> conftest.h
2863   rm -f conftest.in
2864   if cmp -s $ac_file conftest.h 2>/dev/null; then
2865     echo "$ac_file is unchanged"
2866     rm -f conftest.h
2867   else
2868     # Remove last slash and all that follows it.  Not all systems have dirname.
2869       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2870       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2871       # The file is in a subdirectory.
2872       test ! -d "$ac_dir" && mkdir "$ac_dir"
2873     fi
2874     rm -f $ac_file
2875     mv conftest.h $ac_file
2876   fi
2877 fi; done
2878
2879 EOF
2880 cat >> $CONFIG_STATUS <<EOF
2881
2882
2883 EOF
2884 cat >> $CONFIG_STATUS <<\EOF
2885 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2886
2887 exit 0
2888 EOF
2889 chmod +x $CONFIG_STATUS
2890 rm -fr confdefs* $ac_clean_files
2891 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2892
2893 echo "Configuration done. Now type \"make\"."