]> www.ginac.de Git - ginac.git/blob - configure
2424819a9e36fef56b36e9d97e69efe28ccaf7e1
[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-shared         build shared libraries [default=no]
16                           (a static library will still be built as well)"
17
18 # Initialize some variables set by options.
19 # The variables have the same names as the options, with
20 # dashes changed to underlines.
21 build=NONE
22 cache_file=./config.cache
23 exec_prefix=NONE
24 host=NONE
25 no_create=
26 nonopt=NONE
27 no_recursion=
28 prefix=NONE
29 program_prefix=NONE
30 program_suffix=NONE
31 program_transform_name=s,x,x,
32 silent=
33 site=
34 srcdir=
35 target=NONE
36 verbose=
37 x_includes=NONE
38 x_libraries=NONE
39 bindir='${exec_prefix}/bin'
40 sbindir='${exec_prefix}/sbin'
41 libexecdir='${exec_prefix}/libexec'
42 datadir='${prefix}/share'
43 sysconfdir='${prefix}/etc'
44 sharedstatedir='${prefix}/com'
45 localstatedir='${prefix}/var'
46 libdir='${exec_prefix}/lib'
47 includedir='${prefix}/include'
48 oldincludedir='/usr/include'
49 infodir='${prefix}/info'
50 mandir='${prefix}/man'
51
52 # Initialize some other variables.
53 subdirs=
54 MFLAGS= MAKEFLAGS=
55 SHELL=${CONFIG_SHELL-/bin/sh}
56 # Maximum number of lines to put in a shell here document.
57 ac_max_here_lines=12
58
59 ac_prev=
60 for ac_option
61 do
62
63   # If the previous option needs an argument, assign it.
64   if test -n "$ac_prev"; then
65     eval "$ac_prev=\$ac_option"
66     ac_prev=
67     continue
68   fi
69
70   case "$ac_option" in
71   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72   *) ac_optarg= ;;
73   esac
74
75   # Accept the important Cygnus configure options, so we can diagnose typos.
76
77   case "$ac_option" in
78
79   -bindir | --bindir | --bindi | --bind | --bin | --bi)
80     ac_prev=bindir ;;
81   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82     bindir="$ac_optarg" ;;
83
84   -build | --build | --buil | --bui | --bu)
85     ac_prev=build ;;
86   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87     build="$ac_optarg" ;;
88
89   -cache-file | --cache-file | --cache-fil | --cache-fi \
90   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91     ac_prev=cache_file ;;
92   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94     cache_file="$ac_optarg" ;;
95
96   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97     ac_prev=datadir ;;
98   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99   | --da=*)
100     datadir="$ac_optarg" ;;
101
102   -disable-* | --disable-*)
103     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104     # Reject names that are not valid shell variable names.
105     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
106       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
107     fi
108     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109     eval "enable_${ac_feature}=no" ;;
110
111   -enable-* | --enable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     case "$ac_option" in
119       *=*) ;;
120       *) ac_optarg=yes ;;
121     esac
122     eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126   | --exec | --exe | --ex)
127     ac_prev=exec_prefix ;;
128   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130   | --exec=* | --exe=* | --ex=*)
131     exec_prefix="$ac_optarg" ;;
132
133   -gas | --gas | --ga | --g)
134     # Obsolete; use --with-gas.
135     with_gas=yes ;;
136
137   -help | --help | --hel | --he)
138     # Omit some internal or obsolete options to make the list less imposing.
139     # This message is too long to be a string in the A/UX 3.1 sh.
140     cat << EOF
141 Usage: configure [options] [host]
142 Options: [defaults in brackets after descriptions]
143 Configuration:
144   --cache-file=FILE       cache test results in FILE
145   --help                  print this message
146   --no-create             do not create output files
147   --quiet, --silent       do not print \`checking...' messages
148   --version               print the version of autoconf that created configure
149 Directory and file names:
150   --prefix=PREFIX         install architecture-independent files in PREFIX
151                           [$ac_default_prefix]
152   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
153                           [same as prefix]
154   --bindir=DIR            user executables in DIR [EPREFIX/bin]
155   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
156   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
157   --datadir=DIR           read-only architecture-independent data in DIR
158                           [PREFIX/share]
159   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
160   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
161                           [PREFIX/com]
162   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
163   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
164   --includedir=DIR        C header files in DIR [PREFIX/include]
165   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
166   --infodir=DIR           info documentation in DIR [PREFIX/info]
167   --mandir=DIR            man documentation in DIR [PREFIX/man]
168   --srcdir=DIR            find the sources in DIR [configure dir or ..]
169   --program-prefix=PREFIX prepend PREFIX to installed program names
170   --program-suffix=SUFFIX append SUFFIX to installed program names
171   --program-transform-name=PROGRAM
172                           run sed PROGRAM on installed program names
173 EOF
174     cat << EOF
175 Host type:
176   --build=BUILD           configure for building on BUILD [BUILD=HOST]
177   --host=HOST             configure for HOST [guessed]
178   --target=TARGET         configure for TARGET [TARGET=HOST]
179 Features and packages:
180   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
181   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
182   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
183   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
184   --x-includes=DIR        X include files are in DIR
185   --x-libraries=DIR       X library files are in DIR
186 EOF
187     if test -n "$ac_help"; then
188       echo "--enable and --with options recognized:$ac_help"
189     fi
190     exit 0 ;;
191
192   -host | --host | --hos | --ho)
193     ac_prev=host ;;
194   -host=* | --host=* | --hos=* | --ho=*)
195     host="$ac_optarg" ;;
196
197   -includedir | --includedir | --includedi | --included | --include \
198   | --includ | --inclu | --incl | --inc)
199     ac_prev=includedir ;;
200   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201   | --includ=* | --inclu=* | --incl=* | --inc=*)
202     includedir="$ac_optarg" ;;
203
204   -infodir | --infodir | --infodi | --infod | --info | --inf)
205     ac_prev=infodir ;;
206   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207     infodir="$ac_optarg" ;;
208
209   -libdir | --libdir | --libdi | --libd)
210     ac_prev=libdir ;;
211   -libdir=* | --libdir=* | --libdi=* | --libd=*)
212     libdir="$ac_optarg" ;;
213
214   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215   | --libexe | --libex | --libe)
216     ac_prev=libexecdir ;;
217   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218   | --libexe=* | --libex=* | --libe=*)
219     libexecdir="$ac_optarg" ;;
220
221   -localstatedir | --localstatedir | --localstatedi | --localstated \
222   | --localstate | --localstat | --localsta | --localst \
223   | --locals | --local | --loca | --loc | --lo)
224     ac_prev=localstatedir ;;
225   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228     localstatedir="$ac_optarg" ;;
229
230   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231     ac_prev=mandir ;;
232   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233     mandir="$ac_optarg" ;;
234
235   -nfp | --nfp | --nf)
236     # Obsolete; use --without-fp.
237     with_fp=no ;;
238
239   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240   | --no-cr | --no-c)
241     no_create=yes ;;
242
243   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245     no_recursion=yes ;;
246
247   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249   | --oldin | --oldi | --old | --ol | --o)
250     ac_prev=oldincludedir ;;
251   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254     oldincludedir="$ac_optarg" ;;
255
256   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257     ac_prev=prefix ;;
258   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259     prefix="$ac_optarg" ;;
260
261   -program-prefix | --program-prefix | --program-prefi | --program-pref \
262   | --program-pre | --program-pr | --program-p)
263     ac_prev=program_prefix ;;
264   -program-prefix=* | --program-prefix=* | --program-prefi=* \
265   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266     program_prefix="$ac_optarg" ;;
267
268   -program-suffix | --program-suffix | --program-suffi | --program-suff \
269   | --program-suf | --program-su | --program-s)
270     ac_prev=program_suffix ;;
271   -program-suffix=* | --program-suffix=* | --program-suffi=* \
272   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273     program_suffix="$ac_optarg" ;;
274
275   -program-transform-name | --program-transform-name \
276   | --program-transform-nam | --program-transform-na \
277   | --program-transform-n | --program-transform- \
278   | --program-transform | --program-transfor \
279   | --program-transfo | --program-transf \
280   | --program-trans | --program-tran \
281   | --progr-tra | --program-tr | --program-t)
282     ac_prev=program_transform_name ;;
283   -program-transform-name=* | --program-transform-name=* \
284   | --program-transform-nam=* | --program-transform-na=* \
285   | --program-transform-n=* | --program-transform-=* \
286   | --program-transform=* | --program-transfor=* \
287   | --program-transfo=* | --program-transf=* \
288   | --program-trans=* | --program-tran=* \
289   | --progr-tra=* | --program-tr=* | --program-t=*)
290     program_transform_name="$ac_optarg" ;;
291
292   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293   | -silent | --silent | --silen | --sile | --sil)
294     silent=yes ;;
295
296   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297     ac_prev=sbindir ;;
298   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299   | --sbi=* | --sb=*)
300     sbindir="$ac_optarg" ;;
301
302   -sharedstatedir | --sharedstatedir | --sharedstatedi \
303   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304   | --sharedst | --shareds | --shared | --share | --shar \
305   | --sha | --sh)
306     ac_prev=sharedstatedir ;;
307   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310   | --sha=* | --sh=*)
311     sharedstatedir="$ac_optarg" ;;
312
313   -site | --site | --sit)
314     ac_prev=site ;;
315   -site=* | --site=* | --sit=*)
316     site="$ac_optarg" ;;
317
318   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319     ac_prev=srcdir ;;
320   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321     srcdir="$ac_optarg" ;;
322
323   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324   | --syscon | --sysco | --sysc | --sys | --sy)
325     ac_prev=sysconfdir ;;
326   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328     sysconfdir="$ac_optarg" ;;
329
330   -target | --target | --targe | --targ | --tar | --ta | --t)
331     ac_prev=target ;;
332   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333     target="$ac_optarg" ;;
334
335   -v | -verbose | --verbose | --verbos | --verbo | --verb)
336     verbose=yes ;;
337
338   -version | --version | --versio | --versi | --vers)
339     echo "configure generated by autoconf version 2.13"
340     exit 0 ;;
341
342   -with-* | --with-*)
343     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344     # Reject names that are not valid shell variable names.
345     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
346       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
347     fi
348     ac_package=`echo $ac_package| sed 's/-/_/g'`
349     case "$ac_option" in
350       *=*) ;;
351       *) ac_optarg=yes ;;
352     esac
353     eval "with_${ac_package}='$ac_optarg'" ;;
354
355   -without-* | --without-*)
356     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357     # Reject names that are not valid shell variable names.
358     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
359       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360     fi
361     ac_package=`echo $ac_package| sed 's/-/_/g'`
362     eval "with_${ac_package}=no" ;;
363
364   --x)
365     # Obsolete; use --with-x.
366     with_x=yes ;;
367
368   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369   | --x-incl | --x-inc | --x-in | --x-i)
370     ac_prev=x_includes ;;
371   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373     x_includes="$ac_optarg" ;;
374
375   -x-libraries | --x-libraries | --x-librarie | --x-librari \
376   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377     ac_prev=x_libraries ;;
378   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380     x_libraries="$ac_optarg" ;;
381
382   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383     ;;
384
385   *)
386     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387       echo "configure: warning: $ac_option: invalid host type" 1>&2
388     fi
389     if test "x$nonopt" != xNONE; then
390       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
391     fi
392     nonopt="$ac_option"
393     ;;
394
395   esac
396 done
397
398 if test -n "$ac_prev"; then
399   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400 fi
401
402 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
403
404 # File descriptor usage:
405 # 0 standard input
406 # 1 file creation
407 # 2 errors and warnings
408 # 3 some systems may open it to /dev/tty
409 # 4 used on the Kubota Titan
410 # 6 checking for... messages and results
411 # 5 compiler messages saved in config.log
412 if test "$silent" = yes; then
413   exec 6>/dev/null
414 else
415   exec 6>&1
416 fi
417 exec 5>./config.log
418
419 echo "\
420 This file contains any messages produced by compilers while
421 running configure, to aid debugging if configure makes a mistake.
422 " 1>&5
423
424 # Strip out --no-create and --no-recursion so they do not pile up.
425 # Also quote any args containing shell metacharacters.
426 ac_configure_args=
427 for ac_arg
428 do
429   case "$ac_arg" in
430   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431   | --no-cr | --no-c) ;;
432   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
434   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
437   esac
438 done
439
440 # NLS nuisances.
441 # Only set these to C if already set.  These must not be set unconditionally
442 # because not all systems understand e.g. LANG=C (notably SCO).
443 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
444 # Non-C LC_CTYPE values break the ctype check.
445 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
446 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
447 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
448 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
449
450 # confdefs.h avoids OS command line length limits that DEFS can exceed.
451 rm -rf conftest* confdefs.h
452 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
453 echo > confdefs.h
454
455 # A filename unique to this package, relative to the directory that
456 # configure is in, which we can look for to find out if srcdir is correct.
457 ac_unique_file=include/ginac.h
458
459 # Find the source files, if location was not specified.
460 if test -z "$srcdir"; then
461   ac_srcdir_defaulted=yes
462   # Try the directory containing this script, then its parent.
463   ac_prog=$0
464   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
465   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
466   srcdir=$ac_confdir
467   if test ! -r $srcdir/$ac_unique_file; then
468     srcdir=..
469   fi
470 else
471   ac_srcdir_defaulted=no
472 fi
473 if test ! -r $srcdir/$ac_unique_file; then
474   if test "$ac_srcdir_defaulted" = yes; then
475     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
476   else
477     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
478   fi
479 fi
480 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
481
482 # Prefer explicitly selected file to automatically selected ones.
483 if test -z "$CONFIG_SITE"; then
484   if test "x$prefix" != xNONE; then
485     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
486   else
487     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
488   fi
489 fi
490 for ac_site_file in $CONFIG_SITE; do
491   if test -r "$ac_site_file"; then
492     echo "loading site script $ac_site_file"
493     . "$ac_site_file"
494   fi
495 done
496
497 if test -r "$cache_file"; then
498   echo "loading cache $cache_file"
499   . $cache_file
500 else
501   echo "creating cache $cache_file"
502   > $cache_file
503 fi
504
505 ac_ext=c
506 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
507 ac_cpp='$CPP $CPPFLAGS'
508 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
509 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
510 cross_compiling=$ac_cv_prog_cc_cross
511
512 ac_exeext=
513 ac_objext=o
514 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517     ac_n= ac_c='
518 ' ac_t='        '
519   else
520     ac_n=-n ac_c= ac_t=
521   fi
522 else
523   ac_n= ac_c='\c' ac_t=
524 fi
525
526
527
528
529 GiNaC_Major_Version=0
530 GiNaC_Minor_Version=0
531 GiNaC_Micro_Version=30
532 GiNaC_Version="${GiNaC_Major_Version}.${GiNaC_Minor_Version}.${GiNaC_Micro_Version}"
533 LibGiNaC_Ver="${GiNaC_Major_Version}:${GiNaC_Micro_Version}:${GiNaC_Minor_Version}"
534
535 # Check whether --enable-shared or --disable-shared was given.
536 if test "${enable_shared+set}" = set; then
537   enableval="$enable_shared"
538   shared=${enableval}
539 else
540   shared="no"
541 fi
542
543
544 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
545 do
546 # Extract the first word of "$ac_prog", so it can be a program name with args.
547 set dummy $ac_prog; ac_word=$2
548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
549 echo "configure:550: checking for $ac_word" >&5
550 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
551   echo $ac_n "(cached) $ac_c" 1>&6
552 else
553   if test -n "$CXX"; then
554   ac_cv_prog_CXX="$CXX" # Let the user override the test.
555 else
556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
557   ac_dummy="$PATH"
558   for ac_dir in $ac_dummy; do
559     test -z "$ac_dir" && ac_dir=.
560     if test -f $ac_dir/$ac_word; then
561       ac_cv_prog_CXX="$ac_prog"
562       break
563     fi
564   done
565   IFS="$ac_save_ifs"
566 fi
567 fi
568 CXX="$ac_cv_prog_CXX"
569 if test -n "$CXX"; then
570   echo "$ac_t""$CXX" 1>&6
571 else
572   echo "$ac_t""no" 1>&6
573 fi
574
575 test -n "$CXX" && break
576 done
577 test -n "$CXX" || CXX="gcc"
578
579
580 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
581 echo "configure:582: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
582
583 ac_ext=C
584 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
585 ac_cpp='$CXXCPP $CPPFLAGS'
586 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
587 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
588 cross_compiling=$ac_cv_prog_cxx_cross
589
590 cat > conftest.$ac_ext << EOF
591
592 #line 593 "configure"
593 #include "confdefs.h"
594
595 int main(){return(0);}
596 EOF
597 if { (eval echo configure:598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
598   ac_cv_prog_cxx_works=yes
599   # If we can't run a trivial program, we are probably using a cross compiler.
600   if (./conftest; exit) 2>/dev/null; then
601     ac_cv_prog_cxx_cross=no
602   else
603     ac_cv_prog_cxx_cross=yes
604   fi
605 else
606   echo "configure: failed program was:" >&5
607   cat conftest.$ac_ext >&5
608   ac_cv_prog_cxx_works=no
609 fi
610 rm -fr conftest*
611 ac_ext=c
612 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
613 ac_cpp='$CPP $CPPFLAGS'
614 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
615 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
616 cross_compiling=$ac_cv_prog_cc_cross
617
618 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
619 if test $ac_cv_prog_cxx_works = no; then
620   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
621 fi
622 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
623 echo "configure:624: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
624 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
625 cross_compiling=$ac_cv_prog_cxx_cross
626
627 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
628 echo "configure:629: checking whether we are using GNU C++" >&5
629 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
630   echo $ac_n "(cached) $ac_c" 1>&6
631 else
632   cat > conftest.C <<EOF
633 #ifdef __GNUC__
634   yes;
635 #endif
636 EOF
637 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
638   ac_cv_prog_gxx=yes
639 else
640   ac_cv_prog_gxx=no
641 fi
642 fi
643
644 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
645
646 if test $ac_cv_prog_gxx = yes; then
647   GXX=yes
648 else
649   GXX=
650 fi
651
652 ac_test_CXXFLAGS="${CXXFLAGS+set}"
653 ac_save_CXXFLAGS="$CXXFLAGS"
654 CXXFLAGS=
655 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
656 echo "configure:657: checking whether ${CXX-g++} accepts -g" >&5
657 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
658   echo $ac_n "(cached) $ac_c" 1>&6
659 else
660   echo 'void f(){}' > conftest.cc
661 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
662   ac_cv_prog_cxx_g=yes
663 else
664   ac_cv_prog_cxx_g=no
665 fi
666 rm -f conftest*
667
668 fi
669
670 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
671 if test "$ac_test_CXXFLAGS" = set; then
672   CXXFLAGS="$ac_save_CXXFLAGS"
673 elif test $ac_cv_prog_cxx_g = yes; then
674   if test "$GXX" = yes; then
675     CXXFLAGS="-g -O2"
676   else
677     CXXFLAGS="-g"
678   fi
679 else
680   if test "$GXX" = yes; then
681     CXXFLAGS="-O2"
682   else
683     CXXFLAGS=
684   fi
685 fi
686
687 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
688 echo "configure:689: checking how to run the C++ preprocessor" >&5
689 if test -z "$CXXCPP"; then
690 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
691   echo $ac_n "(cached) $ac_c" 1>&6
692 else
693   ac_ext=C
694 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
695 ac_cpp='$CXXCPP $CPPFLAGS'
696 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
697 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
698 cross_compiling=$ac_cv_prog_cxx_cross
699   CXXCPP="${CXX-g++} -E"
700   cat > conftest.$ac_ext <<EOF
701 #line 702 "configure"
702 #include "confdefs.h"
703 #include <stdlib.h>
704 EOF
705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
706 { (eval echo configure:707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
708 if test -z "$ac_err"; then
709   :
710 else
711   echo "$ac_err" >&5
712   echo "configure: failed program was:" >&5
713   cat conftest.$ac_ext >&5
714   rm -rf conftest*
715   CXXCPP=/lib/cpp
716 fi
717 rm -f conftest*
718   ac_cv_prog_CXXCPP="$CXXCPP"
719 ac_ext=c
720 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
721 ac_cpp='$CPP $CPPFLAGS'
722 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
723 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
724 cross_compiling=$ac_cv_prog_cc_cross
725 fi
726 fi
727 CXXCPP="$ac_cv_prog_CXXCPP"
728 echo "$ac_t""$CXXCPP" 1>&6
729
730 ac_ext=C
731 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
732 ac_cpp='$CXXCPP $CPPFLAGS'
733 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
734 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
735 cross_compiling=$ac_cv_prog_cxx_cross
736
737 echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6
738 echo "configure:739: checking for cout in -lstdc++" >&5
739 ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'`
740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
741   echo $ac_n "(cached) $ac_c" 1>&6
742 else
743   ac_save_LIBS="$LIBS"
744 LIBS="-lstdc++  $LIBS"
745 cat > conftest.$ac_ext <<EOF
746 #line 747 "configure"
747 #include "confdefs.h"
748 /* Override any gcc2 internal prototype to avoid an error.  */
749 #ifdef __cplusplus
750 extern "C"
751 #endif
752 /* We use char because int might match the return type of a gcc2
753     builtin and then its argument prototype would still apply.  */
754 char cout();
755
756 int main() {
757 cout()
758 ; return 0; }
759 EOF
760 if { (eval echo configure:761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
761   rm -rf conftest*
762   eval "ac_cv_lib_$ac_lib_var=yes"
763 else
764   echo "configure: failed program was:" >&5
765   cat conftest.$ac_ext >&5
766   rm -rf conftest*
767   eval "ac_cv_lib_$ac_lib_var=no"
768 fi
769 rm -f conftest*
770 LIBS="$ac_save_LIBS"
771
772 fi
773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
774   echo "$ac_t""yes" 1>&6
775     ac_tr_lib=HAVE_LIB`echo stdc++ | sed -e 's/[^a-zA-Z0-9_]/_/g' \
776     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
777   cat >> confdefs.h <<EOF
778 #define $ac_tr_lib 1
779 EOF
780
781   LIBS="-lstdc++ $LIBS"
782
783 else
784   echo "$ac_t""no" 1>&6
785 fi
786
787 for ac_hdr in iostream vector map string list typeinfo iterator strstream stdexcept algorithm
788 do
789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
791 echo "configure:792: checking for $ac_hdr" >&5
792 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
793   echo $ac_n "(cached) $ac_c" 1>&6
794 else
795   cat > conftest.$ac_ext <<EOF
796 #line 797 "configure"
797 #include "confdefs.h"
798 #include <$ac_hdr>
799 EOF
800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
801 { (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
803 if test -z "$ac_err"; then
804   rm -rf conftest*
805   eval "ac_cv_header_$ac_safe=yes"
806 else
807   echo "$ac_err" >&5
808   echo "configure: failed program was:" >&5
809   cat conftest.$ac_ext >&5
810   rm -rf conftest*
811   eval "ac_cv_header_$ac_safe=no"
812 fi
813 rm -f conftest*
814 fi
815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
816   echo "$ac_t""yes" 1>&6
817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
818   cat >> confdefs.h <<EOF
819 #define $ac_tr_hdr 1
820 EOF
821  
822 else
823   echo "$ac_t""no" 1>&6
824 { echo "configure: error: need to have ANSI compliant headers" 1>&2; exit 1; }
825 fi
826 done
827
828
829     for ac_hdr in CLN/cln.h
830 do
831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
833 echo "configure:834: checking for $ac_hdr" >&5
834 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837   cat > conftest.$ac_ext <<EOF
838 #line 839 "configure"
839 #include "confdefs.h"
840 #include <$ac_hdr>
841 EOF
842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
843 { (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
845 if test -z "$ac_err"; then
846   rm -rf conftest*
847   eval "ac_cv_header_$ac_safe=yes"
848 else
849   echo "$ac_err" >&5
850   echo "configure: failed program was:" >&5
851   cat conftest.$ac_ext >&5
852   rm -rf conftest*
853   eval "ac_cv_header_$ac_safe=no"
854 fi
855 rm -f conftest*
856 fi
857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
858   echo "$ac_t""yes" 1>&6
859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
860   cat >> confdefs.h <<EOF
861 #define $ac_tr_hdr 1
862 EOF
863  
864 else
865   echo "$ac_t""no" 1>&6
866 for ac_hdr in cln.h
867 do
868 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
869 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
870 echo "configure:871: checking for $ac_hdr" >&5
871 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
872   echo $ac_n "(cached) $ac_c" 1>&6
873 else
874   cat > conftest.$ac_ext <<EOF
875 #line 876 "configure"
876 #include "confdefs.h"
877 #include <$ac_hdr>
878 EOF
879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
880 { (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
881 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
882 if test -z "$ac_err"; then
883   rm -rf conftest*
884   eval "ac_cv_header_$ac_safe=yes"
885 else
886   echo "$ac_err" >&5
887   echo "configure: failed program was:" >&5
888   cat conftest.$ac_ext >&5
889   rm -rf conftest*
890   eval "ac_cv_header_$ac_safe=no"
891 fi
892 rm -f conftest*
893 fi
894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
895   echo "$ac_t""yes" 1>&6
896     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
897   cat >> confdefs.h <<EOF
898 #define $ac_tr_hdr 1
899 EOF
900  
901 else
902   echo "$ac_t""no" 1>&6
903 { echo "configure: error: cannot find header for Bruno Haible's CLN" 1>&2; exit 1; };
904         
905 fi
906 done
907
908     
909 fi
910 done
911
912
913
914     echo $ac_n "checking how to link with libcln""... $ac_c" 1>&6
915 echo "configure:916: checking how to link with libcln" >&5
916     saved_LIBS="${LIBS}"
917     if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then
918   echo $ac_n "(cached) $ac_c" 1>&6
919 else
920   LIBS="-lcln"
921         case "${ac_cv_header_CLN_cln_h}" in
922         "yes")
923             cat > conftest.$ac_ext <<EOF
924 #line 925 "configure"
925 #include "confdefs.h"
926 #include <CLN/cln.h>
927 int main() {
928 factorial(1);
929 ; return 0; }
930 EOF
931 if { (eval echo configure:932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
932   rm -rf conftest*
933   ginac_cv_lib_cln_link="-lcln"
934 else
935   echo "configure: failed program was:" >&5
936   cat conftest.$ac_ext >&5
937   rm -rf conftest*
938   ginac_cv_lib_cln_link="fail"
939 fi
940 rm -f conftest*
941             ;;
942         *)
943             cat > conftest.$ac_ext <<EOF
944 #line 945 "configure"
945 #include "confdefs.h"
946 #include <cln.h>
947 int main() {
948 factorial(1);
949 ; return 0; }
950 EOF
951 if { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
952   rm -rf conftest*
953   ginac_cv_lib_cln_link="-lcln"
954 else
955   echo "configure: failed program was:" >&5
956   cat conftest.$ac_ext >&5
957   rm -rf conftest*
958   ginac_cv_lib_cln_link="fail"
959 fi
960 rm -f conftest*
961             ;;
962         esac
963     
964 fi
965
966     case "${ginac_cv_lib_cln_link}" in
967     "-lcln")
968         LIBS="-lcln ${saved_LIBS}"
969         echo "$ac_t""-lcln" 1>&6
970         
971     echo $ac_n "checking whether libcln behaves sane""... $ac_c" 1>&6
972 echo "configure:973: checking whether libcln behaves sane" >&5
973     if eval "test \"`echo '$''{'ginac_cv_lib_cln_integrity'+set}'`\" = set"; then
974   echo $ac_n "(cached) $ac_c" 1>&6
975 else
976   
977         case "${ac_cv_header_CLN_cln_h}" in
978         "yes")
979             if test "$cross_compiling" = yes; then
980   ginac_cv_lib_cln_integrity="guessing sane"
981 else
982   cat > conftest.$ac_ext <<EOF
983 #line 984 "configure"
984 #include "confdefs.h"
985 #ifdef __cplusplus
986 extern "C" void exit(int);
987 #endif
988 #include <CLN/cln.h>
989 int main() {
990 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
991 if (q+p != 3) return 1; else return 0;
992 }
993 EOF
994 if { (eval echo configure:995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
995 then
996   ginac_cv_lib_cln_integrity="sane"
997 else
998   echo "configure: failed program was:" >&5
999   cat conftest.$ac_ext >&5
1000   rm -fr conftest*
1001   ginac_cv_lib_cln_integrity="insane"
1002 fi
1003 rm -fr conftest*
1004 fi
1005
1006             ;;
1007         *)
1008             if test "$cross_compiling" = yes; then
1009   ginac_cv_lib_cln_integrity="guessing sane"
1010 else
1011   cat > conftest.$ac_ext <<EOF
1012 #line 1013 "configure"
1013 #include "confdefs.h"
1014 #ifdef __cplusplus
1015 extern "C" void exit(int);
1016 #endif
1017 #include <cln.h>
1018 int main() {
1019 cl_RA q(3); q = q/2; cl_RA p(3); p = p/2;
1020 if (q+p != 3) return 1; else return 0;
1021 }
1022 EOF
1023 if { (eval echo configure:1024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1024 then
1025   ginac_cv_lib_cln_integrity="sane"
1026 else
1027   echo "configure: failed program was:" >&5
1028   cat conftest.$ac_ext >&5
1029   rm -fr conftest*
1030   ginac_cv_lib_cln_integrity="insane"
1031 fi
1032 rm -fr conftest*
1033 fi
1034
1035             ;;
1036         esac
1037     
1038 fi
1039
1040     case "${ginac_cv_lib_cln_integrity}" in
1041     "sane")
1042         echo "$ac_t""yes" 1>&6
1043     ;;
1044     "insane")
1045         echo "$ac_t""no" 1>&6
1046         echo "configure: warning: maybe version of libcln is older than 1.0.2?" 1>&2
1047     ;;
1048     "guessing sane")
1049         echo "$ac_t""hopefully" 1>&6
1050     ;;
1051     *)
1052         echo "configure: warning: you found a bug in the configure script!" 1>&2
1053     ;;
1054     esac
1055
1056     ;;
1057     "fail")
1058         LIBS="${saved_LIBS}"
1059         echo "$ac_t""" 1>&6
1060         echo "configure: warning: linking with libcln failed" 1>&2
1061     ;;
1062     *)
1063         LIBS="${saved_LIBS}"
1064     ;;
1065     esac
1066
1067 ac_aux_dir=
1068 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1069   if test -f $ac_dir/install-sh; then
1070     ac_aux_dir=$ac_dir
1071     ac_install_sh="$ac_aux_dir/install-sh -c"
1072     break
1073   elif test -f $ac_dir/install.sh; then
1074     ac_aux_dir=$ac_dir
1075     ac_install_sh="$ac_aux_dir/install.sh -c"
1076     break
1077   fi
1078 done
1079 if test -z "$ac_aux_dir"; then
1080   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1081 fi
1082 ac_config_guess=$ac_aux_dir/config.guess
1083 ac_config_sub=$ac_aux_dir/config.sub
1084 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1085
1086 # Find a good install program.  We prefer a C program (faster),
1087 # so one script is as good as another.  But avoid the broken or
1088 # incompatible versions:
1089 # SysV /etc/install, /usr/sbin/install
1090 # SunOS /usr/etc/install
1091 # IRIX /sbin/install
1092 # AIX /bin/install
1093 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1094 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1095 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1096 # ./install, which can be erroneously created by make from ./install.sh.
1097 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1098 echo "configure:1099: checking for a BSD compatible install" >&5
1099 if test -z "$INSTALL"; then
1100 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1101   echo $ac_n "(cached) $ac_c" 1>&6
1102 else
1103     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1104   for ac_dir in $PATH; do
1105     # Account for people who put trailing slashes in PATH elements.
1106     case "$ac_dir/" in
1107     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1108     *)
1109       # OSF1 and SCO ODT 3.0 have their own names for install.
1110       # Don't use installbsd from OSF since it installs stuff as root
1111       # by default.
1112       for ac_prog in ginstall scoinst install; do
1113         if test -f $ac_dir/$ac_prog; then
1114           if test $ac_prog = install &&
1115             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1116             # AIX install.  It has an incompatible calling convention.
1117             :
1118           else
1119             ac_cv_path_install="$ac_dir/$ac_prog -c"
1120             break 2
1121           fi
1122         fi
1123       done
1124       ;;
1125     esac
1126   done
1127   IFS="$ac_save_IFS"
1128
1129 fi
1130   if test "${ac_cv_path_install+set}" = set; then
1131     INSTALL="$ac_cv_path_install"
1132   else
1133     # As a last resort, use the slow shell script.  We don't cache a
1134     # path for INSTALL within a source directory, because that will
1135     # break other packages using the cache if that directory is
1136     # removed, or if the path is relative.
1137     INSTALL="$ac_install_sh"
1138   fi
1139 fi
1140 echo "$ac_t""$INSTALL" 1>&6
1141
1142 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1143 # It thinks the first close brace ends the variable substitution.
1144 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1145
1146 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1147
1148 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1149
1150 # Extract the first word of "makedepend", so it can be a program name with args.
1151 set dummy makedepend; ac_word=$2
1152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1153 echo "configure:1154: checking for $ac_word" >&5
1154 if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPEND'+set}'`\" = set"; then
1155   echo $ac_n "(cached) $ac_c" 1>&6
1156 else
1157   case "$MAKEDEPEND" in
1158   /*)
1159   ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a path.
1160   ;;
1161   ?:/*)                  
1162   ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a dos path.
1163   ;;
1164   *)
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do 
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_path_MAKEDEPEND="$ac_dir/$ac_word"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175   test -z "$ac_cv_path_MAKEDEPEND" && ac_cv_path_MAKEDEPEND=""""
1176   ;;
1177 esac
1178 fi
1179 MAKEDEPEND="$ac_cv_path_MAKEDEPEND"
1180 if test -n "$MAKEDEPEND"; then
1181   echo "$ac_t""$MAKEDEPEND" 1>&6
1182 else
1183   echo "$ac_t""no" 1>&6
1184 fi
1185
1186 case "${shared}" in
1187 "yes"|"Yes"|"YES")      # Default-enable ("yes") or user was nitpicking:
1188     shared="shlib";
1189     # Extract the first word of "libtool", so it can be a program name with args.
1190 set dummy libtool; ac_word=$2
1191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1192 echo "configure:1193: checking for $ac_word" >&5
1193 if eval "test \"`echo '$''{'ac_cv_path_LIBTOOL'+set}'`\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   case "$LIBTOOL" in
1197   /*)
1198   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
1199   ;;
1200   ?:/*)                  
1201   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a dos path.
1202   ;;
1203   *)
1204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1205   ac_dummy="$PATH"
1206   for ac_dir in $ac_dummy; do 
1207     test -z "$ac_dir" && ac_dir=.
1208     if test -f $ac_dir/$ac_word; then
1209       ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
1210       break
1211     fi
1212   done
1213   IFS="$ac_save_ifs"
1214   test -z "$ac_cv_path_LIBTOOL" && ac_cv_path_LIBTOOL=""""
1215   ;;
1216 esac
1217 fi
1218 LIBTOOL="$ac_cv_path_LIBTOOL"
1219 if test -n "$LIBTOOL"; then
1220   echo "$ac_t""$LIBTOOL" 1>&6
1221 else
1222   echo "$ac_t""no" 1>&6
1223 fi
1224
1225     if test "${LIBTOOL}" == ""; then
1226         echo "configure: warning: libtool not found: building static lib only" 1>&2
1227         shared="";
1228     fi
1229     ;;
1230 *)      # Default, default-disable ("no") or user entered bogus:
1231     shared="";
1232     ;;
1233 esac
1234 # Extract the first word of "flex", so it can be a program name with args.
1235 set dummy flex; ac_word=$2
1236 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1237 echo "configure:1238: checking for $ac_word" >&5
1238 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1239   echo $ac_n "(cached) $ac_c" 1>&6
1240 else
1241   if test -n "$LEX"; then
1242   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1243 else
1244   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1245   ac_dummy="$PATH"
1246   for ac_dir in $ac_dummy; do
1247     test -z "$ac_dir" && ac_dir=.
1248     if test -f $ac_dir/$ac_word; then
1249       ac_cv_prog_LEX="flex"
1250       break
1251     fi
1252   done
1253   IFS="$ac_save_ifs"
1254   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1255 fi
1256 fi
1257 LEX="$ac_cv_prog_LEX"
1258 if test -n "$LEX"; then
1259   echo "$ac_t""$LEX" 1>&6
1260 else
1261   echo "$ac_t""no" 1>&6
1262 fi
1263
1264 if test -z "$LEXLIB"
1265 then
1266   case "$LEX" in
1267   flex*) ac_lib=fl ;;
1268   *) ac_lib=l ;;
1269   esac
1270   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1271 echo "configure:1272: checking for yywrap in -l$ac_lib" >&5
1272 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1274   echo $ac_n "(cached) $ac_c" 1>&6
1275 else
1276   ac_save_LIBS="$LIBS"
1277 LIBS="-l$ac_lib  $LIBS"
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281 /* Override any gcc2 internal prototype to avoid an error.  */
1282 #ifdef __cplusplus
1283 extern "C"
1284 #endif
1285 /* We use char because int might match the return type of a gcc2
1286     builtin and then its argument prototype would still apply.  */
1287 char yywrap();
1288
1289 int main() {
1290 yywrap()
1291 ; return 0; }
1292 EOF
1293 if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1294   rm -rf conftest*
1295   eval "ac_cv_lib_$ac_lib_var=yes"
1296 else
1297   echo "configure: failed program was:" >&5
1298   cat conftest.$ac_ext >&5
1299   rm -rf conftest*
1300   eval "ac_cv_lib_$ac_lib_var=no"
1301 fi
1302 rm -f conftest*
1303 LIBS="$ac_save_LIBS"
1304
1305 fi
1306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1307   echo "$ac_t""yes" 1>&6
1308   LEXLIB="-l$ac_lib"
1309 else
1310   echo "$ac_t""no" 1>&6
1311 fi
1312
1313 fi
1314
1315 for ac_prog in 'bison -y' byacc
1316 do
1317 # Extract the first word of "$ac_prog", so it can be a program name with args.
1318 set dummy $ac_prog; ac_word=$2
1319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1320 echo "configure:1321: checking for $ac_word" >&5
1321 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1322   echo $ac_n "(cached) $ac_c" 1>&6
1323 else
1324   if test -n "$YACC"; then
1325   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1326 else
1327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1328   ac_dummy="$PATH"
1329   for ac_dir in $ac_dummy; do
1330     test -z "$ac_dir" && ac_dir=.
1331     if test -f $ac_dir/$ac_word; then
1332       ac_cv_prog_YACC="$ac_prog"
1333       break
1334     fi
1335   done
1336   IFS="$ac_save_ifs"
1337 fi
1338 fi
1339 YACC="$ac_cv_prog_YACC"
1340 if test -n "$YACC"; then
1341   echo "$ac_t""$YACC" 1>&6
1342 else
1343   echo "$ac_t""no" 1>&6
1344 fi
1345
1346 test -n "$YACC" && break
1347 done
1348 test -n "$YACC" || YACC="yacc"
1349
1350 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1351 echo "configure:1352: checking lex output file root" >&5
1352 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1353   echo $ac_n "(cached) $ac_c" 1>&6
1354 else
1355   # The minimal lex program is just a single line: %%.  But some broken lexes
1356 # (Solaris, I think it was) want two %% lines, so accommodate them.
1357 echo '%%
1358 %%' | $LEX
1359 if test -f lex.yy.c; then
1360   ac_cv_prog_lex_root=lex.yy
1361 elif test -f lexyy.c; then
1362   ac_cv_prog_lex_root=lexyy
1363 else
1364   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1365 fi
1366 fi
1367
1368 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1369 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1370
1371 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1372 echo "configure:1373: checking whether yytext is a pointer" >&5
1373 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1374   echo $ac_n "(cached) $ac_c" 1>&6
1375 else
1376   # POSIX says lex can declare yytext either as a pointer or an array; the
1377 # default is implementation-dependent. Figure out which it is, since
1378 # not all implementations provide the %pointer and %array declarations.
1379 ac_cv_prog_lex_yytext_pointer=no
1380 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1381 ac_save_LIBS="$LIBS"
1382 LIBS="$LIBS $LEXLIB"
1383 cat > conftest.$ac_ext <<EOF
1384 #line 1385 "configure"
1385 #include "confdefs.h"
1386 `cat $LEX_OUTPUT_ROOT.c`
1387 int main() {
1388
1389 ; return 0; }
1390 EOF
1391 if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1392   rm -rf conftest*
1393   ac_cv_prog_lex_yytext_pointer=yes
1394 else
1395   echo "configure: failed program was:" >&5
1396   cat conftest.$ac_ext >&5
1397 fi
1398 rm -f conftest*
1399 LIBS="$ac_save_LIBS"
1400 rm -f "${LEX_OUTPUT_ROOT}.c"
1401
1402 fi
1403
1404 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1405 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1406   cat >> confdefs.h <<\EOF
1407 #define YYTEXT_POINTER 1
1408 EOF
1409
1410 fi
1411
1412 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1413 echo "configure:1414: checking for ANSI C header files" >&5
1414 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1415   echo $ac_n "(cached) $ac_c" 1>&6
1416 else
1417   cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1420 #include <stdlib.h>
1421 #include <stdarg.h>
1422 #include <string.h>
1423 #include <float.h>
1424 EOF
1425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1426 { (eval echo configure:1427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1428 if test -z "$ac_err"; then
1429   rm -rf conftest*
1430   ac_cv_header_stdc=yes
1431 else
1432   echo "$ac_err" >&5
1433   echo "configure: failed program was:" >&5
1434   cat conftest.$ac_ext >&5
1435   rm -rf conftest*
1436   ac_cv_header_stdc=no
1437 fi
1438 rm -f conftest*
1439
1440 if test $ac_cv_header_stdc = yes; then
1441   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1442 cat > conftest.$ac_ext <<EOF
1443 #line 1444 "configure"
1444 #include "confdefs.h"
1445 #include <string.h>
1446 EOF
1447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1448   egrep "memchr" >/dev/null 2>&1; then
1449   :
1450 else
1451   rm -rf conftest*
1452   ac_cv_header_stdc=no
1453 fi
1454 rm -f conftest*
1455
1456 fi
1457
1458 if test $ac_cv_header_stdc = yes; then
1459   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1460 cat > conftest.$ac_ext <<EOF
1461 #line 1462 "configure"
1462 #include "confdefs.h"
1463 #include <stdlib.h>
1464 EOF
1465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1466   egrep "free" >/dev/null 2>&1; then
1467   :
1468 else
1469   rm -rf conftest*
1470   ac_cv_header_stdc=no
1471 fi
1472 rm -f conftest*
1473
1474 fi
1475
1476 if test $ac_cv_header_stdc = yes; then
1477   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1478 if test "$cross_compiling" = yes; then
1479   :
1480 else
1481   cat > conftest.$ac_ext <<EOF
1482 #line 1483 "configure"
1483 #include "confdefs.h"
1484 #ifdef __cplusplus
1485 extern "C" void exit(int);
1486 #endif
1487 #include <ctype.h>
1488 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1489 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1490 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1491 int main () { int i; for (i = 0; i < 256; i++)
1492 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1493 exit (0); }
1494
1495 EOF
1496 if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1497 then
1498   :
1499 else
1500   echo "configure: failed program was:" >&5
1501   cat conftest.$ac_ext >&5
1502   rm -fr conftest*
1503   ac_cv_header_stdc=no
1504 fi
1505 rm -fr conftest*
1506 fi
1507
1508 fi
1509 fi
1510
1511 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1512 if test $ac_cv_header_stdc = yes; then
1513   cat >> confdefs.h <<\EOF
1514 #define STDC_HEADERS 1
1515 EOF
1516
1517 fi
1518
1519 for ac_hdr in unistd.h
1520 do
1521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1523 echo "configure:1524: checking for $ac_hdr" >&5
1524 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1525   echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527   cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 #include <$ac_hdr>
1531 EOF
1532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1533 { (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1535 if test -z "$ac_err"; then
1536   rm -rf conftest*
1537   eval "ac_cv_header_$ac_safe=yes"
1538 else
1539   echo "$ac_err" >&5
1540   echo "configure: failed program was:" >&5
1541   cat conftest.$ac_ext >&5
1542   rm -rf conftest*
1543   eval "ac_cv_header_$ac_safe=no"
1544 fi
1545 rm -f conftest*
1546 fi
1547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1548   echo "$ac_t""yes" 1>&6
1549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1550   cat >> confdefs.h <<EOF
1551 #define $ac_tr_hdr 1
1552 EOF
1553  
1554 else
1555   echo "$ac_t""no" 1>&6
1556 fi
1557 done
1558
1559 for ac_func in strdup
1560 do
1561 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1562 echo "configure:1563: checking for $ac_func" >&5
1563 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1564   echo $ac_n "(cached) $ac_c" 1>&6
1565 else
1566   cat > conftest.$ac_ext <<EOF
1567 #line 1568 "configure"
1568 #include "confdefs.h"
1569 /* System header to define __stub macros and hopefully few prototypes,
1570     which can conflict with char $ac_func(); below.  */
1571 #include <assert.h>
1572 /* Override any gcc2 internal prototype to avoid an error.  */
1573 #ifdef __cplusplus
1574 extern "C"
1575 #endif
1576 /* We use char because int might match the return type of a gcc2
1577     builtin and then its argument prototype would still apply.  */
1578 char $ac_func();
1579
1580 int main() {
1581
1582 /* The GNU C library defines this for functions which it implements
1583     to always fail with ENOSYS.  Some functions are actually named
1584     something starting with __ and the normal name is an alias.  */
1585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1586 choke me
1587 #else
1588 $ac_func();
1589 #endif
1590
1591 ; return 0; }
1592 EOF
1593 if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1594   rm -rf conftest*
1595   eval "ac_cv_func_$ac_func=yes"
1596 else
1597   echo "configure: failed program was:" >&5
1598   cat conftest.$ac_ext >&5
1599   rm -rf conftest*
1600   eval "ac_cv_func_$ac_func=no"
1601 fi
1602 rm -f conftest*
1603 fi
1604
1605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1606   echo "$ac_t""yes" 1>&6
1607     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1608   cat >> confdefs.h <<EOF
1609 #define $ac_tr_func 1
1610 EOF
1611  
1612 else
1613   echo "$ac_t""no" 1>&6
1614 fi
1615 done
1616
1617 for ac_hdr in readline/readline.h readline/history.h
1618 do
1619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1621 echo "configure:1622: checking for $ac_hdr" >&5
1622 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1623   echo $ac_n "(cached) $ac_c" 1>&6
1624 else
1625   cat > conftest.$ac_ext <<EOF
1626 #line 1627 "configure"
1627 #include "confdefs.h"
1628 #include <$ac_hdr>
1629 EOF
1630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1631 { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1633 if test -z "$ac_err"; then
1634   rm -rf conftest*
1635   eval "ac_cv_header_$ac_safe=yes"
1636 else
1637   echo "$ac_err" >&5
1638   echo "configure: failed program was:" >&5
1639   cat conftest.$ac_ext >&5
1640   rm -rf conftest*
1641   eval "ac_cv_header_$ac_safe=no"
1642 fi
1643 rm -f conftest*
1644 fi
1645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1646   echo "$ac_t""yes" 1>&6
1647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1648   cat >> confdefs.h <<EOF
1649 #define $ac_tr_hdr 1
1650 EOF
1651  
1652 else
1653   echo "$ac_t""no" 1>&6
1654 { echo "configure: error: need to have GNU readline headers" 1>&2; exit 1; }
1655 fi
1656 done
1657
1658 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
1659 echo "configure:1660: checking for readline in -lreadline" >&5
1660 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
1661 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1662   echo $ac_n "(cached) $ac_c" 1>&6
1663 else
1664   ac_save_LIBS="$LIBS"
1665 LIBS="-lreadline  $LIBS"
1666 cat > conftest.$ac_ext <<EOF
1667 #line 1668 "configure"
1668 #include "confdefs.h"
1669 /* Override any gcc2 internal prototype to avoid an error.  */
1670 #ifdef __cplusplus
1671 extern "C"
1672 #endif
1673 /* We use char because int might match the return type of a gcc2
1674     builtin and then its argument prototype would still apply.  */
1675 char readline();
1676
1677 int main() {
1678 readline()
1679 ; return 0; }
1680 EOF
1681 if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1682   rm -rf conftest*
1683   eval "ac_cv_lib_$ac_lib_var=yes"
1684 else
1685   echo "configure: failed program was:" >&5
1686   cat conftest.$ac_ext >&5
1687   rm -rf conftest*
1688   eval "ac_cv_lib_$ac_lib_var=no"
1689 fi
1690 rm -f conftest*
1691 LIBS="$ac_save_LIBS"
1692
1693 fi
1694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1695   echo "$ac_t""yes" 1>&6
1696     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1697     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1698   cat >> confdefs.h <<EOF
1699 #define $ac_tr_lib 1
1700 EOF
1701
1702   LIBS="-lreadline $LIBS"
1703
1704 else
1705   echo "$ac_t""no" 1>&6
1706 { echo "configure: error: need to have GNU readline library" 1>&2; exit 1; }
1707 fi
1708
1709 # Extract the first word of "doxygen", so it can be a program name with args.
1710 set dummy doxygen; ac_word=$2
1711 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1712 echo "configure:1713: checking for $ac_word" >&5
1713 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
1714   echo $ac_n "(cached) $ac_c" 1>&6
1715 else
1716   case "$DOXYGEN" in
1717   /*)
1718   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
1719   ;;
1720   ?:/*)                  
1721   ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a dos path.
1722   ;;
1723   *)
1724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1725   ac_dummy="$PATH"
1726   for ac_dir in $ac_dummy; do 
1727     test -z "$ac_dir" && ac_dir=.
1728     if test -f $ac_dir/$ac_word; then
1729       ac_cv_path_DOXYGEN="$ac_dir/$ac_word"
1730       break
1731     fi
1732   done
1733   IFS="$ac_save_ifs"
1734   test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=""""
1735   ;;
1736 esac
1737 fi
1738 DOXYGEN="$ac_cv_path_DOXYGEN"
1739 if test -n "$DOXYGEN"; then
1740   echo "$ac_t""$DOXYGEN" 1>&6
1741 else
1742   echo "$ac_t""no" 1>&6
1743 fi
1744
1745 # Extract the first word of "latex", so it can be a program name with args.
1746 set dummy latex; ac_word=$2
1747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1748 echo "configure:1749: checking for $ac_word" >&5
1749 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
1750   echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752   case "$LATEX" in
1753   /*)
1754   ac_cv_path_LATEX="$LATEX" # Let the user override the test with a path.
1755   ;;
1756   ?:/*)                  
1757   ac_cv_path_LATEX="$LATEX" # Let the user override the test with a dos path.
1758   ;;
1759   *)
1760   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1761   ac_dummy="$PATH"
1762   for ac_dir in $ac_dummy; do 
1763     test -z "$ac_dir" && ac_dir=.
1764     if test -f $ac_dir/$ac_word; then
1765       ac_cv_path_LATEX="$ac_dir/$ac_word"
1766       break
1767     fi
1768   done
1769   IFS="$ac_save_ifs"
1770   test -z "$ac_cv_path_LATEX" && ac_cv_path_LATEX=""""
1771   ;;
1772 esac
1773 fi
1774 LATEX="$ac_cv_path_LATEX"
1775 if test -n "$LATEX"; then
1776   echo "$ac_t""$LATEX" 1>&6
1777 else
1778   echo "$ac_t""no" 1>&6
1779 fi
1780
1781 # Extract the first word of "makeindex", so it can be a program name with args.
1782 set dummy makeindex; ac_word=$2
1783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1784 echo "configure:1785: checking for $ac_word" >&5
1785 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then
1786   echo $ac_n "(cached) $ac_c" 1>&6
1787 else
1788   case "$MAKEINDEX" in
1789   /*)
1790   ac_cv_path_MAKEINDEX="$MAKEINDEX" # Let the user override the test with a path.
1791   ;;
1792   ?:/*)                  
1793   ac_cv_path_MAKEINDEX="$MAKEINDEX" # Let the user override the test with a dos path.
1794   ;;
1795   *)
1796   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1797   ac_dummy="$PATH"
1798   for ac_dir in $ac_dummy; do 
1799     test -z "$ac_dir" && ac_dir=.
1800     if test -f $ac_dir/$ac_word; then
1801       ac_cv_path_MAKEINDEX="$ac_dir/$ac_word"
1802       break
1803     fi
1804   done
1805   IFS="$ac_save_ifs"
1806   test -z "$ac_cv_path_MAKEINDEX" && ac_cv_path_MAKEINDEX=""""
1807   ;;
1808 esac
1809 fi
1810 MAKEINDEX="$ac_cv_path_MAKEINDEX"
1811 if test -n "$MAKEINDEX"; then
1812   echo "$ac_t""$MAKEINDEX" 1>&6
1813 else
1814   echo "$ac_t""no" 1>&6
1815 fi
1816
1817 # Extract the first word of "dvips", so it can be a program name with args.
1818 set dummy dvips; ac_word=$2
1819 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1820 echo "configure:1821: checking for $ac_word" >&5
1821 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
1822   echo $ac_n "(cached) $ac_c" 1>&6
1823 else
1824   case "$DVIPS" in
1825   /*)
1826   ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
1827   ;;
1828   ?:/*)                  
1829   ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a dos path.
1830   ;;
1831   *)
1832   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1833   ac_dummy="$PATH"
1834   for ac_dir in $ac_dummy; do 
1835     test -z "$ac_dir" && ac_dir=.
1836     if test -f $ac_dir/$ac_word; then
1837       ac_cv_path_DVIPS="$ac_dir/$ac_word"
1838       break
1839     fi
1840   done
1841   IFS="$ac_save_ifs"
1842   test -z "$ac_cv_path_DVIPS" && ac_cv_path_DVIPS=""""
1843   ;;
1844 esac
1845 fi
1846 DVIPS="$ac_cv_path_DVIPS"
1847 if test -n "$DVIPS"; then
1848   echo "$ac_t""$DVIPS" 1>&6
1849 else
1850   echo "$ac_t""no" 1>&6
1851 fi
1852
1853 # Extract the first word of "fig2dev", so it can be a program name with args.
1854 set dummy fig2dev; ac_word=$2
1855 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1856 echo "configure:1857: checking for $ac_word" >&5
1857 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then
1858   echo $ac_n "(cached) $ac_c" 1>&6
1859 else
1860   case "$FIG2DEV" in
1861   /*)
1862   ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a path.
1863   ;;
1864   ?:/*)                  
1865   ac_cv_path_FIG2DEV="$FIG2DEV" # Let the user override the test with a dos path.
1866   ;;
1867   *)
1868   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1869   ac_dummy="$PATH"
1870   for ac_dir in $ac_dummy; do 
1871     test -z "$ac_dir" && ac_dir=.
1872     if test -f $ac_dir/$ac_word; then
1873       ac_cv_path_FIG2DEV="$ac_dir/$ac_word"
1874       break
1875     fi
1876   done
1877   IFS="$ac_save_ifs"
1878   test -z "$ac_cv_path_FIG2DEV" && ac_cv_path_FIG2DEV=""""
1879   ;;
1880 esac
1881 fi
1882 FIG2DEV="$ac_cv_path_FIG2DEV"
1883 if test -n "$FIG2DEV"; then
1884   echo "$ac_t""$FIG2DEV" 1>&6
1885 else
1886   echo "$ac_t""no" 1>&6
1887 fi
1888
1889 # Extract the first word of "jade", so it can be a program name with args.
1890 set dummy jade; ac_word=$2
1891 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1892 echo "configure:1893: checking for $ac_word" >&5
1893 if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then
1894   echo $ac_n "(cached) $ac_c" 1>&6
1895 else
1896   case "$JADE" in
1897   /*)
1898   ac_cv_path_JADE="$JADE" # Let the user override the test with a path.
1899   ;;
1900   ?:/*)                  
1901   ac_cv_path_JADE="$JADE" # Let the user override the test with a dos path.
1902   ;;
1903   *)
1904   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1905   ac_dummy="$PATH"
1906   for ac_dir in $ac_dummy; do 
1907     test -z "$ac_dir" && ac_dir=.
1908     if test -f $ac_dir/$ac_word; then
1909       ac_cv_path_JADE="$ac_dir/$ac_word"
1910       break
1911     fi
1912   done
1913   IFS="$ac_save_ifs"
1914   test -z "$ac_cv_path_JADE" && ac_cv_path_JADE=""""
1915   ;;
1916 esac
1917 fi
1918 JADE="$ac_cv_path_JADE"
1919 if test -n "$JADE"; then
1920   echo "$ac_t""$JADE" 1>&6
1921 else
1922   echo "$ac_t""no" 1>&6
1923 fi
1924
1925 # Extract the first word of "jadetex", so it can be a program name with args.
1926 set dummy jadetex; ac_word=$2
1927 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1928 echo "configure:1929: checking for $ac_word" >&5
1929 if eval "test \"`echo '$''{'ac_cv_path_JADETEX'+set}'`\" = set"; then
1930   echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932   case "$JADETEX" in
1933   /*)
1934   ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a path.
1935   ;;
1936   ?:/*)                  
1937   ac_cv_path_JADETEX="$JADETEX" # Let the user override the test with a dos path.
1938   ;;
1939   *)
1940   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1941   ac_dummy="$PATH"
1942   for ac_dir in $ac_dummy; do 
1943     test -z "$ac_dir" && ac_dir=.
1944     if test -f $ac_dir/$ac_word; then
1945       ac_cv_path_JADETEX="$ac_dir/$ac_word"
1946       break
1947     fi
1948   done
1949   IFS="$ac_save_ifs"
1950   test -z "$ac_cv_path_JADETEX" && ac_cv_path_JADETEX=""""
1951   ;;
1952 esac
1953 fi
1954 JADETEX="$ac_cv_path_JADETEX"
1955 if test -n "$JADETEX"; then
1956   echo "$ac_t""$JADETEX" 1>&6
1957 else
1958   echo "$ac_t""no" 1>&6
1959 fi
1960
1961
1962
1963
1964
1965 trap '' 1 2 15
1966 cat > confcache <<\EOF
1967 # This file is a shell script that caches the results of configure
1968 # tests run on this system so they can be shared between configure
1969 # scripts and configure runs.  It is not useful on other systems.
1970 # If it contains results you don't want to keep, you may remove or edit it.
1971 #
1972 # By default, configure uses ./config.cache as the cache file,
1973 # creating it if it does not exist already.  You can give configure
1974 # the --cache-file=FILE option to use a different cache file; that is
1975 # what configure does when it calls configure scripts in
1976 # subdirectories, so they share the cache.
1977 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1978 # config.status only pays attention to the cache file if you give it the
1979 # --recheck option to rerun configure.
1980 #
1981 EOF
1982 # The following way of writing the cache mishandles newlines in values,
1983 # but we know of no workaround that is simple, portable, and efficient.
1984 # So, don't put newlines in cache variables' values.
1985 # Ultrix sh set writes to stderr and can't be redirected directly,
1986 # and sets the high bit in the cache file unless we assign to the vars.
1987 (set) 2>&1 |
1988   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1989   *ac_space=\ *)
1990     # `set' does not quote correctly, so add quotes (double-quote substitution
1991     # turns \\\\ into \\, and sed turns \\ into \).
1992     sed -n \
1993       -e "s/'/'\\\\''/g" \
1994       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1995     ;;
1996   *)
1997     # `set' quotes correctly as required by POSIX, so do not add quotes.
1998     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1999     ;;
2000   esac >> confcache
2001 if cmp -s $cache_file confcache; then
2002   :
2003 else
2004   if test -w $cache_file; then
2005     echo "updating cache $cache_file"
2006     cat confcache > $cache_file
2007   else
2008     echo "not updating unwritable cache $cache_file"
2009   fi
2010 fi
2011 rm -f confcache
2012
2013 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2014
2015 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2016 # Let make expand exec_prefix.
2017 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2018
2019 # Any assignment to VPATH causes Sun make to only execute
2020 # the first set of double-colon rules, so remove it if not needed.
2021 # If there is a colon in the path, we need to keep it.
2022 if test "x$srcdir" = x.; then
2023   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2024 fi
2025
2026 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2027
2028 DEFS=-DHAVE_CONFIG_H
2029
2030 # Without the "./", some shells look in PATH for config.status.
2031 : ${CONFIG_STATUS=./config.status}
2032
2033 echo creating $CONFIG_STATUS
2034 rm -f $CONFIG_STATUS
2035 cat > $CONFIG_STATUS <<EOF
2036 #! /bin/sh
2037 # Generated automatically by configure.
2038 # Run this file to recreate the current configuration.
2039 # This directory was configured as follows,
2040 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2041 #
2042 # $0 $ac_configure_args
2043 #
2044 # Compiler output produced by configure, useful for debugging
2045 # configure, is in ./config.log if it exists.
2046
2047 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2048 for ac_option
2049 do
2050   case "\$ac_option" in
2051   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2052     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2053     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2054   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2055     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2056     exit 0 ;;
2057   -help | --help | --hel | --he | --h)
2058     echo "\$ac_cs_usage"; exit 0 ;;
2059   *) echo "\$ac_cs_usage"; exit 1 ;;
2060   esac
2061 done
2062
2063 ac_given_srcdir=$srcdir
2064 ac_given_INSTALL="$INSTALL"
2065
2066 trap 'rm -fr `echo "Makefile src/Makefile check/Makefile ginsh/Makefile doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2067 EOF
2068 cat >> $CONFIG_STATUS <<EOF
2069
2070 # Protect against being on the right side of a sed subst in config.status.
2071 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2072  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2073 $ac_vpsub
2074 $extrasub
2075 s%@SHELL@%$SHELL%g
2076 s%@CFLAGS@%$CFLAGS%g
2077 s%@CPPFLAGS@%$CPPFLAGS%g
2078 s%@CXXFLAGS@%$CXXFLAGS%g
2079 s%@FFLAGS@%$FFLAGS%g
2080 s%@DEFS@%$DEFS%g
2081 s%@LDFLAGS@%$LDFLAGS%g
2082 s%@LIBS@%$LIBS%g
2083 s%@exec_prefix@%$exec_prefix%g
2084 s%@prefix@%$prefix%g
2085 s%@program_transform_name@%$program_transform_name%g
2086 s%@bindir@%$bindir%g
2087 s%@sbindir@%$sbindir%g
2088 s%@libexecdir@%$libexecdir%g
2089 s%@datadir@%$datadir%g
2090 s%@sysconfdir@%$sysconfdir%g
2091 s%@sharedstatedir@%$sharedstatedir%g
2092 s%@localstatedir@%$localstatedir%g
2093 s%@libdir@%$libdir%g
2094 s%@includedir@%$includedir%g
2095 s%@oldincludedir@%$oldincludedir%g
2096 s%@infodir@%$infodir%g
2097 s%@mandir@%$mandir%g
2098 s%@CXX@%$CXX%g
2099 s%@CXXCPP@%$CXXCPP%g
2100 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2101 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2102 s%@INSTALL_DATA@%$INSTALL_DATA%g
2103 s%@MAKEDEPEND@%$MAKEDEPEND%g
2104 s%@LIBTOOL@%$LIBTOOL%g
2105 s%@LEX@%$LEX%g
2106 s%@LEXLIB@%$LEXLIB%g
2107 s%@YACC@%$YACC%g
2108 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2109 s%@DOXYGEN@%$DOXYGEN%g
2110 s%@LATEX@%$LATEX%g
2111 s%@MAKEINDEX@%$MAKEINDEX%g
2112 s%@DVIPS@%$DVIPS%g
2113 s%@FIG2DEV@%$FIG2DEV%g
2114 s%@JADE@%$JADE%g
2115 s%@JADETEX@%$JADETEX%g
2116 s%@shared@%$shared%g
2117 s%@LibGiNaC_Ver@%$LibGiNaC_Ver%g
2118
2119 CEOF
2120 EOF
2121
2122 cat >> $CONFIG_STATUS <<\EOF
2123
2124 # Split the substitutions into bite-sized pieces for seds with
2125 # small command number limits, like on Digital OSF/1 and HP-UX.
2126 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2127 ac_file=1 # Number of current file.
2128 ac_beg=1 # First line for current file.
2129 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2130 ac_more_lines=:
2131 ac_sed_cmds=""
2132 while $ac_more_lines; do
2133   if test $ac_beg -gt 1; then
2134     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2135   else
2136     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2137   fi
2138   if test ! -s conftest.s$ac_file; then
2139     ac_more_lines=false
2140     rm -f conftest.s$ac_file
2141   else
2142     if test -z "$ac_sed_cmds"; then
2143       ac_sed_cmds="sed -f conftest.s$ac_file"
2144     else
2145       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2146     fi
2147     ac_file=`expr $ac_file + 1`
2148     ac_beg=$ac_end
2149     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2150   fi
2151 done
2152 if test -z "$ac_sed_cmds"; then
2153   ac_sed_cmds=cat
2154 fi
2155 EOF
2156
2157 cat >> $CONFIG_STATUS <<EOF
2158
2159 CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile check/Makefile ginsh/Makefile doc/Makefile"}
2160 EOF
2161 cat >> $CONFIG_STATUS <<\EOF
2162 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2163   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2164   case "$ac_file" in
2165   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2166        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2167   *) ac_file_in="${ac_file}.in" ;;
2168   esac
2169
2170   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2171
2172   # Remove last slash and all that follows it.  Not all systems have dirname.
2173   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2174   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2175     # The file is in a subdirectory.
2176     test ! -d "$ac_dir" && mkdir "$ac_dir"
2177     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2178     # A "../" for each directory in $ac_dir_suffix.
2179     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2180   else
2181     ac_dir_suffix= ac_dots=
2182   fi
2183
2184   case "$ac_given_srcdir" in
2185   .)  srcdir=.
2186       if test -z "$ac_dots"; then top_srcdir=.
2187       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2188   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2189   *) # Relative path.
2190     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2191     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2192   esac
2193
2194   case "$ac_given_INSTALL" in
2195   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2196   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2197   esac
2198
2199   echo creating "$ac_file"
2200   rm -f "$ac_file"
2201   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2202   case "$ac_file" in
2203   *Makefile*) ac_comsub="1i\\
2204 # $configure_input" ;;
2205   *) ac_comsub= ;;
2206   esac
2207
2208   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2209   sed -e "$ac_comsub
2210 s%@configure_input@%$configure_input%g
2211 s%@srcdir@%$srcdir%g
2212 s%@top_srcdir@%$top_srcdir%g
2213 s%@INSTALL@%$INSTALL%g
2214 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2215 fi; done
2216 rm -f conftest.s*
2217
2218 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2219 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2220 #
2221 # ac_d sets the value in "#define NAME VALUE" lines.
2222 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2223 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2224 ac_dC='\3'
2225 ac_dD='%g'
2226 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2227 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2228 ac_uB='\([      ]\)%\1#\2define\3'
2229 ac_uC=' '
2230 ac_uD='\4%g'
2231 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2232 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2233 ac_eB='$%\1#\2define\3'
2234 ac_eC=' '
2235 ac_eD='%g'
2236
2237 if test "${CONFIG_HEADERS+set}" != set; then
2238 EOF
2239 cat >> $CONFIG_STATUS <<EOF
2240   CONFIG_HEADERS="config.h"
2241 EOF
2242 cat >> $CONFIG_STATUS <<\EOF
2243 fi
2244 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2245   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2246   case "$ac_file" in
2247   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2248        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2249   *) ac_file_in="${ac_file}.in" ;;
2250   esac
2251
2252   echo creating $ac_file
2253
2254   rm -f conftest.frag conftest.in conftest.out
2255   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2256   cat $ac_file_inputs > conftest.in
2257
2258 EOF
2259
2260 # Transform confdefs.h into a sed script conftest.vals that substitutes
2261 # the proper values into config.h.in to produce config.h.  And first:
2262 # Protect against being on the right side of a sed subst in config.status.
2263 # Protect against being in an unquoted here document in config.status.
2264 rm -f conftest.vals
2265 cat > conftest.hdr <<\EOF
2266 s/[\\&%]/\\&/g
2267 s%[\\$`]%\\&%g
2268 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2269 s%ac_d%ac_u%gp
2270 s%ac_u%ac_e%gp
2271 EOF
2272 sed -n -f conftest.hdr confdefs.h > conftest.vals
2273 rm -f conftest.hdr
2274
2275 # This sed command replaces #undef with comments.  This is necessary, for
2276 # example, in the case of _POSIX_SOURCE, which is predefined and required
2277 # on some systems where configure will not decide to define it.
2278 cat >> conftest.vals <<\EOF
2279 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2280 EOF
2281
2282 # Break up conftest.vals because some shells have a limit on
2283 # the size of here documents, and old seds have small limits too.
2284
2285 rm -f conftest.tail
2286 while :
2287 do
2288   ac_lines=`grep -c . conftest.vals`
2289   # grep -c gives empty output for an empty file on some AIX systems.
2290   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2291   # Write a limited-size here document to conftest.frag.
2292   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2293   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2294   echo 'CEOF
2295   sed -f conftest.frag conftest.in > conftest.out
2296   rm -f conftest.in
2297   mv conftest.out conftest.in
2298 ' >> $CONFIG_STATUS
2299   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2300   rm -f conftest.vals
2301   mv conftest.tail conftest.vals
2302 done
2303 rm -f conftest.vals
2304
2305 cat >> $CONFIG_STATUS <<\EOF
2306   rm -f conftest.frag conftest.h
2307   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2308   cat conftest.in >> conftest.h
2309   rm -f conftest.in
2310   if cmp -s $ac_file conftest.h 2>/dev/null; then
2311     echo "$ac_file is unchanged"
2312     rm -f conftest.h
2313   else
2314     # Remove last slash and all that follows it.  Not all systems have dirname.
2315       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2316       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2317       # The file is in a subdirectory.
2318       test ! -d "$ac_dir" && mkdir "$ac_dir"
2319     fi
2320     rm -f $ac_file
2321     mv conftest.h $ac_file
2322   fi
2323 fi; done
2324
2325 EOF
2326 cat >> $CONFIG_STATUS <<EOF
2327
2328 EOF
2329 cat >> $CONFIG_STATUS <<\EOF
2330
2331 exit 0
2332 EOF
2333 chmod +x $CONFIG_STATUS
2334 rm -fr confdefs* $ac_clean_files
2335 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2336
2337 echo "now type make"