1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
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_help="$ac_help
15  --with-mpi[=PATH]       Enable MPI/Set location of MPI package"
16ac_help="$ac_help
17  --with-mpiincl=PATH     Set location of MPI include directory"
18
19# Initialize some variables set by options.
20# The variables have the same names as the options, with
21# dashes changed to underlines.
22build=NONE
23cache_file=./config.cache
24exec_prefix=NONE
25host=NONE
26no_create=
27nonopt=NONE
28no_recursion=
29prefix=NONE
30program_prefix=NONE
31program_suffix=NONE
32program_transform_name=s,x,x,
33silent=
34site=
35srcdir=
36target=NONE
37verbose=
38x_includes=NONE
39x_libraries=NONE
40bindir='${exec_prefix}/bin'
41sbindir='${exec_prefix}/sbin'
42libexecdir='${exec_prefix}/libexec'
43datadir='${prefix}/share'
44sysconfdir='${prefix}/etc'
45sharedstatedir='${prefix}/com'
46localstatedir='${prefix}/var'
47libdir='${exec_prefix}/lib'
48includedir='${prefix}/include'
49oldincludedir='/usr/include'
50infodir='${prefix}/info'
51mandir='${prefix}/man'
52
53# Initialize some other variables.
54subdirs=
55MFLAGS= MAKEFLAGS=
56# Maximum number of lines to put in a shell here document.
57ac_max_here_lines=12
58
59ac_prev=
60for ac_option
61do
62
63  # If the previous option needs an argument, assign it.
64  if test -n "$ac_prev"; then
65    eval "$ac_prev=\$ac_option"
66    ac_prev=
67    continue
68  fi
69
70  case "$ac_option" in
71  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72  *) ac_optarg= ;;
73  esac
74
75  # Accept the important Cygnus configure options, so we can diagnose typos.
76
77  case "$ac_option" in
78
79  -bindir | --bindir | --bindi | --bind | --bin | --bi)
80    ac_prev=bindir ;;
81  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82    bindir="$ac_optarg" ;;
83
84  -build | --build | --buil | --bui | --bu)
85    ac_prev=build ;;
86  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87    build="$ac_optarg" ;;
88
89  -cache-file | --cache-file | --cache-fil | --cache-fi \
90  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91    ac_prev=cache_file ;;
92  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94    cache_file="$ac_optarg" ;;
95
96  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97    ac_prev=datadir ;;
98  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99  | --da=*)
100    datadir="$ac_optarg" ;;
101
102  -disable-* | --disable-*)
103    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104    # Reject names that are not valid shell variable names.
105    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
106      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
107    fi
108    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109    eval "enable_${ac_feature}=no" ;;
110
111  -enable-* | --enable-*)
112    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113    # Reject names that are not valid shell variable names.
114    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
115      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116    fi
117    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118    case "$ac_option" in
119      *=*) ;;
120      *) ac_optarg=yes ;;
121    esac
122    eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126  | --exec | --exe | --ex)
127    ac_prev=exec_prefix ;;
128  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130  | --exec=* | --exe=* | --ex=*)
131    exec_prefix="$ac_optarg" ;;
132
133  -gas | --gas | --ga | --g)
134    # Obsolete; use --with-gas.
135    with_gas=yes ;;
136
137  -help | --help | --hel | --he)
138    # Omit some internal or obsolete options to make the list less imposing.
139    # This message is too long to be a string in the A/UX 3.1 sh.
140    cat << EOF
141Usage: configure [options] [host]
142Options: [defaults in brackets after descriptions]
143Configuration:
144  --cache-file=FILE       cache test results in FILE
145  --help                  print this message
146  --no-create             do not create output files
147  --quiet, --silent       do not print \`checking...' messages
148  --version               print the version of autoconf that created configure
149Directory and file names:
150  --prefix=PREFIX         install architecture-independent files in PREFIX
151                          [$ac_default_prefix]
152  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
153                          [same as prefix]
154  --bindir=DIR            user executables in DIR [EPREFIX/bin]
155  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
156  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
157  --datadir=DIR           read-only architecture-independent data in DIR
158                          [PREFIX/share]
159  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
160  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
161                          [PREFIX/com]
162  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
163  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
164  --includedir=DIR        C header files in DIR [PREFIX/include]
165  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
166  --infodir=DIR           info documentation in DIR [PREFIX/info]
167  --mandir=DIR            man documentation in DIR [PREFIX/man]
168  --srcdir=DIR            find the sources in DIR [configure dir or ..]
169  --program-prefix=PREFIX prepend PREFIX to installed program names
170  --program-suffix=SUFFIX append SUFFIX to installed program names
171  --program-transform-name=PROGRAM
172                          run sed PROGRAM on installed program names
173EOF
174    cat << EOF
175Host type:
176  --build=BUILD           configure for building on BUILD [BUILD=HOST]
177  --host=HOST             configure for HOST [guessed]
178  --target=TARGET         configure for TARGET [TARGET=HOST]
179Features and packages:
180  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
181  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
182  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
183  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
184  --x-includes=DIR        X include files are in DIR
185  --x-libraries=DIR       X library files are in DIR
186EOF
187    if test -n "$ac_help"; then
188      echo "--enable and --with options recognized:$ac_help"
189    fi
190    exit 0 ;;
191
192  -host | --host | --hos | --ho)
193    ac_prev=host ;;
194  -host=* | --host=* | --hos=* | --ho=*)
195    host="$ac_optarg" ;;
196
197  -includedir | --includedir | --includedi | --included | --include \
198  | --includ | --inclu | --incl | --inc)
199    ac_prev=includedir ;;
200  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201  | --includ=* | --inclu=* | --incl=* | --inc=*)
202    includedir="$ac_optarg" ;;
203
204  -infodir | --infodir | --infodi | --infod | --info | --inf)
205    ac_prev=infodir ;;
206  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207    infodir="$ac_optarg" ;;
208
209  -libdir | --libdir | --libdi | --libd)
210    ac_prev=libdir ;;
211  -libdir=* | --libdir=* | --libdi=* | --libd=*)
212    libdir="$ac_optarg" ;;
213
214  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215  | --libexe | --libex | --libe)
216    ac_prev=libexecdir ;;
217  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218  | --libexe=* | --libex=* | --libe=*)
219    libexecdir="$ac_optarg" ;;
220
221  -localstatedir | --localstatedir | --localstatedi | --localstated \
222  | --localstate | --localstat | --localsta | --localst \
223  | --locals | --local | --loca | --loc | --lo)
224    ac_prev=localstatedir ;;
225  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228    localstatedir="$ac_optarg" ;;
229
230  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231    ac_prev=mandir ;;
232  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233    mandir="$ac_optarg" ;;
234
235  -nfp | --nfp | --nf)
236    # Obsolete; use --without-fp.
237    with_fp=no ;;
238
239  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240  | --no-cr | --no-c)
241    no_create=yes ;;
242
243  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245    no_recursion=yes ;;
246
247  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249  | --oldin | --oldi | --old | --ol | --o)
250    ac_prev=oldincludedir ;;
251  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254    oldincludedir="$ac_optarg" ;;
255
256  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257    ac_prev=prefix ;;
258  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259    prefix="$ac_optarg" ;;
260
261  -program-prefix | --program-prefix | --program-prefi | --program-pref \
262  | --program-pre | --program-pr | --program-p)
263    ac_prev=program_prefix ;;
264  -program-prefix=* | --program-prefix=* | --program-prefi=* \
265  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266    program_prefix="$ac_optarg" ;;
267
268  -program-suffix | --program-suffix | --program-suffi | --program-suff \
269  | --program-suf | --program-su | --program-s)
270    ac_prev=program_suffix ;;
271  -program-suffix=* | --program-suffix=* | --program-suffi=* \
272  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273    program_suffix="$ac_optarg" ;;
274
275  -program-transform-name | --program-transform-name \
276  | --program-transform-nam | --program-transform-na \
277  | --program-transform-n | --program-transform- \
278  | --program-transform | --program-transfor \
279  | --program-transfo | --program-transf \
280  | --program-trans | --program-tran \
281  | --progr-tra | --program-tr | --program-t)
282    ac_prev=program_transform_name ;;
283  -program-transform-name=* | --program-transform-name=* \
284  | --program-transform-nam=* | --program-transform-na=* \
285  | --program-transform-n=* | --program-transform-=* \
286  | --program-transform=* | --program-transfor=* \
287  | --program-transfo=* | --program-transf=* \
288  | --program-trans=* | --program-tran=* \
289  | --progr-tra=* | --program-tr=* | --program-t=*)
290    program_transform_name="$ac_optarg" ;;
291
292  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293  | -silent | --silent | --silen | --sile | --sil)
294    silent=yes ;;
295
296  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297    ac_prev=sbindir ;;
298  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299  | --sbi=* | --sb=*)
300    sbindir="$ac_optarg" ;;
301
302  -sharedstatedir | --sharedstatedir | --sharedstatedi \
303  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304  | --sharedst | --shareds | --shared | --share | --shar \
305  | --sha | --sh)
306    ac_prev=sharedstatedir ;;
307  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310  | --sha=* | --sh=*)
311    sharedstatedir="$ac_optarg" ;;
312
313  -site | --site | --sit)
314    ac_prev=site ;;
315  -site=* | --site=* | --sit=*)
316    site="$ac_optarg" ;;
317
318  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319    ac_prev=srcdir ;;
320  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321    srcdir="$ac_optarg" ;;
322
323  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324  | --syscon | --sysco | --sysc | --sys | --sy)
325    ac_prev=sysconfdir ;;
326  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328    sysconfdir="$ac_optarg" ;;
329
330  -target | --target | --targe | --targ | --tar | --ta | --t)
331    ac_prev=target ;;
332  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333    target="$ac_optarg" ;;
334
335  -v | -verbose | --verbose | --verbos | --verbo | --verb)
336    verbose=yes ;;
337
338  -version | --version | --versio | --versi | --vers)
339    echo "configure generated by autoconf version 2.12"
340    exit 0 ;;
341
342  -with-* | --with-*)
343    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344    # Reject names that are not valid shell variable names.
345    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
346      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
347    fi
348    ac_package=`echo $ac_package| sed 's/-/_/g'`
349    case "$ac_option" in
350      *=*) ;;
351      *) ac_optarg=yes ;;
352    esac
353    eval "with_${ac_package}='$ac_optarg'" ;;
354
355  -without-* | --without-*)
356    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357    # Reject names that are not valid shell variable names.
358    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
359      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360    fi
361    ac_package=`echo $ac_package| sed 's/-/_/g'`
362    eval "with_${ac_package}=no" ;;
363
364  --x)
365    # Obsolete; use --with-x.
366    with_x=yes ;;
367
368  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369  | --x-incl | --x-inc | --x-in | --x-i)
370    ac_prev=x_includes ;;
371  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373    x_includes="$ac_optarg" ;;
374
375  -x-libraries | --x-libraries | --x-librarie | --x-librari \
376  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377    ac_prev=x_libraries ;;
378  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380    x_libraries="$ac_optarg" ;;
381
382  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383    ;;
384
385  *)
386    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387      echo "configure: warning: $ac_option: invalid host type" 1>&2
388    fi
389    if test "x$nonopt" != xNONE; then
390      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
391    fi
392    nonopt="$ac_option"
393    ;;
394
395  esac
396done
397
398if test -n "$ac_prev"; then
399  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400fi
401
402trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
403
404# File descriptor usage:
405# 0 standard input
406# 1 file creation
407# 2 errors and warnings
408# 3 some systems may open it to /dev/tty
409# 4 used on the Kubota Titan
410# 6 checking for... messages and results
411# 5 compiler messages saved in config.log
412if test "$silent" = yes; then
413  exec 6>/dev/null
414else
415  exec 6>&1
416fi
417exec 5>./config.log
418
419echo "\
420This file contains any messages produced by compilers while
421running configure, to aid debugging if configure makes a mistake.
422" 1>&5
423
424# Strip out --no-create and --no-recursion so they do not pile up.
425# Also quote any args containing shell metacharacters.
426ac_configure_args=
427for ac_arg
428do
429  case "$ac_arg" in
430  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431  | --no-cr | --no-c) ;;
432  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
434  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
437  esac
438done
439
440# NLS nuisances.
441# Only set these to C if already set.  These must not be set unconditionally
442# because not all systems understand e.g. LANG=C (notably SCO).
443# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
444# Non-C LC_CTYPE values break the ctype check.
445if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
446if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
447if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
448if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
449
450# confdefs.h avoids OS command line length limits that DEFS can exceed.
451rm -rf conftest* confdefs.h
452# AIX cpp loses on an empty file, so make sure it contains at least a newline.
453echo > confdefs.h
454
455# A filename unique to this package, relative to the directory that
456# configure is in, which we can look for to find out if srcdir is correct.
457ac_unique_file=Include/swill.h
458
459# Find the source files, if location was not specified.
460if test -z "$srcdir"; then
461  ac_srcdir_defaulted=yes
462  # Try the directory containing this script, then its parent.
463  ac_prog=$0
464  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
465  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
466  srcdir=$ac_confdir
467  if test ! -r $srcdir/$ac_unique_file; then
468    srcdir=..
469  fi
470else
471  ac_srcdir_defaulted=no
472fi
473if test ! -r $srcdir/$ac_unique_file; then
474  if test "$ac_srcdir_defaulted" = yes; then
475    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
476  else
477    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
478  fi
479fi
480srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
481
482# Prefer explicitly selected file to automatically selected ones.
483if test -z "$CONFIG_SITE"; then
484  if test "x$prefix" != xNONE; then
485    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
486  else
487    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
488  fi
489fi
490for ac_site_file in $CONFIG_SITE; do
491  if test -r "$ac_site_file"; then
492    echo "loading site script $ac_site_file"
493    . "$ac_site_file"
494  fi
495done
496
497if test -r "$cache_file"; then
498  echo "loading cache $cache_file"
499  . $cache_file
500else
501  echo "creating cache $cache_file"
502  > $cache_file
503fi
504
505ac_ext=c
506# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
507ac_cpp='$CPP $CPPFLAGS'
508ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
509ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
510cross_compiling=$ac_cv_prog_cc_cross
511
512if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
513  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
514  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
515    ac_n= ac_c='
516' ac_t='	'
517  else
518    ac_n=-n ac_c= ac_t=
519  fi
520else
521  ac_n= ac_c='\c' ac_t=
522fi
523
524
525
526
527# Set name for machine-dependent library files
528
529echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
530echo "configure:531: checking MACHDEP" >&5
531if test -z "$MACHDEP"
532then
533	if test -f /usr/lib/NextStep/software_version; then
534		set X `hostinfo | grep 'NeXT Mach.*:' | \
535			sed -e 's/://' -e 's/\./_/'` && \
536		ac_sys_system=next && ac_sys_release=$4
537		MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
538	else
539		ac_sys_system=`uname -s`
540		if test "$ac_sys_system" = "AIX" ; then
541			ac_sys_release=`uname -v`
542		else
543			ac_sys_release=`uname -r`
544		fi
545		ac_md_system=`echo $ac_sys_system |
546				   tr -d '/ ' | tr '[A-Z]' '[a-z]'`
547		ac_md_release=`echo $ac_sys_release |
548				   tr -d '/ ' | sed 's/\..*//'`
549		MACHDEP="$ac_md_system$ac_md_release"
550	fi
551	case MACHDEP in
552	'')	MACHDEP=unknown;;
553	esac
554fi
555echo "$ac_t""$MACHDEP" 1>&6
556
557# Extract the first word of "gcc", so it can be a program name with args.
558set dummy gcc; ac_word=$2
559echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
560echo "configure:561: checking for $ac_word" >&5
561if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
562  echo $ac_n "(cached) $ac_c" 1>&6
563else
564  if test -n "$CC"; then
565  ac_cv_prog_CC="$CC" # Let the user override the test.
566else
567  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
568  for ac_dir in $PATH; do
569    test -z "$ac_dir" && ac_dir=.
570    if test -f $ac_dir/$ac_word; then
571      ac_cv_prog_CC="gcc"
572      break
573    fi
574  done
575  IFS="$ac_save_ifs"
576fi
577fi
578CC="$ac_cv_prog_CC"
579if test -n "$CC"; then
580  echo "$ac_t""$CC" 1>&6
581else
582  echo "$ac_t""no" 1>&6
583fi
584
585if test -z "$CC"; then
586  # Extract the first word of "cc", so it can be a program name with args.
587set dummy cc; ac_word=$2
588echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
589echo "configure:590: checking for $ac_word" >&5
590if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
591  echo $ac_n "(cached) $ac_c" 1>&6
592else
593  if test -n "$CC"; then
594  ac_cv_prog_CC="$CC" # Let the user override the test.
595else
596  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
597  ac_prog_rejected=no
598  for ac_dir in $PATH; do
599    test -z "$ac_dir" && ac_dir=.
600    if test -f $ac_dir/$ac_word; then
601      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
602        ac_prog_rejected=yes
603	continue
604      fi
605      ac_cv_prog_CC="cc"
606      break
607    fi
608  done
609  IFS="$ac_save_ifs"
610if test $ac_prog_rejected = yes; then
611  # We found a bogon in the path, so make sure we never use it.
612  set dummy $ac_cv_prog_CC
613  shift
614  if test $# -gt 0; then
615    # We chose a different compiler from the bogus one.
616    # However, it has the same basename, so the bogon will be chosen
617    # first if we set CC to just the basename; use the full file name.
618    shift
619    set dummy "$ac_dir/$ac_word" "$@"
620    shift
621    ac_cv_prog_CC="$@"
622  fi
623fi
624fi
625fi
626CC="$ac_cv_prog_CC"
627if test -n "$CC"; then
628  echo "$ac_t""$CC" 1>&6
629else
630  echo "$ac_t""no" 1>&6
631fi
632
633  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
634fi
635
636echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
637echo "configure:638: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
638
639ac_ext=c
640# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
641ac_cpp='$CPP $CPPFLAGS'
642ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
643ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
644cross_compiling=$ac_cv_prog_cc_cross
645
646cat > conftest.$ac_ext <<EOF
647#line 648 "configure"
648#include "confdefs.h"
649main(){return(0);}
650EOF
651if { (eval echo configure:652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
652  ac_cv_prog_cc_works=yes
653  # If we can't run a trivial program, we are probably using a cross compiler.
654  if (./conftest; exit) 2>/dev/null; then
655    ac_cv_prog_cc_cross=no
656  else
657    ac_cv_prog_cc_cross=yes
658  fi
659else
660  echo "configure: failed program was:" >&5
661  cat conftest.$ac_ext >&5
662  ac_cv_prog_cc_works=no
663fi
664rm -fr conftest*
665
666echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
667if test $ac_cv_prog_cc_works = no; then
668  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
669fi
670echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
671echo "configure:672: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
672echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
673cross_compiling=$ac_cv_prog_cc_cross
674
675echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
676echo "configure:677: checking whether we are using GNU C" >&5
677if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
678  echo $ac_n "(cached) $ac_c" 1>&6
679else
680  cat > conftest.c <<EOF
681#ifdef __GNUC__
682  yes;
683#endif
684EOF
685if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
686  ac_cv_prog_gcc=yes
687else
688  ac_cv_prog_gcc=no
689fi
690fi
691
692echo "$ac_t""$ac_cv_prog_gcc" 1>&6
693
694if test $ac_cv_prog_gcc = yes; then
695  GCC=yes
696  ac_test_CFLAGS="${CFLAGS+set}"
697  ac_save_CFLAGS="$CFLAGS"
698  CFLAGS=
699  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
700echo "configure:701: checking whether ${CC-cc} accepts -g" >&5
701if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
702  echo $ac_n "(cached) $ac_c" 1>&6
703else
704  echo 'void f(){}' > conftest.c
705if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
706  ac_cv_prog_cc_g=yes
707else
708  ac_cv_prog_cc_g=no
709fi
710rm -f conftest*
711
712fi
713
714echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
715  if test "$ac_test_CFLAGS" = set; then
716    CFLAGS="$ac_save_CFLAGS"
717  elif test $ac_cv_prog_cc_g = yes; then
718    CFLAGS="-g -O2"
719  else
720    CFLAGS="-O2"
721  fi
722else
723  GCC=
724  test "${CFLAGS+set}" = set || CFLAGS="-g"
725fi
726
727# Extract the first word of "ranlib", so it can be a program name with args.
728set dummy ranlib; ac_word=$2
729echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730echo "configure:731: checking for $ac_word" >&5
731if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
732  echo $ac_n "(cached) $ac_c" 1>&6
733else
734  if test -n "$RANLIB"; then
735  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
736else
737  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
738  for ac_dir in $PATH; do
739    test -z "$ac_dir" && ac_dir=.
740    if test -f $ac_dir/$ac_word; then
741      ac_cv_prog_RANLIB="ranlib"
742      break
743    fi
744  done
745  IFS="$ac_save_ifs"
746  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
747fi
748fi
749RANLIB="$ac_cv_prog_RANLIB"
750if test -n "$RANLIB"; then
751  echo "$ac_t""$RANLIB" 1>&6
752else
753  echo "$ac_t""no" 1>&6
754fi
755
756
757for ac_prog in ar aal
758do
759# Extract the first word of "$ac_prog", so it can be a program name with args.
760set dummy $ac_prog; ac_word=$2
761echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
762echo "configure:763: checking for $ac_word" >&5
763if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
764  echo $ac_n "(cached) $ac_c" 1>&6
765else
766  if test -n "$AR"; then
767  ac_cv_prog_AR="$AR" # Let the user override the test.
768else
769  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
770  for ac_dir in $PATH; do
771    test -z "$ac_dir" && ac_dir=.
772    if test -f $ac_dir/$ac_word; then
773      ac_cv_prog_AR="$ac_prog"
774      break
775    fi
776  done
777  IFS="$ac_save_ifs"
778fi
779fi
780AR="$ac_cv_prog_AR"
781if test -n "$AR"; then
782  echo "$ac_t""$AR" 1>&6
783else
784  echo "$ac_t""no" 1>&6
785fi
786
787test -n "$AR" && break
788done
789test -n "$AR" || AR="ar"
790
791
792echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
793echo "configure:794: checking how to run the C preprocessor" >&5
794# On Suns, sometimes $CPP names a directory.
795if test -n "$CPP" && test -d "$CPP"; then
796  CPP=
797fi
798if test -z "$CPP"; then
799if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
800  echo $ac_n "(cached) $ac_c" 1>&6
801else
802    # This must be in double quotes, not single quotes, because CPP may get
803  # substituted into the Makefile and "${CC-cc}" will confuse make.
804  CPP="${CC-cc} -E"
805  # On the NeXT, cc -E runs the code through the compiler's parser,
806  # not just through cpp.
807  cat > conftest.$ac_ext <<EOF
808#line 809 "configure"
809#include "confdefs.h"
810#include <assert.h>
811Syntax Error
812EOF
813ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
814{ (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
815ac_err=`grep -v '^ *+' conftest.out`
816if test -z "$ac_err"; then
817  :
818else
819  echo "$ac_err" >&5
820  echo "configure: failed program was:" >&5
821  cat conftest.$ac_ext >&5
822  rm -rf conftest*
823  CPP="${CC-cc} -E -traditional-cpp"
824  cat > conftest.$ac_ext <<EOF
825#line 826 "configure"
826#include "confdefs.h"
827#include <assert.h>
828Syntax Error
829EOF
830ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
831{ (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
832ac_err=`grep -v '^ *+' conftest.out`
833if test -z "$ac_err"; then
834  :
835else
836  echo "$ac_err" >&5
837  echo "configure: failed program was:" >&5
838  cat conftest.$ac_ext >&5
839  rm -rf conftest*
840  CPP=/lib/cpp
841fi
842rm -f conftest*
843fi
844rm -f conftest*
845  ac_cv_prog_CPP="$CPP"
846fi
847  CPP="$ac_cv_prog_CPP"
848else
849  ac_cv_prog_CPP="$CPP"
850fi
851echo "$ac_t""$CPP" 1>&6
852
853echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
854echo "configure:855: checking for ANSI C header files" >&5
855if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
856  echo $ac_n "(cached) $ac_c" 1>&6
857else
858  cat > conftest.$ac_ext <<EOF
859#line 860 "configure"
860#include "confdefs.h"
861#include <stdlib.h>
862#include <stdarg.h>
863#include <string.h>
864#include <float.h>
865EOF
866ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
867{ (eval echo configure:868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
868ac_err=`grep -v '^ *+' conftest.out`
869if test -z "$ac_err"; then
870  rm -rf conftest*
871  ac_cv_header_stdc=yes
872else
873  echo "$ac_err" >&5
874  echo "configure: failed program was:" >&5
875  cat conftest.$ac_ext >&5
876  rm -rf conftest*
877  ac_cv_header_stdc=no
878fi
879rm -f conftest*
880
881if test $ac_cv_header_stdc = yes; then
882  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
883cat > conftest.$ac_ext <<EOF
884#line 885 "configure"
885#include "confdefs.h"
886#include <string.h>
887EOF
888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
889  egrep "memchr" >/dev/null 2>&1; then
890  :
891else
892  rm -rf conftest*
893  ac_cv_header_stdc=no
894fi
895rm -f conftest*
896
897fi
898
899if test $ac_cv_header_stdc = yes; then
900  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
901cat > conftest.$ac_ext <<EOF
902#line 903 "configure"
903#include "confdefs.h"
904#include <stdlib.h>
905EOF
906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
907  egrep "free" >/dev/null 2>&1; then
908  :
909else
910  rm -rf conftest*
911  ac_cv_header_stdc=no
912fi
913rm -f conftest*
914
915fi
916
917if test $ac_cv_header_stdc = yes; then
918  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
919if test "$cross_compiling" = yes; then
920  :
921else
922  cat > conftest.$ac_ext <<EOF
923#line 924 "configure"
924#include "confdefs.h"
925#include <ctype.h>
926#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
927#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
928#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
929int main () { int i; for (i = 0; i < 256; i++)
930if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
931exit (0); }
932
933EOF
934if { (eval echo configure:935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
935then
936  :
937else
938  echo "configure: failed program was:" >&5
939  cat conftest.$ac_ext >&5
940  rm -fr conftest*
941  ac_cv_header_stdc=no
942fi
943rm -fr conftest*
944fi
945
946fi
947fi
948
949echo "$ac_t""$ac_cv_header_stdc" 1>&6
950if test $ac_cv_header_stdc = yes; then
951  cat >> confdefs.h <<\EOF
952#define STDC_HEADERS 1
953EOF
954
955fi
956
957
958
959# Set info about shared libraries.
960
961
962
963
964
965# SO is the extension of shared libraries `(including the dot!)
966# -- usually .so, .sl on HP-UX
967echo $ac_n "checking SO""... $ac_c" 1>&6
968echo "configure:969: checking SO" >&5
969if test -z "$SO"
970then
971	case $ac_sys_system in
972	hp*|HP*)   SO=.sl;;
973	CYGWIN*)   SO=.dll;;
974	*)	   SO=.so;;
975	esac
976fi
977echo "$ac_t""$SO" 1>&6
978# LDSHARED is the ld *command* used to create shared library
979# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
980echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
981echo "configure:982: checking LDSHARED" >&5
982if test -z "$LDSHARED"
983then
984	case $ac_sys_system/$ac_sys_release in
985	AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
986	CYGWIN*) LDSHARED="gcc -shared";;
987	IRIX/5*) LDSHARED="ld -shared";;
988	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
989	SunOS/4*) LDSHARED="ld";;
990	SunOS/5*) LDSHARED="ld -G";;
991	hp*|HP*) LDSHARED="ld -b";;
992	OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
993	DYNIX/ptx*) LDSHARED="ld -G";;
994	next/*)
995		if test "$ns_dyld"
996		then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
997		else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
998		fi
999                if test "$with_next_framework" ; then
1000		    LDSHARED="$LDSHARED \$(LDLIBRARY)"
1001		fi ;;
1002	Linux*) LDSHARED="gcc -shared";;
1003	dgux*) LDSHARED="ld -G";;
1004	FreeBSD*/3*) LDSHARED="gcc -shared";;
1005	FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
1006	NetBSD*)
1007		if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
1008		then
1009			LDSHARED="cc -shared"
1010		else
1011			LDSHARED="ld -Bshareable"
1012		fi;;
1013	SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
1014	*)	LDSHARED="ld";;
1015	esac
1016fi
1017echo "$ac_t""$LDSHARED" 1>&6
1018# CXXSHARED is the ld *command* used to create C++ shared library
1019# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
1020# (Shared libraries in this instance are shared modules to be loaded into
1021# Python, as opposed to building Python itself as a shared library.)
1022echo $ac_n "checking CXXSHARED""... $ac_c" 1>&6
1023echo "configure:1024: checking CXXSHARED" >&5
1024if test -z "$CXXSHARED"
1025then
1026	CXXSHARED="$LDSHARED"
1027fi
1028echo "$ac_t""$CXXSHARED" 1>&6
1029
1030# CCSHARED are the C *flags* used to create objects to go into a shared
1031# library (module) -- this is only needed for a few systems
1032echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
1033echo "configure:1034: checking CCSHARED" >&5
1034if test -z "$CCSHARED"
1035then
1036	case $ac_sys_system/$ac_sys_release in
1037	hp*|HP*) if test "$GCC" = yes;
1038		 then CCSHARED="-fpic";
1039		 else CCSHARED="+z";
1040		 fi;;
1041	Linux*) CCSHARED="-fpic";;
1042	FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
1043	NetBSD*) CCSHARED="-fPIC";;
1044	SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
1045	IRIX*/6*)  case $CC in
1046		   *gcc*) CCSHARED="-shared";;
1047		   *) CCSHARED="";;
1048		   esac;;
1049	esac
1050fi
1051echo "$ac_t""$CCSHARED" 1>&6
1052
1053# RPATH is the path used to look for shared library files.
1054echo $ac_n "checking RPATH""... $ac_c" 1>&6
1055echo "configure:1056: checking RPATH" >&5
1056if test -z "$RPATH"
1057then
1058	case $ac_sys_system/$ac_sys_release in
1059	SunOS/5*) RPATH='-R. -R$(exec_prefix)/lib';;
1060        IRIX*) RPATH='-rpath .:$(exec_prefix)/lib';;
1061	Linux*) RPATH='-Xlinker -rpath $(exec_prefix)/lib -Xlinker -rpath .';;
1062	*)	RPATH='';;
1063	esac
1064fi
1065echo "$ac_t""$RPATH" 1>&6
1066
1067
1068
1069# Check for specific libraries.   Used for SWIG examples
1070echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1071echo "configure:1072: checking for dlopen in -ldl" >&5
1072ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1073if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1074  echo $ac_n "(cached) $ac_c" 1>&6
1075else
1076  ac_save_LIBS="$LIBS"
1077LIBS="-ldl  $LIBS"
1078cat > conftest.$ac_ext <<EOF
1079#line 1080 "configure"
1080#include "confdefs.h"
1081/* Override any gcc2 internal prototype to avoid an error.  */
1082/* We use char because int might match the return type of a gcc2
1083    builtin and then its argument prototype would still apply.  */
1084char dlopen();
1085
1086int main() {
1087dlopen()
1088; return 0; }
1089EOF
1090if { (eval echo configure:1091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1091  rm -rf conftest*
1092  eval "ac_cv_lib_$ac_lib_var=yes"
1093else
1094  echo "configure: failed program was:" >&5
1095  cat conftest.$ac_ext >&5
1096  rm -rf conftest*
1097  eval "ac_cv_lib_$ac_lib_var=no"
1098fi
1099rm -f conftest*
1100LIBS="$ac_save_LIBS"
1101
1102fi
1103if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1104  echo "$ac_t""yes" 1>&6
1105    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1106    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1107  cat >> confdefs.h <<EOF
1108#define $ac_tr_lib 1
1109EOF
1110
1111  LIBS="-ldl $LIBS"
1112
1113else
1114  echo "$ac_t""no" 1>&6
1115fi
1116	# Dynamic linking for SunOS/Solaris and SYSV
1117echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1118echo "configure:1119: checking for shl_load in -ldld" >&5
1119ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1120if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1121  echo $ac_n "(cached) $ac_c" 1>&6
1122else
1123  ac_save_LIBS="$LIBS"
1124LIBS="-ldld  $LIBS"
1125cat > conftest.$ac_ext <<EOF
1126#line 1127 "configure"
1127#include "confdefs.h"
1128/* Override any gcc2 internal prototype to avoid an error.  */
1129/* We use char because int might match the return type of a gcc2
1130    builtin and then its argument prototype would still apply.  */
1131char shl_load();
1132
1133int main() {
1134shl_load()
1135; return 0; }
1136EOF
1137if { (eval echo configure:1138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1138  rm -rf conftest*
1139  eval "ac_cv_lib_$ac_lib_var=yes"
1140else
1141  echo "configure: failed program was:" >&5
1142  cat conftest.$ac_ext >&5
1143  rm -rf conftest*
1144  eval "ac_cv_lib_$ac_lib_var=no"
1145fi
1146rm -f conftest*
1147LIBS="$ac_save_LIBS"
1148
1149fi
1150if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1151  echo "$ac_t""yes" 1>&6
1152    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1153    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1154  cat >> confdefs.h <<EOF
1155#define $ac_tr_lib 1
1156EOF
1157
1158  LIBS="-ldld $LIBS"
1159
1160else
1161  echo "$ac_t""no" 1>&6
1162fi
1163	# Dynamic linking for HP-UX
1164
1165# The following three (nsl,inet,socket) are needed on Sequent;
1166# the order of checking must be this.  Most SVR4 platforms will
1167# need -lsocket and -lnsl.  However on SGI IRIX 5, these exist but
1168# broken.  I see no elegant solution (probably CHECK_LIB should be
1169# fixed to only add the library if the given entry point is not
1170# satisfied without it).
1171
1172if test "`uname -s`" != IRIX
1173then
1174echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
1175echo "configure:1176: checking for t_open in -lnsl" >&5
1176ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
1177if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1178  echo $ac_n "(cached) $ac_c" 1>&6
1179else
1180  ac_save_LIBS="$LIBS"
1181LIBS="-lnsl  $LIBS"
1182cat > conftest.$ac_ext <<EOF
1183#line 1184 "configure"
1184#include "confdefs.h"
1185/* Override any gcc2 internal prototype to avoid an error.  */
1186/* We use char because int might match the return type of a gcc2
1187    builtin and then its argument prototype would still apply.  */
1188char t_open();
1189
1190int main() {
1191t_open()
1192; return 0; }
1193EOF
1194if { (eval echo configure:1195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1195  rm -rf conftest*
1196  eval "ac_cv_lib_$ac_lib_var=yes"
1197else
1198  echo "configure: failed program was:" >&5
1199  cat conftest.$ac_ext >&5
1200  rm -rf conftest*
1201  eval "ac_cv_lib_$ac_lib_var=no"
1202fi
1203rm -f conftest*
1204LIBS="$ac_save_LIBS"
1205
1206fi
1207if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1208  echo "$ac_t""yes" 1>&6
1209  NETLIBS="-lnsl"
1210else
1211  echo "$ac_t""no" 1>&6
1212fi
1213 # SVR4
1214echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
1215echo "configure:1216: checking for gethostbyname in -linet" >&5
1216ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
1217if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1218  echo $ac_n "(cached) $ac_c" 1>&6
1219else
1220  ac_save_LIBS="$LIBS"
1221LIBS="-linet -lnsl $LIBS"
1222cat > conftest.$ac_ext <<EOF
1223#line 1224 "configure"
1224#include "confdefs.h"
1225/* Override any gcc2 internal prototype to avoid an error.  */
1226/* We use char because int might match the return type of a gcc2
1227    builtin and then its argument prototype would still apply.  */
1228char gethostbyname();
1229
1230int main() {
1231gethostbyname()
1232; return 0; }
1233EOF
1234if { (eval echo configure:1235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1235  rm -rf conftest*
1236  eval "ac_cv_lib_$ac_lib_var=yes"
1237else
1238  echo "configure: failed program was:" >&5
1239  cat conftest.$ac_ext >&5
1240  rm -rf conftest*
1241  eval "ac_cv_lib_$ac_lib_var=no"
1242fi
1243rm -f conftest*
1244LIBS="$ac_save_LIBS"
1245
1246fi
1247if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1248  echo "$ac_t""yes" 1>&6
1249  NETLIBS="-linet $NETLIBS"
1250else
1251  echo "$ac_t""no" 1>&6
1252fi
1253 # Sequent
1254echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1255echo "configure:1256: checking for socket in -lsocket" >&5
1256ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1257if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1258  echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260  ac_save_LIBS="$LIBS"
1261LIBS="-lsocket $NETLIBS $LIBS"
1262cat > conftest.$ac_ext <<EOF
1263#line 1264 "configure"
1264#include "confdefs.h"
1265/* Override any gcc2 internal prototype to avoid an error.  */
1266/* We use char because int might match the return type of a gcc2
1267    builtin and then its argument prototype would still apply.  */
1268char socket();
1269
1270int main() {
1271socket()
1272; return 0; }
1273EOF
1274if { (eval echo configure:1275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1275  rm -rf conftest*
1276  eval "ac_cv_lib_$ac_lib_var=yes"
1277else
1278  echo "configure: failed program was:" >&5
1279  cat conftest.$ac_ext >&5
1280  rm -rf conftest*
1281  eval "ac_cv_lib_$ac_lib_var=no"
1282fi
1283rm -f conftest*
1284LIBS="$ac_save_LIBS"
1285
1286fi
1287if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1288  echo "$ac_t""yes" 1>&6
1289  NETLIBS="-lsocket $NETLIBS"
1290else
1291  echo "$ac_t""no" 1>&6
1292fi
1293 # SVR4 sockets
1294fi
1295
1296
1297
1298
1299########################################################################
1300# MPI?
1301########################################################################
1302# We don't need to know anything about libmpi at this stage. -TL 1/16/02
1303########################################################################
1304USEMPI=
1305MPISUFFIX=
1306MPIPACKAGE=
1307MPIINCLUDE=
1308#MPILIB=
1309# Check whether --with-mpi or --without-mpi was given.
1310if test "${with_mpi+set}" = set; then
1311  withval="$with_mpi"
1312  MPIPACKAGE="$withval"
1313else
1314  MPIPACKAGE=
1315fi
1316
1317# Check whether --with-mpiincl or --without-mpiincl was given.
1318if test "${with_mpiincl+set}" = set; then
1319  withval="$with_mpiincl"
1320  MPIINCLUDE="-I$withval"
1321else
1322  MPIINCLUDE=
1323fi
1324
1325#AC_ARG_WITH(mpilib,[  --with-mpilib=PATH      Set location of MPI library directory],[MPILIB="-L$withval"], [MPILIB=])
1326
1327echo $ac_n "checking for MPI configuration""... $ac_c" 1>&6
1328echo "configure:1329: checking for MPI configuration" >&5
1329
1330if test -n "$MPIPACKAGE"
1331then
1332	USEMPI="-D__USE_MPI"
1333        MPISUFFIX="mpi"
1334	MPICC="$MPIPACKAGE/bin/mpicc"
1335fi
1336
1337# if test -z "$MPILIB"; then
1338#    if test -n "$MPIPACKAGE" -a "$MPIPACKAGE" != "yes"; then
1339#         MPILIB="-L$MPIPACKAGE/lib -lMPI"
1340#    fi
1341# fi
1342
1343if test -z "$MPIINCLUDE"
1344then
1345   if test -n "$MPIPACKAGE" -a "$MPIPACKAGE" != "yes"
1346   then
1347        MPIINCLUDE="-I$MPIPACKAGE/include"
1348   fi
1349fi
1350#  AC_MSG_CHECKING([for MPI library])
1351#  if test -z "$MPILIB"; then
1352#  dirs="$prefix/lib /usr/local/lib /usr/lib /opt/local/lib"
1353#  for i in $dirs ; do
1354#  	if test -r $i/libmpi.a; then
1355#  	    AC_MSG_RESULT($i)
1356#  	    MPILIB="-L$i -lmpi"
1357#  	    break
1358#  	fi
1359#  done
1360#  if test -z "$MPILIB"; then
1361#  	AC_MSG_RESULT(not found)
1362#  fi
1363#  else
1364#  AC_MSG_RESULT($MPILIB)
1365#  fi
1366
1367echo $ac_n "checking for MPI header files""... $ac_c" 1>&6
1368echo "configure:1369: checking for MPI header files" >&5
1369if test -z "$MPIINCLUDE"; then
1370cat > conftest.$ac_ext <<EOF
1371#line 1372 "configure"
1372#include "confdefs.h"
1373#include <mpi.h>
1374EOF
1375ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1376{ (eval echo configure:1377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1377ac_err=`grep -v '^ *+' conftest.out`
1378if test -z "$ac_err"; then
1379  :
1380else
1381  echo "$ac_err" >&5
1382  echo "configure: failed program was:" >&5
1383  cat conftest.$ac_ext >&5
1384  rm -rf conftest*
1385  MPIINCLUDE=""
1386fi
1387rm -f conftest*
1388if test -z "$MPIINCLUDE"; then
1389	dirs="$prefix/include /usr/local/include /usr/include /opt/local/include"
1390	for i in $dirs ; do
1391		if test -r $i/mpi.h; then
1392			echo "$ac_t""$i" 1>&6
1393			MPIINCLUDE="-I$i"
1394			break
1395		fi
1396	done
1397fi
1398if test -z "$MPIINCLUDE"; then
1399    	echo "$ac_t""not found" 1>&6
1400fi
1401else
1402        echo "$ac_t""$MPIINCLUDE" 1>&6
1403fi
1404
1405#AC_SUBST(MPILIB)
1406
1407
1408
1409
1410########################################################################
1411
1412trap '' 1 2 15
1413cat > confcache <<\EOF
1414# This file is a shell script that caches the results of configure
1415# tests run on this system so they can be shared between configure
1416# scripts and configure runs.  It is not useful on other systems.
1417# If it contains results you don't want to keep, you may remove or edit it.
1418#
1419# By default, configure uses ./config.cache as the cache file,
1420# creating it if it does not exist already.  You can give configure
1421# the --cache-file=FILE option to use a different cache file; that is
1422# what configure does when it calls configure scripts in
1423# subdirectories, so they share the cache.
1424# Giving --cache-file=/dev/null disables caching, for debugging configure.
1425# config.status only pays attention to the cache file if you give it the
1426# --recheck option to rerun configure.
1427#
1428EOF
1429# The following way of writing the cache mishandles newlines in values,
1430# but we know of no workaround that is simple, portable, and efficient.
1431# So, don't put newlines in cache variables' values.
1432# Ultrix sh set writes to stderr and can't be redirected directly,
1433# and sets the high bit in the cache file unless we assign to the vars.
1434(set) 2>&1 |
1435  case `(ac_space=' '; set) 2>&1` in
1436  *ac_space=\ *)
1437    # `set' does not quote correctly, so add quotes (double-quote substitution
1438    # turns \\\\ into \\, and sed turns \\ into \).
1439    sed -n \
1440      -e "s/'/'\\\\''/g" \
1441      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1442    ;;
1443  *)
1444    # `set' quotes correctly as required by POSIX, so do not add quotes.
1445    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1446    ;;
1447  esac >> confcache
1448if cmp -s $cache_file confcache; then
1449  :
1450else
1451  if test -w $cache_file; then
1452    echo "updating cache $cache_file"
1453    cat confcache > $cache_file
1454  else
1455    echo "not updating unwritable cache $cache_file"
1456  fi
1457fi
1458rm -f confcache
1459
1460trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1461
1462test "x$prefix" = xNONE && prefix=$ac_default_prefix
1463# Let make expand exec_prefix.
1464test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1465
1466# Any assignment to VPATH causes Sun make to only execute
1467# the first set of double-colon rules, so remove it if not needed.
1468# If there is a colon in the path, we need to keep it.
1469if test "x$srcdir" = x.; then
1470  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
1471fi
1472
1473trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1474
1475# Transform confdefs.h into DEFS.
1476# Protect against shell expansion while executing Makefile rules.
1477# Protect against Makefile macro expansion.
1478cat > conftest.defs <<\EOF
1479s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1480s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
1481s%\[%\\&%g
1482s%\]%\\&%g
1483s%\$%$$%g
1484EOF
1485DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1486rm -f conftest.defs
1487
1488
1489# Without the "./", some shells look in PATH for config.status.
1490: ${CONFIG_STATUS=./config.status}
1491
1492echo creating $CONFIG_STATUS
1493rm -f $CONFIG_STATUS
1494cat > $CONFIG_STATUS <<EOF
1495#! /bin/sh
1496# Generated automatically by configure.
1497# Run this file to recreate the current configuration.
1498# This directory was configured as follows,
1499# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1500#
1501# $0 $ac_configure_args
1502#
1503# Compiler output produced by configure, useful for debugging
1504# configure, is in ./config.log if it exists.
1505
1506ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1507for ac_option
1508do
1509  case "\$ac_option" in
1510  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1511    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1512    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1513  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1514    echo "$CONFIG_STATUS generated by autoconf version 2.12"
1515    exit 0 ;;
1516  -help | --help | --hel | --he | --h)
1517    echo "\$ac_cs_usage"; exit 0 ;;
1518  *) echo "\$ac_cs_usage"; exit 1 ;;
1519  esac
1520done
1521
1522ac_given_srcdir=$srcdir
1523
1524trap 'rm -fr `echo "Makefile Source/SWILL/Makefile Source/Objects/Makefile Examples/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1525EOF
1526cat >> $CONFIG_STATUS <<EOF
1527
1528# Protect against being on the right side of a sed subst in config.status.
1529sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1530 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1531$ac_vpsub
1532$extrasub
1533s%@CFLAGS@%$CFLAGS%g
1534s%@CPPFLAGS@%$CPPFLAGS%g
1535s%@CXXFLAGS@%$CXXFLAGS%g
1536s%@DEFS@%$DEFS%g
1537s%@LDFLAGS@%$LDFLAGS%g
1538s%@LIBS@%$LIBS%g
1539s%@exec_prefix@%$exec_prefix%g
1540s%@prefix@%$prefix%g
1541s%@program_transform_name@%$program_transform_name%g
1542s%@bindir@%$bindir%g
1543s%@sbindir@%$sbindir%g
1544s%@libexecdir@%$libexecdir%g
1545s%@datadir@%$datadir%g
1546s%@sysconfdir@%$sysconfdir%g
1547s%@sharedstatedir@%$sharedstatedir%g
1548s%@localstatedir@%$localstatedir%g
1549s%@libdir@%$libdir%g
1550s%@includedir@%$includedir%g
1551s%@oldincludedir@%$oldincludedir%g
1552s%@infodir@%$infodir%g
1553s%@mandir@%$mandir%g
1554s%@MACHDEP@%$MACHDEP%g
1555s%@CC@%$CC%g
1556s%@RANLIB@%$RANLIB%g
1557s%@AR@%$AR%g
1558s%@CPP@%$CPP%g
1559s%@SO@%$SO%g
1560s%@LDSHARED@%$LDSHARED%g
1561s%@CCSHARED@%$CCSHARED%g
1562s%@CXXSHARED@%$CXXSHARED%g
1563s%@RPATH@%$RPATH%g
1564s%@NETLIBS@%$NETLIBS%g
1565s%@MPIINCLUDE@%$MPIINCLUDE%g
1566s%@USEMPI@%$USEMPI%g
1567s%@MPICC@%$MPICC%g
1568s%@MPISUFFIX@%$MPISUFFIX%g
1569
1570CEOF
1571EOF
1572
1573cat >> $CONFIG_STATUS <<\EOF
1574
1575# Split the substitutions into bite-sized pieces for seds with
1576# small command number limits, like on Digital OSF/1 and HP-UX.
1577ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1578ac_file=1 # Number of current file.
1579ac_beg=1 # First line for current file.
1580ac_end=$ac_max_sed_cmds # Line after last line for current file.
1581ac_more_lines=:
1582ac_sed_cmds=""
1583while $ac_more_lines; do
1584  if test $ac_beg -gt 1; then
1585    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1586  else
1587    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1588  fi
1589  if test ! -s conftest.s$ac_file; then
1590    ac_more_lines=false
1591    rm -f conftest.s$ac_file
1592  else
1593    if test -z "$ac_sed_cmds"; then
1594      ac_sed_cmds="sed -f conftest.s$ac_file"
1595    else
1596      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1597    fi
1598    ac_file=`expr $ac_file + 1`
1599    ac_beg=$ac_end
1600    ac_end=`expr $ac_end + $ac_max_sed_cmds`
1601  fi
1602done
1603if test -z "$ac_sed_cmds"; then
1604  ac_sed_cmds=cat
1605fi
1606EOF
1607
1608cat >> $CONFIG_STATUS <<EOF
1609
1610CONFIG_FILES=\${CONFIG_FILES-"Makefile Source/SWILL/Makefile Source/Objects/Makefile Examples/Makefile"}
1611EOF
1612cat >> $CONFIG_STATUS <<\EOF
1613for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1614  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1615  case "$ac_file" in
1616  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1617       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1618  *) ac_file_in="${ac_file}.in" ;;
1619  esac
1620
1621  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1622
1623  # Remove last slash and all that follows it.  Not all systems have dirname.
1624  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1625  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1626    # The file is in a subdirectory.
1627    test ! -d "$ac_dir" && mkdir "$ac_dir"
1628    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1629    # A "../" for each directory in $ac_dir_suffix.
1630    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1631  else
1632    ac_dir_suffix= ac_dots=
1633  fi
1634
1635  case "$ac_given_srcdir" in
1636  .)  srcdir=.
1637      if test -z "$ac_dots"; then top_srcdir=.
1638      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1639  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1640  *) # Relative path.
1641    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1642    top_srcdir="$ac_dots$ac_given_srcdir" ;;
1643  esac
1644
1645
1646  echo creating "$ac_file"
1647  rm -f "$ac_file"
1648  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1649  case "$ac_file" in
1650  *Makefile*) ac_comsub="1i\\
1651# $configure_input" ;;
1652  *) ac_comsub= ;;
1653  esac
1654
1655  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1656  sed -e "$ac_comsub
1657s%@configure_input@%$configure_input%g
1658s%@srcdir@%$srcdir%g
1659s%@top_srcdir@%$top_srcdir%g
1660" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1661fi; done
1662rm -f conftest.s*
1663
1664EOF
1665cat >> $CONFIG_STATUS <<EOF
1666
1667EOF
1668cat >> $CONFIG_STATUS <<\EOF
1669
1670exit 0
1671EOF
1672chmod +x $CONFIG_STATUS
1673rm -fr confdefs* $ac_clean_files
1674test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1675
1676
1677
1678