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