source: git/factory/configure @ 8c28d07

spielwiese
Last change on this file since 8c28d07 was 8c28d07, checked in by Jens Schmidt <schmidt@…>, 27 years ago
* configure: configure.in changed git-svn-id: file:///usr/local/Singular/svn/trunk@878 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 69.4 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.3b"
564factory_configuration="'$ac_configure_args' in `pwd`"
565
566#
567# - check withs and enables.
568#
569# Check whether --with-memman or --without-memman was given.
570if test "${with_memman+set}" = set; then
571  withval="$with_memman"
572  :
573else
574   if test "x$with_Singular" = xyes; then
575      with_memman=no
576    else
577      with_memman=old
578    fi
579fi
580
581
582# font-lock-trick: '
583
584# Check whether --with-gmp or --without-gmp was given.
585if test "${with_gmp+set}" = set; then
586  withval="$with_gmp"
587  :
588fi
589
590
591# Check whether --with-Singular or --without-Singular was given.
592if test "${with_Singular+set}" = set; then
593  withval="$with_Singular"
594  :
595else
596  with_Singular=no
597fi
598
599
600# Check whether --enable-streamio or --disable-streamio was given.
601if test "${enable_streamio+set}" = set; then
602  enableval="$enable_streamio"
603  :
604else
605   if test "x$with_Singular" = xyes; then
606      enable_streamio=no
607    else
608      enable_streamio=yes
609    fi
610fi
611
612
613# Check whether --enable-memdebug or --disable-memdebug was given.
614if test "${enable_memdebug+set}" = set; then
615  enableval="$enable_memdebug"
616  :
617else
618  enable_memdebug=no
619fi
620
621
622# Check whether --enable-assertions or --disable-assertions was given.
623if test "${enable_assertions+set}" = set; then
624  enableval="$enable_assertions"
625  :
626else
627  enable_assertions=no
628fi
629
630
631# Check whether --enable-timing or --disable-timing was given.
632if test "${enable_timing+set}" = set; then
633  enableval="$enable_timing"
634  :
635else
636  enable_timing=no
637fi
638
639
640# Check whether --enable-debugoutput or --disable-debugoutput was given.
641if test "${enable_debugoutput+set}" = set; then
642  enableval="$enable_debugoutput"
643  :
644else
645  enable_debugoutput=no
646fi
647
648
649# an ugly tribute to Singular
650# Check whether --enable-gmp or --disable-gmp was given.
651if test "${enable_gmp+set}" = set; then
652  enableval="$enable_gmp"
653   if test "x$with_Singular" = xyes && test "x$enable_gmp" != xno; then
654      with_gmp='$(includedir)'
655    fi
656fi
657
658
659#
660# - check the results of --with-gmp.
661#
662case "$with_gmp" in
663  yes|no|"")
664    gmp_in_installation=no ;;
665  '$(includedir)'|'${includedir}')
666    gmp_in_installation=yes ;;
667  *,*)
668    saveIFS="$IFS"; IFS="${IFS},"
669    set dummy $with_gmp
670    IFS="$saveIFS"
671    CPPFLAGS="-I$2 $CPPFLAGS"
672    LDFLAGS="-L$3 $LDFLAGS"
673    gmp_in_installation=no ;;
674  *)
675    CPPFLAGS="-I$with_gmp $CPPFLAGS"
676    LDFLAGS="-L$with_gmp/../lib $LDFLAGS"
677    gmp_in_installation=no ;;
678esac
679
680#
681# - check for CC and CXX but be careful about CFLAGS.
682#
683test "${CFLAGS+set}" = set || cflags_expl_set=no
684# Extract the first word of "gcc", so it can be a program name with args.
685set dummy gcc; ac_word=$2
686echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
687if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
688  echo $ac_n "(cached) $ac_c" 1>&6
689else
690  if test -n "$CC"; then
691  ac_cv_prog_CC="$CC" # Let the user override the test.
692else
693  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
694  for ac_dir in $PATH; do
695    test -z "$ac_dir" && ac_dir=.
696    if test -f $ac_dir/$ac_word; then
697      ac_cv_prog_CC="gcc"
698      break
699    fi
700  done
701  IFS="$ac_save_ifs"
702fi
703fi
704CC="$ac_cv_prog_CC"
705if test -n "$CC"; then
706  echo "$ac_t""$CC" 1>&6
707else
708  echo "$ac_t""no" 1>&6
709fi
710
711if test -z "$CC"; then
712  # Extract the first word of "cc", so it can be a program name with args.
713set dummy cc; ac_word=$2
714echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
716  echo $ac_n "(cached) $ac_c" 1>&6
717else
718  if test -n "$CC"; then
719  ac_cv_prog_CC="$CC" # Let the user override the test.
720else
721  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
722  ac_prog_rejected=no
723  for ac_dir in $PATH; do
724    test -z "$ac_dir" && ac_dir=.
725    if test -f $ac_dir/$ac_word; then
726      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
727        ac_prog_rejected=yes
728        continue
729      fi
730      ac_cv_prog_CC="cc"
731      break
732    fi
733  done
734  IFS="$ac_save_ifs"
735if test $ac_prog_rejected = yes; then
736  # We found a bogon in the path, so make sure we never use it.
737  set dummy $ac_cv_prog_CC
738  shift
739  if test $# -gt 0; then
740    # We chose a different compiler from the bogus one.
741    # However, it has the same basename, so the bogon will be chosen
742    # first if we set CC to just the basename; use the full file name.
743    shift
744    set dummy "$ac_dir/$ac_word" "$@"
745    shift
746    ac_cv_prog_CC="$@"
747  fi
748fi
749fi
750fi
751CC="$ac_cv_prog_CC"
752if test -n "$CC"; then
753  echo "$ac_t""$CC" 1>&6
754else
755  echo "$ac_t""no" 1>&6
756fi
757
758  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
759fi
760
761echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
762if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
763  echo $ac_n "(cached) $ac_c" 1>&6
764else
765  cat > conftest.c <<EOF
766#ifdef __GNUC__
767  yes;
768#endif
769EOF
770if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
771  ac_cv_prog_gcc=yes
772else
773  ac_cv_prog_gcc=no
774fi
775fi
776
777echo "$ac_t""$ac_cv_prog_gcc" 1>&6
778if test $ac_cv_prog_gcc = yes; then
779  GCC=yes
780  if test "${CFLAGS+set}" != set; then
781    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
782if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
783  echo $ac_n "(cached) $ac_c" 1>&6
784else
785  echo 'void f(){}' > conftest.c
786if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
787  ac_cv_prog_gcc_g=yes
788else
789  ac_cv_prog_gcc_g=no
790fi
791rm -f conftest*
792
793fi
794
795echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
796    if test $ac_cv_prog_gcc_g = yes; then
797      CFLAGS="-g -O"
798    else
799      CFLAGS="-O"
800    fi
801  fi
802else
803  GCC=
804  test "${CFLAGS+set}" = set || CFLAGS="-g"
805fi
806
807test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
808for ac_prog in $CCC c++ g++ gcc CC cxx
809do
810# Extract the first word of "$ac_prog", so it can be a program name with args.
811set dummy $ac_prog; ac_word=$2
812echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
813if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
814  echo $ac_n "(cached) $ac_c" 1>&6
815else
816  if test -n "$CXX"; then
817  ac_cv_prog_CXX="$CXX" # Let the user override the test.
818else
819  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
820  for ac_dir in $PATH; do
821    test -z "$ac_dir" && ac_dir=.
822    if test -f $ac_dir/$ac_word; then
823      ac_cv_prog_CXX="$ac_prog"
824      break
825    fi
826  done
827  IFS="$ac_save_ifs"
828fi
829fi
830CXX="$ac_cv_prog_CXX"
831if test -n "$CXX"; then
832  echo "$ac_t""$CXX" 1>&6
833else
834  echo "$ac_t""no" 1>&6
835fi
836
837test -n "$CXX" && break
838done
839test -n "$CXX" || CXX="gcc"
840
841
842echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
843if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
844  echo $ac_n "(cached) $ac_c" 1>&6
845else
846  cat > conftest.C <<EOF
847#ifdef __GNUC__
848  yes;
849#endif
850EOF
851if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
852  ac_cv_prog_gxx=yes
853else
854  ac_cv_prog_gxx=no
855fi
856fi
857
858echo "$ac_t""$ac_cv_prog_gxx" 1>&6
859if test $ac_cv_prog_gxx = yes; then
860  GXX=yes
861  if test "${CXXFLAGS+set}" != set; then
862    echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
863if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
864  echo $ac_n "(cached) $ac_c" 1>&6
865else
866  echo 'void f(){}' > conftest.cc
867if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
868  ac_cv_prog_gxx_g=yes
869else
870  ac_cv_prog_gxx_g=no
871fi
872rm -f conftest*
873
874fi
875
876echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6
877    if test $ac_cv_prog_gxx_g = yes; then
878      CXXFLAGS="-g -O"
879    else
880      CXXFLAGS="-O"
881    fi
882  fi
883else
884  GXX=
885  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
886fi
887
888if test "x$GCC" != xyes && test "x$GXX" != xyes; then
889  echo "configure: warning: you better use gcc to compile Factory" 1>&2
890else
891  if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
892    echo "configure: warning: we will use \`-O2 -fomit-frame-pointer' as default for \`CXXFLAGS'
893                    (instead of the configure default \`-g -O')" 1>&2
894  fi
895  if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
896    echo "configure: warning: we will use \`-O2 -fomit-frame-pointer' as default for \`CFLAGS'
897                    (instead of the configure default \`-g -O')" 1>&2
898  fi
899fi
900
901#
902# - check for some other programs.
903#
904echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
905# On Suns, sometimes $CPP names a directory.
906if test -n "$CPP" && test -d "$CPP"; then
907  CPP=
908fi
909if test -z "$CPP"; then
910if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
911  echo $ac_n "(cached) $ac_c" 1>&6
912else
913    # This must be in double quotes, not single quotes, because CPP may get
914  # substituted into the Makefile and "${CC-cc}" will confuse make.
915  CPP="${CC-cc} -E"
916  # On the NeXT, cc -E runs the code through the compiler's parser,
917  # not just through cpp.
918  cat > conftest.$ac_ext <<EOF
919#line 920 "configure"
920#include "confdefs.h"
921#include <assert.h>
922Syntax Error
923EOF
924ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
925{ (eval echo configure:926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
926ac_err=`grep -v '^ *+' conftest.out`
927if test -z "$ac_err"; then
928  :
929else
930  echo "$ac_err" >&5
931  rm -rf conftest*
932  CPP="${CC-cc} -E -traditional-cpp"
933  cat > conftest.$ac_ext <<EOF
934#line 935 "configure"
935#include "confdefs.h"
936#include <assert.h>
937Syntax Error
938EOF
939ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
940{ (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
941ac_err=`grep -v '^ *+' conftest.out`
942if test -z "$ac_err"; then
943  :
944else
945  echo "$ac_err" >&5
946  rm -rf conftest*
947  CPP=/lib/cpp
948fi
949rm -f conftest*
950fi
951rm -f conftest*
952  ac_cv_prog_CPP="$CPP"
953fi
954  CPP="$ac_cv_prog_CPP"
955else
956  ac_cv_prog_CPP="$CPP"
957fi
958echo "$ac_t""$CPP" 1>&6
959
960echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
961if test -z "$CXXCPP"; then
962if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
963  echo $ac_n "(cached) $ac_c" 1>&6
964else
965  ac_ext=C
966# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
967ac_cpp='$CXXCPP $CPPFLAGS'
968ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
969ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
970  CXXCPP="${CXX-g++} -E"
971  cat > conftest.$ac_ext <<EOF
972#line 973 "configure"
973#include "confdefs.h"
974#include <stdlib.h>
975EOF
976ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
977{ (eval echo configure:978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
978ac_err=`grep -v '^ *+' conftest.out`
979if test -z "$ac_err"; then
980  :
981else
982  echo "$ac_err" >&5
983  rm -rf conftest*
984  CXXCPP=/lib/cpp
985fi
986rm -f conftest*
987  ac_cv_prog_CXXCPP="$CXXCPP"
988ac_ext=c
989# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
990ac_cpp='$CPP $CPPFLAGS'
991ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
992ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
993fi
994fi
995CXXCPP="$ac_cv_prog_CXXCPP"
996echo "$ac_t""$CXXCPP" 1>&6
997
998echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
999if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1000  echo $ac_n "(cached) $ac_c" 1>&6
1001else
1002  rm -f conftestdata
1003if ln -s X conftestdata 2>/dev/null
1004then
1005  rm -f conftestdata
1006  ac_cv_prog_LN_S="ln -s"
1007else
1008  ac_cv_prog_LN_S=ln
1009fi
1010fi
1011LN_S="$ac_cv_prog_LN_S"
1012if test "$ac_cv_prog_LN_S" = "ln -s"; then
1013  echo "$ac_t""yes" 1>&6
1014else
1015  echo "$ac_t""no" 1>&6
1016fi
1017
1018# Find a good install program.  We prefer a C program (faster),
1019# so one script is as good as another.  But avoid the broken or
1020# incompatible versions:
1021# SysV /etc/install, /usr/sbin/install
1022# SunOS /usr/etc/install
1023# IRIX /sbin/install
1024# AIX /bin/install
1025# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1026# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1027# ./install, which can be erroneously created by make from ./install.sh.
1028echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1029if test -z "$INSTALL"; then
1030if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1031  echo $ac_n "(cached) $ac_c" 1>&6
1032else
1033    IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1034  for ac_dir in $PATH; do
1035    # Account for people who put trailing slashes in PATH elements.
1036    case "$ac_dir/" in
1037    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1038    *)
1039      # OSF1 and SCO ODT 3.0 have their own names for install.
1040      for ac_prog in ginstall installbsd scoinst install; do
1041        if test -f $ac_dir/$ac_prog; then
1042          if test $ac_prog = install &&
1043            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1044            # AIX install.  It has an incompatible calling convention.
1045            # OSF/1 installbsd also uses dspmsg, but is usable.
1046            :
1047          else
1048            ac_cv_path_install="$ac_dir/$ac_prog -c"
1049            break 2
1050          fi
1051        fi
1052      done
1053      ;;
1054    esac
1055  done
1056  IFS="$ac_save_ifs"
1057
1058fi
1059  if test "${ac_cv_path_install+set}" = set; then
1060    INSTALL="$ac_cv_path_install"
1061  else
1062    # As a last resort, use the slow shell script.  We don't cache a
1063    # path for INSTALL within a source directory, because that will
1064    # break other packages using the cache if that directory is
1065    # removed, or if the path is relative.
1066    INSTALL="$ac_install_sh"
1067  fi
1068fi
1069echo "$ac_t""$INSTALL" 1>&6
1070
1071# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1072# It thinks the first close brace ends the variable substitution.
1073test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1074
1075test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1076
1077# Extract the first word of "ranlib", so it can be a program name with args.
1078set dummy ranlib; ac_word=$2
1079echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1080if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1081  echo $ac_n "(cached) $ac_c" 1>&6
1082else
1083  if test -n "$RANLIB"; then
1084  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1085else
1086  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1087  for ac_dir in $PATH; do
1088    test -z "$ac_dir" && ac_dir=.
1089    if test -f $ac_dir/$ac_word; then
1090      ac_cv_prog_RANLIB="ranlib"
1091      break
1092    fi
1093  done
1094  IFS="$ac_save_ifs"
1095  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1096fi
1097fi
1098RANLIB="$ac_cv_prog_RANLIB"
1099if test -n "$RANLIB"; then
1100  echo "$ac_t""$RANLIB" 1>&6
1101else
1102  echo "$ac_t""no" 1>&6
1103fi
1104
1105echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1106set dummy ${MAKE-make}; ac_make=$2
1107if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1108  echo $ac_n "(cached) $ac_c" 1>&6
1109else
1110  cat > conftestmake <<\EOF
1111all:
1112        @echo 'ac_maketemp="${MAKE}"'
1113EOF
1114# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1115eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1116if test -n "$ac_maketemp"; then
1117  eval ac_cv_prog_make_${ac_make}_set=yes
1118else
1119  eval ac_cv_prog_make_${ac_make}_set=no
1120fi
1121rm -f conftestmake
1122fi
1123if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1124  echo "$ac_t""yes" 1>&6
1125  SET_MAKE=
1126else
1127  echo "$ac_t""no" 1>&6
1128  SET_MAKE="MAKE=${MAKE-make}"
1129fi
1130
1131# Extract the first word of "ar", so it can be a program name with args.
1132set dummy ar; ac_word=$2
1133echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1134if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1135  echo $ac_n "(cached) $ac_c" 1>&6
1136else
1137  if test -n "$AR"; then
1138  ac_cv_prog_AR="$AR" # Let the user override the test.
1139else
1140  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1141  for ac_dir in $PATH; do
1142    test -z "$ac_dir" && ac_dir=.
1143    if test -f $ac_dir/$ac_word; then
1144      ac_cv_prog_AR="ar"
1145      break
1146    fi
1147  done
1148  IFS="$ac_save_ifs"
1149  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="where-is-your-ar"
1150fi
1151fi
1152AR="$ac_cv_prog_AR"
1153if test -n "$AR"; then
1154  echo "$ac_t""$AR" 1>&6
1155else
1156  echo "$ac_t""no" 1>&6
1157fi
1158
1159# Extract the first word of "m4", so it can be a program name with args.
1160set dummy m4; ac_word=$2
1161echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1162if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
1163  echo $ac_n "(cached) $ac_c" 1>&6
1164else
1165  if test -n "$M4"; then
1166  ac_cv_prog_M4="$M4" # Let the user override the test.
1167else
1168  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1169  for ac_dir in $PATH; do
1170    test -z "$ac_dir" && ac_dir=.
1171    if test -f $ac_dir/$ac_word; then
1172      ac_cv_prog_M4="m4"
1173      break
1174    fi
1175  done
1176  IFS="$ac_save_ifs"
1177  test -z "$ac_cv_prog_M4" && ac_cv_prog_M4="where-is-your-m4"
1178fi
1179fi
1180M4="$ac_cv_prog_M4"
1181if test -n "$M4"; then
1182  echo "$ac_t""$M4" 1>&6
1183else
1184  echo "$ac_t""no" 1>&6
1185fi
1186
1187# Extract the first word of "bison", so it can be a program name with args.
1188set dummy bison; ac_word=$2
1189echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1190if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
1191  echo $ac_n "(cached) $ac_c" 1>&6
1192else
1193  if test -n "$BISON"; then
1194  ac_cv_prog_BISON="$BISON" # Let the user override the test.
1195else
1196  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1197  for ac_dir in $PATH; do
1198    test -z "$ac_dir" && ac_dir=.
1199    if test -f $ac_dir/$ac_word; then
1200      ac_cv_prog_BISON="bison"
1201      break
1202    fi
1203  done
1204  IFS="$ac_save_ifs"
1205  test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="where-is-your-bison"
1206fi
1207fi
1208BISON="$ac_cv_prog_BISON"
1209if test -n "$BISON"; then
1210  echo "$ac_t""$BISON" 1>&6
1211else
1212  echo "$ac_t""no" 1>&6
1213fi
1214
1215
1216# get absolute path of srcdir to avoid some funny problems when
1217# feeding our results to other peoples configure via cache
1218if echo "$srcdir" | grep '^/' > /dev/null 2> /dev/null; then
1219  abssrcdir="$srcdir"
1220else
1221  abssrcdir="`pwd`/$srcdir"
1222fi
1223# Extract the first word of "mkinstalldirs", so it can be a program name with args.
1224set dummy mkinstalldirs; ac_word=$2
1225echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1226if eval "test \"`echo '$''{'ac_cv_path_MKINSTALLDIRS'+set}'`\" = set"; then
1227  echo $ac_n "(cached) $ac_c" 1>&6
1228else
1229  case "$MKINSTALLDIRS" in
1230  /*)
1231  ac_cv_path_MKINSTALLDIRS="$MKINSTALLDIRS" # Let the user override the test with a path.
1232  ;;
1233  *)
1234  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1235  for ac_dir in $PATH:$abssrcdir/bin; do
1236    test -z "$ac_dir" && ac_dir=.
1237    if test -f $ac_dir/$ac_word; then
1238      ac_cv_path_MKINSTALLDIRS="$ac_dir/$ac_word"
1239      break
1240    fi
1241  done
1242  IFS="$ac_save_ifs"
1243  test -z "$ac_cv_path_MKINSTALLDIRS" && ac_cv_path_MKINSTALLDIRS="-mkdir"
1244  ;;
1245esac
1246fi
1247MKINSTALLDIRS="$ac_cv_path_MKINSTALLDIRS"
1248if test -n "$MKINSTALLDIRS"; then
1249  echo "$ac_t""$MKINSTALLDIRS" 1>&6
1250else
1251  echo "$ac_t""no" 1>&6
1252fi
1253
1254# Extract the first word of "makeheader", so it can be a program name with args.
1255set dummy makeheader; ac_word=$2
1256echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1257if eval "test \"`echo '$''{'ac_cv_path_MAKEHEADER'+set}'`\" = set"; then
1258  echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260  case "$MAKEHEADER" in
1261  /*)
1262  ac_cv_path_MAKEHEADER="$MAKEHEADER" # Let the user override the test with a path.
1263  ;;
1264  *)
1265  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1266  for ac_dir in $abssrcdir/bin:$PATH; do
1267    test -z "$ac_dir" && ac_dir=.
1268    if test -f $ac_dir/$ac_word; then
1269      ac_cv_path_MAKEHEADER="$ac_dir/$ac_word"
1270      break
1271    fi
1272  done
1273  IFS="$ac_save_ifs"
1274  ;;
1275esac
1276fi
1277MAKEHEADER="$ac_cv_path_MAKEHEADER"
1278if test -n "$MAKEHEADER"; then
1279  echo "$ac_t""$MAKEHEADER" 1>&6
1280else
1281  echo "$ac_t""no" 1>&6
1282fi
1283
1284
1285#
1286# - check for libraries.
1287#
1288if test "x$gmp_in_installation" != xyes; then
1289  echo $ac_n "checking for -lgmp""... $ac_c" 1>&6
1290ac_lib_var=`echo gmp'_'mpz_init | tr './+\055' '__p_'`
1291if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1292  echo $ac_n "(cached) $ac_c" 1>&6
1293else
1294  ac_save_LIBS="$LIBS"
1295LIBS="-lgmp  $LIBS"
1296cat > conftest.$ac_ext <<EOF
1297#line 1298 "configure"
1298#include "confdefs.h"
1299/* Override any gcc2 internal prototype to avoid an error.  */
1300/* We use char because int might match the return type of a gcc2
1301    builtin and then its argument prototype would still apply.  */
1302char mpz_init();
1303
1304int main() { return 0; }
1305int t() {
1306mpz_init()
1307; return 0; }
1308EOF
1309if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1310  rm -rf conftest*
1311  eval "ac_cv_lib_$ac_lib_var=yes"
1312else
1313  rm -rf conftest*
1314  eval "ac_cv_lib_$ac_lib_var=no"
1315fi
1316rm -f conftest*
1317LIBS="$ac_save_LIBS"
1318
1319fi
1320if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1321  echo "$ac_t""yes" 1>&6
1322    ac_tr_lib=HAVE_LIB`echo gmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1323  cat >> confdefs.h <<EOF
1324#define $ac_tr_lib 1
1325EOF
1326
1327  LIBS="-lgmp $LIBS"
1328
1329else
1330  echo "$ac_t""no" 1>&6
1331 { echo "configure: error: libgmp.a not found.  Use option --with-gmp to specify path" 1>&2; exit 1; }
1332fi
1333
1334fi
1335echo $ac_n "checking for -lm""... $ac_c" 1>&6
1336ac_lib_var=`echo m'_'sqrt | tr './+\055' '__p_'`
1337if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1338  echo $ac_n "(cached) $ac_c" 1>&6
1339else
1340  ac_save_LIBS="$LIBS"
1341LIBS="-lm  $LIBS"
1342cat > conftest.$ac_ext <<EOF
1343#line 1344 "configure"
1344#include "confdefs.h"
1345/* Override any gcc2 internal prototype to avoid an error.  */
1346/* We use char because int might match the return type of a gcc2
1347    builtin and then its argument prototype would still apply.  */
1348char sqrt();
1349
1350int main() { return 0; }
1351int t() {
1352sqrt()
1353; return 0; }
1354EOF
1355if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1356  rm -rf conftest*
1357  eval "ac_cv_lib_$ac_lib_var=yes"
1358else
1359  rm -rf conftest*
1360  eval "ac_cv_lib_$ac_lib_var=no"
1361fi
1362rm -f conftest*
1363LIBS="$ac_save_LIBS"
1364
1365fi
1366if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1367  echo "$ac_t""yes" 1>&6
1368    ac_tr_lib=HAVE_LIB`echo m | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1369  cat >> confdefs.h <<EOF
1370#define $ac_tr_lib 1
1371EOF
1372
1373  LIBS="-lm $LIBS"
1374
1375else
1376  echo "$ac_t""no" 1>&6
1377 { echo "configure: error: libm.a not found" 1>&2; exit 1; }
1378fi
1379
1380echo $ac_n "checking for -lg++""... $ac_c" 1>&6
1381ac_lib_var=`echo g++'_'strsignal | tr './+\055' '__p_'`
1382if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1383  echo $ac_n "(cached) $ac_c" 1>&6
1384else
1385  ac_save_LIBS="$LIBS"
1386LIBS="-lg++  $LIBS"
1387cat > conftest.$ac_ext <<EOF
1388#line 1389 "configure"
1389#include "confdefs.h"
1390/* Override any gcc2 internal prototype to avoid an error.  */
1391/* We use char because int might match the return type of a gcc2
1392    builtin and then its argument prototype would still apply.  */
1393char strsignal();
1394
1395int main() { return 0; }
1396int t() {
1397strsignal()
1398; return 0; }
1399EOF
1400if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1401  rm -rf conftest*
1402  eval "ac_cv_lib_$ac_lib_var=yes"
1403else
1404  rm -rf conftest*
1405  eval "ac_cv_lib_$ac_lib_var=no"
1406fi
1407rm -f conftest*
1408LIBS="$ac_save_LIBS"
1409
1410fi
1411if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1412  echo "$ac_t""yes" 1>&6
1413    ac_tr_lib=HAVE_LIB`echo g++ | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1414  cat >> confdefs.h <<EOF
1415#define $ac_tr_lib 1
1416EOF
1417
1418  LIBS="-lg++ $LIBS"
1419
1420else
1421  echo "$ac_t""no" 1>&6
1422 echo "configure: warning: libg++ not found.
1423                    You will not be able to build the Factory Test Environment
1424                    (though Factory itself should compile)" 1>&2
1425fi
1426
1427
1428#
1429# - check for header files.
1430#
1431ac_ext=C
1432# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1433ac_cpp='$CXXCPP $CPPFLAGS'
1434ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1435ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1436
1437
1438if test "x$gmp_in_installation" != xyes; then
1439  for ac_hdr in gmp.h
1440do
1441ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1442echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1443if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1444  echo $ac_n "(cached) $ac_c" 1>&6
1445else
1446  cat > conftest.$ac_ext <<EOF
1447#line 1448 "configure"
1448#include "confdefs.h"
1449#include <$ac_hdr>
1450EOF
1451ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1452{ (eval echo configure:1453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1453ac_err=`grep -v '^ *+' conftest.out`
1454if test -z "$ac_err"; then
1455  rm -rf conftest*
1456  eval "ac_cv_header_$ac_safe=yes"
1457else
1458  echo "$ac_err" >&5
1459  rm -rf conftest*
1460  eval "ac_cv_header_$ac_safe=no"
1461fi
1462rm -f conftest*
1463fi
1464if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1465  echo "$ac_t""yes" 1>&6
1466    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1467  cat >> confdefs.h <<EOF
1468#define $ac_tr_hdr 1
1469EOF
1470 
1471else
1472  echo "$ac_t""no" 1>&6
1473{ echo "configure: error: gmp.h not found.  Use option --with-gmp to specify path" 1>&2; exit 1; }
1474fi
1475done
1476
1477fi
1478
1479for ac_hdr in stdio.h stdlib.h string.h time.h math.h
1480do
1481ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1482echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1483if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1484  echo $ac_n "(cached) $ac_c" 1>&6
1485else
1486  cat > conftest.$ac_ext <<EOF
1487#line 1488 "configure"
1488#include "confdefs.h"
1489#include <$ac_hdr>
1490EOF
1491ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1492{ (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1493ac_err=`grep -v '^ *+' conftest.out`
1494if test -z "$ac_err"; then
1495  rm -rf conftest*
1496  eval "ac_cv_header_$ac_safe=yes"
1497else
1498  echo "$ac_err" >&5
1499  rm -rf conftest*
1500  eval "ac_cv_header_$ac_safe=no"
1501fi
1502rm -f conftest*
1503fi
1504if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1505  echo "$ac_t""yes" 1>&6
1506    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1507  cat >> confdefs.h <<EOF
1508#define $ac_tr_hdr 1
1509EOF
1510 
1511else
1512  echo "$ac_t""no" 1>&6
1513{ echo "configure: error: C header files not found" 1>&2; exit 1; }
1514fi
1515done
1516
1517
1518if test "x$enable_streamio" != xno; then
1519  for ac_hdr in iostream.h strstream.h fstream.h
1520do
1521ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1522echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1523if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1524  echo $ac_n "(cached) $ac_c" 1>&6
1525else
1526  cat > conftest.$ac_ext <<EOF
1527#line 1528 "configure"
1528#include "confdefs.h"
1529#include <$ac_hdr>
1530EOF
1531ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1532{ (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1533ac_err=`grep -v '^ *+' conftest.out`
1534if test -z "$ac_err"; then
1535  rm -rf conftest*
1536  eval "ac_cv_header_$ac_safe=yes"
1537else
1538  echo "$ac_err" >&5
1539  rm -rf conftest*
1540  eval "ac_cv_header_$ac_safe=no"
1541fi
1542rm -f conftest*
1543fi
1544if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1545  echo "$ac_t""yes" 1>&6
1546    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1547  cat >> confdefs.h <<EOF
1548#define $ac_tr_hdr 1
1549EOF
1550 
1551else
1552  echo "$ac_t""no" 1>&6
1553{ echo "configure: error: C++ header files not found" 1>&2; exit 1; }
1554fi
1555done
1556
1557  for ac_hdr in ctype.h
1558do
1559ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1560echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1561if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1562  echo $ac_n "(cached) $ac_c" 1>&6
1563else
1564  cat > conftest.$ac_ext <<EOF
1565#line 1566 "configure"
1566#include "confdefs.h"
1567#include <$ac_hdr>
1568EOF
1569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1570{ (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1571ac_err=`grep -v '^ *+' conftest.out`
1572if test -z "$ac_err"; then
1573  rm -rf conftest*
1574  eval "ac_cv_header_$ac_safe=yes"
1575else
1576  echo "$ac_err" >&5
1577  rm -rf conftest*
1578  eval "ac_cv_header_$ac_safe=no"
1579fi
1580rm -f conftest*
1581fi
1582if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1583  echo "$ac_t""yes" 1>&6
1584    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1585  cat >> confdefs.h <<EOF
1586#define $ac_tr_hdr 1
1587EOF
1588 
1589else
1590  echo "$ac_t""no" 1>&6
1591{ echo "configure: error: standard C header files not found" 1>&2; exit 1; }
1592fi
1593done
1594
1595
1596  # since the FTE will compile only with stream IO enabled we will not
1597  # check for the necessary header files if stream IO is disabled
1598  for ac_hdr in stdarg.h signal.h errno.h unistd.h GetOpt.h
1599do
1600ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1601echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1602if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1603  echo $ac_n "(cached) $ac_c" 1>&6
1604else
1605  cat > conftest.$ac_ext <<EOF
1606#line 1607 "configure"
1607#include "confdefs.h"
1608#include <$ac_hdr>
1609EOF
1610ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1611{ (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1612ac_err=`grep -v '^ *+' conftest.out`
1613if test -z "$ac_err"; then
1614  rm -rf conftest*
1615  eval "ac_cv_header_$ac_safe=yes"
1616else
1617  echo "$ac_err" >&5
1618  rm -rf conftest*
1619  eval "ac_cv_header_$ac_safe=no"
1620fi
1621rm -f conftest*
1622fi
1623if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1624  echo "$ac_t""yes" 1>&6
1625    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1626  cat >> confdefs.h <<EOF
1627#define $ac_tr_hdr 1
1628EOF
1629 
1630else
1631  echo "$ac_t""no" 1>&6
1632echo "configure: warning: C/C++ header files not found.
1633                    You will not be able to build the Factory Test Environment
1634                    (though Factory itself should compile)" 1>&2
1635fi
1636done
1637
1638fi
1639
1640if test "x$enable_timing" != xno; then
1641  for ac_hdr in sys/param.h sys/times.h
1642do
1643ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1644echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1645if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1646  echo $ac_n "(cached) $ac_c" 1>&6
1647else
1648  cat > conftest.$ac_ext <<EOF
1649#line 1650 "configure"
1650#include "confdefs.h"
1651#include <$ac_hdr>
1652EOF
1653ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1654{ (eval echo configure:1655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1655ac_err=`grep -v '^ *+' conftest.out`
1656if test -z "$ac_err"; then
1657  rm -rf conftest*
1658  eval "ac_cv_header_$ac_safe=yes"
1659else
1660  echo "$ac_err" >&5
1661  rm -rf conftest*
1662  eval "ac_cv_header_$ac_safe=no"
1663fi
1664rm -f conftest*
1665fi
1666if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1667  echo "$ac_t""yes" 1>&6
1668    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1669  cat >> confdefs.h <<EOF
1670#define $ac_tr_hdr 1
1671EOF
1672 
1673else
1674  echo "$ac_t""no" 1>&6
1675{ echo "configure: error: \`sys/times.h' or \`sys/param.h' not found.  Try
1676                  \`configure --disable-timing'" 1>&2; exit 1; }
1677fi
1678done
1679
1680fi
1681
1682# font-lock-trick: '
1683
1684#
1685# - check for compiler characteristics.
1686#
1687
1688# use C to check compiler characteristics instead of C++.  On
1689# nextstep, checking with C++ may fail.
1690ac_ext=c
1691# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1692ac_cpp='$CPP $CPPFLAGS'
1693ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1694ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1695
1696
1697# cross-compiling ?!
1698# If we cannot run a trivial program, we must be cross compiling.
1699echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1700if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1701  echo $ac_n "(cached) $ac_c" 1>&6
1702else
1703  if test "$cross_compiling" = yes; then
1704  ac_cv_c_cross=yes
1705else
1706cat > conftest.$ac_ext <<EOF
1707#line 1708 "configure"
1708#include "confdefs.h"
1709main(){return(0);}
1710EOF
1711{ (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1712if test -s conftest && (./conftest; exit) 2>/dev/null; then
1713  ac_cv_c_cross=no
1714else
1715  ac_cv_c_cross=yes
1716fi
1717fi
1718rm -fr conftest*
1719fi
1720
1721echo "$ac_t""$ac_cv_c_cross" 1>&6
1722cross_compiling=$ac_cv_c_cross
1723
1724if test "x$cross_compiling" = xyes; then
1725  echo "configure: warning: you better specify a cache file to get the values for
1726                    cross-compiling right (e.g., call \`configure
1727                    --cache-file=yourTarget.cache').  In particular, you
1728                    should make sure that your target machine supports
1729                    arithmetic shift." 1>&2
1730fi
1731
1732# font-lock-trick: '
1733
1734echo $ac_n "checking for working const""... $ac_c" 1>&6
1735if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1736  echo $ac_n "(cached) $ac_c" 1>&6
1737else
1738  cat > conftest.$ac_ext <<EOF
1739#line 1740 "configure"
1740#include "confdefs.h"
1741
1742int main() { return 0; }
1743int t() {
1744
1745/* Ultrix mips cc rejects this.  */
1746typedef int charset[2]; const charset x;
1747/* SunOS 4.1.1 cc rejects this.  */
1748char const *const *ccp;
1749char **p;
1750/* NEC SVR4.0.2 mips cc rejects this.  */
1751struct point {int x, y;};
1752static struct point const zero = {0,0};
1753/* AIX XL C 1.02.0.0 rejects this.
1754   It does not let you subtract one const X* pointer from another in an arm
1755   of an if-expression whose if-part is not a constant expression */
1756const char *g = "string";
1757ccp = &g + (g ? g-g : 0);
1758/* HPUX 7.0 cc rejects these. */
1759++ccp;
1760p = (char**) ccp;
1761ccp = (char const *const *) p;
1762{ /* SCO 3.2v4 cc rejects this.  */
1763  char *t;
1764  char const *s = 0 ? (char *) 0 : (char const *) 0;
1765
1766  *t++ = 0;
1767}
1768{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1769  int x[] = {25, 17};
1770  const int *foo = &x[0];
1771  ++foo;
1772}
1773{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1774  typedef const int *iptr;
1775  iptr p = 0;
1776  ++p;
1777}
1778{ /* AIX XL C 1.02.0.0 rejects this saying
1779     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1780  struct s { int j; const int *ap[3]; };
1781  struct s *b; b->j = 5;
1782}
1783{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1784  const int foo = 10;
1785}
1786
1787; return 0; }
1788EOF
1789if { (eval echo configure:1790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1790  rm -rf conftest*
1791  ac_cv_c_const=yes
1792else
1793  rm -rf conftest*
1794  ac_cv_c_const=no
1795fi
1796rm -f conftest*
1797
1798fi
1799
1800echo "$ac_t""$ac_cv_c_const" 1>&6
1801if test $ac_cv_c_const = no; then
1802  cat >> confdefs.h <<\EOF
1803#define const
1804EOF
1805
1806fi
1807
1808echo $ac_n "checking for inline""... $ac_c" 1>&6
1809if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1810  echo $ac_n "(cached) $ac_c" 1>&6
1811else
1812  ac_cv_c_inline=no
1813for ac_kw in inline __inline__ __inline; do
1814  cat > conftest.$ac_ext <<EOF
1815#line 1816 "configure"
1816#include "confdefs.h"
1817
1818int main() { return 0; }
1819int t() {
1820} $ac_kw foo() {
1821; return 0; }
1822EOF
1823if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1824  rm -rf conftest*
1825  ac_cv_c_inline=$ac_kw; break
1826fi
1827rm -f conftest*
1828
1829done
1830
1831fi
1832
1833echo "$ac_t""$ac_cv_c_inline" 1>&6
1834case "$ac_cv_c_inline" in
1835  inline | yes) ;;
1836  no) cat >> confdefs.h <<\EOF
1837#define inline
1838EOF
1839 ;;
1840  *)  cat >> confdefs.h <<EOF
1841#define inline $ac_cv_c_inline
1842EOF
1843 ;;
1844esac
1845
1846
1847# arithmetic shift
1848echo $ac_n "checking whether your compiler does arithmetic shifts""... $ac_c" 1>&6
1849if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
1850  echo $ac_n "(cached) $ac_c" 1>&6
1851else
1852   if test "$cross_compiling" = yes; then
1853  ac_cv_shift=yes
1854else
1855cat > conftest.$ac_ext <<EOF
1856#line 1857 "configure"
1857#include "confdefs.h"
1858 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
1859EOF
1860{ (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1861if test -s conftest && (./conftest; exit) 2>/dev/null; then
1862  ac_cv_shift=yes
1863else
1864  ac_cv_shift=no
1865fi
1866fi
1867rm -fr conftest*
1868fi
1869
1870if test "x$ac_cv_shift" = xyes; then   
1871  echo "$ac_t""yes" 1>&6
1872else
1873  echo "$ac_t""no" 1>&6
1874fi
1875
1876#
1877# - paths.
1878#
1879
1880# we have to get datadir explicitely for config.h
1881save_prefix="$prefix"
1882test "x$prefix" = xNONE && prefix="$ac_default_prefix"
1883expl_datadir=`eval echo "$datadir"`
1884prefix="$save_prefix"
1885# get absolute path of expl_datadir
1886if echo "$expl_datadir" | grep -v '^/' > /dev/null 2> /dev/null; then
1887  expl_datadir="`pwd`/$expl_datadir"
1888fi
1889
1890if test "x$with_Singular" = xyes; then
1891  gftabledir='${datadir}/Singular/gftables'
1892  expl_gftabledir="$expl_datadir/Singular/gftables"
1893  templatedir='${includedir}/templates'
1894else
1895  gftabledir='${datadir}/factory/gftables'
1896  expl_gftabledir="$expl_datadir/factory/gftables"
1897  templatedir='${includedir}/templates'
1898fi
1899
1900#
1901# - the name of the game and the targets to create.
1902#
1903if test "x$with_Singular" = xyes; then
1904  libfactory=libsingcf.a
1905
1906  factorysrc='$(basefactorysrc) $(singfactorysrc)'
1907  factoryincl='$(basefactoryincl) $(singfactoryincl)'
1908  memmansrc=
1909  memmanincl=
1910
1911  alltargets=cf
1912  installtargets=installcf
1913  uninstalltargets=uninstallcf
1914else
1915  libfactory=libcf.a
1916
1917  factorysrc='$(basefactorysrc)'
1918  factoryincl='$(basefactoryincl)'
1919  memmansrc='$(basememmansrc)'
1920  memmanincl=
1921
1922  alltargets=cf
1923  installtargets=installcf
1924  uninstalltargets=uninstallcf
1925fi
1926
1927#
1928# - set defines and variables according to our tests.
1929#
1930
1931# CFLAGS
1932if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
1933  CFLAGS="-O2 -fomit-frame-pointer"
1934fi
1935
1936# CXXFLAGS
1937if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
1938  CXXFLAGS="-O2 -fomit-frame-pointer"
1939fi
1940
1941# ARFLAGS
1942test "${ARFLAGS+set}" = set || ARFLAGS=cr
1943
1944# M4FLAGS
1945test "${M4FLAGS+set}" = set || M4FLAGS=
1946
1947# Singular
1948if test "x$with_Singular" = xyes; then
1949  cat >> confdefs.h <<\EOF
1950#define SINGULAR 1
1951EOF
1952
1953fi
1954
1955# arithmetic shift
1956if test "x$ac_cv_shift" = xyes; then   
1957  cat >> confdefs.h <<\EOF
1958#define HAS_ARITHMETIC_SHIFT 1
1959EOF
1960
1961fi
1962
1963# gmp-stuff.  we must not set these flags before the tests
1964# are finished!
1965if test "x$gmp_in_installation" = xyes; then
1966  CPPFLAGS="-I\$(includedir) $CPPFLAGS"
1967  LDFLAGS="-L\$(libdir) -lgmp $LDFLAGS"
1968fi
1969
1970# memory manager
1971if test "x$with_memman" != xno; then
1972  alltargets="$alltargets mem"
1973  installtargets="$installtargets installmem"
1974  uninstalltargets="$uninstalltargets uninstallmem"
1975  cat >> confdefs.h <<\EOF
1976#define USE_MEMUTIL 1
1977EOF
1978
1979
1980  if test "x$with_memman" != xnew; then
1981    memmansrc="$memmansrc \$(oldmemmansrc)"
1982    memmanincl='$(oldmemmanincl)'
1983    cat >> confdefs.h <<\EOF
1984#define USE_OLD_MEMMAN 1
1985EOF
1986
1987  else
1988    memmansrc="$memmansrc \$(newmemmansrc)"
1989    memmanincl='$(newmemmanincl)'
1990
1991    if test "x$enable_memdebug" = xfull; then
1992      cat >> confdefs.h <<\EOF
1993#define MDEBUG 1
1994EOF
1995
1996    elif test "x$enable_memdebug" != xno; then
1997      cat >> confdefs.h <<\EOF
1998#define MDEBUG 0
1999EOF
2000
2001    fi
2002  fi
2003fi
2004
2005# iostream
2006if test "x$enable_streamio" = xno; then
2007  cat >> confdefs.h <<\EOF
2008#define NOSTREAMIO 1
2009EOF
2010
2011else
2012  factorysrc="$factorysrc \$(useiofactorysrc)"
2013  factoryincl="$factoryincl \$(useiofactoryincl)"
2014fi
2015
2016# assertions
2017if test "x$enable_assertions" = xno; then
2018  cat >> confdefs.h <<\EOF
2019#define NOASSERT 1
2020EOF
2021
2022fi
2023
2024#
2025# - debugoutput and timing magic.
2026#
2027# For those who do not like this: As long as you do not specify
2028# --enable-timing or --enable-debugoutput the following code will
2029# not be executed.
2030#
2031timingtargets=/dev/null
2032debouttargets=/dev/null
2033debtimingtargets=/dev/null
2034enhanceddebtime=no
2035
2036# timing
2037if test "x$enable_timing" != xno; then
2038  if test "x$enable_timing" = xyes; then
2039    cat >> confdefs.h <<\EOF
2040#define TIMING 1
2041EOF
2042
2043  else
2044    echo "$enable_timing" | tr ',' '\n' | sed 's/\..*$//' | sort > conftest.time
2045    timingtargets=conftest.time
2046    enhanceddebtime=yes
2047  fi
2048fi
2049
2050# debugoutput
2051if test "x$enable_debugoutput" != xno; then
2052  if test "x$enable_debugoutput" = xyes; then
2053    cat >> confdefs.h <<\EOF
2054#define DEBUGOUTPUT 1
2055EOF
2056
2057  else
2058    echo "$enable_debugoutput" | tr ',' '\n' | sed 's/\..*$//' | sort > conftest.debout
2059    debouttargets=conftest.debout
2060    enhanceddebtime=yes
2061  fi
2062fi
2063
2064# create makefile fragments
2065if test "x$enhanceddebtime" = xyes; then
2066  # get the intersection of timingtargets and debouttargets
2067  sort "$timingtargets" "$debouttargets" | uniq -d > conftest.debtime
2068  if test -s conftest.debtime; then
2069    debtimingtargets=conftest.debtime
2070  fi
2071  if test "x$timingtargets" != x/dev/null; then
2072    # get difference of timingtargets and debtimingtargets
2073    sort "$timingtargets" "$debtimingtargets" | uniq -u |
2074      while read line; do
2075        echo "$line.o: $line.cc config.h;" '$(CXX) -c $< -DTIMING $(LIBCXXFLAGS) -o $@'
2076      done > conftest.tmp
2077    mv conftest.tmp "$timingtargets"
2078  fi
2079  if test "x$debouttargets" != x/dev/null; then
2080    # get difference of debouttargets and debtimingtargets
2081    sort "$debouttargets" "$debtimingtargets" | uniq -u |
2082      while read line; do
2083        echo "$line.o: $line.cc config.h;" '$(CXX) -c $< -DDEBUGOUTPUT $(LIBCXXFLAGS) -o $@'
2084      done > conftest.tmp
2085    mv conftest.tmp "$debouttargets"
2086  fi
2087  if test "x$debtimingtargets" != x/dev/null; then
2088    while read line; do
2089      echo "$line.o: $line.cc config.h;" '$(CXX) -c $< -DTIMING -DDEBUGOUTPUT $(LIBCXXFLAGS) -o $@'
2090    done < "$debtimingtargets" > conftest.tmp
2091    mv conftest.tmp "$debtimingtargets"
2092  fi
2093fi
2094
2095#
2096# - complete and substitute variables, defines.
2097#
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122cat >> confdefs.h <<EOF
2123#define FACTORYVERSION "$factory_version"
2124EOF
2125
2126cat >> confdefs.h <<EOF
2127#define FACTORYCONFIGURATION "$factory_configuration"
2128EOF
2129
2130cat >> confdefs.h <<EOF
2131#define GFTABLEDIR "$expl_gftabledir"
2132EOF
2133
2134
2135trap '' 1 2 15
2136cat > confcache <<\EOF
2137# This file is a shell script that caches the results of configure
2138# tests run on this system so they can be shared between configure
2139# scripts and configure runs.  It is not useful on other systems.
2140# If it contains results you don't want to keep, you may remove or edit it.
2141#
2142# By default, configure uses ./config.cache as the cache file,
2143# creating it if it does not exist already.  You can give configure
2144# the --cache-file=FILE option to use a different cache file; that is
2145# what configure does when it calls configure scripts in
2146# subdirectories, so they share the cache.
2147# Giving --cache-file=/dev/null disables caching, for debugging configure.
2148# config.status only pays attention to the cache file if you give it the
2149# --recheck option to rerun configure.
2150#
2151EOF
2152# Ultrix sh set writes to stderr and can't be redirected directly,
2153# and sets the high bit in the cache file unless we assign to the vars.
2154(set) 2>&1 |
2155  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2156  >> confcache
2157if cmp -s $cache_file confcache; then
2158  :
2159else
2160  if test -w $cache_file; then
2161    echo "updating cache $cache_file"
2162    cat confcache > $cache_file
2163  else
2164    echo "not updating unwritable cache $cache_file"
2165  fi
2166fi
2167rm -f confcache
2168
2169trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2170
2171test "x$prefix" = xNONE && prefix=$ac_default_prefix
2172# Let make expand exec_prefix.
2173test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2174
2175# Any assignment to VPATH causes Sun make to only execute
2176# the first set of double-colon rules, so remove it if not needed.
2177# If there is a colon in the path, we need to keep it.
2178if test "x$srcdir" = x.; then
2179  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2180fi
2181
2182trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2183
2184DEFS=-DHAVE_CONFIG_H
2185
2186# Without the "./", some shells look in PATH for config.status.
2187: ${CONFIG_STATUS=./config.status}
2188
2189echo creating $CONFIG_STATUS
2190rm -f $CONFIG_STATUS
2191cat > $CONFIG_STATUS <<EOF
2192#! /bin/sh
2193# Generated automatically by configure.
2194# Run this file to recreate the current configuration.
2195# This directory was configured as follows,
2196# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2197#
2198# $0 $ac_configure_args
2199#
2200# Compiler output produced by configure, useful for debugging
2201# configure, is in ./config.log if it exists.
2202
2203ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2204for ac_option
2205do
2206  case "\$ac_option" in
2207  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2208    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2209    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2210  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2211    echo "$CONFIG_STATUS generated by autoconf version 2.10"
2212    exit 0 ;;
2213  -help | --help | --hel | --he | --h)
2214    echo "\$ac_cs_usage"; exit 0 ;;
2215  *) echo "\$ac_cs_usage"; exit 1 ;;
2216  esac
2217done
2218
2219ac_given_srcdir=$srcdir
2220ac_given_INSTALL="$INSTALL"
2221
2222trap 'rm -fr `echo "GNUmakefile ftest/GNUmakefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2223EOF
2224cat >> $CONFIG_STATUS <<EOF
2225
2226# Protect against being on the right side of a sed subst in config.status.
2227sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2228 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2229$ac_vpsub
2230$extrasub
2231s%@CFLAGS@%$CFLAGS%g
2232s%@CPPFLAGS@%$CPPFLAGS%g
2233s%@CXXFLAGS@%$CXXFLAGS%g
2234s%@DEFS@%$DEFS%g
2235s%@LDFLAGS@%$LDFLAGS%g
2236s%@LIBS@%$LIBS%g
2237s%@exec_prefix@%$exec_prefix%g
2238s%@prefix@%$prefix%g
2239s%@program_transform_name@%$program_transform_name%g
2240s%@bindir@%$bindir%g
2241s%@sbindir@%$sbindir%g
2242s%@libexecdir@%$libexecdir%g
2243s%@datadir@%$datadir%g
2244s%@sysconfdir@%$sysconfdir%g
2245s%@sharedstatedir@%$sharedstatedir%g
2246s%@localstatedir@%$localstatedir%g
2247s%@libdir@%$libdir%g
2248s%@includedir@%$includedir%g
2249s%@oldincludedir@%$oldincludedir%g
2250s%@infodir@%$infodir%g
2251s%@mandir@%$mandir%g
2252s%@CC@%$CC%g
2253s%@CXX@%$CXX%g
2254s%@CPP@%$CPP%g
2255s%@CXXCPP@%$CXXCPP%g
2256s%@LN_S@%$LN_S%g
2257s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2258s%@INSTALL_DATA@%$INSTALL_DATA%g
2259s%@RANLIB@%$RANLIB%g
2260s%@SET_MAKE@%$SET_MAKE%g
2261s%@AR@%$AR%g
2262s%@M4@%$M4%g
2263s%@BISON@%$BISON%g
2264s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
2265s%@MAKEHEADER@%$MAKEHEADER%g
2266s%@gftabledir@%$gftabledir%g
2267s%@templatedir@%$templatedir%g
2268s%@factory_version@%$factory_version%g
2269s%@libfactory@%$libfactory%g
2270s%@ARFLAGS@%$ARFLAGS%g
2271s%@M4FLAGS@%$M4FLAGS%g
2272s%@MAKEHEADERFLAGS@%$MAKEHEADERFLAGS%g
2273s%@factorysrc@%$factorysrc%g
2274s%@factoryincl@%$factoryincl%g
2275s%@memmansrc@%$memmansrc%g
2276s%@memmanincl@%$memmanincl%g
2277s%@alltargets@%$alltargets%g
2278s%@installtargets@%$installtargets%g
2279s%@uninstalltargets@%$uninstalltargets%g
2280/@timingtargets@/r $timingtargets
2281s%@timingtargets@%%g
2282/@debouttargets@/r $debouttargets
2283s%@debouttargets@%%g
2284/@debtimingtargets@/r $debtimingtargets
2285s%@debtimingtargets@%%g
2286
2287CEOF
2288EOF
2289cat >> $CONFIG_STATUS <<EOF
2290
2291CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile ftest/GNUmakefile"}
2292EOF
2293cat >> $CONFIG_STATUS <<\EOF
2294for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2295  # Support "outfile[:infile]", defaulting infile="outfile.in".
2296  case "$ac_file" in
2297  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2298       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2299  *) ac_file_in="${ac_file}.in" ;;
2300  esac
2301
2302  # Adjust relative srcdir, etc. for subdirectories.
2303
2304  # Remove last slash and all that follows it.  Not all systems have dirname.
2305  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2306  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2307    # The file is in a subdirectory.
2308    test ! -d "$ac_dir" && mkdir "$ac_dir"
2309    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2310    # A "../" for each directory in $ac_dir_suffix.
2311    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2312  else
2313    ac_dir_suffix= ac_dots=
2314  fi
2315
2316  case "$ac_given_srcdir" in
2317  .)  srcdir=.
2318      if test -z "$ac_dots"; then top_srcdir=.
2319      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2320  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2321  *) # Relative path.
2322    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2323    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2324  esac
2325
2326  case "$ac_given_INSTALL" in
2327  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2328  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2329  esac
2330  echo creating "$ac_file"
2331  rm -f "$ac_file"
2332  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2333  case "$ac_file" in
2334  *Makefile*) ac_comsub="1i\\
2335# $configure_input" ;;
2336  *) ac_comsub= ;;
2337  esac
2338  sed -e "$ac_comsub
2339s%@configure_input@%$configure_input%g
2340s%@srcdir@%$srcdir%g
2341s%@top_srcdir@%$top_srcdir%g
2342s%@INSTALL@%$INSTALL%g
2343" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2344fi; done
2345rm -f conftest.subs
2346
2347# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2348# NAME is the cpp macro being defined and VALUE is the value it is being given.
2349#
2350# ac_d sets the value in "#define NAME VALUE" lines.
2351ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2352ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2353ac_dC='\3'
2354ac_dD='%g'
2355# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2356ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2357ac_uB='\([      ]\)%\1#\2define\3'
2358ac_uC=' '
2359ac_uD='\4%g'
2360# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2361ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2362ac_eB='$%\1#\2define\3'
2363ac_eC=' '
2364ac_eD='%g'
2365
2366CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2367for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2368  # Support "outfile[:infile]", defaulting infile="outfile.in".
2369  case "$ac_file" in
2370  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2371       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2372  *) ac_file_in="${ac_file}.in" ;;
2373  esac
2374
2375  echo creating $ac_file
2376
2377  rm -f conftest.frag conftest.in conftest.out
2378  cp $ac_given_srcdir/$ac_file_in conftest.in
2379
2380EOF
2381
2382# Transform confdefs.h into a sed script conftest.vals that substitutes
2383# the proper values into config.h.in to produce config.h.  And first:
2384# Protect against being on the right side of a sed subst in config.status.
2385# Protect against being in an unquoted here document in config.status.
2386rm -f conftest.vals
2387cat > conftest.hdr <<\EOF
2388s/[\\&%]/\\&/g
2389s%[\\$`]%\\&%g
2390s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2391s%ac_d%ac_u%gp
2392s%ac_u%ac_e%gp
2393EOF
2394sed -n -f conftest.hdr confdefs.h > conftest.vals
2395rm -f conftest.hdr
2396
2397# This sed command replaces #undef with comments.  This is necessary, for
2398# example, in the case of _POSIX_SOURCE, which is predefined and required
2399# on some systems where configure will not decide to define it.
2400cat >> conftest.vals <<\EOF
2401s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2402EOF
2403
2404# Break up conftest.vals because some shells have a limit on
2405# the size of here documents, and old seds have small limits too.
2406# Maximum number of lines to put in a single here document.
2407ac_max_here_lines=12
2408
2409rm -f conftest.tail
2410while :
2411do
2412  ac_lines=`grep -c . conftest.vals`
2413  # grep -c gives empty output for an empty file on some AIX systems.
2414  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2415  # Write a limited-size here document to conftest.frag.
2416  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2417  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2418  echo 'CEOF
2419  sed -f conftest.frag conftest.in > conftest.out
2420  rm -f conftest.in
2421  mv conftest.out conftest.in
2422' >> $CONFIG_STATUS
2423  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2424  rm -f conftest.vals
2425  mv conftest.tail conftest.vals
2426done
2427rm -f conftest.vals
2428
2429cat >> $CONFIG_STATUS <<\EOF
2430  rm -f conftest.frag conftest.h
2431  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2432  cat conftest.in >> conftest.h
2433  rm -f conftest.in
2434  if cmp -s $ac_file conftest.h 2>/dev/null; then
2435    echo "$ac_file is unchanged"
2436    rm -f conftest.h
2437  else
2438    # Remove last slash and all that follows it.  Not all systems have dirname.
2439      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2440      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2441      # The file is in a subdirectory.
2442      test ! -d "$ac_dir" && mkdir "$ac_dir"
2443    fi
2444    rm -f $ac_file
2445    mv conftest.h $ac_file
2446  fi
2447fi; done
2448
2449
2450
2451exit 0
2452EOF
2453chmod +x $CONFIG_STATUS
2454rm -fr confdefs* $ac_clean_files
2455test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2456
Note: See TracBrowser for help on using the repository browser.