source: git/factory/configure @ d9ef16

spielwiese
Last change on this file since d9ef16 was d9ef16, checked in by Jens Schmidt <schmidt@…>, 26 years ago
* configure: configure.in changed git-svn-id: file:///usr/local/Singular/svn/trunk@890 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 68.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
1380# the following test breaks the configure script
1381#AC_CHECK_LIB(g++, strsignal, ,
1382#    [ AC_MSG_WARN(libg++ not found.
1383#                    You will not be able to build the Factory Test Environment
1384#                    (though Factory itself should compile)) ])
1385
1386#
1387# - check for header files.
1388#
1389ac_ext=C
1390# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1391ac_cpp='$CXXCPP $CPPFLAGS'
1392ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1393ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1394
1395
1396if test "x$gmp_in_installation" != xyes; then
1397  for ac_hdr in gmp.h
1398do
1399ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1400echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1401if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1402  echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404  cat > conftest.$ac_ext <<EOF
1405#line 1406 "configure"
1406#include "confdefs.h"
1407#include <$ac_hdr>
1408EOF
1409ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1410{ (eval echo configure:1411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1411ac_err=`grep -v '^ *+' conftest.out`
1412if test -z "$ac_err"; then
1413  rm -rf conftest*
1414  eval "ac_cv_header_$ac_safe=yes"
1415else
1416  echo "$ac_err" >&5
1417  rm -rf conftest*
1418  eval "ac_cv_header_$ac_safe=no"
1419fi
1420rm -f conftest*
1421fi
1422if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1423  echo "$ac_t""yes" 1>&6
1424    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1425  cat >> confdefs.h <<EOF
1426#define $ac_tr_hdr 1
1427EOF
1428 
1429else
1430  echo "$ac_t""no" 1>&6
1431{ echo "configure: error: gmp.h not found.  Use option --with-gmp to specify path" 1>&2; exit 1; }
1432fi
1433done
1434
1435fi
1436
1437for ac_hdr in stdio.h stdlib.h string.h time.h math.h
1438do
1439ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1440echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1441if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1442  echo $ac_n "(cached) $ac_c" 1>&6
1443else
1444  cat > conftest.$ac_ext <<EOF
1445#line 1446 "configure"
1446#include "confdefs.h"
1447#include <$ac_hdr>
1448EOF
1449ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1450{ (eval echo configure:1451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1451ac_err=`grep -v '^ *+' conftest.out`
1452if test -z "$ac_err"; then
1453  rm -rf conftest*
1454  eval "ac_cv_header_$ac_safe=yes"
1455else
1456  echo "$ac_err" >&5
1457  rm -rf conftest*
1458  eval "ac_cv_header_$ac_safe=no"
1459fi
1460rm -f conftest*
1461fi
1462if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1463  echo "$ac_t""yes" 1>&6
1464    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1465  cat >> confdefs.h <<EOF
1466#define $ac_tr_hdr 1
1467EOF
1468 
1469else
1470  echo "$ac_t""no" 1>&6
1471{ echo "configure: error: C header files not found" 1>&2; exit 1; }
1472fi
1473done
1474
1475
1476if test "x$enable_streamio" != xno; then
1477  for ac_hdr in iostream.h strstream.h fstream.h
1478do
1479ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1480echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1481if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1482  echo $ac_n "(cached) $ac_c" 1>&6
1483else
1484  cat > conftest.$ac_ext <<EOF
1485#line 1486 "configure"
1486#include "confdefs.h"
1487#include <$ac_hdr>
1488EOF
1489ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1490{ (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1491ac_err=`grep -v '^ *+' conftest.out`
1492if test -z "$ac_err"; then
1493  rm -rf conftest*
1494  eval "ac_cv_header_$ac_safe=yes"
1495else
1496  echo "$ac_err" >&5
1497  rm -rf conftest*
1498  eval "ac_cv_header_$ac_safe=no"
1499fi
1500rm -f conftest*
1501fi
1502if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1503  echo "$ac_t""yes" 1>&6
1504    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1505  cat >> confdefs.h <<EOF
1506#define $ac_tr_hdr 1
1507EOF
1508 
1509else
1510  echo "$ac_t""no" 1>&6
1511{ echo "configure: error: C++ header files not found" 1>&2; exit 1; }
1512fi
1513done
1514
1515  for ac_hdr in ctype.h
1516do
1517ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1518echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1519if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1520  echo $ac_n "(cached) $ac_c" 1>&6
1521else
1522  cat > conftest.$ac_ext <<EOF
1523#line 1524 "configure"
1524#include "confdefs.h"
1525#include <$ac_hdr>
1526EOF
1527ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1528{ (eval echo configure:1529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1529ac_err=`grep -v '^ *+' conftest.out`
1530if test -z "$ac_err"; then
1531  rm -rf conftest*
1532  eval "ac_cv_header_$ac_safe=yes"
1533else
1534  echo "$ac_err" >&5
1535  rm -rf conftest*
1536  eval "ac_cv_header_$ac_safe=no"
1537fi
1538rm -f conftest*
1539fi
1540if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1541  echo "$ac_t""yes" 1>&6
1542    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1543  cat >> confdefs.h <<EOF
1544#define $ac_tr_hdr 1
1545EOF
1546 
1547else
1548  echo "$ac_t""no" 1>&6
1549{ echo "configure: error: standard C header files not found" 1>&2; exit 1; }
1550fi
1551done
1552
1553
1554  # since the FTE will compile only with stream IO enabled we will not
1555  # check for the necessary header files if stream IO is disabled
1556  for ac_hdr in stdarg.h signal.h errno.h unistd.h GetOpt.h
1557do
1558ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1559echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1560if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1561  echo $ac_n "(cached) $ac_c" 1>&6
1562else
1563  cat > conftest.$ac_ext <<EOF
1564#line 1565 "configure"
1565#include "confdefs.h"
1566#include <$ac_hdr>
1567EOF
1568ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1569{ (eval echo configure:1570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1570ac_err=`grep -v '^ *+' conftest.out`
1571if test -z "$ac_err"; then
1572  rm -rf conftest*
1573  eval "ac_cv_header_$ac_safe=yes"
1574else
1575  echo "$ac_err" >&5
1576  rm -rf conftest*
1577  eval "ac_cv_header_$ac_safe=no"
1578fi
1579rm -f conftest*
1580fi
1581if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1582  echo "$ac_t""yes" 1>&6
1583    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1584  cat >> confdefs.h <<EOF
1585#define $ac_tr_hdr 1
1586EOF
1587 
1588else
1589  echo "$ac_t""no" 1>&6
1590echo "configure: warning: C/C++ header files not found.
1591                    You will not be able to build the Factory Test Environment
1592                    (though Factory itself should compile)" 1>&2
1593fi
1594done
1595
1596fi
1597
1598if test "x$enable_timing" != xno; then
1599  for ac_hdr in sys/param.h sys/times.h
1600do
1601ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1602echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1603if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1604  echo $ac_n "(cached) $ac_c" 1>&6
1605else
1606  cat > conftest.$ac_ext <<EOF
1607#line 1608 "configure"
1608#include "confdefs.h"
1609#include <$ac_hdr>
1610EOF
1611ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1612{ (eval echo configure:1613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1613ac_err=`grep -v '^ *+' conftest.out`
1614if test -z "$ac_err"; then
1615  rm -rf conftest*
1616  eval "ac_cv_header_$ac_safe=yes"
1617else
1618  echo "$ac_err" >&5
1619  rm -rf conftest*
1620  eval "ac_cv_header_$ac_safe=no"
1621fi
1622rm -f conftest*
1623fi
1624if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1625  echo "$ac_t""yes" 1>&6
1626    ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1627  cat >> confdefs.h <<EOF
1628#define $ac_tr_hdr 1
1629EOF
1630 
1631else
1632  echo "$ac_t""no" 1>&6
1633{ echo "configure: error: \`sys/times.h' or \`sys/param.h' not found.  Try
1634                  \`configure --disable-timing'" 1>&2; exit 1; }
1635fi
1636done
1637
1638fi
1639
1640# font-lock-trick: '
1641
1642#
1643# - check for compiler characteristics.
1644#
1645
1646# use C to check compiler characteristics instead of C++.  On
1647# nextstep, checking with C++ may fail.
1648ac_ext=c
1649# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1650ac_cpp='$CPP $CPPFLAGS'
1651ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1652ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1653
1654
1655# cross-compiling ?!
1656# If we cannot run a trivial program, we must be cross compiling.
1657echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1658if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1659  echo $ac_n "(cached) $ac_c" 1>&6
1660else
1661  if test "$cross_compiling" = yes; then
1662  ac_cv_c_cross=yes
1663else
1664cat > conftest.$ac_ext <<EOF
1665#line 1666 "configure"
1666#include "confdefs.h"
1667main(){return(0);}
1668EOF
1669{ (eval echo configure:1670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1670if test -s conftest && (./conftest; exit) 2>/dev/null; then
1671  ac_cv_c_cross=no
1672else
1673  ac_cv_c_cross=yes
1674fi
1675fi
1676rm -fr conftest*
1677fi
1678
1679echo "$ac_t""$ac_cv_c_cross" 1>&6
1680cross_compiling=$ac_cv_c_cross
1681
1682if test "x$cross_compiling" = xyes; then
1683  echo "configure: warning: you better specify a cache file to get the values for
1684                    cross-compiling right (e.g., call \`configure
1685                    --cache-file=yourTarget.cache').  In particular, you
1686                    should make sure that your target machine supports
1687                    arithmetic shift." 1>&2
1688fi
1689
1690# font-lock-trick: '
1691
1692echo $ac_n "checking for working const""... $ac_c" 1>&6
1693if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1694  echo $ac_n "(cached) $ac_c" 1>&6
1695else
1696  cat > conftest.$ac_ext <<EOF
1697#line 1698 "configure"
1698#include "confdefs.h"
1699
1700int main() { return 0; }
1701int t() {
1702
1703/* Ultrix mips cc rejects this.  */
1704typedef int charset[2]; const charset x;
1705/* SunOS 4.1.1 cc rejects this.  */
1706char const *const *ccp;
1707char **p;
1708/* NEC SVR4.0.2 mips cc rejects this.  */
1709struct point {int x, y;};
1710static struct point const zero = {0,0};
1711/* AIX XL C 1.02.0.0 rejects this.
1712   It does not let you subtract one const X* pointer from another in an arm
1713   of an if-expression whose if-part is not a constant expression */
1714const char *g = "string";
1715ccp = &g + (g ? g-g : 0);
1716/* HPUX 7.0 cc rejects these. */
1717++ccp;
1718p = (char**) ccp;
1719ccp = (char const *const *) p;
1720{ /* SCO 3.2v4 cc rejects this.  */
1721  char *t;
1722  char const *s = 0 ? (char *) 0 : (char const *) 0;
1723
1724  *t++ = 0;
1725}
1726{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1727  int x[] = {25, 17};
1728  const int *foo = &x[0];
1729  ++foo;
1730}
1731{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1732  typedef const int *iptr;
1733  iptr p = 0;
1734  ++p;
1735}
1736{ /* AIX XL C 1.02.0.0 rejects this saying
1737     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1738  struct s { int j; const int *ap[3]; };
1739  struct s *b; b->j = 5;
1740}
1741{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1742  const int foo = 10;
1743}
1744
1745; return 0; }
1746EOF
1747if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1748  rm -rf conftest*
1749  ac_cv_c_const=yes
1750else
1751  rm -rf conftest*
1752  ac_cv_c_const=no
1753fi
1754rm -f conftest*
1755
1756fi
1757
1758echo "$ac_t""$ac_cv_c_const" 1>&6
1759if test $ac_cv_c_const = no; then
1760  cat >> confdefs.h <<\EOF
1761#define const
1762EOF
1763
1764fi
1765
1766echo $ac_n "checking for inline""... $ac_c" 1>&6
1767if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1768  echo $ac_n "(cached) $ac_c" 1>&6
1769else
1770  ac_cv_c_inline=no
1771for ac_kw in inline __inline__ __inline; do
1772  cat > conftest.$ac_ext <<EOF
1773#line 1774 "configure"
1774#include "confdefs.h"
1775
1776int main() { return 0; }
1777int t() {
1778} $ac_kw foo() {
1779; return 0; }
1780EOF
1781if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1782  rm -rf conftest*
1783  ac_cv_c_inline=$ac_kw; break
1784fi
1785rm -f conftest*
1786
1787done
1788
1789fi
1790
1791echo "$ac_t""$ac_cv_c_inline" 1>&6
1792case "$ac_cv_c_inline" in
1793  inline | yes) ;;
1794  no) cat >> confdefs.h <<\EOF
1795#define inline
1796EOF
1797 ;;
1798  *)  cat >> confdefs.h <<EOF
1799#define inline $ac_cv_c_inline
1800EOF
1801 ;;
1802esac
1803
1804
1805# arithmetic shift
1806echo $ac_n "checking whether your compiler does arithmetic shifts""... $ac_c" 1>&6
1807if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
1808  echo $ac_n "(cached) $ac_c" 1>&6
1809else
1810   if test "$cross_compiling" = yes; then
1811  ac_cv_shift=yes
1812else
1813cat > conftest.$ac_ext <<EOF
1814#line 1815 "configure"
1815#include "confdefs.h"
1816 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
1817EOF
1818{ (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1819if test -s conftest && (./conftest; exit) 2>/dev/null; then
1820  ac_cv_shift=yes
1821else
1822  ac_cv_shift=no
1823fi
1824fi
1825rm -fr conftest*
1826fi
1827
1828if test "x$ac_cv_shift" = xyes; then   
1829  echo "$ac_t""yes" 1>&6
1830else
1831  echo "$ac_t""no" 1>&6
1832fi
1833
1834#
1835# - paths.
1836#
1837
1838# we have to get datadir explicitely for config.h
1839save_prefix="$prefix"
1840test "x$prefix" = xNONE && prefix="$ac_default_prefix"
1841expl_datadir=`eval echo "$datadir"`
1842prefix="$save_prefix"
1843# get absolute path of expl_datadir
1844if echo "$expl_datadir" | grep -v '^/' > /dev/null 2> /dev/null; then
1845  expl_datadir="`pwd`/$expl_datadir"
1846fi
1847
1848if test "x$with_Singular" = xyes; then
1849  gftabledir='${datadir}/Singular/gftables'
1850  expl_gftabledir="$expl_datadir/Singular/gftables"
1851  templatedir='${includedir}/templates'
1852else
1853  gftabledir='${datadir}/factory/gftables'
1854  expl_gftabledir="$expl_datadir/factory/gftables"
1855  templatedir='${includedir}/templates'
1856fi
1857
1858#
1859# - the name of the game and the targets to create.
1860#
1861if test "x$with_Singular" = xyes; then
1862  libfactory=libsingcf.a
1863
1864  factorysrc='$(basefactorysrc) $(singfactorysrc)'
1865  factoryincl='$(basefactoryincl) $(singfactoryincl)'
1866  memmansrc=
1867  memmanincl=
1868
1869  alltargets=cf
1870  installtargets=installcf
1871  uninstalltargets=uninstallcf
1872else
1873  libfactory=libcf.a
1874
1875  factorysrc='$(basefactorysrc)'
1876  factoryincl='$(basefactoryincl)'
1877  memmansrc='$(basememmansrc)'
1878  memmanincl=
1879
1880  alltargets=cf
1881  installtargets=installcf
1882  uninstalltargets=uninstallcf
1883fi
1884
1885#
1886# - set defines and variables according to our tests.
1887#
1888
1889# CFLAGS
1890if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
1891  CFLAGS="-O2 -fomit-frame-pointer"
1892fi
1893
1894# CXXFLAGS
1895if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
1896  CXXFLAGS="-O2 -fomit-frame-pointer"
1897fi
1898
1899# ARFLAGS
1900test "${ARFLAGS+set}" = set || ARFLAGS=cr
1901
1902# M4FLAGS
1903test "${M4FLAGS+set}" = set || M4FLAGS=
1904
1905# Singular
1906if test "x$with_Singular" = xyes; then
1907  cat >> confdefs.h <<\EOF
1908#define SINGULAR 1
1909EOF
1910
1911fi
1912
1913# arithmetic shift
1914if test "x$ac_cv_shift" = xyes; then   
1915  cat >> confdefs.h <<\EOF
1916#define HAS_ARITHMETIC_SHIFT 1
1917EOF
1918
1919fi
1920
1921# gmp-stuff.  we must not set these flags before the tests
1922# are finished!
1923if test "x$gmp_in_installation" = xyes; then
1924  CPPFLAGS="-I\$(includedir) $CPPFLAGS"
1925  LDFLAGS="-L\$(libdir) -lgmp $LDFLAGS"
1926fi
1927
1928# memory manager
1929if test "x$with_memman" != xno; then
1930  alltargets="$alltargets mem"
1931  installtargets="$installtargets installmem"
1932  uninstalltargets="$uninstalltargets uninstallmem"
1933  cat >> confdefs.h <<\EOF
1934#define USE_MEMUTIL 1
1935EOF
1936
1937
1938  if test "x$with_memman" != xnew; then
1939    memmansrc="$memmansrc \$(oldmemmansrc)"
1940    memmanincl='$(oldmemmanincl)'
1941    cat >> confdefs.h <<\EOF
1942#define USE_OLD_MEMMAN 1
1943EOF
1944
1945  else
1946    memmansrc="$memmansrc \$(newmemmansrc)"
1947    memmanincl='$(newmemmanincl)'
1948
1949    if test "x$enable_memdebug" = xfull; then
1950      cat >> confdefs.h <<\EOF
1951#define MDEBUG 1
1952EOF
1953
1954    elif test "x$enable_memdebug" != xno; then
1955      cat >> confdefs.h <<\EOF
1956#define MDEBUG 0
1957EOF
1958
1959    fi
1960  fi
1961fi
1962
1963# iostream
1964if test "x$enable_streamio" = xno; then
1965  cat >> confdefs.h <<\EOF
1966#define NOSTREAMIO 1
1967EOF
1968
1969else
1970  factorysrc="$factorysrc \$(useiofactorysrc)"
1971  factoryincl="$factoryincl \$(useiofactoryincl)"
1972fi
1973
1974# assertions
1975if test "x$enable_assertions" = xno; then
1976  cat >> confdefs.h <<\EOF
1977#define NOASSERT 1
1978EOF
1979
1980fi
1981
1982#
1983# - debugoutput and timing magic.
1984#
1985# For those who do not like this: As long as you do not specify
1986# --enable-timing or --enable-debugoutput the following code will
1987# not be executed.
1988#
1989timingtargets=/dev/null
1990debouttargets=/dev/null
1991debtimingtargets=/dev/null
1992enhanceddebtime=no
1993
1994# timing
1995if test "x$enable_timing" != xno; then
1996  if test "x$enable_timing" = xyes; then
1997    cat >> confdefs.h <<\EOF
1998#define TIMING 1
1999EOF
2000
2001  else
2002    echo "$enable_timing" | tr ',' '\n' | sed 's/\..*$//' | sort > conftest.time
2003    timingtargets=conftest.time
2004    enhanceddebtime=yes
2005  fi
2006fi
2007
2008# debugoutput
2009if test "x$enable_debugoutput" != xno; then
2010  if test "x$enable_debugoutput" = xyes; then
2011    cat >> confdefs.h <<\EOF
2012#define DEBUGOUTPUT 1
2013EOF
2014
2015  else
2016    echo "$enable_debugoutput" | tr ',' '\n' | sed 's/\..*$//' | sort > conftest.debout
2017    debouttargets=conftest.debout
2018    enhanceddebtime=yes
2019  fi
2020fi
2021
2022# create makefile fragments
2023if test "x$enhanceddebtime" = xyes; then
2024  # get the intersection of timingtargets and debouttargets
2025  sort "$timingtargets" "$debouttargets" | uniq -d > conftest.debtime
2026  if test -s conftest.debtime; then
2027    debtimingtargets=conftest.debtime
2028  fi
2029  if test "x$timingtargets" != x/dev/null; then
2030    # get difference of timingtargets and debtimingtargets
2031    sort "$timingtargets" "$debtimingtargets" | uniq -u |
2032      while read line; do
2033        echo "$line.o: $line.cc config.h;" '$(CXX) -c $< -DTIMING $(LIBCXXFLAGS) -o $@'
2034      done > conftest.tmp
2035    mv conftest.tmp "$timingtargets"
2036  fi
2037  if test "x$debouttargets" != x/dev/null; then
2038    # get difference of debouttargets and debtimingtargets
2039    sort "$debouttargets" "$debtimingtargets" | uniq -u |
2040      while read line; do
2041        echo "$line.o: $line.cc config.h;" '$(CXX) -c $< -DDEBUGOUTPUT $(LIBCXXFLAGS) -o $@'
2042      done > conftest.tmp
2043    mv conftest.tmp "$debouttargets"
2044  fi
2045  if test "x$debtimingtargets" != x/dev/null; then
2046    while read line; do
2047      echo "$line.o: $line.cc config.h;" '$(CXX) -c $< -DTIMING -DDEBUGOUTPUT $(LIBCXXFLAGS) -o $@'
2048    done < "$debtimingtargets" > conftest.tmp
2049    mv conftest.tmp "$debtimingtargets"
2050  fi
2051fi
2052
2053#
2054# - complete and substitute variables, defines.
2055#
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080cat >> confdefs.h <<EOF
2081#define FACTORYVERSION "$factory_version"
2082EOF
2083
2084cat >> confdefs.h <<EOF
2085#define FACTORYCONFIGURATION "$factory_configuration"
2086EOF
2087
2088cat >> confdefs.h <<EOF
2089#define GFTABLEDIR "$expl_gftabledir"
2090EOF
2091
2092
2093trap '' 1 2 15
2094cat > confcache <<\EOF
2095# This file is a shell script that caches the results of configure
2096# tests run on this system so they can be shared between configure
2097# scripts and configure runs.  It is not useful on other systems.
2098# If it contains results you don't want to keep, you may remove or edit it.
2099#
2100# By default, configure uses ./config.cache as the cache file,
2101# creating it if it does not exist already.  You can give configure
2102# the --cache-file=FILE option to use a different cache file; that is
2103# what configure does when it calls configure scripts in
2104# subdirectories, so they share the cache.
2105# Giving --cache-file=/dev/null disables caching, for debugging configure.
2106# config.status only pays attention to the cache file if you give it the
2107# --recheck option to rerun configure.
2108#
2109EOF
2110# Ultrix sh set writes to stderr and can't be redirected directly,
2111# and sets the high bit in the cache file unless we assign to the vars.
2112(set) 2>&1 |
2113  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2114  >> confcache
2115if cmp -s $cache_file confcache; then
2116  :
2117else
2118  if test -w $cache_file; then
2119    echo "updating cache $cache_file"
2120    cat confcache > $cache_file
2121  else
2122    echo "not updating unwritable cache $cache_file"
2123  fi
2124fi
2125rm -f confcache
2126
2127trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2128
2129test "x$prefix" = xNONE && prefix=$ac_default_prefix
2130# Let make expand exec_prefix.
2131test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2132
2133# Any assignment to VPATH causes Sun make to only execute
2134# the first set of double-colon rules, so remove it if not needed.
2135# If there is a colon in the path, we need to keep it.
2136if test "x$srcdir" = x.; then
2137  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2138fi
2139
2140trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2141
2142DEFS=-DHAVE_CONFIG_H
2143
2144# Without the "./", some shells look in PATH for config.status.
2145: ${CONFIG_STATUS=./config.status}
2146
2147echo creating $CONFIG_STATUS
2148rm -f $CONFIG_STATUS
2149cat > $CONFIG_STATUS <<EOF
2150#! /bin/sh
2151# Generated automatically by configure.
2152# Run this file to recreate the current configuration.
2153# This directory was configured as follows,
2154# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2155#
2156# $0 $ac_configure_args
2157#
2158# Compiler output produced by configure, useful for debugging
2159# configure, is in ./config.log if it exists.
2160
2161ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2162for ac_option
2163do
2164  case "\$ac_option" in
2165  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2166    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2167    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2168  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2169    echo "$CONFIG_STATUS generated by autoconf version 2.10"
2170    exit 0 ;;
2171  -help | --help | --hel | --he | --h)
2172    echo "\$ac_cs_usage"; exit 0 ;;
2173  *) echo "\$ac_cs_usage"; exit 1 ;;
2174  esac
2175done
2176
2177ac_given_srcdir=$srcdir
2178ac_given_INSTALL="$INSTALL"
2179
2180trap 'rm -fr `echo "GNUmakefile ftest/GNUmakefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2181EOF
2182cat >> $CONFIG_STATUS <<EOF
2183
2184# Protect against being on the right side of a sed subst in config.status.
2185sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2186 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2187$ac_vpsub
2188$extrasub
2189s%@CFLAGS@%$CFLAGS%g
2190s%@CPPFLAGS@%$CPPFLAGS%g
2191s%@CXXFLAGS@%$CXXFLAGS%g
2192s%@DEFS@%$DEFS%g
2193s%@LDFLAGS@%$LDFLAGS%g
2194s%@LIBS@%$LIBS%g
2195s%@exec_prefix@%$exec_prefix%g
2196s%@prefix@%$prefix%g
2197s%@program_transform_name@%$program_transform_name%g
2198s%@bindir@%$bindir%g
2199s%@sbindir@%$sbindir%g
2200s%@libexecdir@%$libexecdir%g
2201s%@datadir@%$datadir%g
2202s%@sysconfdir@%$sysconfdir%g
2203s%@sharedstatedir@%$sharedstatedir%g
2204s%@localstatedir@%$localstatedir%g
2205s%@libdir@%$libdir%g
2206s%@includedir@%$includedir%g
2207s%@oldincludedir@%$oldincludedir%g
2208s%@infodir@%$infodir%g
2209s%@mandir@%$mandir%g
2210s%@CC@%$CC%g
2211s%@CXX@%$CXX%g
2212s%@CPP@%$CPP%g
2213s%@CXXCPP@%$CXXCPP%g
2214s%@LN_S@%$LN_S%g
2215s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2216s%@INSTALL_DATA@%$INSTALL_DATA%g
2217s%@RANLIB@%$RANLIB%g
2218s%@SET_MAKE@%$SET_MAKE%g
2219s%@AR@%$AR%g
2220s%@M4@%$M4%g
2221s%@BISON@%$BISON%g
2222s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
2223s%@MAKEHEADER@%$MAKEHEADER%g
2224s%@gftabledir@%$gftabledir%g
2225s%@templatedir@%$templatedir%g
2226s%@factory_version@%$factory_version%g
2227s%@libfactory@%$libfactory%g
2228s%@ARFLAGS@%$ARFLAGS%g
2229s%@M4FLAGS@%$M4FLAGS%g
2230s%@MAKEHEADERFLAGS@%$MAKEHEADERFLAGS%g
2231s%@factorysrc@%$factorysrc%g
2232s%@factoryincl@%$factoryincl%g
2233s%@memmansrc@%$memmansrc%g
2234s%@memmanincl@%$memmanincl%g
2235s%@alltargets@%$alltargets%g
2236s%@installtargets@%$installtargets%g
2237s%@uninstalltargets@%$uninstalltargets%g
2238/@timingtargets@/r $timingtargets
2239s%@timingtargets@%%g
2240/@debouttargets@/r $debouttargets
2241s%@debouttargets@%%g
2242/@debtimingtargets@/r $debtimingtargets
2243s%@debtimingtargets@%%g
2244
2245CEOF
2246EOF
2247cat >> $CONFIG_STATUS <<EOF
2248
2249CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile ftest/GNUmakefile"}
2250EOF
2251cat >> $CONFIG_STATUS <<\EOF
2252for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2253  # Support "outfile[:infile]", defaulting infile="outfile.in".
2254  case "$ac_file" in
2255  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2256       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2257  *) ac_file_in="${ac_file}.in" ;;
2258  esac
2259
2260  # Adjust relative srcdir, etc. for subdirectories.
2261
2262  # Remove last slash and all that follows it.  Not all systems have dirname.
2263  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2264  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2265    # The file is in a subdirectory.
2266    test ! -d "$ac_dir" && mkdir "$ac_dir"
2267    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2268    # A "../" for each directory in $ac_dir_suffix.
2269    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2270  else
2271    ac_dir_suffix= ac_dots=
2272  fi
2273
2274  case "$ac_given_srcdir" in
2275  .)  srcdir=.
2276      if test -z "$ac_dots"; then top_srcdir=.
2277      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2278  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2279  *) # Relative path.
2280    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2281    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2282  esac
2283
2284  case "$ac_given_INSTALL" in
2285  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2286  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2287  esac
2288  echo creating "$ac_file"
2289  rm -f "$ac_file"
2290  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2291  case "$ac_file" in
2292  *Makefile*) ac_comsub="1i\\
2293# $configure_input" ;;
2294  *) ac_comsub= ;;
2295  esac
2296  sed -e "$ac_comsub
2297s%@configure_input@%$configure_input%g
2298s%@srcdir@%$srcdir%g
2299s%@top_srcdir@%$top_srcdir%g
2300s%@INSTALL@%$INSTALL%g
2301" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2302fi; done
2303rm -f conftest.subs
2304
2305# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2306# NAME is the cpp macro being defined and VALUE is the value it is being given.
2307#
2308# ac_d sets the value in "#define NAME VALUE" lines.
2309ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2310ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2311ac_dC='\3'
2312ac_dD='%g'
2313# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2314ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2315ac_uB='\([      ]\)%\1#\2define\3'
2316ac_uC=' '
2317ac_uD='\4%g'
2318# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2319ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2320ac_eB='$%\1#\2define\3'
2321ac_eC=' '
2322ac_eD='%g'
2323
2324CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2325for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2326  # Support "outfile[:infile]", defaulting infile="outfile.in".
2327  case "$ac_file" in
2328  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2329       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2330  *) ac_file_in="${ac_file}.in" ;;
2331  esac
2332
2333  echo creating $ac_file
2334
2335  rm -f conftest.frag conftest.in conftest.out
2336  cp $ac_given_srcdir/$ac_file_in conftest.in
2337
2338EOF
2339
2340# Transform confdefs.h into a sed script conftest.vals that substitutes
2341# the proper values into config.h.in to produce config.h.  And first:
2342# Protect against being on the right side of a sed subst in config.status.
2343# Protect against being in an unquoted here document in config.status.
2344rm -f conftest.vals
2345cat > conftest.hdr <<\EOF
2346s/[\\&%]/\\&/g
2347s%[\\$`]%\\&%g
2348s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2349s%ac_d%ac_u%gp
2350s%ac_u%ac_e%gp
2351EOF
2352sed -n -f conftest.hdr confdefs.h > conftest.vals
2353rm -f conftest.hdr
2354
2355# This sed command replaces #undef with comments.  This is necessary, for
2356# example, in the case of _POSIX_SOURCE, which is predefined and required
2357# on some systems where configure will not decide to define it.
2358cat >> conftest.vals <<\EOF
2359s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2360EOF
2361
2362# Break up conftest.vals because some shells have a limit on
2363# the size of here documents, and old seds have small limits too.
2364# Maximum number of lines to put in a single here document.
2365ac_max_here_lines=12
2366
2367rm -f conftest.tail
2368while :
2369do
2370  ac_lines=`grep -c . conftest.vals`
2371  # grep -c gives empty output for an empty file on some AIX systems.
2372  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2373  # Write a limited-size here document to conftest.frag.
2374  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2375  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2376  echo 'CEOF
2377  sed -f conftest.frag conftest.in > conftest.out
2378  rm -f conftest.in
2379  mv conftest.out conftest.in
2380' >> $CONFIG_STATUS
2381  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2382  rm -f conftest.vals
2383  mv conftest.tail conftest.vals
2384done
2385rm -f conftest.vals
2386
2387cat >> $CONFIG_STATUS <<\EOF
2388  rm -f conftest.frag conftest.h
2389  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2390  cat conftest.in >> conftest.h
2391  rm -f conftest.in
2392  if cmp -s $ac_file conftest.h 2>/dev/null; then
2393    echo "$ac_file is unchanged"
2394    rm -f conftest.h
2395  else
2396    # Remove last slash and all that follows it.  Not all systems have dirname.
2397      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2398      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2399      # The file is in a subdirectory.
2400      test ! -d "$ac_dir" && mkdir "$ac_dir"
2401    fi
2402    rm -f $ac_file
2403    mv conftest.h $ac_file
2404  fi
2405fi; done
2406
2407
2408
2409exit 0
2410EOF
2411chmod +x $CONFIG_STATUS
2412rm -fr confdefs* $ac_clean_files
2413test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2414
Note: See TracBrowser for help on using the repository browser.