source: git/factory/configure @ 63be42

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