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