source: git/factory/configure @ d3ff79

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