source: git/configure @ 575b64

spielwiese
Last change on this file since 575b64 was 575b64, checked in by Hans Schönemann <hannes@…>, 16 years ago
*hannes: check for uudecode git-svn-id: file:///usr/local/Singular/svn/trunk@10764 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 102.1 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=`pwd`
15ac_help="$ac_help
16\
17  --with-tmpdir=DIR       use DIR as temporary directory"
18ac_help="$ac_help
19\
20  --enable-PACKAGE        configure and/or build PACKAGE
21  --disable-PACKAGE       do not configure and/or build PACKAGE
22   where PACKAGE can be:
23     omalloc               omalloc memory managment"
24ac_help="$ac_help
25\
26     gmp                  Gnu Multiple Precision package"
27ac_help="$ac_help
28\
29     MP                   Multi Protocol library"
30ac_help="$ac_help
31\
32     factory              polynomial factorization library"
33ac_help="$ac_help
34\
35     libfac               char set and modp poly factorization library"
36ac_help="$ac_help
37\
38     sgroup               numerical semigroup computations"
39ac_help="$ac_help
40\
41     Singular             CAS for Polynomial Computations"
42ac_help="$ac_help
43\
44     IntegerProgramming   IntegerProgramming"
45ac_help="$ac_help
46\
47     Plural               Plural"
48ac_help="$ac_help
49\
50     Texinfo              Texinfo for info, texi2dvi, makeinfo"
51ac_help="$ac_help
52\
53     Texi2html            Texinfo to HTML converter"
54ac_help="$ac_help
55\
56     doc                  Singular documentation"
57ac_help="$ac_help
58\
59     emacs                emacs completion files"
60ac_help="$ac_help
61\
62  --with-PACKAGE          use PACKAGE, provide dependent functionality
63  --without-PACKAGE       do not use PACKAGE, disable dependent functionality
64   where PACKAGE can be:
65     MP                   Multi Protocol library"
66ac_help="$ac_help
67\
68     factory              polynomial factorization library"
69ac_help="$ac_help
70\
71     libfac               char set and modp poly factorization library"
72ac_help="$ac_help
73\
74  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic
75                          where PACKAGE can be gmp
76All additional --enable and --with options are passed to subsequent calls
77to configure of the packages to be built. See also configure --help in
78these packages (resp. subdirs). "
79
80# Initialize some variables set by options.
81# The variables have the same names as the options, with
82# dashes changed to underlines.
83build=NONE
84cache_file=./config.cache
85exec_prefix=NONE
86host=NONE
87no_create=
88nonopt=NONE
89no_recursion=
90prefix=NONE
91program_prefix=NONE
92program_suffix=NONE
93program_transform_name=s,x,x,
94silent=
95site=
96srcdir=
97target=NONE
98verbose=
99x_includes=NONE
100x_libraries=NONE
101bindir='${exec_prefix}/bin'
102sbindir='${exec_prefix}/sbin'
103libexecdir='${exec_prefix}/libexec'
104datadir='${prefix}/share'
105sysconfdir='${prefix}/etc'
106sharedstatedir='${prefix}/com'
107localstatedir='${prefix}/var'
108libdir='${exec_prefix}/lib'
109includedir='${prefix}/include'
110oldincludedir='/usr/include'
111infodir='${prefix}/info'
112mandir='${prefix}/man'
113
114# Initialize some other variables.
115subdirs=
116MFLAGS= MAKEFLAGS=
117SHELL=${CONFIG_SHELL-/bin/sh}
118# Maximum number of lines to put in a shell here document.
119ac_max_here_lines=12
120
121ac_prev=
122for ac_option
123do
124
125  # If the previous option needs an argument, assign it.
126  if test -n "$ac_prev"; then
127    eval "$ac_prev=\$ac_option"
128    ac_prev=
129    continue
130  fi
131
132  case "$ac_option" in
133  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
134  *) ac_optarg= ;;
135  esac
136
137  # Accept the important Cygnus configure options, so we can diagnose typos.
138
139  case "$ac_option" in
140
141  -bindir | --bindir | --bindi | --bind | --bin | --bi)
142    ac_prev=bindir ;;
143  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
144    bindir="$ac_optarg" ;;
145
146  -build | --build | --buil | --bui | --bu)
147    ac_prev=build ;;
148  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
149    build="$ac_optarg" ;;
150
151  -cache-file | --cache-file | --cache-fil | --cache-fi \
152  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
153    ac_prev=cache_file ;;
154  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
155  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
156    cache_file="$ac_optarg" ;;
157
158  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
159    ac_prev=datadir ;;
160  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
161  | --da=*)
162    datadir="$ac_optarg" ;;
163
164  -disable-* | --disable-*)
165    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
166    # Reject names that are not valid shell variable names.
167    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
168      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
169    fi
170    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
171    eval "enable_${ac_feature}=no" ;;
172
173  -enable-* | --enable-*)
174    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
175    # Reject names that are not valid shell variable names.
176    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
177      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
178    fi
179    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
180    case "$ac_option" in
181      *=*) ;;
182      *) ac_optarg=yes ;;
183    esac
184    eval "enable_${ac_feature}='$ac_optarg'" ;;
185
186  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
187  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
188  | --exec | --exe | --ex)
189    ac_prev=exec_prefix ;;
190  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
191  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
192  | --exec=* | --exe=* | --ex=*)
193    exec_prefix="$ac_optarg" ;;
194
195  -gas | --gas | --ga | --g)
196    # Obsolete; use --with-gas.
197    with_gas=yes ;;
198
199  -help | --help | --hel | --he)
200    # Omit some internal or obsolete options to make the list less imposing.
201    # This message is too long to be a string in the A/UX 3.1 sh.
202    cat << EOF
203Usage: configure [options] [host]
204Options: [defaults in brackets after descriptions]
205Configuration:
206  --cache-file=FILE       cache test results in FILE
207  --help                  print this message
208  --no-create             do not create output files
209  --quiet, --silent       do not print \`checking...' messages
210  --version               print the version of autoconf that created configure
211Directory and file names:
212  --prefix=PREFIX         install architecture-independent files in PREFIX
213                          [$ac_default_prefix]
214  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
215                          [same as prefix]
216  --bindir=DIR            user executables in DIR [EPREFIX/bin]
217  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
218  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
219  --datadir=DIR           read-only architecture-independent data in DIR
220                          [PREFIX/share]
221  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
222  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
223                          [PREFIX/com]
224  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
225  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
226  --includedir=DIR        C header files in DIR [PREFIX/include]
227  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
228  --infodir=DIR           info documentation in DIR [PREFIX/info]
229  --mandir=DIR            man documentation in DIR [PREFIX/man]
230  --srcdir=DIR            find the sources in DIR [configure dir or ..]
231  --program-prefix=PREFIX prepend PREFIX to installed program names
232  --program-suffix=SUFFIX append SUFFIX to installed program names
233  --program-transform-name=PROGRAM
234                          run sed PROGRAM on installed program names
235EOF
236    cat << EOF
237Host type:
238  --build=BUILD           configure for building on BUILD [BUILD=HOST]
239  --host=HOST             configure for HOST [guessed]
240  --target=TARGET         configure for TARGET [TARGET=HOST]
241Features and packages:
242  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
243  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
244  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
245  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
246  --x-includes=DIR        X include files are in DIR
247  --x-libraries=DIR       X library files are in DIR
248EOF
249    if test -n "$ac_help"; then
250      echo "--enable and --with options recognized:$ac_help"
251    fi
252    exit 0 ;;
253
254  -host | --host | --hos | --ho)
255    ac_prev=host ;;
256  -host=* | --host=* | --hos=* | --ho=*)
257    host="$ac_optarg" ;;
258
259  -includedir | --includedir | --includedi | --included | --include \
260  | --includ | --inclu | --incl | --inc)
261    ac_prev=includedir ;;
262  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
263  | --includ=* | --inclu=* | --incl=* | --inc=*)
264    includedir="$ac_optarg" ;;
265
266  -infodir | --infodir | --infodi | --infod | --info | --inf)
267    ac_prev=infodir ;;
268  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
269    infodir="$ac_optarg" ;;
270
271  -libdir | --libdir | --libdi | --libd)
272    ac_prev=libdir ;;
273  -libdir=* | --libdir=* | --libdi=* | --libd=*)
274    libdir="$ac_optarg" ;;
275
276  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
277  | --libexe | --libex | --libe)
278    ac_prev=libexecdir ;;
279  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
280  | --libexe=* | --libex=* | --libe=*)
281    libexecdir="$ac_optarg" ;;
282
283  -localstatedir | --localstatedir | --localstatedi | --localstated \
284  | --localstate | --localstat | --localsta | --localst \
285  | --locals | --local | --loca | --loc | --lo)
286    ac_prev=localstatedir ;;
287  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
288  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
289  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
290    localstatedir="$ac_optarg" ;;
291
292  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
293    ac_prev=mandir ;;
294  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
295    mandir="$ac_optarg" ;;
296
297  -nfp | --nfp | --nf)
298    # Obsolete; use --without-fp.
299    with_fp=no ;;
300
301  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
302  | --no-cr | --no-c)
303    no_create=yes ;;
304
305  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
306  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
307    no_recursion=yes ;;
308
309  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
310  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
311  | --oldin | --oldi | --old | --ol | --o)
312    ac_prev=oldincludedir ;;
313  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
314  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
315  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
316    oldincludedir="$ac_optarg" ;;
317
318  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
319    ac_prev=prefix ;;
320  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
321    prefix="$ac_optarg" ;;
322
323  -program-prefix | --program-prefix | --program-prefi | --program-pref \
324  | --program-pre | --program-pr | --program-p)
325    ac_prev=program_prefix ;;
326  -program-prefix=* | --program-prefix=* | --program-prefi=* \
327  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
328    program_prefix="$ac_optarg" ;;
329
330  -program-suffix | --program-suffix | --program-suffi | --program-suff \
331  | --program-suf | --program-su | --program-s)
332    ac_prev=program_suffix ;;
333  -program-suffix=* | --program-suffix=* | --program-suffi=* \
334  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
335    program_suffix="$ac_optarg" ;;
336
337  -program-transform-name | --program-transform-name \
338  | --program-transform-nam | --program-transform-na \
339  | --program-transform-n | --program-transform- \
340  | --program-transform | --program-transfor \
341  | --program-transfo | --program-transf \
342  | --program-trans | --program-tran \
343  | --progr-tra | --program-tr | --program-t)
344    ac_prev=program_transform_name ;;
345  -program-transform-name=* | --program-transform-name=* \
346  | --program-transform-nam=* | --program-transform-na=* \
347  | --program-transform-n=* | --program-transform-=* \
348  | --program-transform=* | --program-transfor=* \
349  | --program-transfo=* | --program-transf=* \
350  | --program-trans=* | --program-tran=* \
351  | --progr-tra=* | --program-tr=* | --program-t=*)
352    program_transform_name="$ac_optarg" ;;
353
354  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
355  | -silent | --silent | --silen | --sile | --sil)
356    silent=yes ;;
357
358  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
359    ac_prev=sbindir ;;
360  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
361  | --sbi=* | --sb=*)
362    sbindir="$ac_optarg" ;;
363
364  -sharedstatedir | --sharedstatedir | --sharedstatedi \
365  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
366  | --sharedst | --shareds | --shared | --share | --shar \
367  | --sha | --sh)
368    ac_prev=sharedstatedir ;;
369  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
370  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
371  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
372  | --sha=* | --sh=*)
373    sharedstatedir="$ac_optarg" ;;
374
375  -site | --site | --sit)
376    ac_prev=site ;;
377  -site=* | --site=* | --sit=*)
378    site="$ac_optarg" ;;
379
380  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
381    ac_prev=srcdir ;;
382  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
383    srcdir="$ac_optarg" ;;
384
385  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
386  | --syscon | --sysco | --sysc | --sys | --sy)
387    ac_prev=sysconfdir ;;
388  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
389  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
390    sysconfdir="$ac_optarg" ;;
391
392  -target | --target | --targe | --targ | --tar | --ta | --t)
393    ac_prev=target ;;
394  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
395    target="$ac_optarg" ;;
396
397  -v | -verbose | --verbose | --verbos | --verbo | --verb)
398    verbose=yes ;;
399
400  -version | --version | --versio | --versi | --vers)
401    echo "configure generated by autoconf version 2.13"
402    exit 0 ;;
403
404  -with-* | --with-*)
405    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
406    # Reject names that are not valid shell variable names.
407    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
408      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409    fi
410    ac_package=`echo $ac_package| sed 's/-/_/g'`
411    case "$ac_option" in
412      *=*) ;;
413      *) ac_optarg=yes ;;
414    esac
415    eval "with_${ac_package}='$ac_optarg'" ;;
416
417  -without-* | --without-*)
418    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
419    # Reject names that are not valid shell variable names.
420    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
421      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
422    fi
423    ac_package=`echo $ac_package| sed 's/-/_/g'`
424    eval "with_${ac_package}=no" ;;
425
426  --x)
427    # Obsolete; use --with-x.
428    with_x=yes ;;
429
430  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
431  | --x-incl | --x-inc | --x-in | --x-i)
432    ac_prev=x_includes ;;
433  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
434  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
435    x_includes="$ac_optarg" ;;
436
437  -x-libraries | --x-libraries | --x-librarie | --x-librari \
438  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
439    ac_prev=x_libraries ;;
440  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
441  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
442    x_libraries="$ac_optarg" ;;
443
444  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
445    ;;
446
447  *)
448    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
449      echo "configure: warning: $ac_option: invalid host type" 1>&2
450    fi
451    if test "x$nonopt" != xNONE; then
452      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
453    fi
454    nonopt="$ac_option"
455    ;;
456
457  esac
458done
459
460if test -n "$ac_prev"; then
461  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
462fi
463
464trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
465
466# File descriptor usage:
467# 0 standard input
468# 1 file creation
469# 2 errors and warnings
470# 3 some systems may open it to /dev/tty
471# 4 used on the Kubota Titan
472# 6 checking for... messages and results
473# 5 compiler messages saved in config.log
474if test "$silent" = yes; then
475  exec 6>/dev/null
476else
477  exec 6>&1
478fi
479exec 5>./config.log
480
481echo "\
482This file contains any messages produced by compilers while
483running configure, to aid debugging if configure makes a mistake.
484" 1>&5
485
486# Strip out --no-create and --no-recursion so they do not pile up.
487# Also quote any args containing shell metacharacters.
488ac_configure_args=
489for ac_arg
490do
491  case "$ac_arg" in
492  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
493  | --no-cr | --no-c) ;;
494  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
496  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
497  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
498  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
499  esac
500done
501
502# NLS nuisances.
503# Only set these to C if already set.  These must not be set unconditionally
504# because not all systems understand e.g. LANG=C (notably SCO).
505# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
506# Non-C LC_CTYPE values break the ctype check.
507if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
508if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
509if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
510if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
511
512# confdefs.h avoids OS command line length limits that DEFS can exceed.
513rm -rf conftest* confdefs.h
514# AIX cpp loses on an empty file, so make sure it contains at least a newline.
515echo > confdefs.h
516
517# A filename unique to this package, relative to the directory that
518# configure is in, which we can look for to find out if srcdir is correct.
519ac_unique_file=kernel/matpol.h
520
521# Find the source files, if location was not specified.
522if test -z "$srcdir"; then
523  ac_srcdir_defaulted=yes
524  # Try the directory containing this script, then its parent.
525  ac_prog=$0
526  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
527  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
528  srcdir=$ac_confdir
529  if test ! -r $srcdir/$ac_unique_file; then
530    srcdir=..
531  fi
532else
533  ac_srcdir_defaulted=no
534fi
535if test ! -r $srcdir/$ac_unique_file; then
536  if test "$ac_srcdir_defaulted" = yes; then
537    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
538  else
539    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
540  fi
541fi
542srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
543
544# Prefer explicitly selected file to automatically selected ones.
545if test -z "$CONFIG_SITE"; then
546  if test "x$prefix" != xNONE; then
547    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
548  else
549    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
550  fi
551fi
552for ac_site_file in $CONFIG_SITE; do
553  if test -r "$ac_site_file"; then
554    echo "loading site script $ac_site_file"
555    . "$ac_site_file"
556  fi
557done
558
559if test -r "$cache_file"; then
560  echo "loading cache $cache_file"
561  . $cache_file
562else
563  echo "creating cache $cache_file"
564  > $cache_file
565fi
566
567ac_ext=c
568# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
569ac_cpp='$CPP $CPPFLAGS'
570ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
571ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
572cross_compiling=$ac_cv_prog_cc_cross
573
574ac_exeext=
575ac_objext=o
576if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
577  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
578  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
579    ac_n= ac_c='
580' ac_t='        '
581  else
582    ac_n=-n ac_c= ac_t=
583  fi
584else
585  ac_n= ac_c='\c' ac_t=
586fi
587
588
589
590pwd=`pwd`
591
592# make them to env variables
593# pass them indirectly to subsequent configures
594SINGULAR_MAJOR_VERSION=3
595SINGULAR_MINOR_VERSION=0
596SINGULAR_SUB_VERSION=4
597VERSION_SEP="-"
598SINGULAR_SHORT_VERSION="${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}"
599SINGULAR_VERSION="${SINGULAR_SHORT_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}"
600SINGULAR_RPM_VERSION="${SINGULAR_MAJOR_VERSION}.${SINGULAR_MINOR_VERSION}.${SINGULAR_SUB_VERSION}"
601VERSION_DATE="Nov 2007"
602SINGULAR_ROOT_DIR=$pwd
603
604export SINGULAR_MINOR_VERSION
605export SINGULAR_MAJOR_VERSION
606export SINGULAR_SUB_VERSION
607export SINGULAR_VERSION
608export SINGULAR_RPM_VERSION
609export VERSION_DATE
610export SINGULAR_ROOT_DIR
611
612
613
614
615
616
617
618
619# determine Makefiles to output
620OUTPUT_MAKEFILES="Makefile"
621if test -d "doc"; then
622   OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES doc/Makefile doc/version.texi doc/uname.texi"
623fi
624if test -d "emacs"; then
625   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" emacs/Makefile"
626fi
627if test -d "IntegerProgramming"; then
628   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" IntegerProgramming/Makefile"
629fi
630if test -d "Plural"; then
631   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" Plural/Makefile"
632fi
633if test -d "InstallShield"; then
634   OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" InstallShield/Makefile InstallShield/Etc/Makefile InstallShield/Cygwin/Makefile InstallShield/Singular/Makefile InstallShield/Xemacs/Makefile"
635fi
636
637
638echo $ac_n "checking uname for singular""... $ac_c" 1>&6
639echo "configure:640: checking uname for singular" >&5
640if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then
641  echo $ac_n "(cached) $ac_c" 1>&6
642else
643  ac_cv_singuname="unknown"
644if test -r "singuname.sh"; then
645  if (/bin/sh singuname.sh >/dev/null 2>&1) then
646    ac_cv_singuname=`/bin/sh singuname.sh`
647  fi
648fi
649
650fi
651
652echo "$ac_t""$ac_cv_singuname" 1>&6
653if test "$ac_cv_singuname" = unknown; then
654  { echo "configure: error: Unknown architecture: Check singuname.sh" 1>&2; exit 1; }
655else
656  SINGUNAME=$ac_cv_singuname
657 
658fi
659
660SING_UNAME=`echo $SINGUNAME | tr '-' '_' `
661
662
663
664if test "${CXXFLAGS+set}" != set; then
665  ac_cxxflags_set=no
666  CXXFLAGS="-O"
667fi
668if test "${CFLAGS+set}" != set; then
669  CFLAGS="-O"
670  ac_cflags_set=no
671fi
672
673# Extract the first word of "gcc", so it can be a program name with args.
674set dummy gcc; ac_word=$2
675echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
676echo "configure:677: checking for $ac_word" >&5
677if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
678  echo $ac_n "(cached) $ac_c" 1>&6
679else
680  if test -n "$CC"; then
681  ac_cv_prog_CC="$CC" # Let the user override the test.
682else
683  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
684  ac_dummy="$PATH"
685  for ac_dir in $ac_dummy; do
686    test -z "$ac_dir" && ac_dir=.
687    if test -f $ac_dir/$ac_word; then
688      ac_cv_prog_CC="gcc"
689      break
690    fi
691  done
692  IFS="$ac_save_ifs"
693fi
694fi
695CC="$ac_cv_prog_CC"
696if test -n "$CC"; then
697  echo "$ac_t""$CC" 1>&6
698else
699  echo "$ac_t""no" 1>&6
700fi
701
702if test -z "$CC"; then
703  # Extract the first word of "cc", so it can be a program name with args.
704set dummy cc; ac_word=$2
705echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
706echo "configure:707: checking for $ac_word" >&5
707if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
708  echo $ac_n "(cached) $ac_c" 1>&6
709else
710  if test -n "$CC"; then
711  ac_cv_prog_CC="$CC" # Let the user override the test.
712else
713  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
714  ac_prog_rejected=no
715  ac_dummy="$PATH"
716  for ac_dir in $ac_dummy; do
717    test -z "$ac_dir" && ac_dir=.
718    if test -f $ac_dir/$ac_word; then
719      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
720        ac_prog_rejected=yes
721        continue
722      fi
723      ac_cv_prog_CC="cc"
724      break
725    fi
726  done
727  IFS="$ac_save_ifs"
728if test $ac_prog_rejected = yes; then
729  # We found a bogon in the path, so make sure we never use it.
730  set dummy $ac_cv_prog_CC
731  shift
732  if test $# -gt 0; then
733    # We chose a different compiler from the bogus one.
734    # However, it has the same basename, so the bogon will be chosen
735    # first if we set CC to just the basename; use the full file name.
736    shift
737    set dummy "$ac_dir/$ac_word" "$@"
738    shift
739    ac_cv_prog_CC="$@"
740  fi
741fi
742fi
743fi
744CC="$ac_cv_prog_CC"
745if test -n "$CC"; then
746  echo "$ac_t""$CC" 1>&6
747else
748  echo "$ac_t""no" 1>&6
749fi
750
751  if test -z "$CC"; then
752    case "`uname -s`" in
753    *win32* | *WIN32*)
754      # Extract the first word of "cl", so it can be a program name with args.
755set dummy cl; ac_word=$2
756echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
757echo "configure:758: checking for $ac_word" >&5
758if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
759  echo $ac_n "(cached) $ac_c" 1>&6
760else
761  if test -n "$CC"; then
762  ac_cv_prog_CC="$CC" # Let the user override the test.
763else
764  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
765  ac_dummy="$PATH"
766  for ac_dir in $ac_dummy; do
767    test -z "$ac_dir" && ac_dir=.
768    if test -f $ac_dir/$ac_word; then
769      ac_cv_prog_CC="cl"
770      break
771    fi
772  done
773  IFS="$ac_save_ifs"
774fi
775fi
776CC="$ac_cv_prog_CC"
777if test -n "$CC"; then
778  echo "$ac_t""$CC" 1>&6
779else
780  echo "$ac_t""no" 1>&6
781fi
782 ;;
783    esac
784  fi
785  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
786fi
787
788echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
789echo "configure:790: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
790
791ac_ext=c
792# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
793ac_cpp='$CPP $CPPFLAGS'
794ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
795ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
796cross_compiling=$ac_cv_prog_cc_cross
797
798cat > conftest.$ac_ext << EOF
799
800#line 801 "configure"
801#include "confdefs.h"
802
803main(){return(0);}
804EOF
805if { (eval echo configure:806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
806  ac_cv_prog_cc_works=yes
807  # If we can't run a trivial program, we are probably using a cross compiler.
808  if (./conftest; exit) 2>/dev/null; then
809    ac_cv_prog_cc_cross=no
810  else
811    ac_cv_prog_cc_cross=yes
812  fi
813else
814  echo "configure: failed program was:" >&5
815  cat conftest.$ac_ext >&5
816  ac_cv_prog_cc_works=no
817fi
818rm -fr conftest*
819ac_ext=c
820# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
821ac_cpp='$CPP $CPPFLAGS'
822ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
823ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
824cross_compiling=$ac_cv_prog_cc_cross
825
826echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
827if test $ac_cv_prog_cc_works = no; then
828  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
829fi
830echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
831echo "configure:832: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
832echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
833cross_compiling=$ac_cv_prog_cc_cross
834
835echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
836echo "configure:837: checking whether we are using GNU C" >&5
837if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
838  echo $ac_n "(cached) $ac_c" 1>&6
839else
840  cat > conftest.c <<EOF
841#ifdef __GNUC__
842  yes;
843#endif
844EOF
845if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
846  ac_cv_prog_gcc=yes
847else
848  ac_cv_prog_gcc=no
849fi
850fi
851
852echo "$ac_t""$ac_cv_prog_gcc" 1>&6
853
854if test $ac_cv_prog_gcc = yes; then
855  GCC=yes
856else
857  GCC=
858fi
859
860ac_test_CFLAGS="${CFLAGS+set}"
861ac_save_CFLAGS="$CFLAGS"
862CFLAGS=
863echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
864echo "configure:865: checking whether ${CC-cc} accepts -g" >&5
865if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
866  echo $ac_n "(cached) $ac_c" 1>&6
867else
868  echo 'void f(){}' > conftest.c
869if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
870  ac_cv_prog_cc_g=yes
871else
872  ac_cv_prog_cc_g=no
873fi
874rm -f conftest*
875
876fi
877
878echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
879if test "$ac_test_CFLAGS" = set; then
880  CFLAGS="$ac_save_CFLAGS"
881elif test $ac_cv_prog_cc_g = yes; then
882  if test "$GCC" = yes; then
883    CFLAGS="-g -O2"
884  else
885    CFLAGS="-g"
886  fi
887else
888  if test "$GCC" = yes; then
889    CFLAGS="-O2"
890  else
891    CFLAGS=
892  fi
893fi
894
895echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
896echo "configure:897: checking how to run the C preprocessor" >&5
897# On Suns, sometimes $CPP names a directory.
898if test -n "$CPP" && test -d "$CPP"; then
899  CPP=
900fi
901if test -z "$CPP"; then
902if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
903  echo $ac_n "(cached) $ac_c" 1>&6
904else
905    # This must be in double quotes, not single quotes, because CPP may get
906  # substituted into the Makefile and "${CC-cc}" will confuse make.
907  CPP="${CC-cc} -E"
908  # On the NeXT, cc -E runs the code through the compiler's parser,
909  # not just through cpp.
910  cat > conftest.$ac_ext <<EOF
911#line 912 "configure"
912#include "confdefs.h"
913#include <assert.h>
914Syntax Error
915EOF
916ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
917{ (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
918ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
919if test -z "$ac_err"; then
920  :
921else
922  echo "$ac_err" >&5
923  echo "configure: failed program was:" >&5
924  cat conftest.$ac_ext >&5
925  rm -rf conftest*
926  CPP="${CC-cc} -E -traditional-cpp"
927  cat > conftest.$ac_ext <<EOF
928#line 929 "configure"
929#include "confdefs.h"
930#include <assert.h>
931Syntax Error
932EOF
933ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
934{ (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
935ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
936if test -z "$ac_err"; then
937  :
938else
939  echo "$ac_err" >&5
940  echo "configure: failed program was:" >&5
941  cat conftest.$ac_ext >&5
942  rm -rf conftest*
943  CPP="${CC-cc} -nologo -E"
944  cat > conftest.$ac_ext <<EOF
945#line 946 "configure"
946#include "confdefs.h"
947#include <assert.h>
948Syntax Error
949EOF
950ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
951{ (eval echo configure:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
952ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
953if test -z "$ac_err"; then
954  :
955else
956  echo "$ac_err" >&5
957  echo "configure: failed program was:" >&5
958  cat conftest.$ac_ext >&5
959  rm -rf conftest*
960  CPP=/lib/cpp
961fi
962rm -f conftest*
963fi
964rm -f conftest*
965fi
966rm -f conftest*
967  ac_cv_prog_CPP="$CPP"
968fi
969  CPP="$ac_cv_prog_CPP"
970else
971  ac_cv_prog_CPP="$CPP"
972fi
973echo "$ac_t""$CPP" 1>&6
974
975ac_aux_dir=
976for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
977  if test -f $ac_dir/install-sh; then
978    ac_aux_dir=$ac_dir
979    ac_install_sh="$ac_aux_dir/install-sh -c"
980    break
981  elif test -f $ac_dir/install.sh; then
982    ac_aux_dir=$ac_dir
983    ac_install_sh="$ac_aux_dir/install.sh -c"
984    break
985  fi
986done
987if test -z "$ac_aux_dir"; then
988  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
989fi
990ac_config_guess=$ac_aux_dir/config.guess
991ac_config_sub=$ac_aux_dir/config.sub
992ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
993
994# Find a good install program.  We prefer a C program (faster),
995# so one script is as good as another.  But avoid the broken or
996# incompatible versions:
997# SysV /etc/install, /usr/sbin/install
998# SunOS /usr/etc/install
999# IRIX /sbin/install
1000# AIX /bin/install
1001# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1002# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1003# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1004# ./install, which can be erroneously created by make from ./install.sh.
1005echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1006echo "configure:1007: checking for a BSD compatible install" >&5
1007if test -z "$INSTALL"; then
1008if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1009  echo $ac_n "(cached) $ac_c" 1>&6
1010else
1011    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1012  for ac_dir in $PATH; do
1013    # Account for people who put trailing slashes in PATH elements.
1014    case "$ac_dir/" in
1015    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1016    *)
1017      # OSF1 and SCO ODT 3.0 have their own names for install.
1018      # Don't use installbsd from OSF since it installs stuff as root
1019      # by default.
1020      for ac_prog in ginstall scoinst install; do
1021        if test -f $ac_dir/$ac_prog; then
1022          if test $ac_prog = install &&
1023            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1024            # AIX install.  It has an incompatible calling convention.
1025            :
1026          else
1027            ac_cv_path_install="$ac_dir/$ac_prog -c"
1028            break 2
1029          fi
1030        fi
1031      done
1032      ;;
1033    esac
1034  done
1035  IFS="$ac_save_IFS"
1036
1037fi
1038  if test "${ac_cv_path_install+set}" = set; then
1039    INSTALL="$ac_cv_path_install"
1040  else
1041    # As a last resort, use the slow shell script.  We don't cache a
1042    # path for INSTALL within a source directory, because that will
1043    # break other packages using the cache if that directory is
1044    # removed, or if the path is relative.
1045    INSTALL="$ac_install_sh"
1046  fi
1047fi
1048echo "$ac_t""$INSTALL" 1>&6
1049
1050# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1051# It thinks the first close brace ends the variable substitution.
1052test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1053
1054test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1055
1056test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1057
1058echo $ac_n "checking for AIX""... $ac_c" 1>&6
1059echo "configure:1060: checking for AIX" >&5
1060cat > conftest.$ac_ext <<EOF
1061#line 1062 "configure"
1062#include "confdefs.h"
1063#ifdef _AIX
1064  yes
1065#endif
1066
1067EOF
1068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1069  egrep "yes" >/dev/null 2>&1; then
1070  rm -rf conftest*
1071  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1072#define _ALL_SOURCE 1
1073EOF
1074
1075else
1076  rm -rf conftest*
1077  echo "$ac_t""no" 1>&6
1078fi
1079rm -f conftest*
1080
1081
1082for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1083do
1084# Extract the first word of "$ac_prog", so it can be a program name with args.
1085set dummy $ac_prog; ac_word=$2
1086echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087echo "configure:1088: checking for $ac_word" >&5
1088if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1089  echo $ac_n "(cached) $ac_c" 1>&6
1090else
1091  if test -n "$CXX"; then
1092  ac_cv_prog_CXX="$CXX" # Let the user override the test.
1093else
1094  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1095  ac_dummy="$PATH"
1096  for ac_dir in $ac_dummy; do
1097    test -z "$ac_dir" && ac_dir=.
1098    if test -f $ac_dir/$ac_word; then
1099      ac_cv_prog_CXX="$ac_prog"
1100      break
1101    fi
1102  done
1103  IFS="$ac_save_ifs"
1104fi
1105fi
1106CXX="$ac_cv_prog_CXX"
1107if test -n "$CXX"; then
1108  echo "$ac_t""$CXX" 1>&6
1109else
1110  echo "$ac_t""no" 1>&6
1111fi
1112
1113test -n "$CXX" && break
1114done
1115test -n "$CXX" || CXX="gcc"
1116
1117
1118echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1119echo "configure:1120: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1120
1121ac_ext=C
1122# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1123ac_cpp='$CXXCPP $CPPFLAGS'
1124ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1125ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1126cross_compiling=$ac_cv_prog_cxx_cross
1127
1128cat > conftest.$ac_ext << EOF
1129
1130#line 1131 "configure"
1131#include "confdefs.h"
1132
1133int main(){return(0);}
1134EOF
1135if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1136  ac_cv_prog_cxx_works=yes
1137  # If we can't run a trivial program, we are probably using a cross compiler.
1138  if (./conftest; exit) 2>/dev/null; then
1139    ac_cv_prog_cxx_cross=no
1140  else
1141    ac_cv_prog_cxx_cross=yes
1142  fi
1143else
1144  echo "configure: failed program was:" >&5
1145  cat conftest.$ac_ext >&5
1146  ac_cv_prog_cxx_works=no
1147fi
1148rm -fr conftest*
1149ac_ext=c
1150# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1151ac_cpp='$CPP $CPPFLAGS'
1152ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1153ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1154cross_compiling=$ac_cv_prog_cc_cross
1155
1156echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1157if test $ac_cv_prog_cxx_works = no; then
1158  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1159fi
1160echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1161echo "configure:1162: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1162echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1163cross_compiling=$ac_cv_prog_cxx_cross
1164
1165echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1166echo "configure:1167: checking whether we are using GNU C++" >&5
1167if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1168  echo $ac_n "(cached) $ac_c" 1>&6
1169else
1170  cat > conftest.C <<EOF
1171#ifdef __GNUC__
1172  yes;
1173#endif
1174EOF
1175if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1176  ac_cv_prog_gxx=yes
1177else
1178  ac_cv_prog_gxx=no
1179fi
1180fi
1181
1182echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1183
1184if test $ac_cv_prog_gxx = yes; then
1185  GXX=yes
1186else
1187  GXX=
1188fi
1189
1190ac_test_CXXFLAGS="${CXXFLAGS+set}"
1191ac_save_CXXFLAGS="$CXXFLAGS"
1192CXXFLAGS=
1193echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1194echo "configure:1195: checking whether ${CXX-g++} accepts -g" >&5
1195if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1196  echo $ac_n "(cached) $ac_c" 1>&6
1197else
1198  echo 'void f(){}' > conftest.cc
1199if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1200  ac_cv_prog_cxx_g=yes
1201else
1202  ac_cv_prog_cxx_g=no
1203fi
1204rm -f conftest*
1205
1206fi
1207
1208echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1209if test "$ac_test_CXXFLAGS" = set; then
1210  CXXFLAGS="$ac_save_CXXFLAGS"
1211elif test $ac_cv_prog_cxx_g = yes; then
1212  if test "$GXX" = yes; then
1213    CXXFLAGS="-g -O2"
1214  else
1215    CXXFLAGS="-g"
1216  fi
1217else
1218  if test "$GXX" = yes; then
1219    CXXFLAGS="-O2"
1220  else
1221    CXXFLAGS=
1222  fi
1223fi
1224
1225
1226SING_CC=${CC}; export SING_CC
1227SING_CXX=${CXX}; export SING_CXX
1228
1229# check whether the compiler accepts -pipe
1230echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
1231echo "configure:1232: checking whether compiler accepts -pipe" >&5
1232temp_cflags=${CFLAGS}
1233CFLAGS="${CFLAGS} -pipe"
1234if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then
1235  echo $ac_n "(cached) $ac_c" 1>&6
1236else
1237  cat > conftest.$ac_ext <<EOF
1238#line 1239 "configure"
1239#include "confdefs.h"
1240
1241int main() {
1242
1243; return 0; }
1244EOF
1245if { (eval echo configure:1246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1246  rm -rf conftest*
1247  ac_cv_cxx_have_pipe=yes
1248else
1249  echo "configure: failed program was:" >&5
1250  cat conftest.$ac_ext >&5
1251  rm -rf conftest*
1252  ac_cv_cxx_have_pipe=no
1253fi
1254rm -f conftest*
1255
1256fi
1257
1258echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6
1259CFLAGS=${temp_cflags}
1260if test "${ac_cv_cxx_have_pipe}" != yes; then
1261  PIPE=
1262else
1263  PIPE="-pipe"
1264fi
1265
1266
1267for ac_prog in perl5 perl
1268do
1269# Extract the first word of "$ac_prog", so it can be a program name with args.
1270set dummy $ac_prog; ac_word=$2
1271echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1272echo "configure:1273: checking for $ac_word" >&5
1273if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
1274  echo $ac_n "(cached) $ac_c" 1>&6
1275else
1276  if test -n "$PERL"; then
1277  ac_cv_prog_PERL="$PERL" # Let the user override the test.
1278else
1279  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1280  ac_dummy="$PATH"
1281  for ac_dir in $ac_dummy; do
1282    test -z "$ac_dir" && ac_dir=.
1283    if test -f $ac_dir/$ac_word; then
1284      ac_cv_prog_PERL="$ac_prog"
1285      break
1286    fi
1287  done
1288  IFS="$ac_save_ifs"
1289fi
1290fi
1291PERL="$ac_cv_prog_PERL"
1292if test -n "$PERL"; then
1293  echo "$ac_t""$PERL" 1>&6
1294else
1295  echo "$ac_t""no" 1>&6
1296fi
1297
1298test -n "$PERL" && break
1299done
1300
1301for ac_prog in uudecode "uudeview -i"
1302do
1303# Extract the first word of "$ac_prog", so it can be a program name with args.
1304set dummy $ac_prog; ac_word=$2
1305echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1306echo "configure:1307: checking for $ac_word" >&5
1307if eval "test \"`echo '$''{'ac_cv_prog_UUDECODE'+set}'`\" = set"; then
1308  echo $ac_n "(cached) $ac_c" 1>&6
1309else
1310  if test -n "$UUDECODE"; then
1311  ac_cv_prog_UUDECODE="$UUDECODE" # Let the user override the test.
1312else
1313  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1314  ac_dummy="$PATH"
1315  for ac_dir in $ac_dummy; do
1316    test -z "$ac_dir" && ac_dir=.
1317    if test -f $ac_dir/$ac_word; then
1318      ac_cv_prog_UUDECODE="$ac_prog"
1319      break
1320    fi
1321  done
1322  IFS="$ac_save_ifs"
1323fi
1324fi
1325UUDECODE="$ac_cv_prog_UUDECODE"
1326if test -n "$UUDECODE"; then
1327  echo "$ac_t""$UUDECODE" 1>&6
1328else
1329  echo "$ac_t""no" 1>&6
1330fi
1331
1332test -n "$UUDECODE" && break
1333done
1334test -n "$UUDECODE" || UUDECODE="${pwd}/warn_not_found.sh uudecode"
1335
1336for ac_prog in gunzip
1337do
1338# Extract the first word of "$ac_prog", so it can be a program name with args.
1339set dummy $ac_prog; ac_word=$2
1340echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1341echo "configure:1342: checking for $ac_word" >&5
1342if eval "test \"`echo '$''{'ac_cv_prog_GUNZIP'+set}'`\" = set"; then
1343  echo $ac_n "(cached) $ac_c" 1>&6
1344else
1345  if test -n "$GUNZIP"; then
1346  ac_cv_prog_GUNZIP="$GUNZIP" # Let the user override the test.
1347else
1348  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1349  ac_dummy="$PATH"
1350  for ac_dir in $ac_dummy; do
1351    test -z "$ac_dir" && ac_dir=.
1352    if test -f $ac_dir/$ac_word; then
1353      ac_cv_prog_GUNZIP="$ac_prog"
1354      break
1355    fi
1356  done
1357  IFS="$ac_save_ifs"
1358fi
1359fi
1360GUNZIP="$ac_cv_prog_GUNZIP"
1361if test -n "$GUNZIP"; then
1362  echo "$ac_t""$GUNZIP" 1>&6
1363else
1364  echo "$ac_t""no" 1>&6
1365fi
1366
1367test -n "$GUNZIP" && break
1368done
1369test -n "$GUNZIP" || GUNZIP="${pwd}/warn_not_found.sh gunzip"
1370
1371# don't use GZIP this breaks configure
1372for ac_prog in gzip
1373do
1374# Extract the first word of "$ac_prog", so it can be a program name with args.
1375set dummy $ac_prog; ac_word=$2
1376echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1377echo "configure:1378: checking for $ac_word" >&5
1378if eval "test \"`echo '$''{'ac_cv_prog_MYGZIP'+set}'`\" = set"; then
1379  echo $ac_n "(cached) $ac_c" 1>&6
1380else
1381  if test -n "$MYGZIP"; then
1382  ac_cv_prog_MYGZIP="$MYGZIP" # Let the user override the test.
1383else
1384  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1385  ac_dummy="$PATH"
1386  for ac_dir in $ac_dummy; do
1387    test -z "$ac_dir" && ac_dir=.
1388    if test -f $ac_dir/$ac_word; then
1389      ac_cv_prog_MYGZIP="$ac_prog"
1390      break
1391    fi
1392  done
1393  IFS="$ac_save_ifs"
1394fi
1395fi
1396MYGZIP="$ac_cv_prog_MYGZIP"
1397if test -n "$MYGZIP"; then
1398  echo "$ac_t""$MYGZIP" 1>&6
1399else
1400  echo "$ac_t""no" 1>&6
1401fi
1402
1403test -n "$MYGZIP" && break
1404done
1405test -n "$MYGZIP" || MYGZIP="${pwd}/warn_not_found.sh gzip"
1406
1407# Extract the first word of "latex2html", so it can be a program name with args.
1408set dummy latex2html; ac_word=$2
1409echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1410echo "configure:1411: checking for $ac_word" >&5
1411if eval "test \"`echo '$''{'ac_cv_prog_LATEX2HTML'+set}'`\" = set"; then
1412  echo $ac_n "(cached) $ac_c" 1>&6
1413else
1414  if test -n "$LATEX2HTML"; then
1415  ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
1416else
1417  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1418  ac_dummy="$PATH"
1419  for ac_dir in $ac_dummy; do
1420    test -z "$ac_dir" && ac_dir=.
1421    if test -f $ac_dir/$ac_word; then
1422      ac_cv_prog_LATEX2HTML="latex2html"
1423      break
1424    fi
1425  done
1426  IFS="$ac_save_ifs"
1427fi
1428fi
1429LATEX2HTML="$ac_cv_prog_LATEX2HTML"
1430if test -n "$LATEX2HTML"; then
1431  echo "$ac_t""$LATEX2HTML" 1>&6
1432else
1433  echo "$ac_t""no" 1>&6
1434fi
1435
1436echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1437echo "configure:1438: checking whether ln -s works" >&5
1438if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1439  echo $ac_n "(cached) $ac_c" 1>&6
1440else
1441  rm -f conftestdata
1442if ln -s X conftestdata 2>/dev/null
1443then
1444  rm -f conftestdata
1445  ac_cv_prog_LN_S="ln -s"
1446else
1447  ac_cv_prog_LN_S=ln
1448fi
1449fi
1450LN_S="$ac_cv_prog_LN_S"
1451if test "$ac_cv_prog_LN_S" = "ln -s"; then
1452  echo "$ac_t""yes" 1>&6
1453else
1454  echo "$ac_t""no" 1>&6
1455fi
1456
1457
1458if test -r "${pwd}/mkinstalldirs"; then
1459  MKINSTALLDIRS=${pwd}/mkinstalldirs
1460 
1461else
1462  { echo "configure: error: mkinstalldirs not foind in ${pwd}" 1>&2; exit 1; }
1463fi
1464
1465# expand prefix and pass it to subsequent configures
1466if test "x$prefix" = xNONE; then
1467  prefix=${ac_default_prefix}
1468  ac_configure_args="$ac_configure_args --prefix=${prefix}"
1469fi
1470
1471# expand exec_prefix
1472if test "x$exec_prefix" = xNONE; then
1473 exec_prefix=${prefix}/${ac_cv_singuname}
1474 ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}"
1475fi
1476
1477# expand bindir
1478if test "x$bindir" = 'x${exec_prefix}/bin'; then
1479  bindir="${exec_prefix}"
1480  ac_configure_args="$ac_configure_args --bindir=${bindir}"
1481fi
1482
1483# expand libdir
1484if test "x$libdir" = 'x${exec_prefix}/lib'; then
1485  libdir="${exec_prefix}/lib"
1486  ac_configure_args="$ac_configure_args --libdir=${libdir}"
1487fi
1488
1489# expand includedir
1490if test "x$includedir" = 'x${prefix}/include'; then
1491  includedir="${exec_prefix}/include"
1492  ac_configure_args="$ac_configure_args --includedir=${includedir}"
1493fi
1494
1495# construct name of installed Singular executable
1496SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}
1497export SINGULAR
1498
1499
1500
1501# add -I to CPPFLAGS and -L to LDFLAGS, just to be sure
1502LDFLAGS="-L${libdir} ${LDFLAGS}"
1503CPPFLAGS="-I${includedir} ${CPPFLAGS}"
1504
1505# check for AIX
1506echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
1507echo "configure:1508: checking whether _AIX is defined" >&5
1508if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
1509  echo $ac_n "(cached) $ac_c" 1>&6
1510else
1511  cat > conftest.$ac_ext <<EOF
1512#line 1513 "configure"
1513#include "confdefs.h"
1514#ifdef _AIX
1515    yes
1516#endif
1517
1518EOF
1519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1520  egrep "yes" >/dev/null 2>&1; then
1521  rm -rf conftest*
1522  ac_cv_is_aix=yes
1523else
1524  rm -rf conftest*
1525  ac_cv_is_aix=no
1526fi
1527rm -f conftest*
1528
1529fi
1530
1531if test "$ac_cv_is_aix" = yes; then
1532  echo "$ac_t""yes" 1>&6
1533else
1534  echo "$ac_t""no" 1>&6
1535fi
1536
1537echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
1538echo "configure:1539: checking for atof in -lm" >&5
1539ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
1540if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1541  echo $ac_n "(cached) $ac_c" 1>&6
1542else
1543  ac_save_LIBS="$LIBS"
1544LIBS="-lm  $LIBS"
1545cat > conftest.$ac_ext <<EOF
1546#line 1547 "configure"
1547#include "confdefs.h"
1548/* Override any gcc2 internal prototype to avoid an error.  */
1549/* We use char because int might match the return type of a gcc2
1550    builtin and then its argument prototype would still apply.  */
1551char atof();
1552
1553int main() {
1554atof()
1555; return 0; }
1556EOF
1557if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1558  rm -rf conftest*
1559  eval "ac_cv_lib_$ac_lib_var=yes"
1560else
1561  echo "configure: failed program was:" >&5
1562  cat conftest.$ac_ext >&5
1563  rm -rf conftest*
1564  eval "ac_cv_lib_$ac_lib_var=no"
1565fi
1566rm -f conftest*
1567LIBS="$ac_save_LIBS"
1568
1569fi
1570if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1571  echo "$ac_t""yes" 1>&6
1572    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1573    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1574  cat >> confdefs.h <<EOF
1575#define $ac_tr_lib 1
1576EOF
1577
1578  LIBS="-lm $LIBS"
1579
1580else
1581  echo "$ac_t""no" 1>&6
1582fi
1583
1584echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
1585echo "configure:1586: checking for socket in -lbsd" >&5
1586ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
1587if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1588  echo $ac_n "(cached) $ac_c" 1>&6
1589else
1590  ac_save_LIBS="$LIBS"
1591LIBS="-lbsd  $LIBS"
1592cat > conftest.$ac_ext <<EOF
1593#line 1594 "configure"
1594#include "confdefs.h"
1595/* Override any gcc2 internal prototype to avoid an error.  */
1596/* We use char because int might match the return type of a gcc2
1597    builtin and then its argument prototype would still apply.  */
1598char socket();
1599
1600int main() {
1601socket()
1602; return 0; }
1603EOF
1604if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1605  rm -rf conftest*
1606  eval "ac_cv_lib_$ac_lib_var=yes"
1607else
1608  echo "configure: failed program was:" >&5
1609  cat conftest.$ac_ext >&5
1610  rm -rf conftest*
1611  eval "ac_cv_lib_$ac_lib_var=no"
1612fi
1613rm -f conftest*
1614LIBS="$ac_save_LIBS"
1615
1616fi
1617if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1618  echo "$ac_t""yes" 1>&6
1619    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1620    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1621  cat >> confdefs.h <<EOF
1622#define $ac_tr_lib 1
1623EOF
1624
1625  LIBS="-lbsd $LIBS"
1626
1627else
1628  echo "$ac_t""no" 1>&6
1629fi
1630
1631echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
1632echo "configure:1633: checking for listen in -lsocket" >&5
1633ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
1634if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1635  echo $ac_n "(cached) $ac_c" 1>&6
1636else
1637  ac_save_LIBS="$LIBS"
1638LIBS="-lsocket  $LIBS"
1639cat > conftest.$ac_ext <<EOF
1640#line 1641 "configure"
1641#include "confdefs.h"
1642/* Override any gcc2 internal prototype to avoid an error.  */
1643/* We use char because int might match the return type of a gcc2
1644    builtin and then its argument prototype would still apply.  */
1645char listen();
1646
1647int main() {
1648listen()
1649; return 0; }
1650EOF
1651if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1652  rm -rf conftest*
1653  eval "ac_cv_lib_$ac_lib_var=yes"
1654else
1655  echo "configure: failed program was:" >&5
1656  cat conftest.$ac_ext >&5
1657  rm -rf conftest*
1658  eval "ac_cv_lib_$ac_lib_var=no"
1659fi
1660rm -f conftest*
1661LIBS="$ac_save_LIBS"
1662
1663fi
1664if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1665  echo "$ac_t""yes" 1>&6
1666    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1667    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1668  cat >> confdefs.h <<EOF
1669#define $ac_tr_lib 1
1670EOF
1671
1672  LIBS="-lsocket $LIBS"
1673
1674else
1675  echo "$ac_t""no" 1>&6
1676fi
1677
1678echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1679echo "configure:1680: checking for gethostbyname in -lnsl" >&5
1680ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1681if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1682  echo $ac_n "(cached) $ac_c" 1>&6
1683else
1684  ac_save_LIBS="$LIBS"
1685LIBS="-lnsl  $LIBS"
1686cat > conftest.$ac_ext <<EOF
1687#line 1688 "configure"
1688#include "confdefs.h"
1689/* Override any gcc2 internal prototype to avoid an error.  */
1690/* We use char because int might match the return type of a gcc2
1691    builtin and then its argument prototype would still apply.  */
1692char gethostbyname();
1693
1694int main() {
1695gethostbyname()
1696; return 0; }
1697EOF
1698if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1699  rm -rf conftest*
1700  eval "ac_cv_lib_$ac_lib_var=yes"
1701else
1702  echo "configure: failed program was:" >&5
1703  cat conftest.$ac_ext >&5
1704  rm -rf conftest*
1705  eval "ac_cv_lib_$ac_lib_var=no"
1706fi
1707rm -f conftest*
1708LIBS="$ac_save_LIBS"
1709
1710fi
1711if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1712  echo "$ac_t""yes" 1>&6
1713    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1714    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1715  cat >> confdefs.h <<EOF
1716#define $ac_tr_lib 1
1717EOF
1718
1719  LIBS="-lnsl $LIBS"
1720
1721else
1722  echo "$ac_t""no" 1>&6
1723fi
1724
1725echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
1726echo "configure:1727: checking for main in -lgmp" >&5
1727ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
1728if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1729  echo $ac_n "(cached) $ac_c" 1>&6
1730else
1731  ac_save_LIBS="$LIBS"
1732LIBS="-lgmp  $LIBS"
1733cat > conftest.$ac_ext <<EOF
1734#line 1735 "configure"
1735#include "confdefs.h"
1736
1737int main() {
1738main()
1739; return 0; }
1740EOF
1741if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742  rm -rf conftest*
1743  eval "ac_cv_lib_$ac_lib_var=yes"
1744else
1745  echo "configure: failed program was:" >&5
1746  cat conftest.$ac_ext >&5
1747  rm -rf conftest*
1748  eval "ac_cv_lib_$ac_lib_var=no"
1749fi
1750rm -f conftest*
1751LIBS="$ac_save_LIBS"
1752
1753fi
1754if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1755  echo "$ac_t""yes" 1>&6
1756    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1757    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1758  cat >> confdefs.h <<EOF
1759#define $ac_tr_lib 1
1760EOF
1761
1762  LIBS="-lgmp $LIBS"
1763
1764else
1765  echo "$ac_t""no" 1>&6
1766fi
1767
1768echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
1769echo "configure:1770: checking for IMP_PutGmpInt in -lMP" >&5
1770ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
1771if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1772  echo $ac_n "(cached) $ac_c" 1>&6
1773else
1774  ac_save_LIBS="$LIBS"
1775LIBS="-lMP  $LIBS"
1776cat > conftest.$ac_ext <<EOF
1777#line 1778 "configure"
1778#include "confdefs.h"
1779/* Override any gcc2 internal prototype to avoid an error.  */
1780/* We use char because int might match the return type of a gcc2
1781    builtin and then its argument prototype would still apply.  */
1782char IMP_PutGmpInt();
1783
1784int main() {
1785IMP_PutGmpInt()
1786; return 0; }
1787EOF
1788if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1789  rm -rf conftest*
1790  eval "ac_cv_lib_$ac_lib_var=yes"
1791else
1792  echo "configure: failed program was:" >&5
1793  cat conftest.$ac_ext >&5
1794  rm -rf conftest*
1795  eval "ac_cv_lib_$ac_lib_var=no"
1796fi
1797rm -f conftest*
1798LIBS="$ac_save_LIBS"
1799
1800fi
1801if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1802  echo "$ac_t""yes" 1>&6
1803    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1804    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1805  cat >> confdefs.h <<EOF
1806#define $ac_tr_lib 1
1807EOF
1808
1809  LIBS="-lMP $LIBS"
1810
1811else
1812  echo "$ac_t""no" 1>&6
1813fi
1814
1815echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
1816echo "configure:1817: checking for MPT_GetTree in -lMPT" >&5
1817ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
1818if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1819  echo $ac_n "(cached) $ac_c" 1>&6
1820else
1821  ac_save_LIBS="$LIBS"
1822LIBS="-lMPT  $LIBS"
1823cat > conftest.$ac_ext <<EOF
1824#line 1825 "configure"
1825#include "confdefs.h"
1826/* Override any gcc2 internal prototype to avoid an error.  */
1827/* We use char because int might match the return type of a gcc2
1828    builtin and then its argument prototype would still apply.  */
1829char MPT_GetTree();
1830
1831int main() {
1832MPT_GetTree()
1833; return 0; }
1834EOF
1835if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1836  rm -rf conftest*
1837  eval "ac_cv_lib_$ac_lib_var=yes"
1838else
1839  echo "configure: failed program was:" >&5
1840  cat conftest.$ac_ext >&5
1841  rm -rf conftest*
1842  eval "ac_cv_lib_$ac_lib_var=no"
1843fi
1844rm -f conftest*
1845LIBS="$ac_save_LIBS"
1846
1847fi
1848if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1849  echo "$ac_t""yes" 1>&6
1850    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1851    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1852  cat >> confdefs.h <<EOF
1853#define $ac_tr_lib 1
1854EOF
1855
1856  LIBS="-lMPT $LIBS"
1857
1858else
1859  echo "$ac_t""no" 1>&6
1860fi
1861
1862echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
1863echo "configure:1864: checking for atof in -lsingcf" >&5
1864ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
1865if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1866  echo $ac_n "(cached) $ac_c" 1>&6
1867else
1868  ac_save_LIBS="$LIBS"
1869LIBS="-lsingcf  $LIBS"
1870cat > conftest.$ac_ext <<EOF
1871#line 1872 "configure"
1872#include "confdefs.h"
1873/* Override any gcc2 internal prototype to avoid an error.  */
1874/* We use char because int might match the return type of a gcc2
1875    builtin and then its argument prototype would still apply.  */
1876char atof();
1877
1878int main() {
1879atof()
1880; return 0; }
1881EOF
1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1883  rm -rf conftest*
1884  eval "ac_cv_lib_$ac_lib_var=yes"
1885else
1886  echo "configure: failed program was:" >&5
1887  cat conftest.$ac_ext >&5
1888  rm -rf conftest*
1889  eval "ac_cv_lib_$ac_lib_var=no"
1890fi
1891rm -f conftest*
1892LIBS="$ac_save_LIBS"
1893
1894fi
1895if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1896  echo "$ac_t""yes" 1>&6
1897    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1898    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1899  cat >> confdefs.h <<EOF
1900#define $ac_tr_lib 1
1901EOF
1902
1903  LIBS="-lsingcf $LIBS"
1904
1905else
1906  echo "$ac_t""no" 1>&6
1907fi
1908
1909echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
1910echo "configure:1911: checking for atof in -lsingfac" >&5
1911ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
1912if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1913  echo $ac_n "(cached) $ac_c" 1>&6
1914else
1915  ac_save_LIBS="$LIBS"
1916LIBS="-lsingfac  $LIBS"
1917cat > conftest.$ac_ext <<EOF
1918#line 1919 "configure"
1919#include "confdefs.h"
1920/* Override any gcc2 internal prototype to avoid an error.  */
1921/* We use char because int might match the return type of a gcc2
1922    builtin and then its argument prototype would still apply.  */
1923char atof();
1924
1925int main() {
1926atof()
1927; return 0; }
1928EOF
1929if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1930  rm -rf conftest*
1931  eval "ac_cv_lib_$ac_lib_var=yes"
1932else
1933  echo "configure: failed program was:" >&5
1934  cat conftest.$ac_ext >&5
1935  rm -rf conftest*
1936  eval "ac_cv_lib_$ac_lib_var=no"
1937fi
1938rm -f conftest*
1939LIBS="$ac_save_LIBS"
1940
1941fi
1942if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1943  echo "$ac_t""yes" 1>&6
1944    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1945    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1946  cat >> confdefs.h <<EOF
1947#define $ac_tr_lib 1
1948EOF
1949
1950  LIBS="-lsingfac $LIBS"
1951
1952else
1953  echo "$ac_t""no" 1>&6
1954fi
1955
1956echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
1957echo "configure:1958: checking for omTestAddr in -lomalloc" >&5
1958ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
1959if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1960  echo $ac_n "(cached) $ac_c" 1>&6
1961else
1962  ac_save_LIBS="$LIBS"
1963LIBS="-lomalloc  $LIBS"
1964cat > conftest.$ac_ext <<EOF
1965#line 1966 "configure"
1966#include "confdefs.h"
1967/* Override any gcc2 internal prototype to avoid an error.  */
1968/* We use char because int might match the return type of a gcc2
1969    builtin and then its argument prototype would still apply.  */
1970char omTestAddr();
1971
1972int main() {
1973omTestAddr()
1974; return 0; }
1975EOF
1976if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1977  rm -rf conftest*
1978  eval "ac_cv_lib_$ac_lib_var=yes"
1979else
1980  echo "configure: failed program was:" >&5
1981  cat conftest.$ac_ext >&5
1982  rm -rf conftest*
1983  eval "ac_cv_lib_$ac_lib_var=no"
1984fi
1985rm -f conftest*
1986LIBS="$ac_save_LIBS"
1987
1988fi
1989if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1990  echo "$ac_t""yes" 1>&6
1991    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1992    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1993  cat >> confdefs.h <<EOF
1994#define $ac_tr_lib 1
1995EOF
1996
1997  LIBS="-lomalloc $LIBS"
1998
1999else
2000  echo "$ac_t""no" 1>&6
2001fi
2002
2003echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
2004echo "configure:2005: checking for main in -lomalloc_ndebug" >&5
2005ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
2006if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2007  echo $ac_n "(cached) $ac_c" 1>&6
2008else
2009  ac_save_LIBS="$LIBS"
2010LIBS="-lomalloc_ndebug  $LIBS"
2011cat > conftest.$ac_ext <<EOF
2012#line 2013 "configure"
2013#include "confdefs.h"
2014
2015int main() {
2016main()
2017; return 0; }
2018EOF
2019if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2020  rm -rf conftest*
2021  eval "ac_cv_lib_$ac_lib_var=yes"
2022else
2023  echo "configure: failed program was:" >&5
2024  cat conftest.$ac_ext >&5
2025  rm -rf conftest*
2026  eval "ac_cv_lib_$ac_lib_var=no"
2027fi
2028rm -f conftest*
2029LIBS="$ac_save_LIBS"
2030
2031fi
2032if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2033  echo "$ac_t""yes" 1>&6
2034    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2035    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2036  cat >> confdefs.h <<EOF
2037#define $ac_tr_lib 1
2038EOF
2039
2040  LIBS="-lomalloc_ndebug $LIBS"
2041
2042else
2043  echo "$ac_t""no" 1>&6
2044fi
2045
2046
2047for ac_hdr in gmp.h MP.h  MPT.h factory.h factor.h omalloc.h
2048do
2049ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2050echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2051echo "configure:2052: checking for $ac_hdr" >&5
2052if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2053  echo $ac_n "(cached) $ac_c" 1>&6
2054else
2055  cat > conftest.$ac_ext <<EOF
2056#line 2057 "configure"
2057#include "confdefs.h"
2058#include <$ac_hdr>
2059EOF
2060ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2061{ (eval echo configure:2062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2062ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2063if test -z "$ac_err"; then
2064  rm -rf conftest*
2065  eval "ac_cv_header_$ac_safe=yes"
2066else
2067  echo "$ac_err" >&5
2068  echo "configure: failed program was:" >&5
2069  cat conftest.$ac_ext >&5
2070  rm -rf conftest*
2071  eval "ac_cv_header_$ac_safe=no"
2072fi
2073rm -f conftest*
2074fi
2075if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2076  echo "$ac_t""yes" 1>&6
2077    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2078  cat >> confdefs.h <<EOF
2079#define $ac_tr_hdr 1
2080EOF
2081 
2082else
2083  echo "$ac_t""no" 1>&6
2084fi
2085done
2086
2087
2088if test "$ac_cv_lib_gmp_main" = yes && \
2089 test "$ac_cv_header_gmp_h" = yes; then
2090  ac_gmp_ok=yes
2091fi
2092
2093if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
2094 test "$ac_cv_lib_MPT_MPT_GetTree" && \
2095 test "$ac_cv_header_MP_h" = yes && \
2096 test "$ac_cv_header_MPT_h" = yes; then
2097  ac_MP_ok=yes
2098fi
2099
2100if test "$ac_cv_lib_singcf_atof" = yes && \
2101 test "$ac_cv_header_factory_h" = yes; then
2102  ac_factory_ok=yes
2103fi
2104
2105if test "$ac_cv_lib_singfac_atof" = yes && \
2106 test "$ac_cv_header_factor_h" = yes; then
2107  ac_libfac_ok=yes
2108fi
2109
2110if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
2111   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
2112   test "$ac_cv_header_omalloc_c" = yes && \
2113   test "$ac_cv_header_omalloc_h" = yes; then
2114  ac_cv_omalloc_ok=yes
2115fi
2116 
2117
2118DOC2TEX_EXAMPLE_EXCLUSIONS=""
2119
2120
2121# Check whether --with-tmpdir or --without-tmpdir was given.
2122if test "${with_tmpdir+set}" = set; then
2123  withval="$with_tmpdir"
2124  :
2125fi
2126
2127# Check whether --enable-omalloc or --disable-omalloc was given.
2128if test "${enable_omalloc+set}" = set; then
2129  enableval="$enable_omalloc"
2130  :
2131fi
2132
2133# Check whether --enable-gmp or --disable-gmp was given.
2134if test "${enable_gmp+set}" = set; then
2135  enableval="$enable_gmp"
2136  :
2137fi
2138
2139# Check whether --enable-MP or --disable-MP was given.
2140if test "${enable_MP+set}" = set; then
2141  enableval="$enable_MP"
2142  :
2143fi
2144
2145# Check whether --enable-factory or --disable-factory was given.
2146if test "${enable_factory+set}" = set; then
2147  enableval="$enable_factory"
2148  :
2149fi
2150
2151# Check whether --enable-libfac or --disable-libfac was given.
2152if test "${enable_libfac+set}" = set; then
2153  enableval="$enable_libfac"
2154  :
2155fi
2156
2157# Check whether --enable-sgroup or --disable-sgroup was given.
2158if test "${enable_sgroup+set}" = set; then
2159  enableval="$enable_sgroup"
2160  :
2161fi
2162
2163# Check whether --enable-Singular or --disable-Singular was given.
2164if test "${enable_Singular+set}" = set; then
2165  enableval="$enable_Singular"
2166  :
2167fi
2168
2169# Check whether --enable-IntegerProgramming or --disable-IntegerProgramming was given.
2170if test "${enable_IntegerProgramming+set}" = set; then
2171  enableval="$enable_IntegerProgramming"
2172  :
2173fi
2174
2175# Check whether --enable-Plural or --disable-Plural was given.
2176if test "${enable_Plural+set}" = set; then
2177  enableval="$enable_Plural"
2178  :
2179fi
2180
2181# Check whether --enable-Texinfo or --disable-Texinfo was given.
2182if test "${enable_Texinfo+set}" = set; then
2183  enableval="$enable_Texinfo"
2184  :
2185fi
2186
2187# Check whether --enable-Texi2html or --disable-Texi2html was given.
2188if test "${enable_Texi2html+set}" = set; then
2189  enableval="$enable_Texi2html"
2190  :
2191fi
2192
2193# Check whether --enable-doc or --disable-doc was given.
2194if test "${enable_doc+set}" = set; then
2195  enableval="$enable_doc"
2196  :
2197fi
2198
2199# Check whether --enable-emacs or --disable-emacs was given.
2200if test "${enable_emacs+set}" = set; then
2201  enableval="$enable_emacs"
2202  :
2203fi
2204
2205# Check whether --with-MP or --without-MP was given.
2206if test "${with_MP+set}" = set; then
2207  withval="$with_MP"
2208  :
2209fi
2210
2211# Check whether --with-factory or --without-factory was given.
2212if test "${with_factory+set}" = set; then
2213  withval="$with_factory"
2214  :
2215fi
2216
2217# Check whether --with-libfac or --without-libfac was given.
2218if test "${with_libfac+set}" = set; then
2219  withval="$with_libfac"
2220  :
2221fi
2222
2223# Check whether --with-gmp or --without-gmp was given.
2224if test "${with_gmp+set}" = set; then
2225  withval="$with_gmp"
2226  :
2227fi
2228
2229
2230echo $ac_n "checking which tmp dir to use""... $ac_c" 1>&6
2231echo "configure:2232: checking which tmp dir to use" >&5
2232if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then
2233  if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1)
2234  then
2235    TMP_DIR="${pwd}/tmp"
2236  else
2237    TMP_DIR=${with_tmpdir}
2238  fi
2239else
2240  TMP_DIR="${pwd}/tmp"
2241fi
2242echo "$ac_t""$TMP_DIR" 1>&6
2243
2244
2245echo $ac_n "checking whether to configure and build omalloc""... $ac_c" 1>&6
2246echo "configure:2247: checking whether to configure and build omalloc" >&5
2247if test "${enable_omalloc+set}" != set; then
2248   if test "$ac_cv_omalloc_ok" = yes; then
2249     enable_omalloc=no
2250   fi
2251   enable_omalloc_not_set=yes
2252fi
2253if test "$enable_omalloc" = no; then
2254  if test "$ac_cv_omalloc_ok" != yes; then
2255    { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
2256  fi
2257  echo "$ac_t""no" 1>&6
2258else
2259  if test -d omalloc; then
2260    echo "$ac_t""yes" 1>&6
2261    if test "$enable_omalloc_not_set" = yes; then
2262      ac_configure_args="$ac_configure_args --enable-omalloc --with-external-config_h='$pwd/Singular/omSingularConfig.h' --with-track-custom"
2263    fi
2264    CONFIG_SUBDIRS="$CONFIG_SUBDIRS omalloc"
2265    BUILD1_SUBDIRS="$BUILD1_SUBDIRS omalloc"
2266    if test "${with_malloc+set}" != set; then
2267case "$ac_cv_singuname" in
2268# under windows, it is best to use the provided malloc
2269        ix86-Win*)
2270        with_malloc=system
2271        ac_configure_args="$ac_configure_args --with-malloc=system"
2272        ;;
2273        PowerMacintosh-darwin*)
2274        with_malloc=system
2275        ac_configure_args="$ac_configure_args --with-malloc=system"
2276        ;;
2277esac
2278fi
2279  else
2280    { echo "configure: error: need omalloc subdir" 1>&2; exit 1; }
2281  fi
2282fi
2283
2284echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6
2285echo "configure:2286: checking whether to configure and build gmp lib" >&5
2286if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
2287  if test "$ac_gmp_ok" != yes && test -d gmp; then
2288    echo "$ac_t""yes" 1>&6
2289    enable_gmp=yes
2290    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
2291    BUILD1_SUBDIRS="$BUILD1_SUBDIRS gmp"
2292    ac_configure_args="$ac_configure_args --enable-gmp"
2293    enable_gmp=yes
2294#    This we used to need for our patched version of gmp 2.x
2295#    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
2296  else
2297    echo "$ac_t""no" 1>&6
2298    enable_gmp=no
2299  fi
2300elif test "$enable_gmp" = yes; then
2301  if test ! -d gmp; then
2302    echo "$ac_t""no" 1>&6
2303    { echo "configure: error: Can not find gmp subdir" 1>&2; exit 1; }
2304  else
2305    echo "$ac_t""yes" 1>&6
2306    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
2307    BUILD1_SUBDIRS="$BUILD1_SUBDIRS gmp"
2308#    This we used to need for our patched version of gmp 2.x
2309#    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
2310  fi
2311else
2312  echo "$ac_t""no" 1>&6
2313fi
2314
2315if test "$enable_gmp" = yes; then
2316# for gmp-3.0 to work for all ix86 processors, set generic target
2317if test "$target" = NONE; then
2318case "$ac_cv_singuname" in
2319        ix86*)
2320        gmp_target=`./config.guess | sed 's/^\w*-/i386-/'`
2321        ac_configure_args="$ac_configure_args --target=$gmp_target"
2322        ;;
2323esac
2324fi
2325# furthermore, disable building of dynamic libraries, for we want to
2326# link against the static ones
2327if test "$enable_shared" != no; then
2328  ac_configure_args="$ac_configure_args --disable-shared"
2329fi
2330fi
2331
2332# Check whether we have gmp
2333if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then
2334  { echo "configure: error: can neither find nor built gmp" 1>&2; exit 1; }
2335fi
2336
2337# Check whether we need to cheat subsequent configures with --enable-gmp
2338if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then
2339  ac_configure_args="$ac_configure_args --enable-gmp"
2340fi
2341
2342#AC_MSG_CHECKING(whether to configure and build MP lib)
2343# requires: sizeof(long)==4
2344echo $ac_n "checking size of long""... $ac_c" 1>&6
2345echo "configure:2346: checking size of long" >&5
2346if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2347  echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349  if test "$cross_compiling" = yes; then
2350  ac_cv_sizeof_long=4
2351else
2352  cat > conftest.$ac_ext <<EOF
2353#line 2354 "configure"
2354#include "confdefs.h"
2355#include <stdio.h>
2356main()
2357{
2358  FILE *f=fopen("conftestval", "w");
2359  if (!f) exit(1);
2360  fprintf(f, "%d\n", sizeof(long));
2361  exit(0);
2362}
2363EOF
2364if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2365then
2366  ac_cv_sizeof_long=`cat conftestval`
2367else
2368  echo "configure: failed program was:" >&5
2369  cat conftest.$ac_ext >&5
2370  rm -fr conftest*
2371  ac_cv_sizeof_long=0
2372fi
2373rm -fr conftest*
2374fi
2375
2376fi
2377echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2378cat >> confdefs.h <<EOF
2379#define SIZEOF_LONG $ac_cv_sizeof_long
2380EOF
2381
2382
2383if test "$ac_cv_sizeof_long" != 4; then
2384  with_MP=no
2385fi
2386
2387echo $ac_n "checking whether to configure and build MP lib""... $ac_c" 1>&6
2388echo "configure:2389: checking whether to configure and build MP lib" >&5
2389
2390if test "$enable_MP" != yes && test "$enable_MP" != no; then
2391  if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \
2392     (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then
2393    echo "$ac_t""yes" 1>&6
2394    enable_MP=yes
2395    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
2396    BUILD1_SUBDIRS="$BUILD1_SUBDIRS MP"
2397    ac_configure_args="$ac_configure_args --enable-MP"
2398  else
2399    echo "$ac_t""no" 1>&6
2400    enable_MP=no
2401  fi
2402elif test "$enable_MP" = yes; then
2403  if test ! -d MP; then
2404    echo "$ac_t""no" 1>&6
2405    { echo "configure: error: can not build MP without MP directory" 1>&2; exit 1; }
2406  fi
2407  if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then
2408    echo "$ac_t""yes" 1>&6
2409    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
2410    BUILD1_SUBDIRS="$BUILD1_SUBDIRS MP"
2411  else
2412    echo "$ac_t""no" 1>&6
2413    { echo "configure: error: can not build MP without gmp" 1>&2; exit 1; }
2414  fi
2415else
2416  echo "$ac_t""no" 1>&6
2417fi
2418
2419# need MP code to be compiled with -fPIC, should not hurt anybody else
2420if test "$enable_MP" = yes && test "${with_extra_cflags+set}" != set; then
2421ac_configure_args="$ac_configure_args --with-extra_cflags=-fPIC"
2422fi
2423
2424echo $ac_n "checking whether to configure and build NTL lib""... $ac_c" 1>&6
2425echo "configure:2426: checking whether to configure and build NTL lib" >&5
2426if test "$enable_NTL" != yes && test "$enable_NTL" != no; then
2427  if test "$with_NTL" != no && test "$ac_NTL_ok" != yes && \
2428     test -d ntl; then
2429    enable_NTL=yes
2430    echo "$ac_t""yes" 1>&6
2431    CONFIG_SUBDIRS="$CONFIG_SUBDIRS ntl"
2432    BUILD1_SUBDIRS="$BUILD1_SUBDIRS ntl"
2433    ac_configure_args="$ac_configure_args --enable-NTL"
2434    ac_ext=C
2435# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2436ac_cpp='$CXXCPP $CPPFLAGS'
2437ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2438ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2439cross_compiling=$ac_cv_prog_cxx_cross
2440
2441    echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2442echo "configure:2443: checking how to run the C++ preprocessor" >&5
2443if test -z "$CXXCPP"; then
2444if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2445  echo $ac_n "(cached) $ac_c" 1>&6
2446else
2447  ac_ext=C
2448# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2449ac_cpp='$CXXCPP $CPPFLAGS'
2450ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2451ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2452cross_compiling=$ac_cv_prog_cxx_cross
2453  CXXCPP="${CXX-g++} -E"
2454  cat > conftest.$ac_ext <<EOF
2455#line 2456 "configure"
2456#include "confdefs.h"
2457#include <stdlib.h>
2458EOF
2459ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2460{ (eval echo configure:2461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2461ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2462if test -z "$ac_err"; then
2463  :
2464else
2465  echo "$ac_err" >&5
2466  echo "configure: failed program was:" >&5
2467  cat conftest.$ac_ext >&5
2468  rm -rf conftest*
2469  CXXCPP=/lib/cpp
2470fi
2471rm -f conftest*
2472  ac_cv_prog_CXXCPP="$CXXCPP"
2473ac_ext=C
2474# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2475ac_cpp='$CXXCPP $CPPFLAGS'
2476ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2477ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2478cross_compiling=$ac_cv_prog_cxx_cross
2479fi
2480fi
2481CXXCPP="$ac_cv_prog_CXXCPP"
2482echo "$ac_t""$CXXCPP" 1>&6
2483
2484for ac_hdr in iostream.h iostream
2485do
2486ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2487echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2488echo "configure:2489: checking for $ac_hdr" >&5
2489if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2490  echo $ac_n "(cached) $ac_c" 1>&6
2491else
2492  cat > conftest.$ac_ext <<EOF
2493#line 2494 "configure"
2494#include "confdefs.h"
2495#include <$ac_hdr>
2496EOF
2497ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2498{ (eval echo configure:2499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2499ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2500if test -z "$ac_err"; then
2501  rm -rf conftest*
2502  eval "ac_cv_header_$ac_safe=yes"
2503else
2504  echo "$ac_err" >&5
2505  echo "configure: failed program was:" >&5
2506  cat conftest.$ac_ext >&5
2507  rm -rf conftest*
2508  eval "ac_cv_header_$ac_safe=no"
2509fi
2510rm -f conftest*
2511fi
2512if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2513  echo "$ac_t""yes" 1>&6
2514    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2515  cat >> confdefs.h <<EOF
2516#define $ac_tr_hdr 1
2517EOF
2518 
2519else
2520  echo "$ac_t""no" 1>&6
2521fi
2522done
2523
2524   
2525  else
2526    enable_NTL=no
2527    echo "$ac_t""no" 1>&6
2528  fi
2529elif test "$enable_NTL" = yes; then
2530  if test -d ntl; then
2531    echo "$ac_t""yes" 1>&6
2532    CONFIG_SUBDIRS="$CONFIG_SUBDIRS ntl"
2533    BUILD1_SUBDIRS="$BUILD1_SUBDIRS ntl"
2534  else
2535    echo "$ac_t""no" 1>&6
2536    { echo "configure: error: can not build NTL without ntl directory" 1>&2; exit 1; }
2537  fi
2538else
2539  echo "$ac_t""no" 1>&6
2540fi
2541
2542echo $ac_n "checking whether to configure and build factory lib""... $ac_c" 1>&6
2543echo "configure:2544: checking whether to configure and build factory lib" >&5
2544if test "$enable_factory" != yes && test "$enable_factory" != no; then
2545  if test "$with_factory" != no && test "$ac_factory_ok" != yes && \
2546     test -d factory; then
2547    enable_factory=yes
2548    echo "$ac_t""yes" 1>&6
2549    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
2550    BUILD1_SUBDIRS="$BUILD1_SUBDIRS factory"
2551    ac_configure_args="$ac_configure_args --enable-factory"
2552  else
2553    enable_factory=no
2554    echo "$ac_t""no" 1>&6
2555  fi
2556elif test "$enable_factory" = yes; then
2557  if test -d factory; then
2558    echo "$ac_t""yes" 1>&6
2559    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
2560    BUILD1_SUBDIRS="$BUILD1_SUBDIRS factory"
2561  else
2562    echo "$ac_t""no" 1>&6
2563    { echo "configure: error: can not build factory without factory directory" 1>&2; exit 1; }
2564  fi
2565else
2566  echo "$ac_t""no" 1>&6
2567fi
2568
2569echo $ac_n "checking whether to configure and build libfac lib""... $ac_c" 1>&6
2570echo "configure:2571: checking whether to configure and build libfac lib" >&5
2571if test "$enable_libfac" != yes && test "$enable_libfac" != no; then
2572  if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \
2573     test -d libfac && \
2574     (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then
2575    enable_libfac=yes
2576    echo "$ac_t""yes" 1>&6
2577    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
2578    BUILD1_SUBDIRS="$BUILD1_SUBDIRS libfac"
2579    ac_configure_args="$ac_configure_args --enable-libfac"
2580  else
2581    enable_libfac=no
2582    echo "$ac_t""no" 1>&6
2583  fi
2584elif  test "$enable_libfac" = yes; then
2585  if test ! -d libfac; then
2586    echo "$ac_t""no" 1>&6
2587    { echo "configure: error: can not build libfac without libfac directory" 1>&2; exit 1; }
2588  fi
2589  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2590    echo "$ac_t""yes" 1>&6
2591    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
2592    BUILD1_SUBDIRS="$BUILD1_SUBDIRS libfac"
2593  else
2594    echo "$ac_t""no" 1>&6
2595    { echo "configure: error: Can not build libfac without factory" 1>&2; exit 1; }
2596  fi
2597else
2598  echo "$ac_t""no" 1>&6
2599fi
2600
2601echo $ac_n "checking whether to configure and build sgroup lib""... $ac_c" 1>&6
2602echo "configure:2603: checking whether to configure and build sgroup lib" >&5
2603if test "$enable_sgroup" = yes; then
2604  if test ! -d sgroup; then
2605    echo "$ac_t""no" 1>&6
2606    { echo "configure: error: can not build sgroup without sgroup directory" 1>&2; exit 1; }
2607  fi
2608  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2609    echo "$ac_t""yes" 1>&6
2610    CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup"
2611    BUILD1_SUBDIRS="$BUILD1_SUBDIRS sgroup"
2612  else
2613    echo "$ac_t""no" 1>&6
2614    { echo "configure: error: Can not build sgroup without MP" 1>&2; exit 1; }
2615  fi
2616else
2617  echo "$ac_t""no" 1>&6
2618fi
2619
2620BUILD_SUBDIRS="$CONFIG_SUBDIRS"
2621
2622echo $ac_n "checking whether to configure and build Singular""... $ac_c" 1>&6
2623echo "configure:2624: checking whether to configure and build Singular" >&5
2624if test "$enable_Singular" != yes && test "$enable_Singular" != no; then
2625  if test "$with_Singular" != no && test -d Singular; then
2626    enable_Singular=yes
2627    echo "$ac_t""yes" 1>&6
2628    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
2629    BUILD_SUBDIRS="$BUILD_SUBDIRS kernel Singular"     
2630    BUILD1_SUBDIRS="$BUILD1_SUBDIRS kernel Singular"   
2631    ac_configure_args="$ac_configure_args --enable-Singular"
2632  else
2633    enable_Singular=no
2634    echo "$ac_t""no" 1>&6
2635  fi
2636elif test "$enable_Singular" = yes; then
2637  if test -d Singular; then
2638    echo "$ac_t""yes" 1>&6
2639    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
2640    BUILD_SUBDIRS="$BUILD_SUBDIRS kernel Singular"     
2641    BUILD1_SUBDIRS="$BUILD1_SUBDIRS kernel Singular"   
2642  else
2643    echo "$ac_t""no" 1>&6
2644    { echo "configure: error: can not build Singular without Singular directory" 1>&2; exit 1; }
2645  fi
2646else
2647  echo "$ac_t""no" 1>&6
2648fi
2649
2650
2651# test if IntegerProgramming should be built:
2652
2653echo $ac_n "checking whether to build IntegerProgramming""... $ac_c" 1>&6
2654echo "configure:2655: checking whether to build IntegerProgramming" >&5
2655if test "$enable_IntegerProgramming" != no && test -d "IntegerProgramming"; then
2656   BUILD_SUBDIRS="$BUILD_SUBDIRS IntegerProgramming"
2657   BUILD1_SUBDIRS="$BUILD1_SUBDIRS IntegerProgramming"
2658   echo "$ac_t""yes" 1>&6
2659   if test "$enable_IntegerProgramming" != yes; then
2660     ac_configure_args="$ac_configure_args --enable-IntegerProgramming"
2661   fi
2662else
2663   echo "$ac_t""no" 1>&6
2664fi
2665
2666echo $ac_n "checking whether to build Plural""... $ac_c" 1>&6
2667echo "configure:2668: checking whether to build Plural" >&5
2668if test "$enable_Plural" != no || test "$with_Plural" != no; then
2669   echo "$ac_t""yes" 1>&6
2670   if test "$enable_Plural" != yes; then
2671     ac_configure_args="$ac_configure_args --enable-Plural"
2672   fi
2673else
2674   echo "$ac_t""no" 1>&6
2675fi
2676
2677
2678echo $ac_n "checking whether to configure and build Texinfo""... $ac_c" 1>&6
2679echo "configure:2680: checking whether to configure and build Texinfo" >&5
2680if test "$enable_Texinfo" != no && test -d Texinfo; then
2681  echo "$ac_t""yes" 1>&6
2682  enable_texinfo=yes
2683  CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo"
2684  BUILD_SUBDIRS="$BUILD_SUBDIRS Texinfo"       
2685  TEXI2DVI=${bindir}/texi2dvi
2686  TEXI2PDF=${bindir}/texi2pdf
2687  MAKEINFO="${bindir}/makeinfo"
2688  TEXINDEX=${bindir}/texindex
2689 
2690 
2691 
2692 
2693  if test "$enable_Texinfo" != yes; then
2694    ac_configure_args="$ac_configure_args --enable-Texinfo"
2695  fi
2696else
2697  echo "$ac_t""no" 1>&6
2698  echo "configure: warning: Building of doc might fail. Need Texinfo" 1>&2
2699  enable_texinfo=no
2700  # Extract the first word of "makeinfo", so it can be a program name with args.
2701set dummy makeinfo; ac_word=$2
2702echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2703echo "configure:2704: checking for $ac_word" >&5
2704if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2705  echo $ac_n "(cached) $ac_c" 1>&6
2706else
2707  if test -n "$MAKEINFO"; then
2708  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2709else
2710  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2711  ac_dummy="$PATH"
2712  for ac_dir in $ac_dummy; do
2713    test -z "$ac_dir" && ac_dir=.
2714    if test -f $ac_dir/$ac_word; then
2715      ac_cv_prog_MAKEINFO="makeinfo"
2716      break
2717    fi
2718  done
2719  IFS="$ac_save_ifs"
2720  test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="${pwd}/warn_not_found.sh makeinfo"
2721fi
2722fi
2723MAKEINFO="$ac_cv_prog_MAKEINFO"
2724if test -n "$MAKEINFO"; then
2725  echo "$ac_t""$MAKEINFO" 1>&6
2726else
2727  echo "$ac_t""no" 1>&6
2728fi
2729
2730  # Extract the first word of "texi2dvi", so it can be a program name with args.
2731set dummy texi2dvi; ac_word=$2
2732echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2733echo "configure:2734: checking for $ac_word" >&5
2734if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then
2735  echo $ac_n "(cached) $ac_c" 1>&6
2736else
2737  if test -n "$TEXI2DVI"; then
2738  ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test.
2739else
2740  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2741  ac_dummy="$PATH"
2742  for ac_dir in $ac_dummy; do
2743    test -z "$ac_dir" && ac_dir=.
2744    if test -f $ac_dir/$ac_word; then
2745      ac_cv_prog_TEXI2DVI="texi2dvi"
2746      break
2747    fi
2748  done
2749  IFS="$ac_save_ifs"
2750  test -z "$ac_cv_prog_TEXI2DVI" && ac_cv_prog_TEXI2DVI="${pwd}/warn_not_found.sh texi2dvi"
2751fi
2752fi
2753TEXI2DVI="$ac_cv_prog_TEXI2DVI"
2754if test -n "$TEXI2DVI"; then
2755  echo "$ac_t""$TEXI2DVI" 1>&6
2756else
2757  echo "$ac_t""no" 1>&6
2758fi
2759
2760  # Extract the first word of "texindex", so it can be a program name with args.
2761set dummy texindex; ac_word=$2
2762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2763echo "configure:2764: checking for $ac_word" >&5
2764if eval "test \"`echo '$''{'ac_cv_prog_TEXINDEX'+set}'`\" = set"; then
2765  echo $ac_n "(cached) $ac_c" 1>&6
2766else
2767  if test -n "$TEXINDEX"; then
2768  ac_cv_prog_TEXINDEX="$TEXINDEX" # Let the user override the test.
2769else
2770  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2771  ac_dummy="$PATH"
2772  for ac_dir in $ac_dummy; do
2773    test -z "$ac_dir" && ac_dir=.
2774    if test -f $ac_dir/$ac_word; then
2775      ac_cv_prog_TEXINDEX="texindex"
2776      break
2777    fi
2778  done
2779  IFS="$ac_save_ifs"
2780  test -z "$ac_cv_prog_TEXINDEX" && ac_cv_prog_TEXINDEX="${pwd}/warn_not_found.sh texindex"
2781fi
2782fi
2783TEXINDEX="$ac_cv_prog_TEXINDEX"
2784if test -n "$TEXINDEX"; then
2785  echo "$ac_t""$TEXINDEX" 1>&6
2786else
2787  echo "$ac_t""no" 1>&6
2788fi
2789
2790  # Extract the first word of "texi2pdf", so it can be a program name with args.
2791set dummy texi2pdf; ac_word=$2
2792echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2793echo "configure:2794: checking for $ac_word" >&5
2794if eval "test \"`echo '$''{'ac_cv_prog_TEXI2PDF'+set}'`\" = set"; then
2795  echo $ac_n "(cached) $ac_c" 1>&6
2796else
2797  if test -n "$TEXI2PDF"; then
2798  ac_cv_prog_TEXI2PDF="$TEXI2PDF" # Let the user override the test.
2799else
2800  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2801  ac_dummy="$PATH"
2802  for ac_dir in $ac_dummy; do
2803    test -z "$ac_dir" && ac_dir=.
2804    if test -f $ac_dir/$ac_word; then
2805      ac_cv_prog_TEXI2PDF="texi2pdf"
2806      break
2807    fi
2808  done
2809  IFS="$ac_save_ifs"
2810  test -z "$ac_cv_prog_TEXI2PDF" && ac_cv_prog_TEXI2PDF="${pwd}/warn_not_found.sh texi2pdf"
2811fi
2812fi
2813TEXI2PDF="$ac_cv_prog_TEXI2PDF"
2814if test -n "$TEXI2PDF"; then
2815  echo "$ac_t""$TEXI2PDF" 1>&6
2816else
2817  echo "$ac_t""no" 1>&6
2818fi
2819
2820fi 
2821
2822echo $ac_n "checking whether to configure and build Texi2html""... $ac_c" 1>&6
2823echo "configure:2824: checking whether to configure and build Texi2html" >&5
2824if test "$enable_Texi2html" != no && test -d Texi2html; then
2825 echo "$ac_t""yes" 1>&6
2826 CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texi2html"
2827 BUILD_SUBDIRS="$BUILD_SUBDIRS Texi2html"
2828 if test "$enable_Texi2html" != yes; then
2829   ac_configure_args="$ac_configure_args --enable-Texi2html"
2830 fi
2831 TEXI2HTML=${bindir}/texi2html
2832 
2833else
2834 echo "$ac_t""no" 1>&6
2835 # Extract the first word of "texi2html", so it can be a program name with args.
2836set dummy texi2html; ac_word=$2
2837echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2838echo "configure:2839: checking for $ac_word" >&5
2839if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then
2840  echo $ac_n "(cached) $ac_c" 1>&6
2841else
2842  if test -n "$TEXI2HTML"; then
2843  ac_cv_prog_TEXI2HTML="$TEXI2HTML" # Let the user override the test.
2844else
2845  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2846  ac_dummy="$PATH"
2847  for ac_dir in $ac_dummy; do
2848    test -z "$ac_dir" && ac_dir=.
2849    if test -f $ac_dir/$ac_word; then
2850      ac_cv_prog_TEXI2HTML="texi2html"
2851      break
2852    fi
2853  done
2854  IFS="$ac_save_ifs"
2855fi
2856fi
2857TEXI2HTML="$ac_cv_prog_TEXI2HTML"
2858if test -n "$TEXI2HTML"; then
2859  echo "$ac_t""$TEXI2HTML" 1>&6
2860else
2861  echo "$ac_t""no" 1>&6
2862fi
2863
2864fi
2865
2866if test "${UUDECODE+set}" != set; then
2867echo "configure: warning: uudecode not found. HTML doc generation will fail" 1>&2
2868fi
2869if test "${TEXI2HTML+set}" != set; then
2870echo "configure: warning: texi2html not found. HTML doc generation will fail" 1>&2
2871fi
2872if test "$ac_cv_prog_LATEX2HTML" = latex2html; then
2873  TEXI2HTML_OPTS="-l2h"
2874fi
2875
2876
2877
2878echo $ac_n "checking whether to build doc""... $ac_c" 1>&6
2879echo "configure:2880: checking whether to build doc" >&5
2880if test "$enable_doc" != no && test -d doc; then
2881 echo "$ac_t""yes" 1>&6
2882 BUILD_SUBDIRS="$BUILD_SUBDIRS doc"
2883 if test "$enable_doc" != yes; then
2884   enable_doc=yes
2885   ac_configure_args="$ac_configure_args --enable-doc"
2886 fi
2887else
2888 enable_doc=no
2889 echo "$ac_t""no" 1>&6
2890fi
2891
2892echo $ac_n "checking whether to build emacs""... $ac_c" 1>&6
2893echo "configure:2894: checking whether to build emacs" >&5
2894if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then
2895 echo "$ac_t""yes" 1>&6
2896 BUILD_SUBDIRS="$BUILD_SUBDIRS emacs"
2897 if test "$enable_emacs" != yes; then
2898   ac_configure_args="$ac_configure_args --enable-emacs"
2899 fi
2900else
2901 echo "$ac_t""no" 1>&6
2902fi
2903
2904echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
2905echo "configure:2906: checking which apint package to use" >&5
2906if test "$with_apint" = gmp; then
2907  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
2908    echo "$ac_t""gmp" 1>&6
2909  else
2910    echo "$ac_t""none" 1>&6
2911    { echo "configure: error: can not use with gmp without finding or building it" 1>&2; exit 1; }
2912  fi
2913elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then
2914    echo "$ac_t""gmp" 1>&6
2915    ac_configure_args="$ac_configure_args --with-apint=gmp"
2916else
2917  { echo "configure: error: gmp required" 1>&2; exit 1; }
2918fi
2919
2920echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
2921echo "configure:2922: checking whether to use with MP" >&5
2922if test "$with_MP" = yes; then
2923  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2924    echo "$ac_t""yes" 1>&6
2925  else
2926    echo "$ac_t""none" 1>&6
2927    { echo "configure: error: can not use with MP without finding or building it" 1>&2; exit 1; }
2928  fi
2929elif test "$with_MP" = no; then
2930  echo "$ac_t""no" 1>&6
2931elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2932  echo "$ac_t""yes" 1>&6
2933  ac_configure_args="$ac_configure_args --with-MP"
2934else
2935  echo "$ac_t""no" 1>&6
2936  ac_configure_args="$ac_configure_args --without-MP"
2937  DOC2TEX_EXAMPLE_EXCLUSIONS="$DOC2TEX_EXAMPLE_EXCLUSIONS -exclude MP"
2938fi
2939
2940echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
2941echo "configure:2942: checking whether to use with factory" >&5
2942if test "$with_factory" = yes; then
2943  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2944    echo "$ac_t""yes" 1>&6
2945  else
2946    echo "$ac_t""none" 1>&6
2947    { echo "configure: error: can not use with factory without finding or building it" 1>&2; exit 1; }
2948  fi
2949elif test "$with_factory" = no; then
2950  echo "$ac_t""no" 1>&6
2951elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2952  echo "$ac_t""yes" 1>&6
2953  ac_configure_args="$ac_configure_args --with-factory"
2954else
2955  echo "$ac_t""no" 1>&6
2956  ac_configure_args="$ac_configure_args --without-factory"
2957fi
2958 
2959echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
2960echo "configure:2961: checking whether to use with libfac" >&5
2961if test "$with_libfac" = yes; then
2962  if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
2963    echo "$ac_t""yes" 1>&6
2964  else
2965    echo "$ac_t""none" 1>&6
2966    { echo "configure: error: can not use with libfac without finding or building it" 1>&2; exit 1; }
2967  fi
2968elif test "$with_libfac" = no; then
2969  echo "$ac_t""no" 1>&6
2970elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
2971  echo "$ac_t""yes" 1>&6
2972  ac_configure_args="$ac_configure_args --with-libfac"
2973else
2974  echo "$ac_t""no" 1>&6
2975  ac_configure_args="$ac_configure_args --without-libfac"
2976fi
2977
2978
2979
2980echo $ac_n "checking whether to use with Singular""... $ac_c" 1>&6
2981echo "configure:2982: checking whether to use with Singular" >&5
2982if test "$with_Singular" != no && test "$with_Singular" != yes; then
2983  if test "$enable_Singular" = yes; then
2984    with_Singular=yes
2985  else
2986    with_Singular=no
2987  fi
2988  ac_configure_args="$ac_configure_args --with-Singular=$with_Singular"
2989fi
2990
2991if test "$with_Singular" != no; then
2992  echo "$ac_t""yes" 1>&6
2993else
2994  echo "$ac_t""no" 1>&6
2995fi
2996
2997
2998SUBDIRS=""
2999if test -d omalloc; then
3000  SUBDIRS="$SUBDIRS omalloc"
3001fi
3002if test -d gmp; then
3003  SUBDIRS="$SUBDIRS gmp"
3004fi
3005if test -d MP; then
3006  SUBDIRS="$SUBDIRS MP"
3007fi
3008if test -d ntl; then
3009  SUBDIRS="$SUBDIRS ntl"
3010fi
3011if test -d factory; then
3012  SUBDIRS="$SUBDIRS factory"
3013fi
3014if test -d libfac; then
3015  SUBDIRS="$SUBDIRS libfac"
3016fi
3017if test -d sgroup; then
3018  SUBDIRS="$SUBDIRS sgroup"
3019fi
3020if test -d kernel; then
3021  SUBDIRS="$SUBDIRS kernel"
3022fi
3023if test -d IntegerProgramming; then
3024  SUBDIRS="$SUBDIRS IntegerProgramming"
3025fi
3026if test -d Singular; then
3027  SUBDIRS="$SUBDIRS Singular"
3028fi
3029if test -d Texinfo; then
3030  SUBDIRS="$SUBDIRS Texinfo"
3031fi
3032if test -d Texi2html; then
3033  SUBDIRS="$SUBDIRS Texi2html"
3034fi
3035if test -d doc; then
3036  SUBDIRS="$SUBDIRS doc"
3037fi
3038if test -d emacs; then
3039  SUBDIRS="$SUBDIRS emacs"
3040fi
3041if test -d modules; then
3042  SUBDIRS="$SUBDIRS modules"
3043fi
3044if test -d "modules"; then
3045   CONFIG_SUBDIRS=$CONFIG_SUBDIRS" modules"
3046   BUILD_SUBDIRS=$BUILD_SUBDIRS" modules"
3047fi
3048 
3049echo $ac_n "checking whether to use libsvd""... $ac_c" 1>&6
3050echo "configure:3051: checking whether to use libsvd" >&5
3051if test "$with_svd" = yes; then
3052  echo "$ac_t""yes" 1>&6
3053   CONFIG_SUBDIRS=$CONFIG_SUBDIRS" svd"
3054   BUILD_SUBDIRS=$BUILD_SUBDIRS" svd"
3055else
3056  echo "$ac_t""no" 1>&6
3057fi
3058
3059echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3060echo "configure:3061: checking whether ${MAKE-make} sets \${MAKE}" >&5
3061set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3062if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3063  echo $ac_n "(cached) $ac_c" 1>&6
3064else
3065  cat > conftestmake <<\EOF
3066all:
3067        @echo 'ac_maketemp="${MAKE}"'
3068EOF
3069# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3070eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3071if test -n "$ac_maketemp"; then
3072  eval ac_cv_prog_make_${ac_make}_set=yes
3073else
3074  eval ac_cv_prog_make_${ac_make}_set=no
3075fi
3076rm -f conftestmake
3077fi
3078if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3079  echo "$ac_t""yes" 1>&6
3080  SET_MAKE=
3081else
3082  echo "$ac_t""no" 1>&6
3083  SET_MAKE="MAKE=${MAKE-make}"
3084fi
3085
3086
3087
3088
3089
3090subdirs="$CONFIG_SUBDIRS"
3091 
3092
3093trap '' 1 2 15
3094cat > confcache <<\EOF
3095# This file is a shell script that caches the results of configure
3096# tests run on this system so they can be shared between configure
3097# scripts and configure runs.  It is not useful on other systems.
3098# If it contains results you don't want to keep, you may remove or edit it.
3099#
3100# By default, configure uses ./config.cache as the cache file,
3101# creating it if it does not exist already.  You can give configure
3102# the --cache-file=FILE option to use a different cache file; that is
3103# what configure does when it calls configure scripts in
3104# subdirectories, so they share the cache.
3105# Giving --cache-file=/dev/null disables caching, for debugging configure.
3106# config.status only pays attention to the cache file if you give it the
3107# --recheck option to rerun configure.
3108#
3109EOF
3110# The following way of writing the cache mishandles newlines in values,
3111# but we know of no workaround that is simple, portable, and efficient.
3112# So, don't put newlines in cache variables' values.
3113# Ultrix sh set writes to stderr and can't be redirected directly,
3114# and sets the high bit in the cache file unless we assign to the vars.
3115(set) 2>&1 |
3116  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3117  *ac_space=\ *)
3118    # `set' does not quote correctly, so add quotes (double-quote substitution
3119    # turns \\\\ into \\, and sed turns \\ into \).
3120    sed -n \
3121      -e "s/'/'\\\\''/g" \
3122      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3123    ;;
3124  *)
3125    # `set' quotes correctly as required by POSIX, so do not add quotes.
3126    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3127    ;;
3128  esac >> confcache
3129if cmp -s $cache_file confcache; then
3130  :
3131else
3132  if test -w $cache_file; then
3133    echo "updating cache $cache_file"
3134    cat confcache > $cache_file
3135  else
3136    echo "not updating unwritable cache $cache_file"
3137  fi
3138fi
3139rm -f confcache
3140
3141trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3142
3143test "x$prefix" = xNONE && prefix=$ac_default_prefix
3144# Let make expand exec_prefix.
3145test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3146
3147# Any assignment to VPATH causes Sun make to only execute
3148# the first set of double-colon rules, so remove it if not needed.
3149# If there is a colon in the path, we need to keep it.
3150if test "x$srcdir" = x.; then
3151  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3152fi
3153
3154trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3155
3156# Transform confdefs.h into DEFS.
3157# Protect against shell expansion while executing Makefile rules.
3158# Protect against Makefile macro expansion.
3159cat > conftest.defs <<\EOF
3160s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
3161s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
3162s%\[%\\&%g
3163s%\]%\\&%g
3164s%\$%$$%g
3165EOF
3166DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3167rm -f conftest.defs
3168
3169
3170# Without the "./", some shells look in PATH for config.status.
3171: ${CONFIG_STATUS=./config.status}
3172
3173echo creating $CONFIG_STATUS
3174rm -f $CONFIG_STATUS
3175cat > $CONFIG_STATUS <<EOF
3176#! /bin/sh
3177# Generated automatically by configure.
3178# Run this file to recreate the current configuration.
3179# This directory was configured as follows,
3180# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3181#
3182# $0 $ac_configure_args
3183#
3184# Compiler output produced by configure, useful for debugging
3185# configure, is in ./config.log if it exists.
3186
3187ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3188for ac_option
3189do
3190  case "\$ac_option" in
3191  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3192    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3193    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3194  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3195    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3196    exit 0 ;;
3197  -help | --help | --hel | --he | --h)
3198    echo "\$ac_cs_usage"; exit 0 ;;
3199  *) echo "\$ac_cs_usage"; exit 1 ;;
3200  esac
3201done
3202
3203ac_given_srcdir=$srcdir
3204ac_given_INSTALL="$INSTALL"
3205
3206trap 'rm -fr `echo "${OUTPUT_MAKEFILES}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3207EOF
3208cat >> $CONFIG_STATUS <<EOF
3209
3210# Protect against being on the right side of a sed subst in config.status.
3211sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3212 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3213$ac_vpsub
3214$extrasub
3215s%@SHELL@%$SHELL%g
3216s%@CFLAGS@%$CFLAGS%g
3217s%@CPPFLAGS@%$CPPFLAGS%g
3218s%@CXXFLAGS@%$CXXFLAGS%g
3219s%@FFLAGS@%$FFLAGS%g
3220s%@DEFS@%$DEFS%g
3221s%@LDFLAGS@%$LDFLAGS%g
3222s%@LIBS@%$LIBS%g
3223s%@exec_prefix@%$exec_prefix%g
3224s%@prefix@%$prefix%g
3225s%@program_transform_name@%$program_transform_name%g
3226s%@bindir@%$bindir%g
3227s%@sbindir@%$sbindir%g
3228s%@libexecdir@%$libexecdir%g
3229s%@datadir@%$datadir%g
3230s%@sysconfdir@%$sysconfdir%g
3231s%@sharedstatedir@%$sharedstatedir%g
3232s%@localstatedir@%$localstatedir%g
3233s%@libdir@%$libdir%g
3234s%@includedir@%$includedir%g
3235s%@oldincludedir@%$oldincludedir%g
3236s%@infodir@%$infodir%g
3237s%@mandir@%$mandir%g
3238s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
3239s%@VERSION_DATE@%$VERSION_DATE%g
3240s%@SINGULAR_SHORT_VERSION@%$SINGULAR_SHORT_VERSION%g
3241s%@SINGULAR_RPM_VERSION@%$SINGULAR_RPM_VERSION%g
3242s%@SINGULAR_ROOT_DIR@%$SINGULAR_ROOT_DIR%g
3243s%@SINGUNAME@%$SINGUNAME%g
3244s%@SING_UNAME@%$SING_UNAME%g
3245s%@CC@%$CC%g
3246s%@CPP@%$CPP%g
3247s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3248s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3249s%@INSTALL_DATA@%$INSTALL_DATA%g
3250s%@CXX@%$CXX%g
3251s%@PIPE@%$PIPE%g
3252s%@PERL@%$PERL%g
3253s%@UUDECODE@%$UUDECODE%g
3254s%@GUNZIP@%$GUNZIP%g
3255s%@MYGZIP@%$MYGZIP%g
3256s%@LATEX2HTML@%$LATEX2HTML%g
3257s%@LN_S@%$LN_S%g
3258s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3259s%@SINGULAR@%$SINGULAR%g
3260s%@DOC2TEX_EXAMPLE_EXCLUSIONS@%$DOC2TEX_EXAMPLE_EXCLUSIONS%g
3261s%@TMP_DIR@%$TMP_DIR%g
3262s%@CXXCPP@%$CXXCPP%g
3263s%@TEXI2DVI@%$TEXI2DVI%g
3264s%@TEXI2PDF@%$TEXI2PDF%g
3265s%@MAKEINFO@%$MAKEINFO%g
3266s%@TEXINDEX@%$TEXINDEX%g
3267s%@TEXI2HTML@%$TEXI2HTML%g
3268s%@TEXI2HTML_OPTS@%$TEXI2HTML_OPTS%g
3269s%@SET_MAKE@%$SET_MAKE%g
3270s%@SUBDIRS@%$SUBDIRS%g
3271s%@BUILD_SUBDIRS@%$BUILD_SUBDIRS%g
3272s%@BUILD1_SUBDIRS@%$BUILD1_SUBDIRS%g
3273s%@CONFIG_SUBDIRS@%$CONFIG_SUBDIRS%g
3274s%@subdirs@%$subdirs%g
3275
3276CEOF
3277EOF
3278
3279cat >> $CONFIG_STATUS <<\EOF
3280
3281# Split the substitutions into bite-sized pieces for seds with
3282# small command number limits, like on Digital OSF/1 and HP-UX.
3283ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3284ac_file=1 # Number of current file.
3285ac_beg=1 # First line for current file.
3286ac_end=$ac_max_sed_cmds # Line after last line for current file.
3287ac_more_lines=:
3288ac_sed_cmds=""
3289while $ac_more_lines; do
3290  if test $ac_beg -gt 1; then
3291    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3292  else
3293    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3294  fi
3295  if test ! -s conftest.s$ac_file; then
3296    ac_more_lines=false
3297    rm -f conftest.s$ac_file
3298  else
3299    if test -z "$ac_sed_cmds"; then
3300      ac_sed_cmds="sed -f conftest.s$ac_file"
3301    else
3302      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3303    fi
3304    ac_file=`expr $ac_file + 1`
3305    ac_beg=$ac_end
3306    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3307  fi
3308done
3309if test -z "$ac_sed_cmds"; then
3310  ac_sed_cmds=cat
3311fi
3312EOF
3313
3314cat >> $CONFIG_STATUS <<EOF
3315
3316CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
3317EOF
3318cat >> $CONFIG_STATUS <<\EOF
3319for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3320  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3321  case "$ac_file" in
3322  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3323       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3324  *) ac_file_in="${ac_file}.in" ;;
3325  esac
3326
3327  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3328
3329  # Remove last slash and all that follows it.  Not all systems have dirname.
3330  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3331  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3332    # The file is in a subdirectory.
3333    test ! -d "$ac_dir" && mkdir "$ac_dir"
3334    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3335    # A "../" for each directory in $ac_dir_suffix.
3336    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3337  else
3338    ac_dir_suffix= ac_dots=
3339  fi
3340
3341  case "$ac_given_srcdir" in
3342  .)  srcdir=.
3343      if test -z "$ac_dots"; then top_srcdir=.
3344      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3345  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3346  *) # Relative path.
3347    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3348    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3349  esac
3350
3351  case "$ac_given_INSTALL" in
3352  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3353  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3354  esac
3355
3356  echo creating "$ac_file"
3357  rm -f "$ac_file"
3358  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3359  case "$ac_file" in
3360  *Makefile*) ac_comsub="1i\\
3361# $configure_input" ;;
3362  *) ac_comsub= ;;
3363  esac
3364
3365  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3366  sed -e "$ac_comsub
3367s%@configure_input@%$configure_input%g
3368s%@srcdir@%$srcdir%g
3369s%@top_srcdir@%$top_srcdir%g
3370s%@INSTALL@%$INSTALL%g
3371" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3372fi; done
3373rm -f conftest.s*
3374
3375EOF
3376cat >> $CONFIG_STATUS <<EOF
3377
3378EOF
3379cat >> $CONFIG_STATUS <<\EOF
3380
3381exit 0
3382EOF
3383chmod +x $CONFIG_STATUS
3384rm -fr confdefs* $ac_clean_files
3385test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3386
3387if test "$no_recursion" != yes; then
3388
3389  # Remove --cache-file and --srcdir arguments so they do not pile up.
3390  ac_sub_configure_args=
3391  ac_prev=
3392  for ac_arg in $ac_configure_args; do
3393    if test -n "$ac_prev"; then
3394      ac_prev=
3395      continue
3396    fi
3397    case "$ac_arg" in
3398    -cache-file | --cache-file | --cache-fil | --cache-fi \
3399    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3400      ac_prev=cache_file ;;
3401    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3402    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3403      ;;
3404    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3405      ac_prev=srcdir ;;
3406    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3407      ;;
3408    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3409    esac
3410  done
3411
3412  for ac_config_dir in $CONFIG_SUBDIRS; do
3413
3414    # Do not complain, so a configure script can configure whichever
3415    # parts of a large source tree are present.
3416    if test ! -d $srcdir/$ac_config_dir; then
3417      continue
3418    fi
3419
3420    echo configuring in $ac_config_dir
3421
3422    case "$srcdir" in
3423    .) ;;
3424    *)
3425      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3426      else
3427        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3428      fi
3429      ;;
3430    esac
3431
3432    ac_popdir=`pwd`
3433    cd $ac_config_dir
3434
3435      # A "../" for each directory in /$ac_config_dir.
3436      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3437
3438    case "$srcdir" in
3439    .) # No --srcdir option.  We are building in place.
3440      ac_sub_srcdir=$srcdir ;;
3441    /*) # Absolute path.
3442      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3443    *) # Relative path.
3444      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3445    esac
3446
3447    # Check for guested configure; otherwise get Cygnus style configure.
3448    if test -f $ac_sub_srcdir/configure; then
3449      ac_sub_configure=$ac_sub_srcdir/configure
3450    elif test -f $ac_sub_srcdir/configure.in; then
3451      ac_sub_configure=$ac_configure
3452    else
3453      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3454      ac_sub_configure=
3455    fi
3456
3457    # The recursion is here.
3458    if test -n "$ac_sub_configure"; then
3459
3460      # Make the cache file name correct relative to the subdirectory.
3461      case "$cache_file" in
3462      /*) ac_sub_cache_file=$cache_file ;;
3463      *) # Relative path.
3464        ac_sub_cache_file="$ac_dots$cache_file" ;;
3465      esac
3466  case "$ac_given_INSTALL" in
3467        [/$]*) INSTALL="$ac_given_INSTALL" ;;
3468        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3469        esac
3470
3471      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3472      # The eval makes quoting arguments work.
3473      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3474      then :
3475      else
3476        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3477      fi
3478    fi
3479
3480    cd $ac_popdir
3481  done
3482fi
3483
Note: See TracBrowser for help on using the repository browser.