source: git/factory/configure @ 42faf1

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