source: git/configure @ 171950

spielwiese
Last change on this file since 171950 was 051dc7, checked in by Hans Schönemann <hannes@…>, 16 years ago
*hannes: configure --with-svd git-svn-id: file:///usr/local/Singular/svn/trunk@10707 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 101.9 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
1334
1335for ac_prog in gunzip
1336do
1337# Extract the first word of "$ac_prog", so it can be a program name with args.
1338set dummy $ac_prog; ac_word=$2
1339echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1340echo "configure:1341: checking for $ac_word" >&5
1341if eval "test \"`echo '$''{'ac_cv_prog_GUNZIP'+set}'`\" = set"; then
1342  echo $ac_n "(cached) $ac_c" 1>&6
1343else
1344  if test -n "$GUNZIP"; then
1345  ac_cv_prog_GUNZIP="$GUNZIP" # Let the user override the test.
1346else
1347  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1348  ac_dummy="$PATH"
1349  for ac_dir in $ac_dummy; do
1350    test -z "$ac_dir" && ac_dir=.
1351    if test -f $ac_dir/$ac_word; then
1352      ac_cv_prog_GUNZIP="$ac_prog"
1353      break
1354    fi
1355  done
1356  IFS="$ac_save_ifs"
1357fi
1358fi
1359GUNZIP="$ac_cv_prog_GUNZIP"
1360if test -n "$GUNZIP"; then
1361  echo "$ac_t""$GUNZIP" 1>&6
1362else
1363  echo "$ac_t""no" 1>&6
1364fi
1365
1366test -n "$GUNZIP" && break
1367done
1368test -n "$GUNZIP" || GUNZIP="${pwd}/warn_not_found.sh gunzip"
1369
1370# don't use GZIP this breaks configure
1371for ac_prog in gzip
1372do
1373# Extract the first word of "$ac_prog", so it can be a program name with args.
1374set dummy $ac_prog; ac_word=$2
1375echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1376echo "configure:1377: checking for $ac_word" >&5
1377if eval "test \"`echo '$''{'ac_cv_prog_MYGZIP'+set}'`\" = set"; then
1378  echo $ac_n "(cached) $ac_c" 1>&6
1379else
1380  if test -n "$MYGZIP"; then
1381  ac_cv_prog_MYGZIP="$MYGZIP" # Let the user override the test.
1382else
1383  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1384  ac_dummy="$PATH"
1385  for ac_dir in $ac_dummy; do
1386    test -z "$ac_dir" && ac_dir=.
1387    if test -f $ac_dir/$ac_word; then
1388      ac_cv_prog_MYGZIP="$ac_prog"
1389      break
1390    fi
1391  done
1392  IFS="$ac_save_ifs"
1393fi
1394fi
1395MYGZIP="$ac_cv_prog_MYGZIP"
1396if test -n "$MYGZIP"; then
1397  echo "$ac_t""$MYGZIP" 1>&6
1398else
1399  echo "$ac_t""no" 1>&6
1400fi
1401
1402test -n "$MYGZIP" && break
1403done
1404test -n "$MYGZIP" || MYGZIP="${pwd}/warn_not_found.sh gzip"
1405
1406# Extract the first word of "latex2html", so it can be a program name with args.
1407set dummy latex2html; ac_word=$2
1408echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1409echo "configure:1410: checking for $ac_word" >&5
1410if eval "test \"`echo '$''{'ac_cv_prog_LATEX2HTML'+set}'`\" = set"; then
1411  echo $ac_n "(cached) $ac_c" 1>&6
1412else
1413  if test -n "$LATEX2HTML"; then
1414  ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
1415else
1416  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1417  ac_dummy="$PATH"
1418  for ac_dir in $ac_dummy; do
1419    test -z "$ac_dir" && ac_dir=.
1420    if test -f $ac_dir/$ac_word; then
1421      ac_cv_prog_LATEX2HTML="latex2html"
1422      break
1423    fi
1424  done
1425  IFS="$ac_save_ifs"
1426fi
1427fi
1428LATEX2HTML="$ac_cv_prog_LATEX2HTML"
1429if test -n "$LATEX2HTML"; then
1430  echo "$ac_t""$LATEX2HTML" 1>&6
1431else
1432  echo "$ac_t""no" 1>&6
1433fi
1434
1435echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1436echo "configure:1437: checking whether ln -s works" >&5
1437if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1438  echo $ac_n "(cached) $ac_c" 1>&6
1439else
1440  rm -f conftestdata
1441if ln -s X conftestdata 2>/dev/null
1442then
1443  rm -f conftestdata
1444  ac_cv_prog_LN_S="ln -s"
1445else
1446  ac_cv_prog_LN_S=ln
1447fi
1448fi
1449LN_S="$ac_cv_prog_LN_S"
1450if test "$ac_cv_prog_LN_S" = "ln -s"; then
1451  echo "$ac_t""yes" 1>&6
1452else
1453  echo "$ac_t""no" 1>&6
1454fi
1455
1456
1457if test -r "${pwd}/mkinstalldirs"; then
1458  MKINSTALLDIRS=${pwd}/mkinstalldirs
1459 
1460else
1461  { echo "configure: error: mkinstalldirs not foind in ${pwd}" 1>&2; exit 1; }
1462fi
1463
1464# expand prefix and pass it to subsequent configures
1465if test "x$prefix" = xNONE; then
1466  prefix=${ac_default_prefix}
1467  ac_configure_args="$ac_configure_args --prefix=${prefix}"
1468fi
1469
1470# expand exec_prefix
1471if test "x$exec_prefix" = xNONE; then
1472 exec_prefix=${prefix}/${ac_cv_singuname}
1473 ac_configure_args="$ac_configure_args --exec_prefix=${exec_prefix}"
1474fi
1475
1476# expand bindir
1477if test "x$bindir" = 'x${exec_prefix}/bin'; then
1478  bindir="${exec_prefix}"
1479  ac_configure_args="$ac_configure_args --bindir=${bindir}"
1480fi
1481
1482# expand libdir
1483if test "x$libdir" = 'x${exec_prefix}/lib'; then
1484  libdir="${exec_prefix}/lib"
1485  ac_configure_args="$ac_configure_args --libdir=${libdir}"
1486fi
1487
1488# expand includedir
1489if test "x$includedir" = 'x${prefix}/include'; then
1490  includedir="${exec_prefix}/include"
1491  ac_configure_args="$ac_configure_args --includedir=${includedir}"
1492fi
1493
1494# construct name of installed Singular executable
1495SINGULAR=${bindir}/Singular-${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}
1496export SINGULAR
1497
1498
1499
1500# add -I to CPPFLAGS and -L to LDFLAGS, just to be sure
1501LDFLAGS="-L${libdir} ${LDFLAGS}"
1502CPPFLAGS="-I${includedir} ${CPPFLAGS}"
1503
1504# check for AIX
1505echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
1506echo "configure:1507: checking whether _AIX is defined" >&5
1507if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
1508  echo $ac_n "(cached) $ac_c" 1>&6
1509else
1510  cat > conftest.$ac_ext <<EOF
1511#line 1512 "configure"
1512#include "confdefs.h"
1513#ifdef _AIX
1514    yes
1515#endif
1516
1517EOF
1518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1519  egrep "yes" >/dev/null 2>&1; then
1520  rm -rf conftest*
1521  ac_cv_is_aix=yes
1522else
1523  rm -rf conftest*
1524  ac_cv_is_aix=no
1525fi
1526rm -f conftest*
1527
1528fi
1529
1530if test "$ac_cv_is_aix" = yes; then
1531  echo "$ac_t""yes" 1>&6
1532else
1533  echo "$ac_t""no" 1>&6
1534fi
1535
1536echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
1537echo "configure:1538: checking for atof in -lm" >&5
1538ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
1539if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1540  echo $ac_n "(cached) $ac_c" 1>&6
1541else
1542  ac_save_LIBS="$LIBS"
1543LIBS="-lm  $LIBS"
1544cat > conftest.$ac_ext <<EOF
1545#line 1546 "configure"
1546#include "confdefs.h"
1547/* Override any gcc2 internal prototype to avoid an error.  */
1548/* We use char because int might match the return type of a gcc2
1549    builtin and then its argument prototype would still apply.  */
1550char atof();
1551
1552int main() {
1553atof()
1554; return 0; }
1555EOF
1556if { (eval echo configure:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1557  rm -rf conftest*
1558  eval "ac_cv_lib_$ac_lib_var=yes"
1559else
1560  echo "configure: failed program was:" >&5
1561  cat conftest.$ac_ext >&5
1562  rm -rf conftest*
1563  eval "ac_cv_lib_$ac_lib_var=no"
1564fi
1565rm -f conftest*
1566LIBS="$ac_save_LIBS"
1567
1568fi
1569if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1570  echo "$ac_t""yes" 1>&6
1571    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1572    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1573  cat >> confdefs.h <<EOF
1574#define $ac_tr_lib 1
1575EOF
1576
1577  LIBS="-lm $LIBS"
1578
1579else
1580  echo "$ac_t""no" 1>&6
1581fi
1582
1583echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
1584echo "configure:1585: checking for socket in -lbsd" >&5
1585ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
1586if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1587  echo $ac_n "(cached) $ac_c" 1>&6
1588else
1589  ac_save_LIBS="$LIBS"
1590LIBS="-lbsd  $LIBS"
1591cat > conftest.$ac_ext <<EOF
1592#line 1593 "configure"
1593#include "confdefs.h"
1594/* Override any gcc2 internal prototype to avoid an error.  */
1595/* We use char because int might match the return type of a gcc2
1596    builtin and then its argument prototype would still apply.  */
1597char socket();
1598
1599int main() {
1600socket()
1601; return 0; }
1602EOF
1603if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1604  rm -rf conftest*
1605  eval "ac_cv_lib_$ac_lib_var=yes"
1606else
1607  echo "configure: failed program was:" >&5
1608  cat conftest.$ac_ext >&5
1609  rm -rf conftest*
1610  eval "ac_cv_lib_$ac_lib_var=no"
1611fi
1612rm -f conftest*
1613LIBS="$ac_save_LIBS"
1614
1615fi
1616if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1617  echo "$ac_t""yes" 1>&6
1618    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1619    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1620  cat >> confdefs.h <<EOF
1621#define $ac_tr_lib 1
1622EOF
1623
1624  LIBS="-lbsd $LIBS"
1625
1626else
1627  echo "$ac_t""no" 1>&6
1628fi
1629
1630echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
1631echo "configure:1632: checking for listen in -lsocket" >&5
1632ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
1633if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1634  echo $ac_n "(cached) $ac_c" 1>&6
1635else
1636  ac_save_LIBS="$LIBS"
1637LIBS="-lsocket  $LIBS"
1638cat > conftest.$ac_ext <<EOF
1639#line 1640 "configure"
1640#include "confdefs.h"
1641/* Override any gcc2 internal prototype to avoid an error.  */
1642/* We use char because int might match the return type of a gcc2
1643    builtin and then its argument prototype would still apply.  */
1644char listen();
1645
1646int main() {
1647listen()
1648; return 0; }
1649EOF
1650if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1651  rm -rf conftest*
1652  eval "ac_cv_lib_$ac_lib_var=yes"
1653else
1654  echo "configure: failed program was:" >&5
1655  cat conftest.$ac_ext >&5
1656  rm -rf conftest*
1657  eval "ac_cv_lib_$ac_lib_var=no"
1658fi
1659rm -f conftest*
1660LIBS="$ac_save_LIBS"
1661
1662fi
1663if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1664  echo "$ac_t""yes" 1>&6
1665    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1666    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1667  cat >> confdefs.h <<EOF
1668#define $ac_tr_lib 1
1669EOF
1670
1671  LIBS="-lsocket $LIBS"
1672
1673else
1674  echo "$ac_t""no" 1>&6
1675fi
1676
1677echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1678echo "configure:1679: checking for gethostbyname in -lnsl" >&5
1679ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1680if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1681  echo $ac_n "(cached) $ac_c" 1>&6
1682else
1683  ac_save_LIBS="$LIBS"
1684LIBS="-lnsl  $LIBS"
1685cat > conftest.$ac_ext <<EOF
1686#line 1687 "configure"
1687#include "confdefs.h"
1688/* Override any gcc2 internal prototype to avoid an error.  */
1689/* We use char because int might match the return type of a gcc2
1690    builtin and then its argument prototype would still apply.  */
1691char gethostbyname();
1692
1693int main() {
1694gethostbyname()
1695; return 0; }
1696EOF
1697if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1698  rm -rf conftest*
1699  eval "ac_cv_lib_$ac_lib_var=yes"
1700else
1701  echo "configure: failed program was:" >&5
1702  cat conftest.$ac_ext >&5
1703  rm -rf conftest*
1704  eval "ac_cv_lib_$ac_lib_var=no"
1705fi
1706rm -f conftest*
1707LIBS="$ac_save_LIBS"
1708
1709fi
1710if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1711  echo "$ac_t""yes" 1>&6
1712    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1713    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1714  cat >> confdefs.h <<EOF
1715#define $ac_tr_lib 1
1716EOF
1717
1718  LIBS="-lnsl $LIBS"
1719
1720else
1721  echo "$ac_t""no" 1>&6
1722fi
1723
1724echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
1725echo "configure:1726: checking for main in -lgmp" >&5
1726ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
1727if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1728  echo $ac_n "(cached) $ac_c" 1>&6
1729else
1730  ac_save_LIBS="$LIBS"
1731LIBS="-lgmp  $LIBS"
1732cat > conftest.$ac_ext <<EOF
1733#line 1734 "configure"
1734#include "confdefs.h"
1735
1736int main() {
1737main()
1738; return 0; }
1739EOF
1740if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1741  rm -rf conftest*
1742  eval "ac_cv_lib_$ac_lib_var=yes"
1743else
1744  echo "configure: failed program was:" >&5
1745  cat conftest.$ac_ext >&5
1746  rm -rf conftest*
1747  eval "ac_cv_lib_$ac_lib_var=no"
1748fi
1749rm -f conftest*
1750LIBS="$ac_save_LIBS"
1751
1752fi
1753if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1754  echo "$ac_t""yes" 1>&6
1755    ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1756    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1757  cat >> confdefs.h <<EOF
1758#define $ac_tr_lib 1
1759EOF
1760
1761  LIBS="-lgmp $LIBS"
1762
1763else
1764  echo "$ac_t""no" 1>&6
1765fi
1766
1767echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
1768echo "configure:1769: checking for IMP_PutGmpInt in -lMP" >&5
1769ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
1770if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1771  echo $ac_n "(cached) $ac_c" 1>&6
1772else
1773  ac_save_LIBS="$LIBS"
1774LIBS="-lMP  $LIBS"
1775cat > conftest.$ac_ext <<EOF
1776#line 1777 "configure"
1777#include "confdefs.h"
1778/* Override any gcc2 internal prototype to avoid an error.  */
1779/* We use char because int might match the return type of a gcc2
1780    builtin and then its argument prototype would still apply.  */
1781char IMP_PutGmpInt();
1782
1783int main() {
1784IMP_PutGmpInt()
1785; return 0; }
1786EOF
1787if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1788  rm -rf conftest*
1789  eval "ac_cv_lib_$ac_lib_var=yes"
1790else
1791  echo "configure: failed program was:" >&5
1792  cat conftest.$ac_ext >&5
1793  rm -rf conftest*
1794  eval "ac_cv_lib_$ac_lib_var=no"
1795fi
1796rm -f conftest*
1797LIBS="$ac_save_LIBS"
1798
1799fi
1800if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1801  echo "$ac_t""yes" 1>&6
1802    ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1803    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1804  cat >> confdefs.h <<EOF
1805#define $ac_tr_lib 1
1806EOF
1807
1808  LIBS="-lMP $LIBS"
1809
1810else
1811  echo "$ac_t""no" 1>&6
1812fi
1813
1814echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
1815echo "configure:1816: checking for MPT_GetTree in -lMPT" >&5
1816ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
1817if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1818  echo $ac_n "(cached) $ac_c" 1>&6
1819else
1820  ac_save_LIBS="$LIBS"
1821LIBS="-lMPT  $LIBS"
1822cat > conftest.$ac_ext <<EOF
1823#line 1824 "configure"
1824#include "confdefs.h"
1825/* Override any gcc2 internal prototype to avoid an error.  */
1826/* We use char because int might match the return type of a gcc2
1827    builtin and then its argument prototype would still apply.  */
1828char MPT_GetTree();
1829
1830int main() {
1831MPT_GetTree()
1832; return 0; }
1833EOF
1834if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1835  rm -rf conftest*
1836  eval "ac_cv_lib_$ac_lib_var=yes"
1837else
1838  echo "configure: failed program was:" >&5
1839  cat conftest.$ac_ext >&5
1840  rm -rf conftest*
1841  eval "ac_cv_lib_$ac_lib_var=no"
1842fi
1843rm -f conftest*
1844LIBS="$ac_save_LIBS"
1845
1846fi
1847if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1848  echo "$ac_t""yes" 1>&6
1849    ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1850    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1851  cat >> confdefs.h <<EOF
1852#define $ac_tr_lib 1
1853EOF
1854
1855  LIBS="-lMPT $LIBS"
1856
1857else
1858  echo "$ac_t""no" 1>&6
1859fi
1860
1861echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
1862echo "configure:1863: checking for atof in -lsingcf" >&5
1863ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
1864if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1865  echo $ac_n "(cached) $ac_c" 1>&6
1866else
1867  ac_save_LIBS="$LIBS"
1868LIBS="-lsingcf  $LIBS"
1869cat > conftest.$ac_ext <<EOF
1870#line 1871 "configure"
1871#include "confdefs.h"
1872/* Override any gcc2 internal prototype to avoid an error.  */
1873/* We use char because int might match the return type of a gcc2
1874    builtin and then its argument prototype would still apply.  */
1875char atof();
1876
1877int main() {
1878atof()
1879; return 0; }
1880EOF
1881if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1882  rm -rf conftest*
1883  eval "ac_cv_lib_$ac_lib_var=yes"
1884else
1885  echo "configure: failed program was:" >&5
1886  cat conftest.$ac_ext >&5
1887  rm -rf conftest*
1888  eval "ac_cv_lib_$ac_lib_var=no"
1889fi
1890rm -f conftest*
1891LIBS="$ac_save_LIBS"
1892
1893fi
1894if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1895  echo "$ac_t""yes" 1>&6
1896    ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1897    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1898  cat >> confdefs.h <<EOF
1899#define $ac_tr_lib 1
1900EOF
1901
1902  LIBS="-lsingcf $LIBS"
1903
1904else
1905  echo "$ac_t""no" 1>&6
1906fi
1907
1908echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
1909echo "configure:1910: checking for atof in -lsingfac" >&5
1910ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
1911if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1912  echo $ac_n "(cached) $ac_c" 1>&6
1913else
1914  ac_save_LIBS="$LIBS"
1915LIBS="-lsingfac  $LIBS"
1916cat > conftest.$ac_ext <<EOF
1917#line 1918 "configure"
1918#include "confdefs.h"
1919/* Override any gcc2 internal prototype to avoid an error.  */
1920/* We use char because int might match the return type of a gcc2
1921    builtin and then its argument prototype would still apply.  */
1922char atof();
1923
1924int main() {
1925atof()
1926; return 0; }
1927EOF
1928if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1929  rm -rf conftest*
1930  eval "ac_cv_lib_$ac_lib_var=yes"
1931else
1932  echo "configure: failed program was:" >&5
1933  cat conftest.$ac_ext >&5
1934  rm -rf conftest*
1935  eval "ac_cv_lib_$ac_lib_var=no"
1936fi
1937rm -f conftest*
1938LIBS="$ac_save_LIBS"
1939
1940fi
1941if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1942  echo "$ac_t""yes" 1>&6
1943    ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1944    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1945  cat >> confdefs.h <<EOF
1946#define $ac_tr_lib 1
1947EOF
1948
1949  LIBS="-lsingfac $LIBS"
1950
1951else
1952  echo "$ac_t""no" 1>&6
1953fi
1954
1955echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6
1956echo "configure:1957: checking for omTestAddr in -lomalloc" >&5
1957ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'`
1958if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1959  echo $ac_n "(cached) $ac_c" 1>&6
1960else
1961  ac_save_LIBS="$LIBS"
1962LIBS="-lomalloc  $LIBS"
1963cat > conftest.$ac_ext <<EOF
1964#line 1965 "configure"
1965#include "confdefs.h"
1966/* Override any gcc2 internal prototype to avoid an error.  */
1967/* We use char because int might match the return type of a gcc2
1968    builtin and then its argument prototype would still apply.  */
1969char omTestAddr();
1970
1971int main() {
1972omTestAddr()
1973; return 0; }
1974EOF
1975if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1976  rm -rf conftest*
1977  eval "ac_cv_lib_$ac_lib_var=yes"
1978else
1979  echo "configure: failed program was:" >&5
1980  cat conftest.$ac_ext >&5
1981  rm -rf conftest*
1982  eval "ac_cv_lib_$ac_lib_var=no"
1983fi
1984rm -f conftest*
1985LIBS="$ac_save_LIBS"
1986
1987fi
1988if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1989  echo "$ac_t""yes" 1>&6
1990    ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1991    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1992  cat >> confdefs.h <<EOF
1993#define $ac_tr_lib 1
1994EOF
1995
1996  LIBS="-lomalloc $LIBS"
1997
1998else
1999  echo "$ac_t""no" 1>&6
2000fi
2001
2002echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6
2003echo "configure:2004: checking for main in -lomalloc_ndebug" >&5
2004ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'`
2005if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2006  echo $ac_n "(cached) $ac_c" 1>&6
2007else
2008  ac_save_LIBS="$LIBS"
2009LIBS="-lomalloc_ndebug  $LIBS"
2010cat > conftest.$ac_ext <<EOF
2011#line 2012 "configure"
2012#include "confdefs.h"
2013
2014int main() {
2015main()
2016; return 0; }
2017EOF
2018if { (eval echo configure:2019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2019  rm -rf conftest*
2020  eval "ac_cv_lib_$ac_lib_var=yes"
2021else
2022  echo "configure: failed program was:" >&5
2023  cat conftest.$ac_ext >&5
2024  rm -rf conftest*
2025  eval "ac_cv_lib_$ac_lib_var=no"
2026fi
2027rm -f conftest*
2028LIBS="$ac_save_LIBS"
2029
2030fi
2031if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2032  echo "$ac_t""yes" 1>&6
2033    ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2034    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2035  cat >> confdefs.h <<EOF
2036#define $ac_tr_lib 1
2037EOF
2038
2039  LIBS="-lomalloc_ndebug $LIBS"
2040
2041else
2042  echo "$ac_t""no" 1>&6
2043fi
2044
2045
2046for ac_hdr in gmp.h MP.h  MPT.h factory.h factor.h omalloc.h
2047do
2048ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2049echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2050echo "configure:2051: checking for $ac_hdr" >&5
2051if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2052  echo $ac_n "(cached) $ac_c" 1>&6
2053else
2054  cat > conftest.$ac_ext <<EOF
2055#line 2056 "configure"
2056#include "confdefs.h"
2057#include <$ac_hdr>
2058EOF
2059ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2060{ (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2061ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2062if test -z "$ac_err"; then
2063  rm -rf conftest*
2064  eval "ac_cv_header_$ac_safe=yes"
2065else
2066  echo "$ac_err" >&5
2067  echo "configure: failed program was:" >&5
2068  cat conftest.$ac_ext >&5
2069  rm -rf conftest*
2070  eval "ac_cv_header_$ac_safe=no"
2071fi
2072rm -f conftest*
2073fi
2074if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2075  echo "$ac_t""yes" 1>&6
2076    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2077  cat >> confdefs.h <<EOF
2078#define $ac_tr_hdr 1
2079EOF
2080 
2081else
2082  echo "$ac_t""no" 1>&6
2083fi
2084done
2085
2086
2087if test "$ac_cv_lib_gmp_main" = yes && \
2088 test "$ac_cv_header_gmp_h" = yes; then
2089  ac_gmp_ok=yes
2090fi
2091
2092if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \
2093 test "$ac_cv_lib_MPT_MPT_GetTree" && \
2094 test "$ac_cv_header_MP_h" = yes && \
2095 test "$ac_cv_header_MPT_h" = yes; then
2096  ac_MP_ok=yes
2097fi
2098
2099if test "$ac_cv_lib_singcf_atof" = yes && \
2100 test "$ac_cv_header_factory_h" = yes; then
2101  ac_factory_ok=yes
2102fi
2103
2104if test "$ac_cv_lib_singfac_atof" = yes && \
2105 test "$ac_cv_header_factor_h" = yes; then
2106  ac_libfac_ok=yes
2107fi
2108
2109if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \
2110   test "$ac_cv_lib_omalloc_ndebug_main" = yes && \
2111   test "$ac_cv_header_omalloc_c" = yes && \
2112   test "$ac_cv_header_omalloc_h" = yes; then
2113  ac_cv_omalloc_ok=yes
2114fi
2115 
2116
2117DOC2TEX_EXAMPLE_EXCLUSIONS=""
2118
2119
2120# Check whether --with-tmpdir or --without-tmpdir was given.
2121if test "${with_tmpdir+set}" = set; then
2122  withval="$with_tmpdir"
2123  :
2124fi
2125
2126# Check whether --enable-omalloc or --disable-omalloc was given.
2127if test "${enable_omalloc+set}" = set; then
2128  enableval="$enable_omalloc"
2129  :
2130fi
2131
2132# Check whether --enable-gmp or --disable-gmp was given.
2133if test "${enable_gmp+set}" = set; then
2134  enableval="$enable_gmp"
2135  :
2136fi
2137
2138# Check whether --enable-MP or --disable-MP was given.
2139if test "${enable_MP+set}" = set; then
2140  enableval="$enable_MP"
2141  :
2142fi
2143
2144# Check whether --enable-factory or --disable-factory was given.
2145if test "${enable_factory+set}" = set; then
2146  enableval="$enable_factory"
2147  :
2148fi
2149
2150# Check whether --enable-libfac or --disable-libfac was given.
2151if test "${enable_libfac+set}" = set; then
2152  enableval="$enable_libfac"
2153  :
2154fi
2155
2156# Check whether --enable-sgroup or --disable-sgroup was given.
2157if test "${enable_sgroup+set}" = set; then
2158  enableval="$enable_sgroup"
2159  :
2160fi
2161
2162# Check whether --enable-Singular or --disable-Singular was given.
2163if test "${enable_Singular+set}" = set; then
2164  enableval="$enable_Singular"
2165  :
2166fi
2167
2168# Check whether --enable-IntegerProgramming or --disable-IntegerProgramming was given.
2169if test "${enable_IntegerProgramming+set}" = set; then
2170  enableval="$enable_IntegerProgramming"
2171  :
2172fi
2173
2174# Check whether --enable-Plural or --disable-Plural was given.
2175if test "${enable_Plural+set}" = set; then
2176  enableval="$enable_Plural"
2177  :
2178fi
2179
2180# Check whether --enable-Texinfo or --disable-Texinfo was given.
2181if test "${enable_Texinfo+set}" = set; then
2182  enableval="$enable_Texinfo"
2183  :
2184fi
2185
2186# Check whether --enable-Texi2html or --disable-Texi2html was given.
2187if test "${enable_Texi2html+set}" = set; then
2188  enableval="$enable_Texi2html"
2189  :
2190fi
2191
2192# Check whether --enable-doc or --disable-doc was given.
2193if test "${enable_doc+set}" = set; then
2194  enableval="$enable_doc"
2195  :
2196fi
2197
2198# Check whether --enable-emacs or --disable-emacs was given.
2199if test "${enable_emacs+set}" = set; then
2200  enableval="$enable_emacs"
2201  :
2202fi
2203
2204# Check whether --with-MP or --without-MP was given.
2205if test "${with_MP+set}" = set; then
2206  withval="$with_MP"
2207  :
2208fi
2209
2210# Check whether --with-factory or --without-factory was given.
2211if test "${with_factory+set}" = set; then
2212  withval="$with_factory"
2213  :
2214fi
2215
2216# Check whether --with-libfac or --without-libfac was given.
2217if test "${with_libfac+set}" = set; then
2218  withval="$with_libfac"
2219  :
2220fi
2221
2222# Check whether --with-gmp or --without-gmp was given.
2223if test "${with_gmp+set}" = set; then
2224  withval="$with_gmp"
2225  :
2226fi
2227
2228
2229echo $ac_n "checking which tmp dir to use""... $ac_c" 1>&6
2230echo "configure:2231: checking which tmp dir to use" >&5
2231if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then
2232  if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1)
2233  then
2234    TMP_DIR="${pwd}/tmp"
2235  else
2236    TMP_DIR=${with_tmpdir}
2237  fi
2238else
2239  TMP_DIR="${pwd}/tmp"
2240fi
2241echo "$ac_t""$TMP_DIR" 1>&6
2242
2243
2244echo $ac_n "checking whether to configure and build omalloc""... $ac_c" 1>&6
2245echo "configure:2246: checking whether to configure and build omalloc" >&5
2246if test "${enable_omalloc+set}" != set; then
2247   if test "$ac_cv_omalloc_ok" = yes; then
2248     enable_omalloc=no
2249   fi
2250   enable_omalloc_not_set=yes
2251fi
2252if test "$enable_omalloc" = no; then
2253  if test "$ac_cv_omalloc_ok" != yes; then
2254    { echo "configure: error: can not build without omalloc" 1>&2; exit 1; }
2255  fi
2256  echo "$ac_t""no" 1>&6
2257else
2258  if test -d omalloc; then
2259    echo "$ac_t""yes" 1>&6
2260    if test "$enable_omalloc_not_set" = yes; then
2261      ac_configure_args="$ac_configure_args --enable-omalloc --with-external-config_h='$pwd/Singular/omSingularConfig.h' --with-track-custom"
2262    fi
2263    CONFIG_SUBDIRS="$CONFIG_SUBDIRS omalloc"
2264    BUILD1_SUBDIRS="$BUILD1_SUBDIRS omalloc"
2265    if test "${with_malloc+set}" != set; then
2266case "$ac_cv_singuname" in
2267# under windows, it is best to use the provided malloc
2268        ix86-Win*)
2269        with_malloc=system
2270        ac_configure_args="$ac_configure_args --with-malloc=system"
2271        ;;
2272        PowerMacintosh-darwin*)
2273        with_malloc=system
2274        ac_configure_args="$ac_configure_args --with-malloc=system"
2275        ;;
2276esac
2277fi
2278  else
2279    { echo "configure: error: need omalloc subdir" 1>&2; exit 1; }
2280  fi
2281fi
2282
2283echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6
2284echo "configure:2285: checking whether to configure and build gmp lib" >&5
2285if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
2286  if test "$ac_gmp_ok" != yes && test -d gmp; then
2287    echo "$ac_t""yes" 1>&6
2288    enable_gmp=yes
2289    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
2290    BUILD1_SUBDIRS="$BUILD1_SUBDIRS gmp"
2291    ac_configure_args="$ac_configure_args --enable-gmp"
2292    enable_gmp=yes
2293#    This we used to need for our patched version of gmp 2.x
2294#    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
2295  else
2296    echo "$ac_t""no" 1>&6
2297    enable_gmp=no
2298  fi
2299elif test "$enable_gmp" = yes; then
2300  if test ! -d gmp; then
2301    echo "$ac_t""no" 1>&6
2302    { echo "configure: error: Can not find gmp subdir" 1>&2; exit 1; }
2303  else
2304    echo "$ac_t""yes" 1>&6
2305    CONFIG_SUBDIRS="$CONFIG_SUBDIRS gmp"
2306    BUILD1_SUBDIRS="$BUILD1_SUBDIRS gmp"
2307#    This we used to need for our patched version of gmp 2.x
2308#    OUTPUT_MAKEFILES="$OUTPUT_MAKEFILES gmp/Makefile.in"
2309  fi
2310else
2311  echo "$ac_t""no" 1>&6
2312fi
2313
2314if test "$enable_gmp" = yes; then
2315# for gmp-3.0 to work for all ix86 processors, set generic target
2316if test "$target" = NONE; then
2317case "$ac_cv_singuname" in
2318        ix86*)
2319        gmp_target=`./config.guess | sed 's/^\w*-/i386-/'`
2320        ac_configure_args="$ac_configure_args --target=$gmp_target"
2321        ;;
2322esac
2323fi
2324# furthermore, disable building of dynamic libraries, for we want to
2325# link against the static ones
2326if test "$enable_shared" != no; then
2327  ac_configure_args="$ac_configure_args --disable-shared"
2328fi
2329fi
2330
2331# Check whether we have gmp
2332if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then
2333  { echo "configure: error: can neither find nor built gmp" 1>&2; exit 1; }
2334fi
2335
2336# Check whether we need to cheat subsequent configures with --enable-gmp
2337if test "$ac_gmp_ok" != yes && test "$enable_gmp" != yes; then
2338  ac_configure_args="$ac_configure_args --enable-gmp"
2339fi
2340
2341#AC_MSG_CHECKING(whether to configure and build MP lib)
2342# requires: sizeof(long)==4
2343echo $ac_n "checking size of long""... $ac_c" 1>&6
2344echo "configure:2345: checking size of long" >&5
2345if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2346  echo $ac_n "(cached) $ac_c" 1>&6
2347else
2348  if test "$cross_compiling" = yes; then
2349  ac_cv_sizeof_long=4
2350else
2351  cat > conftest.$ac_ext <<EOF
2352#line 2353 "configure"
2353#include "confdefs.h"
2354#include <stdio.h>
2355main()
2356{
2357  FILE *f=fopen("conftestval", "w");
2358  if (!f) exit(1);
2359  fprintf(f, "%d\n", sizeof(long));
2360  exit(0);
2361}
2362EOF
2363if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2364then
2365  ac_cv_sizeof_long=`cat conftestval`
2366else
2367  echo "configure: failed program was:" >&5
2368  cat conftest.$ac_ext >&5
2369  rm -fr conftest*
2370  ac_cv_sizeof_long=0
2371fi
2372rm -fr conftest*
2373fi
2374
2375fi
2376echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2377cat >> confdefs.h <<EOF
2378#define SIZEOF_LONG $ac_cv_sizeof_long
2379EOF
2380
2381
2382if test "$ac_cv_sizeof_long" != 4; then
2383  with_MP=no
2384fi
2385
2386echo $ac_n "checking whether to configure and build MP lib""... $ac_c" 1>&6
2387echo "configure:2388: checking whether to configure and build MP lib" >&5
2388
2389if test "$enable_MP" != yes && test "$enable_MP" != no; then
2390  if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \
2391     (test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes); then
2392    echo "$ac_t""yes" 1>&6
2393    enable_MP=yes
2394    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
2395    BUILD1_SUBDIRS="$BUILD1_SUBDIRS MP"
2396    ac_configure_args="$ac_configure_args --enable-MP"
2397  else
2398    echo "$ac_t""no" 1>&6
2399    enable_MP=no
2400  fi
2401elif test "$enable_MP" = yes; then
2402  if test ! -d MP; then
2403    echo "$ac_t""no" 1>&6
2404    { echo "configure: error: can not build MP without MP directory" 1>&2; exit 1; }
2405  fi
2406  if test "$enable_gmp" = yes || test "$ac_gmp_ok" = yes; then
2407    echo "$ac_t""yes" 1>&6
2408    CONFIG_SUBDIRS="$CONFIG_SUBDIRS MP"
2409    BUILD1_SUBDIRS="$BUILD1_SUBDIRS MP"
2410  else
2411    echo "$ac_t""no" 1>&6
2412    { echo "configure: error: can not build MP without gmp" 1>&2; exit 1; }
2413  fi
2414else
2415  echo "$ac_t""no" 1>&6
2416fi
2417
2418# need MP code to be compiled with -fPIC, should not hurt anybody else
2419if test "$enable_MP" = yes && test "${with_extra_cflags+set}" != set; then
2420ac_configure_args="$ac_configure_args --with-extra_cflags=-fPIC"
2421fi
2422
2423echo $ac_n "checking whether to configure and build NTL lib""... $ac_c" 1>&6
2424echo "configure:2425: checking whether to configure and build NTL lib" >&5
2425if test "$enable_NTL" != yes && test "$enable_NTL" != no; then
2426  if test "$with_NTL" != no && test "$ac_NTL_ok" != yes && \
2427     test -d ntl; then
2428    enable_NTL=yes
2429    echo "$ac_t""yes" 1>&6
2430    CONFIG_SUBDIRS="$CONFIG_SUBDIRS ntl"
2431    BUILD1_SUBDIRS="$BUILD1_SUBDIRS ntl"
2432    ac_configure_args="$ac_configure_args --enable-NTL"
2433    ac_ext=C
2434# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2435ac_cpp='$CXXCPP $CPPFLAGS'
2436ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2437ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2438cross_compiling=$ac_cv_prog_cxx_cross
2439
2440    echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2441echo "configure:2442: checking how to run the C++ preprocessor" >&5
2442if test -z "$CXXCPP"; then
2443if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2444  echo $ac_n "(cached) $ac_c" 1>&6
2445else
2446  ac_ext=C
2447# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2448ac_cpp='$CXXCPP $CPPFLAGS'
2449ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2450ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2451cross_compiling=$ac_cv_prog_cxx_cross
2452  CXXCPP="${CXX-g++} -E"
2453  cat > conftest.$ac_ext <<EOF
2454#line 2455 "configure"
2455#include "confdefs.h"
2456#include <stdlib.h>
2457EOF
2458ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2459{ (eval echo configure:2460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2460ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2461if test -z "$ac_err"; then
2462  :
2463else
2464  echo "$ac_err" >&5
2465  echo "configure: failed program was:" >&5
2466  cat conftest.$ac_ext >&5
2467  rm -rf conftest*
2468  CXXCPP=/lib/cpp
2469fi
2470rm -f conftest*
2471  ac_cv_prog_CXXCPP="$CXXCPP"
2472ac_ext=C
2473# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2474ac_cpp='$CXXCPP $CPPFLAGS'
2475ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2476ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2477cross_compiling=$ac_cv_prog_cxx_cross
2478fi
2479fi
2480CXXCPP="$ac_cv_prog_CXXCPP"
2481echo "$ac_t""$CXXCPP" 1>&6
2482
2483for ac_hdr in iostream.h iostream
2484do
2485ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2486echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2487echo "configure:2488: checking for $ac_hdr" >&5
2488if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2489  echo $ac_n "(cached) $ac_c" 1>&6
2490else
2491  cat > conftest.$ac_ext <<EOF
2492#line 2493 "configure"
2493#include "confdefs.h"
2494#include <$ac_hdr>
2495EOF
2496ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2497{ (eval echo configure:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2498ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2499if test -z "$ac_err"; then
2500  rm -rf conftest*
2501  eval "ac_cv_header_$ac_safe=yes"
2502else
2503  echo "$ac_err" >&5
2504  echo "configure: failed program was:" >&5
2505  cat conftest.$ac_ext >&5
2506  rm -rf conftest*
2507  eval "ac_cv_header_$ac_safe=no"
2508fi
2509rm -f conftest*
2510fi
2511if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2512  echo "$ac_t""yes" 1>&6
2513    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2514  cat >> confdefs.h <<EOF
2515#define $ac_tr_hdr 1
2516EOF
2517 
2518else
2519  echo "$ac_t""no" 1>&6
2520fi
2521done
2522
2523   
2524  else
2525    enable_NTL=no
2526    echo "$ac_t""no" 1>&6
2527  fi
2528elif test "$enable_NTL" = yes; then
2529  if test -d ntl; then
2530    echo "$ac_t""yes" 1>&6
2531    CONFIG_SUBDIRS="$CONFIG_SUBDIRS ntl"
2532    BUILD1_SUBDIRS="$BUILD1_SUBDIRS ntl"
2533  else
2534    echo "$ac_t""no" 1>&6
2535    { echo "configure: error: can not build NTL without ntl directory" 1>&2; exit 1; }
2536  fi
2537else
2538  echo "$ac_t""no" 1>&6
2539fi
2540
2541echo $ac_n "checking whether to configure and build factory lib""... $ac_c" 1>&6
2542echo "configure:2543: checking whether to configure and build factory lib" >&5
2543if test "$enable_factory" != yes && test "$enable_factory" != no; then
2544  if test "$with_factory" != no && test "$ac_factory_ok" != yes && \
2545     test -d factory; then
2546    enable_factory=yes
2547    echo "$ac_t""yes" 1>&6
2548    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
2549    BUILD1_SUBDIRS="$BUILD1_SUBDIRS factory"
2550    ac_configure_args="$ac_configure_args --enable-factory"
2551  else
2552    enable_factory=no
2553    echo "$ac_t""no" 1>&6
2554  fi
2555elif test "$enable_factory" = yes; then
2556  if test -d factory; then
2557    echo "$ac_t""yes" 1>&6
2558    CONFIG_SUBDIRS="$CONFIG_SUBDIRS factory"
2559    BUILD1_SUBDIRS="$BUILD1_SUBDIRS factory"
2560  else
2561    echo "$ac_t""no" 1>&6
2562    { echo "configure: error: can not build factory without factory directory" 1>&2; exit 1; }
2563  fi
2564else
2565  echo "$ac_t""no" 1>&6
2566fi
2567
2568echo $ac_n "checking whether to configure and build libfac lib""... $ac_c" 1>&6
2569echo "configure:2570: checking whether to configure and build libfac lib" >&5
2570if test "$enable_libfac" != yes && test "$enable_libfac" != no; then
2571  if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \
2572     test -d libfac && \
2573     (test "$ac_factory_ok" = yes || test "$enable_factory" = yes); then
2574    enable_libfac=yes
2575    echo "$ac_t""yes" 1>&6
2576    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
2577    BUILD1_SUBDIRS="$BUILD1_SUBDIRS libfac"
2578    ac_configure_args="$ac_configure_args --enable-libfac"
2579  else
2580    enable_libfac=no
2581    echo "$ac_t""no" 1>&6
2582  fi
2583elif  test "$enable_libfac" = yes; then
2584  if test ! -d libfac; then
2585    echo "$ac_t""no" 1>&6
2586    { echo "configure: error: can not build libfac without libfac directory" 1>&2; exit 1; }
2587  fi
2588  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2589    echo "$ac_t""yes" 1>&6
2590    CONFIG_SUBDIRS="$CONFIG_SUBDIRS libfac"
2591    BUILD1_SUBDIRS="$BUILD1_SUBDIRS libfac"
2592  else
2593    echo "$ac_t""no" 1>&6
2594    { echo "configure: error: Can not build libfac without factory" 1>&2; exit 1; }
2595  fi
2596else
2597  echo "$ac_t""no" 1>&6
2598fi
2599
2600echo $ac_n "checking whether to configure and build sgroup lib""... $ac_c" 1>&6
2601echo "configure:2602: checking whether to configure and build sgroup lib" >&5
2602if test "$enable_sgroup" = yes; then
2603  if test ! -d sgroup; then
2604    echo "$ac_t""no" 1>&6
2605    { echo "configure: error: can not build sgroup without sgroup directory" 1>&2; exit 1; }
2606  fi
2607  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2608    echo "$ac_t""yes" 1>&6
2609    CONFIG_SUBDIRS="$CONFIG_SUBDIRS sgroup"
2610    BUILD1_SUBDIRS="$BUILD1_SUBDIRS sgroup"
2611  else
2612    echo "$ac_t""no" 1>&6
2613    { echo "configure: error: Can not build sgroup without MP" 1>&2; exit 1; }
2614  fi
2615else
2616  echo "$ac_t""no" 1>&6
2617fi
2618
2619BUILD_SUBDIRS="$CONFIG_SUBDIRS"
2620
2621echo $ac_n "checking whether to configure and build Singular""... $ac_c" 1>&6
2622echo "configure:2623: checking whether to configure and build Singular" >&5
2623if test "$enable_Singular" != yes && test "$enable_Singular" != no; then
2624  if test "$with_Singular" != no && test -d Singular; then
2625    enable_Singular=yes
2626    echo "$ac_t""yes" 1>&6
2627    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
2628    BUILD_SUBDIRS="$BUILD_SUBDIRS kernel Singular"     
2629    BUILD1_SUBDIRS="$BUILD1_SUBDIRS kernel Singular"   
2630    ac_configure_args="$ac_configure_args --enable-Singular"
2631  else
2632    enable_Singular=no
2633    echo "$ac_t""no" 1>&6
2634  fi
2635elif test "$enable_Singular" = yes; then
2636  if test -d Singular; then
2637    echo "$ac_t""yes" 1>&6
2638    CONFIG_SUBDIRS="$CONFIG_SUBDIRS Singular"
2639    BUILD_SUBDIRS="$BUILD_SUBDIRS kernel Singular"     
2640    BUILD1_SUBDIRS="$BUILD1_SUBDIRS kernel Singular"   
2641  else
2642    echo "$ac_t""no" 1>&6
2643    { echo "configure: error: can not build Singular without Singular directory" 1>&2; exit 1; }
2644  fi
2645else
2646  echo "$ac_t""no" 1>&6
2647fi
2648
2649
2650# test if IntegerProgramming should be built:
2651
2652echo $ac_n "checking whether to build IntegerProgramming""... $ac_c" 1>&6
2653echo "configure:2654: checking whether to build IntegerProgramming" >&5
2654if test "$enable_IntegerProgramming" != no && test -d "IntegerProgramming"; then
2655   BUILD_SUBDIRS="$BUILD_SUBDIRS IntegerProgramming"
2656   BUILD1_SUBDIRS="$BUILD1_SUBDIRS IntegerProgramming"
2657   echo "$ac_t""yes" 1>&6
2658   if test "$enable_IntegerProgramming" != yes; then
2659     ac_configure_args="$ac_configure_args --enable-IntegerProgramming"
2660   fi
2661else
2662   echo "$ac_t""no" 1>&6
2663fi
2664
2665echo $ac_n "checking whether to build Plural""... $ac_c" 1>&6
2666echo "configure:2667: checking whether to build Plural" >&5
2667if test "$enable_Plural" != no || test "$with_Plural" != no; then
2668   echo "$ac_t""yes" 1>&6
2669   if test "$enable_Plural" != yes; then
2670     ac_configure_args="$ac_configure_args --enable-Plural"
2671   fi
2672else
2673   echo "$ac_t""no" 1>&6
2674fi
2675
2676
2677echo $ac_n "checking whether to configure and build Texinfo""... $ac_c" 1>&6
2678echo "configure:2679: checking whether to configure and build Texinfo" >&5
2679if test "$enable_Texinfo" != no && test -d Texinfo; then
2680  echo "$ac_t""yes" 1>&6
2681  enable_texinfo=yes
2682  CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texinfo"
2683  BUILD_SUBDIRS="$BUILD_SUBDIRS Texinfo"       
2684  TEXI2DVI=${bindir}/texi2dvi
2685  TEXI2PDF=${bindir}/texi2pdf
2686  MAKEINFO="${bindir}/makeinfo"
2687  TEXINDEX=${bindir}/texindex
2688 
2689 
2690 
2691 
2692  if test "$enable_Texinfo" != yes; then
2693    ac_configure_args="$ac_configure_args --enable-Texinfo"
2694  fi
2695else
2696  echo "$ac_t""no" 1>&6
2697  echo "configure: warning: Building of doc might fail. Need Texinfo" 1>&2
2698  enable_texinfo=no
2699  # Extract the first word of "makeinfo", so it can be a program name with args.
2700set dummy makeinfo; ac_word=$2
2701echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2702echo "configure:2703: checking for $ac_word" >&5
2703if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
2704  echo $ac_n "(cached) $ac_c" 1>&6
2705else
2706  if test -n "$MAKEINFO"; then
2707  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2708else
2709  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2710  ac_dummy="$PATH"
2711  for ac_dir in $ac_dummy; do
2712    test -z "$ac_dir" && ac_dir=.
2713    if test -f $ac_dir/$ac_word; then
2714      ac_cv_prog_MAKEINFO="makeinfo"
2715      break
2716    fi
2717  done
2718  IFS="$ac_save_ifs"
2719  test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="${pwd}/warn_not_found.sh makeinfo"
2720fi
2721fi
2722MAKEINFO="$ac_cv_prog_MAKEINFO"
2723if test -n "$MAKEINFO"; then
2724  echo "$ac_t""$MAKEINFO" 1>&6
2725else
2726  echo "$ac_t""no" 1>&6
2727fi
2728
2729  # Extract the first word of "texi2dvi", so it can be a program name with args.
2730set dummy texi2dvi; ac_word=$2
2731echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2732echo "configure:2733: checking for $ac_word" >&5
2733if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then
2734  echo $ac_n "(cached) $ac_c" 1>&6
2735else
2736  if test -n "$TEXI2DVI"; then
2737  ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test.
2738else
2739  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2740  ac_dummy="$PATH"
2741  for ac_dir in $ac_dummy; do
2742    test -z "$ac_dir" && ac_dir=.
2743    if test -f $ac_dir/$ac_word; then
2744      ac_cv_prog_TEXI2DVI="texi2dvi"
2745      break
2746    fi
2747  done
2748  IFS="$ac_save_ifs"
2749  test -z "$ac_cv_prog_TEXI2DVI" && ac_cv_prog_TEXI2DVI="${pwd}/warn_not_found.sh texi2dvi"
2750fi
2751fi
2752TEXI2DVI="$ac_cv_prog_TEXI2DVI"
2753if test -n "$TEXI2DVI"; then
2754  echo "$ac_t""$TEXI2DVI" 1>&6
2755else
2756  echo "$ac_t""no" 1>&6
2757fi
2758
2759  # Extract the first word of "texindex", so it can be a program name with args.
2760set dummy texindex; ac_word=$2
2761echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2762echo "configure:2763: checking for $ac_word" >&5
2763if eval "test \"`echo '$''{'ac_cv_prog_TEXINDEX'+set}'`\" = set"; then
2764  echo $ac_n "(cached) $ac_c" 1>&6
2765else
2766  if test -n "$TEXINDEX"; then
2767  ac_cv_prog_TEXINDEX="$TEXINDEX" # Let the user override the test.
2768else
2769  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2770  ac_dummy="$PATH"
2771  for ac_dir in $ac_dummy; do
2772    test -z "$ac_dir" && ac_dir=.
2773    if test -f $ac_dir/$ac_word; then
2774      ac_cv_prog_TEXINDEX="texindex"
2775      break
2776    fi
2777  done
2778  IFS="$ac_save_ifs"
2779  test -z "$ac_cv_prog_TEXINDEX" && ac_cv_prog_TEXINDEX="${pwd}/warn_not_found.sh texindex"
2780fi
2781fi
2782TEXINDEX="$ac_cv_prog_TEXINDEX"
2783if test -n "$TEXINDEX"; then
2784  echo "$ac_t""$TEXINDEX" 1>&6
2785else
2786  echo "$ac_t""no" 1>&6
2787fi
2788
2789  # Extract the first word of "texi2pdf", so it can be a program name with args.
2790set dummy texi2pdf; ac_word=$2
2791echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2792echo "configure:2793: checking for $ac_word" >&5
2793if eval "test \"`echo '$''{'ac_cv_prog_TEXI2PDF'+set}'`\" = set"; then
2794  echo $ac_n "(cached) $ac_c" 1>&6
2795else
2796  if test -n "$TEXI2PDF"; then
2797  ac_cv_prog_TEXI2PDF="$TEXI2PDF" # Let the user override the test.
2798else
2799  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2800  ac_dummy="$PATH"
2801  for ac_dir in $ac_dummy; do
2802    test -z "$ac_dir" && ac_dir=.
2803    if test -f $ac_dir/$ac_word; then
2804      ac_cv_prog_TEXI2PDF="texi2pdf"
2805      break
2806    fi
2807  done
2808  IFS="$ac_save_ifs"
2809  test -z "$ac_cv_prog_TEXI2PDF" && ac_cv_prog_TEXI2PDF="${pwd}/warn_not_found.sh texi2pdf"
2810fi
2811fi
2812TEXI2PDF="$ac_cv_prog_TEXI2PDF"
2813if test -n "$TEXI2PDF"; then
2814  echo "$ac_t""$TEXI2PDF" 1>&6
2815else
2816  echo "$ac_t""no" 1>&6
2817fi
2818
2819fi 
2820
2821echo $ac_n "checking whether to configure and build Texi2html""... $ac_c" 1>&6
2822echo "configure:2823: checking whether to configure and build Texi2html" >&5
2823if test "$enable_Texi2html" != no && test -d Texi2html; then
2824 echo "$ac_t""yes" 1>&6
2825 CONFIG_SUBDIRS="$CONFIG_SUBDIRS Texi2html"
2826 BUILD_SUBDIRS="$BUILD_SUBDIRS Texi2html"
2827 if test "$enable_Texi2html" != yes; then
2828   ac_configure_args="$ac_configure_args --enable-Texi2html"
2829 fi
2830 TEXI2HTML=${bindir}/texi2html
2831 
2832else
2833 echo "$ac_t""no" 1>&6
2834 # Extract the first word of "texi2html", so it can be a program name with args.
2835set dummy texi2html; ac_word=$2
2836echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2837echo "configure:2838: checking for $ac_word" >&5
2838if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then
2839  echo $ac_n "(cached) $ac_c" 1>&6
2840else
2841  if test -n "$TEXI2HTML"; then
2842  ac_cv_prog_TEXI2HTML="$TEXI2HTML" # Let the user override the test.
2843else
2844  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2845  ac_dummy="$PATH"
2846  for ac_dir in $ac_dummy; do
2847    test -z "$ac_dir" && ac_dir=.
2848    if test -f $ac_dir/$ac_word; then
2849      ac_cv_prog_TEXI2HTML="texi2html"
2850      break
2851    fi
2852  done
2853  IFS="$ac_save_ifs"
2854fi
2855fi
2856TEXI2HTML="$ac_cv_prog_TEXI2HTML"
2857if test -n "$TEXI2HTML"; then
2858  echo "$ac_t""$TEXI2HTML" 1>&6
2859else
2860  echo "$ac_t""no" 1>&6
2861fi
2862
2863fi
2864
2865if test "${TEXI2HTML+set}" != set; then
2866echo "configure: warning: texi2html not found. HTML doc generation will fail" 1>&2
2867fi
2868if test "$ac_cv_prog_LATEX2HTML" = latex2html; then
2869  TEXI2HTML_OPTS="-l2h"
2870fi
2871
2872
2873
2874echo $ac_n "checking whether to build doc""... $ac_c" 1>&6
2875echo "configure:2876: checking whether to build doc" >&5
2876if test "$enable_doc" != no && test -d doc; then
2877 echo "$ac_t""yes" 1>&6
2878 BUILD_SUBDIRS="$BUILD_SUBDIRS doc"
2879 if test "$enable_doc" != yes; then
2880   enable_doc=yes
2881   ac_configure_args="$ac_configure_args --enable-doc"
2882 fi
2883else
2884 enable_doc=no
2885 echo "$ac_t""no" 1>&6
2886fi
2887
2888echo $ac_n "checking whether to build emacs""... $ac_c" 1>&6
2889echo "configure:2890: checking whether to build emacs" >&5
2890if test "$enable_doc" = yes && test "$enable_emacs" != no && test -d emacs; then
2891 echo "$ac_t""yes" 1>&6
2892 BUILD_SUBDIRS="$BUILD_SUBDIRS emacs"
2893 if test "$enable_emacs" != yes; then
2894   ac_configure_args="$ac_configure_args --enable-emacs"
2895 fi
2896else
2897 echo "$ac_t""no" 1>&6
2898fi
2899
2900echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
2901echo "configure:2902: checking which apint package to use" >&5
2902if test "$with_apint" = gmp; then
2903  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
2904    echo "$ac_t""gmp" 1>&6
2905  else
2906    echo "$ac_t""none" 1>&6
2907    { echo "configure: error: can not use with gmp without finding or building it" 1>&2; exit 1; }
2908  fi
2909elif test "$ac_gmp_ok" = yes || test "$enable_gmp"; then
2910    echo "$ac_t""gmp" 1>&6
2911    ac_configure_args="$ac_configure_args --with-apint=gmp"
2912else
2913  { echo "configure: error: gmp required" 1>&2; exit 1; }
2914fi
2915
2916echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
2917echo "configure:2918: checking whether to use with MP" >&5
2918if test "$with_MP" = yes; then
2919  if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2920    echo "$ac_t""yes" 1>&6
2921  else
2922    echo "$ac_t""none" 1>&6
2923    { echo "configure: error: can not use with MP without finding or building it" 1>&2; exit 1; }
2924  fi
2925elif test "$with_MP" = no; then
2926  echo "$ac_t""no" 1>&6
2927elif test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
2928  echo "$ac_t""yes" 1>&6
2929  ac_configure_args="$ac_configure_args --with-MP"
2930else
2931  echo "$ac_t""no" 1>&6
2932  ac_configure_args="$ac_configure_args --without-MP"
2933  DOC2TEX_EXAMPLE_EXCLUSIONS="$DOC2TEX_EXAMPLE_EXCLUSIONS -exclude MP"
2934fi
2935
2936echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
2937echo "configure:2938: checking whether to use with factory" >&5
2938if test "$with_factory" = yes; then
2939  if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2940    echo "$ac_t""yes" 1>&6
2941  else
2942    echo "$ac_t""none" 1>&6
2943    { echo "configure: error: can not use with factory without finding or building it" 1>&2; exit 1; }
2944  fi
2945elif test "$with_factory" = no; then
2946  echo "$ac_t""no" 1>&6
2947elif test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
2948  echo "$ac_t""yes" 1>&6
2949  ac_configure_args="$ac_configure_args --with-factory"
2950else
2951  echo "$ac_t""no" 1>&6
2952  ac_configure_args="$ac_configure_args --without-factory"
2953fi
2954 
2955echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
2956echo "configure:2957: checking whether to use with libfac" >&5
2957if test "$with_libfac" = yes; then
2958  if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
2959    echo "$ac_t""yes" 1>&6
2960  else
2961    echo "$ac_t""none" 1>&6
2962    { echo "configure: error: can not use with libfac without finding or building it" 1>&2; exit 1; }
2963  fi
2964elif test "$with_libfac" = no; then
2965  echo "$ac_t""no" 1>&6
2966elif test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
2967  echo "$ac_t""yes" 1>&6
2968  ac_configure_args="$ac_configure_args --with-libfac"
2969else
2970  echo "$ac_t""no" 1>&6
2971  ac_configure_args="$ac_configure_args --without-libfac"
2972fi
2973
2974
2975
2976echo $ac_n "checking whether to use with Singular""... $ac_c" 1>&6
2977echo "configure:2978: checking whether to use with Singular" >&5
2978if test "$with_Singular" != no && test "$with_Singular" != yes; then
2979  if test "$enable_Singular" = yes; then
2980    with_Singular=yes
2981  else
2982    with_Singular=no
2983  fi
2984  ac_configure_args="$ac_configure_args --with-Singular=$with_Singular"
2985fi
2986
2987if test "$with_Singular" != no; then
2988  echo "$ac_t""yes" 1>&6
2989else
2990  echo "$ac_t""no" 1>&6
2991fi
2992
2993
2994SUBDIRS=""
2995if test -d omalloc; then
2996  SUBDIRS="$SUBDIRS omalloc"
2997fi
2998if test -d gmp; then
2999  SUBDIRS="$SUBDIRS gmp"
3000fi
3001if test -d MP; then
3002  SUBDIRS="$SUBDIRS MP"
3003fi
3004if test -d ntl; then
3005  SUBDIRS="$SUBDIRS ntl"
3006fi
3007if test -d factory; then
3008  SUBDIRS="$SUBDIRS factory"
3009fi
3010if test -d libfac; then
3011  SUBDIRS="$SUBDIRS libfac"
3012fi
3013if test -d sgroup; then
3014  SUBDIRS="$SUBDIRS sgroup"
3015fi
3016if test -d kernel; then
3017  SUBDIRS="$SUBDIRS kernel"
3018fi
3019if test -d IntegerProgramming; then
3020  SUBDIRS="$SUBDIRS IntegerProgramming"
3021fi
3022if test -d Singular; then
3023  SUBDIRS="$SUBDIRS Singular"
3024fi
3025if test -d Texinfo; then
3026  SUBDIRS="$SUBDIRS Texinfo"
3027fi
3028if test -d Texi2html; then
3029  SUBDIRS="$SUBDIRS Texi2html"
3030fi
3031if test -d doc; then
3032  SUBDIRS="$SUBDIRS doc"
3033fi
3034if test -d emacs; then
3035  SUBDIRS="$SUBDIRS emacs"
3036fi
3037if test -d modules; then
3038  SUBDIRS="$SUBDIRS modules"
3039fi
3040if test -d "modules"; then
3041   CONFIG_SUBDIRS=$CONFIG_SUBDIRS" modules"
3042   BUILD_SUBDIRS=$BUILD_SUBDIRS" modules"
3043fi
3044 
3045echo $ac_n "checking whether to use libsvd""... $ac_c" 1>&6
3046echo "configure:3047: checking whether to use libsvd" >&5
3047if test "$with_svd" = yes; then
3048  echo "$ac_t""yes" 1>&6
3049   CONFIG_SUBDIRS=$CONFIG_SUBDIRS" svd"
3050   BUILD_SUBDIRS=$BUILD_SUBDIRS" svd"
3051else
3052  echo "$ac_t""no" 1>&6
3053fi
3054
3055echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3056echo "configure:3057: checking whether ${MAKE-make} sets \${MAKE}" >&5
3057set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3058if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3059  echo $ac_n "(cached) $ac_c" 1>&6
3060else
3061  cat > conftestmake <<\EOF
3062all:
3063        @echo 'ac_maketemp="${MAKE}"'
3064EOF
3065# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3066eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3067if test -n "$ac_maketemp"; then
3068  eval ac_cv_prog_make_${ac_make}_set=yes
3069else
3070  eval ac_cv_prog_make_${ac_make}_set=no
3071fi
3072rm -f conftestmake
3073fi
3074if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3075  echo "$ac_t""yes" 1>&6
3076  SET_MAKE=
3077else
3078  echo "$ac_t""no" 1>&6
3079  SET_MAKE="MAKE=${MAKE-make}"
3080fi
3081
3082
3083
3084
3085
3086subdirs="$CONFIG_SUBDIRS"
3087 
3088
3089trap '' 1 2 15
3090cat > confcache <<\EOF
3091# This file is a shell script that caches the results of configure
3092# tests run on this system so they can be shared between configure
3093# scripts and configure runs.  It is not useful on other systems.
3094# If it contains results you don't want to keep, you may remove or edit it.
3095#
3096# By default, configure uses ./config.cache as the cache file,
3097# creating it if it does not exist already.  You can give configure
3098# the --cache-file=FILE option to use a different cache file; that is
3099# what configure does when it calls configure scripts in
3100# subdirectories, so they share the cache.
3101# Giving --cache-file=/dev/null disables caching, for debugging configure.
3102# config.status only pays attention to the cache file if you give it the
3103# --recheck option to rerun configure.
3104#
3105EOF
3106# The following way of writing the cache mishandles newlines in values,
3107# but we know of no workaround that is simple, portable, and efficient.
3108# So, don't put newlines in cache variables' values.
3109# Ultrix sh set writes to stderr and can't be redirected directly,
3110# and sets the high bit in the cache file unless we assign to the vars.
3111(set) 2>&1 |
3112  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3113  *ac_space=\ *)
3114    # `set' does not quote correctly, so add quotes (double-quote substitution
3115    # turns \\\\ into \\, and sed turns \\ into \).
3116    sed -n \
3117      -e "s/'/'\\\\''/g" \
3118      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3119    ;;
3120  *)
3121    # `set' quotes correctly as required by POSIX, so do not add quotes.
3122    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3123    ;;
3124  esac >> confcache
3125if cmp -s $cache_file confcache; then
3126  :
3127else
3128  if test -w $cache_file; then
3129    echo "updating cache $cache_file"
3130    cat confcache > $cache_file
3131  else
3132    echo "not updating unwritable cache $cache_file"
3133  fi
3134fi
3135rm -f confcache
3136
3137trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3138
3139test "x$prefix" = xNONE && prefix=$ac_default_prefix
3140# Let make expand exec_prefix.
3141test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3142
3143# Any assignment to VPATH causes Sun make to only execute
3144# the first set of double-colon rules, so remove it if not needed.
3145# If there is a colon in the path, we need to keep it.
3146if test "x$srcdir" = x.; then
3147  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3148fi
3149
3150trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3151
3152# Transform confdefs.h into DEFS.
3153# Protect against shell expansion while executing Makefile rules.
3154# Protect against Makefile macro expansion.
3155cat > conftest.defs <<\EOF
3156s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
3157s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
3158s%\[%\\&%g
3159s%\]%\\&%g
3160s%\$%$$%g
3161EOF
3162DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3163rm -f conftest.defs
3164
3165
3166# Without the "./", some shells look in PATH for config.status.
3167: ${CONFIG_STATUS=./config.status}
3168
3169echo creating $CONFIG_STATUS
3170rm -f $CONFIG_STATUS
3171cat > $CONFIG_STATUS <<EOF
3172#! /bin/sh
3173# Generated automatically by configure.
3174# Run this file to recreate the current configuration.
3175# This directory was configured as follows,
3176# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3177#
3178# $0 $ac_configure_args
3179#
3180# Compiler output produced by configure, useful for debugging
3181# configure, is in ./config.log if it exists.
3182
3183ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3184for ac_option
3185do
3186  case "\$ac_option" in
3187  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3188    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3189    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3190  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3191    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3192    exit 0 ;;
3193  -help | --help | --hel | --he | --h)
3194    echo "\$ac_cs_usage"; exit 0 ;;
3195  *) echo "\$ac_cs_usage"; exit 1 ;;
3196  esac
3197done
3198
3199ac_given_srcdir=$srcdir
3200ac_given_INSTALL="$INSTALL"
3201
3202trap 'rm -fr `echo "${OUTPUT_MAKEFILES}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3203EOF
3204cat >> $CONFIG_STATUS <<EOF
3205
3206# Protect against being on the right side of a sed subst in config.status.
3207sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3208 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3209$ac_vpsub
3210$extrasub
3211s%@SHELL@%$SHELL%g
3212s%@CFLAGS@%$CFLAGS%g
3213s%@CPPFLAGS@%$CPPFLAGS%g
3214s%@CXXFLAGS@%$CXXFLAGS%g
3215s%@FFLAGS@%$FFLAGS%g
3216s%@DEFS@%$DEFS%g
3217s%@LDFLAGS@%$LDFLAGS%g
3218s%@LIBS@%$LIBS%g
3219s%@exec_prefix@%$exec_prefix%g
3220s%@prefix@%$prefix%g
3221s%@program_transform_name@%$program_transform_name%g
3222s%@bindir@%$bindir%g
3223s%@sbindir@%$sbindir%g
3224s%@libexecdir@%$libexecdir%g
3225s%@datadir@%$datadir%g
3226s%@sysconfdir@%$sysconfdir%g
3227s%@sharedstatedir@%$sharedstatedir%g
3228s%@localstatedir@%$localstatedir%g
3229s%@libdir@%$libdir%g
3230s%@includedir@%$includedir%g
3231s%@oldincludedir@%$oldincludedir%g
3232s%@infodir@%$infodir%g
3233s%@mandir@%$mandir%g
3234s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g
3235s%@VERSION_DATE@%$VERSION_DATE%g
3236s%@SINGULAR_SHORT_VERSION@%$SINGULAR_SHORT_VERSION%g
3237s%@SINGULAR_RPM_VERSION@%$SINGULAR_RPM_VERSION%g
3238s%@SINGULAR_ROOT_DIR@%$SINGULAR_ROOT_DIR%g
3239s%@SINGUNAME@%$SINGUNAME%g
3240s%@SING_UNAME@%$SING_UNAME%g
3241s%@CC@%$CC%g
3242s%@CPP@%$CPP%g
3243s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3244s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3245s%@INSTALL_DATA@%$INSTALL_DATA%g
3246s%@CXX@%$CXX%g
3247s%@PIPE@%$PIPE%g
3248s%@PERL@%$PERL%g
3249s%@UUDECODE@%$UUDECODE%g
3250s%@GUNZIP@%$GUNZIP%g
3251s%@MYGZIP@%$MYGZIP%g
3252s%@LATEX2HTML@%$LATEX2HTML%g
3253s%@LN_S@%$LN_S%g
3254s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3255s%@SINGULAR@%$SINGULAR%g
3256s%@DOC2TEX_EXAMPLE_EXCLUSIONS@%$DOC2TEX_EXAMPLE_EXCLUSIONS%g
3257s%@TMP_DIR@%$TMP_DIR%g
3258s%@CXXCPP@%$CXXCPP%g
3259s%@TEXI2DVI@%$TEXI2DVI%g
3260s%@TEXI2PDF@%$TEXI2PDF%g
3261s%@MAKEINFO@%$MAKEINFO%g
3262s%@TEXINDEX@%$TEXINDEX%g
3263s%@TEXI2HTML@%$TEXI2HTML%g
3264s%@TEXI2HTML_OPTS@%$TEXI2HTML_OPTS%g
3265s%@SET_MAKE@%$SET_MAKE%g
3266s%@SUBDIRS@%$SUBDIRS%g
3267s%@BUILD_SUBDIRS@%$BUILD_SUBDIRS%g
3268s%@BUILD1_SUBDIRS@%$BUILD1_SUBDIRS%g
3269s%@CONFIG_SUBDIRS@%$CONFIG_SUBDIRS%g
3270s%@subdirs@%$subdirs%g
3271
3272CEOF
3273EOF
3274
3275cat >> $CONFIG_STATUS <<\EOF
3276
3277# Split the substitutions into bite-sized pieces for seds with
3278# small command number limits, like on Digital OSF/1 and HP-UX.
3279ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3280ac_file=1 # Number of current file.
3281ac_beg=1 # First line for current file.
3282ac_end=$ac_max_sed_cmds # Line after last line for current file.
3283ac_more_lines=:
3284ac_sed_cmds=""
3285while $ac_more_lines; do
3286  if test $ac_beg -gt 1; then
3287    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3288  else
3289    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3290  fi
3291  if test ! -s conftest.s$ac_file; then
3292    ac_more_lines=false
3293    rm -f conftest.s$ac_file
3294  else
3295    if test -z "$ac_sed_cmds"; then
3296      ac_sed_cmds="sed -f conftest.s$ac_file"
3297    else
3298      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3299    fi
3300    ac_file=`expr $ac_file + 1`
3301    ac_beg=$ac_end
3302    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3303  fi
3304done
3305if test -z "$ac_sed_cmds"; then
3306  ac_sed_cmds=cat
3307fi
3308EOF
3309
3310cat >> $CONFIG_STATUS <<EOF
3311
3312CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"}
3313EOF
3314cat >> $CONFIG_STATUS <<\EOF
3315for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3316  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3317  case "$ac_file" in
3318  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3319       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3320  *) ac_file_in="${ac_file}.in" ;;
3321  esac
3322
3323  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3324
3325  # Remove last slash and all that follows it.  Not all systems have dirname.
3326  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3327  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3328    # The file is in a subdirectory.
3329    test ! -d "$ac_dir" && mkdir "$ac_dir"
3330    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3331    # A "../" for each directory in $ac_dir_suffix.
3332    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3333  else
3334    ac_dir_suffix= ac_dots=
3335  fi
3336
3337  case "$ac_given_srcdir" in
3338  .)  srcdir=.
3339      if test -z "$ac_dots"; then top_srcdir=.
3340      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3341  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3342  *) # Relative path.
3343    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3344    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3345  esac
3346
3347  case "$ac_given_INSTALL" in
3348  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3349  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3350  esac
3351
3352  echo creating "$ac_file"
3353  rm -f "$ac_file"
3354  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3355  case "$ac_file" in
3356  *Makefile*) ac_comsub="1i\\
3357# $configure_input" ;;
3358  *) ac_comsub= ;;
3359  esac
3360
3361  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3362  sed -e "$ac_comsub
3363s%@configure_input@%$configure_input%g
3364s%@srcdir@%$srcdir%g
3365s%@top_srcdir@%$top_srcdir%g
3366s%@INSTALL@%$INSTALL%g
3367" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3368fi; done
3369rm -f conftest.s*
3370
3371EOF
3372cat >> $CONFIG_STATUS <<EOF
3373
3374EOF
3375cat >> $CONFIG_STATUS <<\EOF
3376
3377exit 0
3378EOF
3379chmod +x $CONFIG_STATUS
3380rm -fr confdefs* $ac_clean_files
3381test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3382
3383if test "$no_recursion" != yes; then
3384
3385  # Remove --cache-file and --srcdir arguments so they do not pile up.
3386  ac_sub_configure_args=
3387  ac_prev=
3388  for ac_arg in $ac_configure_args; do
3389    if test -n "$ac_prev"; then
3390      ac_prev=
3391      continue
3392    fi
3393    case "$ac_arg" in
3394    -cache-file | --cache-file | --cache-fil | --cache-fi \
3395    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3396      ac_prev=cache_file ;;
3397    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3398    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3399      ;;
3400    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3401      ac_prev=srcdir ;;
3402    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3403      ;;
3404    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3405    esac
3406  done
3407
3408  for ac_config_dir in $CONFIG_SUBDIRS; do
3409
3410    # Do not complain, so a configure script can configure whichever
3411    # parts of a large source tree are present.
3412    if test ! -d $srcdir/$ac_config_dir; then
3413      continue
3414    fi
3415
3416    echo configuring in $ac_config_dir
3417
3418    case "$srcdir" in
3419    .) ;;
3420    *)
3421      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3422      else
3423        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3424      fi
3425      ;;
3426    esac
3427
3428    ac_popdir=`pwd`
3429    cd $ac_config_dir
3430
3431      # A "../" for each directory in /$ac_config_dir.
3432      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3433
3434    case "$srcdir" in
3435    .) # No --srcdir option.  We are building in place.
3436      ac_sub_srcdir=$srcdir ;;
3437    /*) # Absolute path.
3438      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3439    *) # Relative path.
3440      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3441    esac
3442
3443    # Check for guested configure; otherwise get Cygnus style configure.
3444    if test -f $ac_sub_srcdir/configure; then
3445      ac_sub_configure=$ac_sub_srcdir/configure
3446    elif test -f $ac_sub_srcdir/configure.in; then
3447      ac_sub_configure=$ac_configure
3448    else
3449      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3450      ac_sub_configure=
3451    fi
3452
3453    # The recursion is here.
3454    if test -n "$ac_sub_configure"; then
3455
3456      # Make the cache file name correct relative to the subdirectory.
3457      case "$cache_file" in
3458      /*) ac_sub_cache_file=$cache_file ;;
3459      *) # Relative path.
3460        ac_sub_cache_file="$ac_dots$cache_file" ;;
3461      esac
3462  case "$ac_given_INSTALL" in
3463        [/$]*) INSTALL="$ac_given_INSTALL" ;;
3464        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3465        esac
3466
3467      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3468      # The eval makes quoting arguments work.
3469      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3470      then :
3471      else
3472        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3473      fi
3474    fi
3475
3476    cd $ac_popdir
3477  done
3478fi
3479
Note: See TracBrowser for help on using the repository browser.