source: git/factory/configure @ f0596e

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