source: git/factory/configure @ 104fd23

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