e9318531da483ab8afcd71d14bd9c393de91bcda
[alexxy/gromacs.git] / configure
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --disable-dependency-tracking Speeds up one-time builds
16   --enable-dependency-tracking  Do not reject slow dependency extractors"
17 ac_default_prefix=/usr/local/gromacs
18 ac_help="$ac_help
19   --enable-mpi                  Compile parallel version of Gromacs"
20 ac_help="$ac_help
21   --enable-vector               Compile for a vector machine"
22 ac_help="$ac_help
23   --enable-fortran              Dortran loops (default on sgi,ibm,sun,tru64/dec)"
24 ac_help="$ac_help
25   --enable-double               Compile double precision Gromacs"
26 ac_help="$ac_help
27   --disable-type-suffix         Don't add a suffix to double precision files"
28 ac_help="$ac_help
29   --enable-mpi-suffix           Add a suffix to MPI files (default on ibm)"
30 ac_help="$ac_help
31   --enable-simplewater          Unroll water innerloops (default on sgi)"
32 ac_help="$ac_help
33   --disable-waterwater-loops    No special water-water loops (default on sgi)"
34 ac_help="$ac_help
35   --disable-nice                Disable the nice priority on mdrun"
36 ac_help="$ac_help
37   --disable-sse                 Disable SSE assembly loops on x86"
38 ac_help="$ac_help
39   --disable-3dnow               Disable 3DNow assembly loops on x86"
40 ac_help="$ac_help
41   --disable-xdr                 Disable portable trajectory routines"
42 ac_help="$ac_help
43   --disable-cpu-detection       Don't extend detection with exact cpu type"
44 ac_help="$ac_help
45   --enable-software-recip       Do software 1/x (might be slower)"
46 ac_help="$ac_help
47   --disable-software-sqrt       No software 1/sqrt (default on sgi,rs6000)"
48 ac_help="$ac_help
49   --enable-vectorized-recip     Vectorize 1/x in LJ-only loops"
50 ac_help="$ac_help
51   --enable-vectorized-sqrt=A,B  Loops to vectorize (default none)
52                                 Choices: normal,solvent,water,water-water"
53 ac_help="$ac_help
54   --enable-prefetch-x=A,B       Prefetch coordinates in selected innerloops"
55 ac_help="$ac_help
56   --enable-prefetch-f=A,B       Prefetch forces in selected innerloops"
57 ac_help="$ac_help
58   --enable-hide-square-latency  Try to get coords to cache before using them"
59 ac_help="$ac_help
60   --enable-hide-table-latency   Try to get table data to cache before using it"
61 ac_help="$ac_help
62   --with-mpi-environment=VAR    Only start MPI mdrun when VAR is set"
63 ac_help="$ac_help
64   --with-x                use the X Window System"
65 ac_help="$ac_help
66   --with-motif-includes=DIR    Motif include files are in DIR"
67 ac_help="$ac_help
68   --with-motif-libraries=DIR   Motif libraries are in DIR"
69
70 # Initialize some variables set by options.
71 # The variables have the same names as the options, with
72 # dashes changed to underlines.
73 build=NONE
74 cache_file=./config.cache
75 exec_prefix=NONE
76 host=NONE
77 no_create=
78 nonopt=NONE
79 no_recursion=
80 prefix=NONE
81 program_prefix=NONE
82 program_suffix=NONE
83 program_transform_name=s,x,x,
84 silent=
85 site=
86 srcdir=
87 target=NONE
88 verbose=
89 x_includes=NONE
90 x_libraries=NONE
91 bindir='${exec_prefix}/bin'
92 sbindir='${exec_prefix}/sbin'
93 libexecdir='${exec_prefix}/libexec'
94 datadir='${prefix}/share'
95 sysconfdir='${prefix}/etc'
96 sharedstatedir='${prefix}/com'
97 localstatedir='${prefix}/var'
98 libdir='${exec_prefix}/lib'
99 includedir='${prefix}/include'
100 oldincludedir='/usr/include'
101 infodir='${prefix}/info'
102 mandir='${prefix}/man'
103
104 # Initialize some other variables.
105 subdirs=
106 MFLAGS= MAKEFLAGS=
107 SHELL=${CONFIG_SHELL-/bin/sh}
108 # Maximum number of lines to put in a shell here document.
109 ac_max_here_lines=12
110
111 ac_prev=
112 for ac_option
113 do
114
115   # If the previous option needs an argument, assign it.
116   if test -n "$ac_prev"; then
117     eval "$ac_prev=\$ac_option"
118     ac_prev=
119     continue
120   fi
121
122   case "$ac_option" in
123   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
124   *) ac_optarg= ;;
125   esac
126
127   # Accept the important Cygnus configure options, so we can diagnose typos.
128
129   case "$ac_option" in
130
131   -bindir | --bindir | --bindi | --bind | --bin | --bi)
132     ac_prev=bindir ;;
133   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
134     bindir="$ac_optarg" ;;
135
136   -build | --build | --buil | --bui | --bu)
137     ac_prev=build ;;
138   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
139     build="$ac_optarg" ;;
140
141   -cache-file | --cache-file | --cache-fil | --cache-fi \
142   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
143     ac_prev=cache_file ;;
144   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
145   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
146     cache_file="$ac_optarg" ;;
147
148   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
149     ac_prev=datadir ;;
150   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
151   | --da=*)
152     datadir="$ac_optarg" ;;
153
154   -disable-* | --disable-*)
155     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
156     # Reject names that are not valid shell variable names.
157     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
158       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
159     fi
160     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161     eval "enable_${ac_feature}=no" ;;
162
163   -enable-* | --enable-*)
164     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
165     # Reject names that are not valid shell variable names.
166     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
167       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
168     fi
169     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
170     case "$ac_option" in
171       *=*) ;;
172       *) ac_optarg=yes ;;
173     esac
174     eval "enable_${ac_feature}='$ac_optarg'" ;;
175
176   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
177   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
178   | --exec | --exe | --ex)
179     ac_prev=exec_prefix ;;
180   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
181   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
182   | --exec=* | --exe=* | --ex=*)
183     exec_prefix="$ac_optarg" ;;
184
185   -gas | --gas | --ga | --g)
186     # Obsolete; use --with-gas.
187     with_gas=yes ;;
188
189   -help | --help | --hel | --he)
190     # Omit some internal or obsolete options to make the list less imposing.
191     # This message is too long to be a string in the A/UX 3.1 sh.
192     cat << EOF
193 Usage: configure [options] [host]
194 Options: [defaults in brackets after descriptions]
195 Configuration:
196   --cache-file=FILE       cache test results in FILE
197   --help                  print this message
198   --no-create             do not create output files
199   --quiet, --silent       do not print \`checking...' messages
200   --version               print the version of autoconf that created configure
201 Directory and file names:
202   --prefix=PREFIX         install architecture-independent files in PREFIX
203                           [$ac_default_prefix]
204   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
205                           [same as prefix]
206   --bindir=DIR            user executables in DIR [EPREFIX/bin]
207   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
208   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
209   --datadir=DIR           read-only architecture-independent data in DIR
210                           [PREFIX/share]
211   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
212   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
213                           [PREFIX/com]
214   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
215   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
216   --includedir=DIR        C header files in DIR [PREFIX/include]
217   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
218   --infodir=DIR           info documentation in DIR [PREFIX/info]
219   --mandir=DIR            man documentation in DIR [PREFIX/man]
220   --srcdir=DIR            find the sources in DIR [configure dir or ..]
221   --program-prefix=PREFIX prepend PREFIX to installed program names
222   --program-suffix=SUFFIX append SUFFIX to installed program names
223   --program-transform-name=PROGRAM
224                           run sed PROGRAM on installed program names
225 EOF
226     cat << EOF
227 Host type:
228   --build=BUILD           configure for building on BUILD [BUILD=HOST]
229   --host=HOST             configure for HOST [guessed]
230   --target=TARGET         configure for TARGET [TARGET=HOST]
231 Features and packages:
232   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
233   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
234   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
235   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
236   --x-includes=DIR        X include files are in DIR
237   --x-libraries=DIR       X library files are in DIR
238 EOF
239     if test -n "$ac_help"; then
240       echo "--enable and --with options recognized:$ac_help"
241     fi
242     exit 0 ;;
243
244   -host | --host | --hos | --ho)
245     ac_prev=host ;;
246   -host=* | --host=* | --hos=* | --ho=*)
247     host="$ac_optarg" ;;
248
249   -includedir | --includedir | --includedi | --included | --include \
250   | --includ | --inclu | --incl | --inc)
251     ac_prev=includedir ;;
252   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
253   | --includ=* | --inclu=* | --incl=* | --inc=*)
254     includedir="$ac_optarg" ;;
255
256   -infodir | --infodir | --infodi | --infod | --info | --inf)
257     ac_prev=infodir ;;
258   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
259     infodir="$ac_optarg" ;;
260
261   -libdir | --libdir | --libdi | --libd)
262     ac_prev=libdir ;;
263   -libdir=* | --libdir=* | --libdi=* | --libd=*)
264     libdir="$ac_optarg" ;;
265
266   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
267   | --libexe | --libex | --libe)
268     ac_prev=libexecdir ;;
269   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
270   | --libexe=* | --libex=* | --libe=*)
271     libexecdir="$ac_optarg" ;;
272
273   -localstatedir | --localstatedir | --localstatedi | --localstated \
274   | --localstate | --localstat | --localsta | --localst \
275   | --locals | --local | --loca | --loc | --lo)
276     ac_prev=localstatedir ;;
277   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
278   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
279   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
280     localstatedir="$ac_optarg" ;;
281
282   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
283     ac_prev=mandir ;;
284   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
285     mandir="$ac_optarg" ;;
286
287   -nfp | --nfp | --nf)
288     # Obsolete; use --without-fp.
289     with_fp=no ;;
290
291   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
292   | --no-cr | --no-c)
293     no_create=yes ;;
294
295   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
296   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
297     no_recursion=yes ;;
298
299   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
300   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
301   | --oldin | --oldi | --old | --ol | --o)
302     ac_prev=oldincludedir ;;
303   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
304   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
305   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
306     oldincludedir="$ac_optarg" ;;
307
308   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
309     ac_prev=prefix ;;
310   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
311     prefix="$ac_optarg" ;;
312
313   -program-prefix | --program-prefix | --program-prefi | --program-pref \
314   | --program-pre | --program-pr | --program-p)
315     ac_prev=program_prefix ;;
316   -program-prefix=* | --program-prefix=* | --program-prefi=* \
317   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
318     program_prefix="$ac_optarg" ;;
319
320   -program-suffix | --program-suffix | --program-suffi | --program-suff \
321   | --program-suf | --program-su | --program-s)
322     ac_prev=program_suffix ;;
323   -program-suffix=* | --program-suffix=* | --program-suffi=* \
324   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
325     program_suffix="$ac_optarg" ;;
326
327   -program-transform-name | --program-transform-name \
328   | --program-transform-nam | --program-transform-na \
329   | --program-transform-n | --program-transform- \
330   | --program-transform | --program-transfor \
331   | --program-transfo | --program-transf \
332   | --program-trans | --program-tran \
333   | --progr-tra | --program-tr | --program-t)
334     ac_prev=program_transform_name ;;
335   -program-transform-name=* | --program-transform-name=* \
336   | --program-transform-nam=* | --program-transform-na=* \
337   | --program-transform-n=* | --program-transform-=* \
338   | --program-transform=* | --program-transfor=* \
339   | --program-transfo=* | --program-transf=* \
340   | --program-trans=* | --program-tran=* \
341   | --progr-tra=* | --program-tr=* | --program-t=*)
342     program_transform_name="$ac_optarg" ;;
343
344   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
345   | -silent | --silent | --silen | --sile | --sil)
346     silent=yes ;;
347
348   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
349     ac_prev=sbindir ;;
350   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
351   | --sbi=* | --sb=*)
352     sbindir="$ac_optarg" ;;
353
354   -sharedstatedir | --sharedstatedir | --sharedstatedi \
355   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
356   | --sharedst | --shareds | --shared | --share | --shar \
357   | --sha | --sh)
358     ac_prev=sharedstatedir ;;
359   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
360   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
361   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
362   | --sha=* | --sh=*)
363     sharedstatedir="$ac_optarg" ;;
364
365   -site | --site | --sit)
366     ac_prev=site ;;
367   -site=* | --site=* | --sit=*)
368     site="$ac_optarg" ;;
369
370   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
371     ac_prev=srcdir ;;
372   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
373     srcdir="$ac_optarg" ;;
374
375   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
376   | --syscon | --sysco | --sysc | --sys | --sy)
377     ac_prev=sysconfdir ;;
378   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
379   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
380     sysconfdir="$ac_optarg" ;;
381
382   -target | --target | --targe | --targ | --tar | --ta | --t)
383     ac_prev=target ;;
384   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
385     target="$ac_optarg" ;;
386
387   -v | -verbose | --verbose | --verbos | --verbo | --verb)
388     verbose=yes ;;
389
390   -version | --version | --versio | --versi | --vers)
391     echo "configure generated by autoconf version 2.13"
392     exit 0 ;;
393
394   -with-* | --with-*)
395     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
396     # Reject names that are not valid shell variable names.
397     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
398       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
399     fi
400     ac_package=`echo $ac_package| sed 's/-/_/g'`
401     case "$ac_option" in
402       *=*) ;;
403       *) ac_optarg=yes ;;
404     esac
405     eval "with_${ac_package}='$ac_optarg'" ;;
406
407   -without-* | --without-*)
408     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
409     # Reject names that are not valid shell variable names.
410     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
411       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
412     fi
413     ac_package=`echo $ac_package| sed 's/-/_/g'`
414     eval "with_${ac_package}=no" ;;
415
416   --x)
417     # Obsolete; use --with-x.
418     with_x=yes ;;
419
420   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
421   | --x-incl | --x-inc | --x-in | --x-i)
422     ac_prev=x_includes ;;
423   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
424   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
425     x_includes="$ac_optarg" ;;
426
427   -x-libraries | --x-libraries | --x-librarie | --x-librari \
428   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
429     ac_prev=x_libraries ;;
430   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
431   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
432     x_libraries="$ac_optarg" ;;
433
434   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
435     ;;
436
437   *)
438     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
439       echo "configure: warning: $ac_option: invalid host type" 1>&2
440     fi
441     if test "x$nonopt" != xNONE; then
442       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
443     fi
444     nonopt="$ac_option"
445     ;;
446
447   esac
448 done
449
450 if test -n "$ac_prev"; then
451   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
452 fi
453
454 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
455
456 # File descriptor usage:
457 # 0 standard input
458 # 1 file creation
459 # 2 errors and warnings
460 # 3 some systems may open it to /dev/tty
461 # 4 used on the Kubota Titan
462 # 6 checking for... messages and results
463 # 5 compiler messages saved in config.log
464 if test "$silent" = yes; then
465   exec 6>/dev/null
466 else
467   exec 6>&1
468 fi
469 exec 5>./config.log
470
471 echo "\
472 This file contains any messages produced by compilers while
473 running configure, to aid debugging if configure makes a mistake.
474 " 1>&5
475
476 # Strip out --no-create and --no-recursion so they do not pile up.
477 # Also quote any args containing shell metacharacters.
478 ac_configure_args=
479 for ac_arg
480 do
481   case "$ac_arg" in
482   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
483   | --no-cr | --no-c) ;;
484   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
485   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
486   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
487   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
488   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
489   esac
490 done
491
492 # NLS nuisances.
493 # Only set these to C if already set.  These must not be set unconditionally
494 # because not all systems understand e.g. LANG=C (notably SCO).
495 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
496 # Non-C LC_CTYPE values break the ctype check.
497 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
498 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
499 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
500 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
501
502 # confdefs.h avoids OS command line length limits that DEFS can exceed.
503 rm -rf conftest* confdefs.h
504 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
505 echo > confdefs.h
506
507 # A filename unique to this package, relative to the directory that
508 # configure is in, which we can look for to find out if srcdir is correct.
509 ac_unique_file=src/gmxlib/3dview.c
510
511 # Find the source files, if location was not specified.
512 if test -z "$srcdir"; then
513   ac_srcdir_defaulted=yes
514   # Try the directory containing this script, then its parent.
515   ac_prog=$0
516   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
517   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
518   srcdir=$ac_confdir
519   if test ! -r $srcdir/$ac_unique_file; then
520     srcdir=..
521   fi
522 else
523   ac_srcdir_defaulted=no
524 fi
525 if test ! -r $srcdir/$ac_unique_file; then
526   if test "$ac_srcdir_defaulted" = yes; then
527     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
528   else
529     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
530   fi
531 fi
532 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
533
534 # Prefer explicitly selected file to automatically selected ones.
535 if test -z "$CONFIG_SITE"; then
536   if test "x$prefix" != xNONE; then
537     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
538   else
539     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
540   fi
541 fi
542 for ac_site_file in $CONFIG_SITE; do
543   if test -r "$ac_site_file"; then
544     echo "loading site script $ac_site_file"
545     . "$ac_site_file"
546   fi
547 done
548
549 if test -r "$cache_file"; then
550   echo "loading cache $cache_file"
551   . $cache_file
552 else
553   echo "creating cache $cache_file"
554   > $cache_file
555 fi
556
557 ac_ext=c
558 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
559 ac_cpp='$CPP $CPPFLAGS'
560 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
561 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
562 cross_compiling=$ac_cv_prog_cc_cross
563
564 ac_exeext=
565 ac_objext=o
566 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
567   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
568   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
569     ac_n= ac_c='
570 ' ac_t='        '
571   else
572     ac_n=-n ac_c= ac_t=
573   fi
574 else
575   ac_n= ac_c='\c' ac_t=
576 fi
577
578
579
580 ac_aux_dir=
581 for ac_dir in ./config $srcdir/./config; do
582   if test -f $ac_dir/install-sh; then
583     ac_aux_dir=$ac_dir
584     ac_install_sh="$ac_aux_dir/install-sh -c"
585     break
586   elif test -f $ac_dir/install.sh; then
587     ac_aux_dir=$ac_dir
588     ac_install_sh="$ac_aux_dir/install.sh -c"
589     break
590   fi
591 done
592 if test -z "$ac_aux_dir"; then
593   { echo "configure: error: can not find install-sh or install.sh in ./config $srcdir/./config" 1>&2; exit 1; }
594 fi
595 ac_config_guess=$ac_aux_dir/config.guess
596 ac_config_sub=$ac_aux_dir/config.sub
597 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
598
599 # Find a good install program.  We prefer a C program (faster),
600 # so one script is as good as another.  But avoid the broken or
601 # incompatible versions:
602 # SysV /etc/install, /usr/sbin/install
603 # SunOS /usr/etc/install
604 # IRIX /sbin/install
605 # AIX /bin/install
606 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
607 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
608 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
609 # ./install, which can be erroneously created by make from ./install.sh.
610 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
611 echo "configure:612: checking for a BSD compatible install" >&5
612 if test -z "$INSTALL"; then
613 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
614   echo $ac_n "(cached) $ac_c" 1>&6
615 else
616     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
617   for ac_dir in $PATH; do
618     # Account for people who put trailing slashes in PATH elements.
619     case "$ac_dir/" in
620     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
621     *)
622       # OSF1 and SCO ODT 3.0 have their own names for install.
623       # Don't use installbsd from OSF since it installs stuff as root
624       # by default.
625       for ac_prog in ginstall scoinst install; do
626         if test -f $ac_dir/$ac_prog; then
627           if test $ac_prog = install &&
628             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
629             # AIX install.  It has an incompatible calling convention.
630             :
631           else
632             ac_cv_path_install="$ac_dir/$ac_prog -c"
633             break 2
634           fi
635         fi
636       done
637       ;;
638     esac
639   done
640   IFS="$ac_save_IFS"
641
642 fi
643   if test "${ac_cv_path_install+set}" = set; then
644     INSTALL="$ac_cv_path_install"
645   else
646     # As a last resort, use the slow shell script.  We don't cache a
647     # path for INSTALL within a source directory, because that will
648     # break other packages using the cache if that directory is
649     # removed, or if the path is relative.
650     INSTALL="$ac_install_sh"
651   fi
652 fi
653 echo "$ac_t""$INSTALL" 1>&6
654
655 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
656 # It thinks the first close brace ends the variable substitution.
657 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
658
659 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
660
661 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
662
663 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
664 echo "configure:665: checking whether build environment is sane" >&5
665 # Just in case
666 sleep 1
667 echo timestamp > conftest.file
668 # Do `set' in a subshell so we don't clobber the current shell's
669 # arguments.  Must try -L first in case configure is actually a
670 # symlink; some systems play weird games with the mod time of symlinks
671 # (eg FreeBSD returns the mod time of the symlink's containing
672 # directory).
673 if (
674    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
675    if test "$*" = "X"; then
676       # -L didn't work.
677       set X `ls -t $srcdir/configure conftest.file`
678    fi
679    if test "$*" != "X $srcdir/configure conftest.file" \
680       && test "$*" != "X conftest.file $srcdir/configure"; then
681
682       # If neither matched, then we have a broken ls.  This can happen
683       # if, for instance, CONFIG_SHELL is bash and it inherits a
684       # broken ls alias from the environment.  This has actually
685       # happened.  Such a system could not be considered "sane".
686       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
687 alias in your environment" 1>&2; exit 1; }
688    fi
689
690    test "$2" = conftest.file
691    )
692 then
693    # Ok.
694    :
695 else
696    { echo "configure: error: newly created file is older than distributed files!
697 Check your system clock" 1>&2; exit 1; }
698 fi
699 rm -f conftest*
700 echo "$ac_t""yes" 1>&6
701 if test "$program_transform_name" = s,x,x,; then
702   program_transform_name=
703 else
704   # Double any \ or $.  echo might interpret backslashes.
705   cat <<\EOF_SED > conftestsed
706 s,\\,\\\\,g; s,\$,$$,g
707 EOF_SED
708   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
709   rm -f conftestsed
710 fi
711 test "$program_prefix" != NONE &&
712   program_transform_name="s,^,${program_prefix},; $program_transform_name"
713 # Use a double $ so make ignores it.
714 test "$program_suffix" != NONE &&
715   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
716
717 # sed with no file args requires a program.
718 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
719
720 test x"${MISSING+set}" = xset ||
721   MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
722 # Use eval to expand $SHELL
723 if eval "$MISSING --run :"; then
724   am_missing_run="$MISSING --run "
725 else
726   am_missing_run=
727   am_backtick='`'
728   echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
729 fi
730
731 for ac_prog in mawk gawk nawk awk
732 do
733 # Extract the first word of "$ac_prog", so it can be a program name with args.
734 set dummy $ac_prog; ac_word=$2
735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
736 echo "configure:737: checking for $ac_word" >&5
737 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
738   echo $ac_n "(cached) $ac_c" 1>&6
739 else
740   if test -n "$AWK"; then
741   ac_cv_prog_AWK="$AWK" # Let the user override the test.
742 else
743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
744   ac_dummy="$PATH"
745   for ac_dir in $ac_dummy; do
746     test -z "$ac_dir" && ac_dir=.
747     if test -f $ac_dir/$ac_word; then
748       ac_cv_prog_AWK="$ac_prog"
749       break
750     fi
751   done
752   IFS="$ac_save_ifs"
753 fi
754 fi
755 AWK="$ac_cv_prog_AWK"
756 if test -n "$AWK"; then
757   echo "$ac_t""$AWK" 1>&6
758 else
759   echo "$ac_t""no" 1>&6
760 fi
761
762 test -n "$AWK" && break
763 done
764
765 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
766 echo "configure:767: checking whether ${MAKE-make} sets \${MAKE}" >&5
767 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
768 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
769   echo $ac_n "(cached) $ac_c" 1>&6
770 else
771   cat > conftestmake <<\EOF
772 all:
773         @echo 'ac_maketemp="${MAKE}"'
774 EOF
775 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
776 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
777 if test -n "$ac_maketemp"; then
778   eval ac_cv_prog_make_${ac_make}_set=yes
779 else
780   eval ac_cv_prog_make_${ac_make}_set=no
781 fi
782 rm -f conftestmake
783 fi
784 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
785   echo "$ac_t""yes" 1>&6
786   SET_MAKE=
787 else
788   echo "$ac_t""no" 1>&6
789   SET_MAKE="MAKE=${MAKE-make}"
790 fi
791
792 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
793 if test "${enable_dependency_tracking+set}" = set; then
794   enableval="$enable_dependency_tracking"
795   :
796 fi
797
798 if test "x$enable_dependency_tracking" = xno; then
799   AMDEP="#"
800 else
801   am_depcomp="$ac_aux_dir/depcomp"
802   if test ! -f "$am_depcomp"; then
803     AMDEP="#"
804   else
805     AMDEP=
806   fi
807 fi
808
809 if test -z "$AMDEP"; then
810   AMDEPBACKSLASH='\'
811 else
812   AMDEPBACKSLASH=
813 fi
814
815
816
817
818 if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
819   DEPDIR=.deps
820   # We redirect because .deps might already exist and be populated.
821   # In this situation we don't want to see an error.
822   rmdir .deps > /dev/null 2>&1
823 else
824   DEPDIR=_deps
825 fi
826
827
828 # test to see if srcdir already configured
829 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
830    test -f $srcdir/config.status; then
831   { echo "configure: error: source directory already configured; run \"make distclean\" there first" 1>&2; exit 1; }
832 fi
833
834 # Define the identity of the package.
835 PACKAGE=gromacs
836 VERSION=3.0b
837 cat >> confdefs.h <<EOF
838 #define PACKAGE "$PACKAGE"
839 EOF
840
841 cat >> confdefs.h <<EOF
842 #define VERSION "$VERSION"
843 EOF
844
845
846 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
847 # the ones we care about.
848
849
850
851
852
853
854
855
856 # Some tools Automake needs.
857
858 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
859
860
861 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
862
863
864 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
865
866
867 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
868
869
870 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
871
872
873 AMTAR=${AMTAR-"${am_missing_run}tar"}
874
875
876 if test -z "$install_sh"; then
877    for install_sh in "$ac_aux_dir/install-sh" \
878                      "$ac_aux_dir/install.sh" \
879                      "${am_missing_run}${ac_auxdir}/install-sh";
880    do
881      test -f "$install_sh" && break
882    done
883    # FIXME: an evil hack: we remove the SHELL invocation from
884    # install_sh because automake adds it back in.  Sigh.
885    install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
886 fi
887
888 # We need awk for the "check" target.  The system "awk" is bad on
889 # some platforms.
890
891
892
893   
894
895
896 #######################################################################
897 # User options
898 #######################################################################
899
900 #####
901
902 # Check whether --enable-mpi or --disable-mpi was given.
903 if test "${enable_mpi+set}" = set; then
904   enableval="$enable_mpi"
905   enable_mpi=$enableval
906 else
907   enable_mpi=no
908 fi
909
910
911
912 #####
913
914 # Check whether --enable-vector or --disable-vector was given.
915 if test "${enable_vector+set}" = set; then
916   enableval="$enable_vector"
917   enable_vector=$enableval
918 else
919   enable_vector=no
920 fi
921
922
923
924 #####
925
926 # Check whether --enable-fortran or --disable-fortran was given.
927 if test "${enable_fortran+set}" = set; then
928   enableval="$enable_fortran"
929   enable_fortran=$enableval
930 else
931   enable_fortran=check
932 fi
933
934
935
936 #####
937
938 # Check whether --enable-double or --disable-double was given.
939 if test "${enable_double+set}" = set; then
940   enableval="$enable_double"
941   enable_double=$enableval
942 else
943   enable_double=no
944 fi
945
946
947
948 #####
949
950 # Check whether --enable-type-suffix or --disable-type-suffix was given.
951 if test "${enable_type_suffix+set}" = set; then
952   enableval="$enable_type_suffix"
953   enable_type_suffix=$enableval
954 else
955   enable_type_suffix=yes
956 fi
957
958
959
960 #####
961
962 # Check whether --enable-mpi-suffix or --disable-mpi-suffix was given.
963 if test "${enable_mpi_suffix+set}" = set; then
964   enableval="$enable_mpi_suffix"
965   enable_mpi_suffix=$enableval
966 else
967   enable_mpi_suffix=check
968 fi
969
970
971
972 #####
973
974 # Check whether --enable-simplewater or --disable-simplewater was given.
975 if test "${enable_simplewater+set}" = set; then
976   enableval="$enable_simplewater"
977   enable_simplewater=$enableval
978 else
979   enable_simplewater=check
980 fi
981
982
983
984 #####
985 # Check whether --enable-waterwater-loops or --disable-waterwater-loops was given.
986 if test "${enable_waterwater_loops+set}" = set; then
987   enableval="$enable_waterwater_loops"
988   enable_waterwater_loops=$enableval
989 else
990   enable_waterwater_loops=check
991 fi
992
993
994
995 #####
996
997 # Check whether --enable-nice or --disable-nice was given.
998 if test "${enable_nice+set}" = set; then
999   enableval="$enable_nice"
1000   enable_nice=$enableval
1001 else
1002   enable_nice=yes
1003 fi
1004
1005
1006
1007 #####
1008
1009 # Check whether --enable-sse or --disable-sse was given.
1010 if test "${enable_sse+set}" = set; then
1011   enableval="$enable_sse"
1012   enable_sse=$enableval
1013 else
1014   enable_sse=yes
1015 fi
1016
1017
1018
1019 #####
1020
1021 # Check whether --enable-3dnow or --disable-3dnow was given.
1022 if test "${enable_3dnow+set}" = set; then
1023   enableval="$enable_3dnow"
1024   enable_3dnow=$enableval
1025 else
1026   enable_3dnow=yes
1027 fi
1028
1029
1030
1031 #####
1032
1033 # Check whether --enable-xdr or --disable-xdr was given.
1034 if test "${enable_xdr+set}" = set; then
1035   enableval="$enable_xdr"
1036   enable_xdr=$enableval
1037 else
1038   enable_xdr=yes
1039 fi
1040
1041
1042
1043 #####
1044
1045 # Check whether --enable-cpu-detection or --disable-cpu-detection was given.
1046 if test "${enable_cpu_detection+set}" = set; then
1047   enableval="$enable_cpu_detection"
1048   enable_cpu_detection=$enableval
1049 else
1050   enable_cpu_detection=yes
1051 fi
1052
1053
1054
1055 #####
1056
1057 # Check whether --enable-software-recip or --disable-software-recip was given.
1058 if test "${enable_software_recip+set}" = set; then
1059   enableval="$enable_software_recip"
1060   enable_softwarerecip=$enableval
1061 else
1062   enable_softwarerecip=no
1063 fi
1064
1065
1066
1067 #####
1068
1069 # Check whether --enable-software-sqrt or --disable-software-sqrt was given.
1070 if test "${enable_software_sqrt+set}" = set; then
1071   enableval="$enable_software_sqrt"
1072   enable_softwaresqrt=$enableval
1073 else
1074   enable_softwaresqrt=check
1075 fi
1076
1077
1078
1079 #####
1080
1081 # Check whether --enable-vectorized_recip or --disable-vectorized_recip was given.
1082 if test "${enable_vectorized_recip+set}" = set; then
1083   enableval="$enable_vectorized_recip"
1084   enable_vectorized_recip=$enableval
1085 else
1086   enable_vectorized_recip=no
1087 fi
1088
1089
1090
1091 #####
1092
1093 # Check whether --enable-vectorized_sqrt or --disable-vectorized_sqrt was given.
1094 if test "${enable_vectorized_sqrt+set}" = set; then
1095   enableval="$enable_vectorized_sqrt"
1096   enable_vectorized_sqrt=$enableval
1097 else
1098   enable_vectorized_sqrt=no
1099 fi
1100
1101
1102
1103 #####
1104 # Check whether --enable-prefetch_x or --disable-prefetch_x was given.
1105 if test "${enable_prefetch_x+set}" = set; then
1106   enableval="$enable_prefetch_x"
1107   enable_prefetch_x=$enableval
1108 else
1109   enable_prefetch_x=no
1110 fi
1111
1112
1113
1114 #####
1115 # Check whether --enable-prefetch_f or --disable-prefetch_f was given.
1116 if test "${enable_prefetch_f+set}" = set; then
1117   enableval="$enable_prefetch_f"
1118   enable_prefetch_f=$enableval
1119 else
1120   enable_prefetch_f=no
1121 fi
1122
1123
1124
1125 #####
1126 # Check whether --enable-hide_square_latency or --disable-hide_square_latency was given.
1127 if test "${enable_hide_square_latency+set}" = set; then
1128   enableval="$enable_hide_square_latency"
1129   enable_hide_square_latency=$enableval
1130 else
1131   enable_hide_square_latency=no
1132 fi
1133
1134
1135
1136 #####
1137 # Check whether --enable-hide_table_latency or --disable-hide_table_latency was given.
1138 if test "${enable_hide_table_latency+set}" = set; then
1139   enableval="$enable_hide_table_latency"
1140   enable_hide_table_latency=$enableval
1141 else
1142   enable_hide_table_latency=no
1143 fi
1144
1145
1146
1147 #####
1148
1149 # Check whether --with-mpi-environment or --without-mpi-environment was given.
1150 if test "${with_mpi_environment+set}" = set; then
1151   withval="$with_mpi_environment"
1152   with_mpi_environment="$withval"
1153 else
1154   with_mpi_environment=check
1155 fi
1156
1157
1158
1159 ########################################################################
1160 # Process the options
1161 ########################################################################
1162
1163
1164 # Make sure we can run config.sub.
1165 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1166 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1167 fi
1168
1169 echo $ac_n "checking host system type""... $ac_c" 1>&6
1170 echo "configure:1171: checking host system type" >&5
1171
1172 host_alias=$host
1173 case "$host_alias" in
1174 NONE)
1175   case $nonopt in
1176   NONE)
1177     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1178     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1179     fi ;;
1180   *) host_alias=$nonopt ;;
1181   esac ;;
1182 esac
1183
1184 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1185 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1186 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1187 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1188 echo "$ac_t""$host" 1>&6
1189
1190
1191 case "${host_cpu}" in
1192  i?86)  
1193    x86=yes 
1194    ;;   
1195  *)      
1196    x86=false 
1197    ;;
1198 esac
1199
1200 if test "$enable_fortran" = "check"; then
1201 case "${host_cpu}-${host_os}" in
1202
1203   sparc*-solaris* | alpha*-osf* | rs6000*-aix* | mips*-irix*)
1204     enable_fortran=yes 
1205     ;;
1206
1207   *)
1208     enable_fortran=no 
1209     ;;
1210  esac  
1211 fi
1212
1213 if test "$enable_mpi_suffix" = "check"; then
1214 case "${host_cpu}-${host_os}" in
1215
1216   rs6000*-aix* | powerpc*-aix*)
1217     enable_mpi_suffix=yes
1218     ;;
1219   *)
1220     enable_mpi_suffix=no 
1221     ;;
1222  esac  
1223 fi
1224
1225 if test "$enable_simplewater" = "check"; then
1226 case "${host_cpu}-${host_os}" in
1227
1228   mips*-irix*)
1229     enable_simplewater=yes 
1230     ;;
1231
1232   *)
1233     enable_simplewater=no 
1234     ;;
1235 esac    
1236 fi
1237
1238 if test "$enable_waterwater_loops" = "check"; then
1239 case "${host_cpu}-${host_os}" in
1240
1241    mips*-irix*)
1242      enable_waterwater_loops=no 
1243      ;;
1244
1245    *)
1246      enable_waterwater_loops=yes 
1247      ;;
1248 esac
1249 fi
1250
1251 if test "$enable_softwaresqrt" = "check"; then
1252 case "${host_cpu}-${host_os}" in
1253
1254   mips*-irix* | rs6000*-aix*)
1255     enable_softwaresqrt=no 
1256     ;;
1257
1258   *)
1259     enable_softwaresqrt=yes 
1260     ;;
1261 esac
1262 fi
1263
1264 if test "$with_mpi_environment" = "check" -a "$enable_mpi" = "yes"; then
1265 case "${host_cpu}" in
1266   mips*-irix*)
1267     with_mpi_environment="MPI_ENVIRONMENT"
1268     ;;
1269    *)
1270     with_mpi_environment=no
1271     ;;
1272 esac
1273 fi  
1274
1275 case "${host_cpu}" in
1276  alpha*)  
1277    cat >> confdefs.h <<\EOF
1278 #define USE_AXP_ASM 
1279 EOF
1280  
1281    ;;   
1282  *)      
1283    ;;
1284 esac
1285
1286 if test "$enable_fortran" = "yes"; then
1287   # vendor f77 before g77
1288   for ac_prog in f77 xlf xlf77 cf77 fl32 g77 fort77 f90 xlf90 pgf77 cf77 fort fort77 pgf90
1289 do
1290 # Extract the first word of "$ac_prog", so it can be a program name with args.
1291 set dummy $ac_prog; ac_word=$2
1292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1293 echo "configure:1294: checking for $ac_word" >&5
1294 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
1295   echo $ac_n "(cached) $ac_c" 1>&6
1296 else
1297   if test -n "$F77"; then
1298   ac_cv_prog_F77="$F77" # Let the user override the test.
1299 else
1300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1301   ac_dummy="$PATH"
1302   for ac_dir in $ac_dummy; do
1303     test -z "$ac_dir" && ac_dir=.
1304     if test -f $ac_dir/$ac_word; then
1305       ac_cv_prog_F77="$ac_prog"
1306       break
1307     fi
1308   done
1309   IFS="$ac_save_ifs"
1310 fi
1311 fi
1312 F77="$ac_cv_prog_F77"
1313 if test -n "$F77"; then
1314   echo "$ac_t""$F77" 1>&6
1315 else
1316   echo "$ac_t""no" 1>&6
1317 fi
1318
1319 test -n "$F77" && break
1320 done
1321
1322   if test -z "$F77"; then
1323   for ac_prog in g77 f77 f2c
1324 do
1325 # Extract the first word of "$ac_prog", so it can be a program name with args.
1326 set dummy $ac_prog; ac_word=$2
1327 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1328 echo "configure:1329: checking for $ac_word" >&5
1329 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
1330   echo $ac_n "(cached) $ac_c" 1>&6
1331 else
1332   if test -n "$F77"; then
1333   ac_cv_prog_F77="$F77" # Let the user override the test.
1334 else
1335   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1336   ac_dummy="$PATH"
1337   for ac_dir in $ac_dummy; do
1338     test -z "$ac_dir" && ac_dir=.
1339     if test -f $ac_dir/$ac_word; then
1340       ac_cv_prog_F77="$ac_prog"
1341       break
1342     fi
1343   done
1344   IFS="$ac_save_ifs"
1345 fi
1346 fi
1347 F77="$ac_cv_prog_F77"
1348 if test -n "$F77"; then
1349   echo "$ac_t""$F77" 1>&6
1350 else
1351   echo "$ac_t""no" 1>&6
1352 fi
1353
1354 test -n "$F77" && break
1355 done
1356
1357     test -z "$F77" && { echo "configure: error: no acceptable Fortran 77 compiler found in \$PATH" 1>&2; exit 1; }
1358 fi
1359
1360 echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1361 echo "configure:1362: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5
1362
1363 ac_ext=f
1364 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5'
1365 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1366 cross_compiling=$ac_cv_prog_f77_cross
1367
1368 cat > conftest.$ac_ext << EOF
1369
1370       program conftest
1371       end
1372
1373 EOF
1374 if { (eval echo configure:1375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1375   ac_cv_prog_f77_works=yes
1376   # If we can't run a trivial program, we are probably using a cross compiler.
1377   if (./conftest; exit) 2>/dev/null; then
1378     ac_cv_prog_f77_cross=no
1379   else
1380     ac_cv_prog_f77_cross=yes
1381   fi
1382 else
1383   echo "configure: failed program was:" >&5
1384   cat conftest.$ac_ext >&5
1385   ac_cv_prog_f77_works=no
1386 fi
1387 rm -fr conftest*
1388 ac_ext=c
1389 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1390 ac_cpp='$CPP $CPPFLAGS'
1391 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1392 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1393 cross_compiling=$ac_cv_prog_cc_cross
1394
1395 echo "$ac_t""$ac_cv_prog_f77_works" 1>&6
1396 if test $ac_cv_prog_f77_works = no; then
1397   { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; }
1398 fi
1399 echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1400 echo "configure:1401: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5
1401 echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6
1402 cross_compiling=$ac_cv_prog_f77_cross
1403
1404 echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6
1405 echo "configure:1406: checking whether we are using GNU Fortran 77" >&5
1406 if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then
1407   echo $ac_n "(cached) $ac_c" 1>&6
1408 else
1409   cat > conftest.fpp <<EOF
1410 #ifdef __GNUC__
1411   yes
1412 #endif
1413 EOF
1414 if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1415   ac_cv_prog_g77=yes
1416 else
1417   ac_cv_prog_g77=no
1418 fi
1419 fi
1420
1421 echo "$ac_t""$ac_cv_prog_g77" 1>&6
1422
1423 if test $ac_cv_prog_g77 = yes; then
1424   G77=yes
1425   ac_test_FFLAGS="${FFLAGS+set}"
1426   ac_save_FFLAGS="$FFLAGS"
1427   FFLAGS=
1428   echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6
1429 echo "configure:1430: checking whether $F77 accepts -g" >&5
1430 if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then
1431   echo $ac_n "(cached) $ac_c" 1>&6
1432 else
1433   cat > conftest.f << EOF
1434        program conftest
1435        end
1436 EOF
1437 if test -z "`$F77 -g -c conftest.f 2>&1`"; then
1438   ac_cv_prog_f77_g=yes
1439 else
1440   ac_cv_prog_f77_g=no
1441 fi
1442 rm -f conftest*
1443
1444 fi
1445
1446 echo "$ac_t""$ac_cv_prog_f77_g" 1>&6
1447   if test "$ac_test_FFLAGS" = set; then
1448     FFLAGS="$ac_save_FFLAGS"
1449   elif test $ac_cv_prog_f77_g = yes; then
1450     FFLAGS="-g -O2"
1451   else
1452     FFLAGS="-O2"
1453   fi
1454 else
1455   G77=
1456   test "${FFLAGS+set}" = set || FFLAGS="-g"
1457 fi
1458
1459   if test -z "$F77"; then
1460     { echo "configure: error: No fortran compiler found" 1>&2; exit 1; }
1461   fi
1462 fi
1463
1464 # Checks for programs.
1465 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1466 echo "configure:1467: checking whether ${MAKE-make} sets \${MAKE}" >&5
1467 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1468 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   cat > conftestmake <<\EOF
1472 all:
1473         @echo 'ac_maketemp="${MAKE}"'
1474 EOF
1475 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1476 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1477 if test -n "$ac_maketemp"; then
1478   eval ac_cv_prog_make_${ac_make}_set=yes
1479 else
1480   eval ac_cv_prog_make_${ac_make}_set=no
1481 fi
1482 rm -f conftestmake
1483 fi
1484 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1485   echo "$ac_t""yes" 1>&6
1486   SET_MAKE=
1487 else
1488   echo "$ac_t""no" 1>&6
1489   SET_MAKE="MAKE=${MAKE-make}"
1490 fi
1491
1492
1493 # Extract the first word of "cc", so it can be a program name with args.
1494 set dummy cc; ac_word=$2
1495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1496 echo "configure:1497: checking for $ac_word" >&5
1497 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1498   echo $ac_n "(cached) $ac_c" 1>&6
1499 else
1500   if test -n "$CC"; then
1501   ac_cv_prog_CC="$CC" # Let the user override the test.
1502 else
1503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1504   ac_dummy="$PATH"
1505   for ac_dir in $ac_dummy; do
1506     test -z "$ac_dir" && ac_dir=.
1507     if test -f $ac_dir/$ac_word; then
1508       ac_cv_prog_CC="cc"
1509       break
1510     fi
1511   done
1512   IFS="$ac_save_ifs"
1513 fi
1514 fi
1515 CC="$ac_cv_prog_CC"
1516 if test -n "$CC"; then
1517   echo "$ac_t""$CC" 1>&6
1518 else
1519   echo "$ac_t""no" 1>&6
1520 fi
1521  # do vendor cc before gcc
1522 # Extract the first word of "gcc", so it can be a program name with args.
1523 set dummy gcc; ac_word=$2
1524 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1525 echo "configure:1526: checking for $ac_word" >&5
1526 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1527   echo $ac_n "(cached) $ac_c" 1>&6
1528 else
1529   if test -n "$CC"; then
1530   ac_cv_prog_CC="$CC" # Let the user override the test.
1531 else
1532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1533   ac_dummy="$PATH"
1534   for ac_dir in $ac_dummy; do
1535     test -z "$ac_dir" && ac_dir=.
1536     if test -f $ac_dir/$ac_word; then
1537       ac_cv_prog_CC="gcc"
1538       break
1539     fi
1540   done
1541   IFS="$ac_save_ifs"
1542 fi
1543 fi
1544 CC="$ac_cv_prog_CC"
1545 if test -n "$CC"; then
1546   echo "$ac_t""$CC" 1>&6
1547 else
1548   echo "$ac_t""no" 1>&6
1549 fi
1550
1551 if test -z "$CC"; then
1552   # Extract the first word of "cc", so it can be a program name with args.
1553 set dummy cc; ac_word=$2
1554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1555 echo "configure:1556: checking for $ac_word" >&5
1556 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1557   echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559   if test -n "$CC"; then
1560   ac_cv_prog_CC="$CC" # Let the user override the test.
1561 else
1562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1563   ac_prog_rejected=no
1564   ac_dummy="$PATH"
1565   for ac_dir in $ac_dummy; do
1566     test -z "$ac_dir" && ac_dir=.
1567     if test -f $ac_dir/$ac_word; then
1568       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1569         ac_prog_rejected=yes
1570         continue
1571       fi
1572       ac_cv_prog_CC="cc"
1573       break
1574     fi
1575   done
1576   IFS="$ac_save_ifs"
1577 if test $ac_prog_rejected = yes; then
1578   # We found a bogon in the path, so make sure we never use it.
1579   set dummy $ac_cv_prog_CC
1580   shift
1581   if test $# -gt 0; then
1582     # We chose a different compiler from the bogus one.
1583     # However, it has the same basename, so the bogon will be chosen
1584     # first if we set CC to just the basename; use the full file name.
1585     shift
1586     set dummy "$ac_dir/$ac_word" "$@"
1587     shift
1588     ac_cv_prog_CC="$@"
1589   fi
1590 fi
1591 fi
1592 fi
1593 CC="$ac_cv_prog_CC"
1594 if test -n "$CC"; then
1595   echo "$ac_t""$CC" 1>&6
1596 else
1597   echo "$ac_t""no" 1>&6
1598 fi
1599
1600   if test -z "$CC"; then
1601     case "`uname -s`" in
1602     *win32* | *WIN32*)
1603       # Extract the first word of "cl", so it can be a program name with args.
1604 set dummy cl; ac_word=$2
1605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1606 echo "configure:1607: checking for $ac_word" >&5
1607 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1608   echo $ac_n "(cached) $ac_c" 1>&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1614   ac_dummy="$PATH"
1615   for ac_dir in $ac_dummy; do
1616     test -z "$ac_dir" && ac_dir=.
1617     if test -f $ac_dir/$ac_word; then
1618       ac_cv_prog_CC="cl"
1619       break
1620     fi
1621   done
1622   IFS="$ac_save_ifs"
1623 fi
1624 fi
1625 CC="$ac_cv_prog_CC"
1626 if test -n "$CC"; then
1627   echo "$ac_t""$CC" 1>&6
1628 else
1629   echo "$ac_t""no" 1>&6
1630 fi
1631  ;;
1632     esac
1633   fi
1634   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1635 fi
1636
1637 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1638 echo "configure:1639: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1639
1640 ac_ext=c
1641 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1642 ac_cpp='$CPP $CPPFLAGS'
1643 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1644 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1645 cross_compiling=$ac_cv_prog_cc_cross
1646
1647 cat > conftest.$ac_ext << EOF
1648
1649 #line 1650 "configure"
1650 #include "confdefs.h"
1651
1652 main(){return(0);}
1653 EOF
1654 if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1655   ac_cv_prog_cc_works=yes
1656   # If we can't run a trivial program, we are probably using a cross compiler.
1657   if (./conftest; exit) 2>/dev/null; then
1658     ac_cv_prog_cc_cross=no
1659   else
1660     ac_cv_prog_cc_cross=yes
1661   fi
1662 else
1663   echo "configure: failed program was:" >&5
1664   cat conftest.$ac_ext >&5
1665   ac_cv_prog_cc_works=no
1666 fi
1667 rm -fr conftest*
1668 ac_ext=c
1669 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1670 ac_cpp='$CPP $CPPFLAGS'
1671 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1672 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1673 cross_compiling=$ac_cv_prog_cc_cross
1674
1675 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1676 if test $ac_cv_prog_cc_works = no; then
1677   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1678 fi
1679 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1680 echo "configure:1681: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1681 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1682 cross_compiling=$ac_cv_prog_cc_cross
1683
1684 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1685 echo "configure:1686: checking whether we are using GNU C" >&5
1686 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1687   echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689   cat > conftest.c <<EOF
1690 #ifdef __GNUC__
1691   yes;
1692 #endif
1693 EOF
1694 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1695   ac_cv_prog_gcc=yes
1696 else
1697   ac_cv_prog_gcc=no
1698 fi
1699 fi
1700
1701 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1702
1703 if test $ac_cv_prog_gcc = yes; then
1704   GCC=yes
1705 else
1706   GCC=
1707 fi
1708
1709 ac_test_CFLAGS="${CFLAGS+set}"
1710 ac_save_CFLAGS="$CFLAGS"
1711 CFLAGS=
1712 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1713 echo "configure:1714: checking whether ${CC-cc} accepts -g" >&5
1714 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1715   echo $ac_n "(cached) $ac_c" 1>&6
1716 else
1717   echo 'void f(){}' > conftest.c
1718 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1719   ac_cv_prog_cc_g=yes
1720 else
1721   ac_cv_prog_cc_g=no
1722 fi
1723 rm -f conftest*
1724
1725 fi
1726
1727 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1728 if test "$ac_test_CFLAGS" = set; then
1729   CFLAGS="$ac_save_CFLAGS"
1730 elif test $ac_cv_prog_cc_g = yes; then
1731   if test "$GCC" = yes; then
1732     CFLAGS="-g -O2"
1733   else
1734     CFLAGS="-g"
1735   fi
1736 else
1737   if test "$GCC" = yes; then
1738     CFLAGS="-O2"
1739   else
1740     CFLAGS=
1741   fi
1742 fi
1743
1744
1745 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1746 echo "configure:1747: checking how to run the C preprocessor" >&5
1747 # On Suns, sometimes $CPP names a directory.
1748 if test -n "$CPP" && test -d "$CPP"; then
1749   CPP=
1750 fi
1751 if test -z "$CPP"; then
1752 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1753   echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755     # This must be in double quotes, not single quotes, because CPP may get
1756   # substituted into the Makefile and "${CC-cc}" will confuse make.
1757   CPP="${CC-cc} -E"
1758   # On the NeXT, cc -E runs the code through the compiler's parser,
1759   # not just through cpp.
1760   cat > conftest.$ac_ext <<EOF
1761 #line 1762 "configure"
1762 #include "confdefs.h"
1763 #include <assert.h>
1764 Syntax Error
1765 EOF
1766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1767 { (eval echo configure:1768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1769 if test -z "$ac_err"; then
1770   :
1771 else
1772   echo "$ac_err" >&5
1773   echo "configure: failed program was:" >&5
1774   cat conftest.$ac_ext >&5
1775   rm -rf conftest*
1776   CPP="${CC-cc} -E -traditional-cpp"
1777   cat > conftest.$ac_ext <<EOF
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780 #include <assert.h>
1781 Syntax Error
1782 EOF
1783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1784 { (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1786 if test -z "$ac_err"; then
1787   :
1788 else
1789   echo "$ac_err" >&5
1790   echo "configure: failed program was:" >&5
1791   cat conftest.$ac_ext >&5
1792   rm -rf conftest*
1793   CPP="${CC-cc} -nologo -E"
1794   cat > conftest.$ac_ext <<EOF
1795 #line 1796 "configure"
1796 #include "confdefs.h"
1797 #include <assert.h>
1798 Syntax Error
1799 EOF
1800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1801 { (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1803 if test -z "$ac_err"; then
1804   :
1805 else
1806   echo "$ac_err" >&5
1807   echo "configure: failed program was:" >&5
1808   cat conftest.$ac_ext >&5
1809   rm -rf conftest*
1810   CPP=/lib/cpp
1811 fi
1812 rm -f conftest*
1813 fi
1814 rm -f conftest*
1815 fi
1816 rm -f conftest*
1817   ac_cv_prog_CPP="$CPP"
1818 fi
1819   CPP="$ac_cv_prog_CPP"
1820 else
1821   ac_cv_prog_CPP="$CPP"
1822 fi
1823 echo "$ac_t""$CPP" 1>&6
1824
1825 am_make=${MAKE-make}
1826 # BSD make uses .include
1827 cat > confinc << 'END'
1828 doit:
1829         @echo done
1830 END
1831 # If we don't find an include directive, just comment out the code.
1832 echo $ac_n "checking for style of include used by $am_make""... $ac_c" 1>&6
1833 echo "configure:1834: checking for style of include used by $am_make" >&5
1834 _am_include='#'
1835 for am_inc in include .include; do
1836    echo "$am_inc confinc" > confmf
1837    if test "`$am_make -f confmf 2> /dev/null`" = "done"; then
1838       _am_include=$am_inc
1839       break
1840    fi
1841 done
1842
1843 echo "$ac_t""$_am_include" 1>&6
1844 rm -f confinc confmf
1845
1846
1847 depcc="$CC"
1848 depcpp="$CPP"
1849
1850
1851
1852 echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
1853 echo "configure:1854: checking dependency style of $depcc" >&5
1854 if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
1855   echo $ac_n "(cached) $ac_c" 1>&6
1856 else
1857   if test -z "$AMDEP"; then
1858   # We make a subdir and do the tests there.  Otherwise we can end up
1859   # making bogus files that we don't know about and never remove.  For
1860   # instance it was reported that on HP-UX the gcc test will end up
1861   # making a dummy file named `D' -- because `-MD' means `put the output
1862   # in D'.
1863   mkdir confdir
1864   # Copy depcomp to subdir because otherwise we won't find it if we're
1865   # using a relative directory.
1866   cp "$am_depcomp" confdir
1867   cd confdir
1868
1869   am_cv_CC_dependencies_compiler_type=none
1870   for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "./depcomp"`; do
1871     # We need to recreate these files for each test, as the compiler may
1872     # overwrite some of them when testing with obscure command lines.
1873     # This happens at least with the AIX C compiler.
1874     echo '#include "conftest.h"' > conftest.c
1875     echo 'int i;' > conftest.h
1876
1877     case "$depmode" in
1878     nosideeffect)
1879       # after this tag, mechanisms are not by side-effect, so they'll
1880       # only be used when explicitly requested
1881       if test "x$enable_dependency_tracking" = xyes; then
1882         continue
1883       else
1884         break
1885       fi
1886       ;;
1887     none) break ;;
1888     esac
1889     # We check with `-c' and `-o' for the sake of the "dashmstdout"
1890     # mode.  It turns out that the SunPro C++ compiler does not properly
1891     # handle `-M -o', and we need to detect this.
1892     if depmode="$depmode" \
1893        source=conftest.c object=conftest.o \
1894        depfile=conftest.Po tmpdepfile=conftest.TPo \
1895        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
1896        grep conftest.h conftest.Po > /dev/null 2>&1; then
1897       am_cv_CC_dependencies_compiler_type="$depmode"
1898       break
1899     fi
1900   done
1901
1902   cd ..
1903   rm -rf confdir
1904 else
1905   am_cv_CC_dependencies_compiler_type=none
1906 fi
1907
1908 fi
1909
1910 echo "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
1911 CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
1912
1913
1914 BUILD_CC=$CC
1915
1916
1917 if test "$enable_fortran" = "yes"; then
1918   echo $ac_n "checking for Fortran 77 libraries""... $ac_c" 1>&6
1919 echo "configure:1920: checking for Fortran 77 libraries" >&5
1920
1921
1922 if eval "test \"`echo '$''{'ac_cv_flibs'+set}'`\" = set"; then
1923   echo $ac_n "(cached) $ac_c" 1>&6
1924 else
1925   echo "      END" > conftest.f
1926 foutput=`${F77} -v -o conftest conftest.f 2>&1`
1927 xlf_p=`echo $foutput | grep xlfentry`
1928 if test -n "$xlf_p"; then
1929   foutput=`echo $foutput | sed 's/,/ /g'`
1930 fi
1931 ld_run_path=`echo $foutput | \
1932   sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`
1933 case "$ld_run_path" in
1934   /*)
1935     if test "$ac_cv_prog_gcc" = yes; then
1936       ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
1937     else
1938       ld_run_path="-R $ld_run_path"
1939     fi
1940   ;;
1941   *)
1942     ld_run_path=
1943   ;;
1944 esac
1945 flibs=
1946 lflags=
1947 want_arg=
1948 for arg in $foutput; do
1949   old_want_arg=$want_arg
1950   want_arg=
1951   if test -n "$old_want_arg"; then
1952     case "$arg" in
1953       -*)
1954         old_want_arg=
1955       ;;
1956     esac
1957   fi
1958   case "$old_want_arg" in
1959     '')
1960       case $arg in
1961         /*.a)
1962           exists=false
1963           for f in $lflags; do
1964             if test x$arg = x$f; then
1965               exists=true
1966             fi
1967           done
1968           if $exists; then
1969             arg=
1970           else
1971             lflags="$lflags $arg"
1972           fi
1973         ;;
1974         -bI:*)
1975           exists=false
1976           for f in $lflags; do
1977             if test x$arg = x$f; then
1978               exists=true
1979             fi
1980           done
1981           if $exists; then
1982             arg=
1983           else
1984             if test "$ac_cv_prog_gcc" = yes; then
1985               lflags="$lflags -Xlinker $arg"
1986             else
1987               lflags="$lflags $arg"
1988             fi
1989           fi
1990         ;;
1991         -lang* | -lcrt0.o | -lc | -lgcc)
1992           arg=
1993         ;;
1994         -[lLR])
1995           want_arg=$arg
1996           arg=
1997         ;;
1998         -[lLR]*)
1999           exists=false
2000           for f in $lflags; do
2001             if test x$arg = x$f; then
2002               exists=true
2003             fi
2004           done
2005           if $exists; then
2006             arg=
2007           else
2008             case "$arg" in
2009               -lkernel32)
2010                 case "$canonical_host_type" in
2011                   *-*-cygwin*)
2012                     arg=
2013                   ;;
2014                   *)
2015                     lflags="$lflags $arg"
2016                   ;;
2017                 esac
2018               ;;
2019               -lm)
2020               ;;
2021               *)
2022                 lflags="$lflags $arg"
2023               ;;
2024             esac
2025           fi
2026         ;;
2027         -u)
2028           want_arg=$arg
2029           arg=
2030         ;;
2031         -Y)
2032           want_arg=$arg
2033           arg=
2034         ;;
2035         *)
2036           arg=
2037         ;;
2038       esac
2039     ;;
2040     -[lLR])
2041       arg="$old_want_arg $arg"
2042     ;;
2043     -u)
2044       arg="-u $arg"
2045     ;;
2046     -Y)
2047       arg=`echo $arg | sed -e 's%^P,%%'`
2048       SAVE_IFS=$IFS
2049       IFS=:
2050       list=
2051       for elt in $arg; do
2052         list="$list -L$elt"
2053       done
2054       IFS=$SAVE_IFS
2055       arg="$list"
2056     ;;
2057   esac
2058   if test -n "$arg"; then
2059     flibs="$flibs $arg"
2060   fi
2061 done
2062 if test -n "$ld_run_path"; then
2063   flibs_result="$ld_run_path $flibs"
2064 else
2065   flibs_result="$flibs"
2066 fi
2067 ac_cv_flibs="$flibs_result"
2068 fi
2069
2070 FLIBS="$ac_cv_flibs"
2071 echo "$ac_t""$FLIBS" 1>&6
2072   
2073   
2074
2075
2076
2077 echo $ac_n "checking fortran name mangling""... $ac_c" 1>&6
2078 echo "configure:2079: checking fortran name mangling" >&5
2079 cat > mangle-func.f <<EOF
2080       subroutine foobar()
2081       return
2082       end
2083       subroutine foo_bar()
2084       return
2085       end
2086 EOF
2087 ac_try='$F77 -c $FFLAGS mangle-func.f 1>&5'
2088 if { (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then
2089   ac_try=""
2090 else
2091   echo "configure: failed program was:" >&5
2092   cat mangle-func.f >&5
2093   rm -f mangle-func*
2094   { echo "configure: error: failed to compile fortran test program" 1>&2; exit 1; }
2095 fi
2096
2097 ac_f77_mangle_type=unknown
2098
2099 ac_ext=c
2100 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2101 ac_cpp='$CPP $CPPFLAGS'
2102 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2103 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2104 cross_compiling=$ac_cv_prog_cc_cross
2105
2106 ac_save_LIBS="$LIBS"
2107 LIBS="mangle-func.o $FLIBS $LIBS"
2108 cat > conftest.$ac_ext <<EOF
2109 #line 2110 "configure"
2110 #include "confdefs.h"
2111
2112 int main() {
2113 foobar();
2114 ; return 0; }
2115 EOF
2116 if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2117   rm -rf conftest*
2118   ac_f77_mangle_type=lowercase
2119 else
2120   echo "configure: failed program was:" >&5
2121   cat conftest.$ac_ext >&5
2122   rm -rf conftest*
2123   cat > conftest.$ac_ext <<EOF
2124 #line 2125 "configure"
2125 #include "confdefs.h"
2126
2127 int main() {
2128 foobar_();
2129 ; return 0; }
2130 EOF
2131 if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2132   rm -rf conftest*
2133   ac_f77_mangle_type=lowercase-underscore
2134 else
2135   echo "configure: failed program was:" >&5
2136   cat conftest.$ac_ext >&5
2137   rm -rf conftest*
2138   cat > conftest.$ac_ext <<EOF
2139 #line 2140 "configure"
2140 #include "confdefs.h"
2141
2142 int main() {
2143 FOOBAR();
2144 ; return 0; }
2145 EOF
2146 if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2147   rm -rf conftest*
2148   ac_f77_mangle_type=uppercase
2149 else
2150   echo "configure: failed program was:" >&5
2151   cat conftest.$ac_ext >&5
2152   rm -rf conftest*
2153   cat > conftest.$ac_ext <<EOF
2154 #line 2155 "configure"
2155 #include "confdefs.h"
2156
2157 int main() {
2158 FOOBAR_();
2159 ; return 0; }
2160 EOF
2161 if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2162   rm -rf conftest*
2163   ac_f77_mangle_type=uppercase-underscore
2164 else
2165   echo "configure: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167 fi
2168 rm -f conftest*
2169 fi
2170 rm -f conftest*
2171 fi
2172 rm -f conftest*
2173 fi
2174 rm -f conftest*
2175 LIBS="$ac_save_LIBS"
2176 ac_ext=c
2177 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2178 ac_cpp='$CPP $CPPFLAGS'
2179 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2180 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2181 cross_compiling=$ac_cv_prog_cc_cross
2182
2183 echo "$ac_t""$ac_f77_mangle_type" 1>&6
2184
2185 mangle_try=unknown
2186 case $ac_f77_mangle_type in
2187         lowercase)
2188                 cat >> confdefs.h <<\EOF
2189 #define F77_NAME_LOWERCASE 
2190 EOF
2191
2192                 mangle_try=foo_bar_
2193                 ;;
2194         lowercase-underscore)
2195                 cat >> confdefs.h <<\EOF
2196 #define F77_NAME_LOWERCASE_UNDERSCORE 
2197 EOF
2198
2199                 mangle_try=foo_bar__
2200                 ;;
2201         uppercase)
2202                 cat >> confdefs.h <<\EOF
2203 #define F77_NAME_UPPERCASE 
2204 EOF
2205
2206                 mangle_try=FOO_BAR_
2207                 ;;
2208         uppercase-underscore)
2209                 cat >> confdefs.h <<\EOF
2210 #define F77_NAME_UPPERCASE_UNDERSCORE 
2211 EOF
2212
2213                 mangle_try=FOO_BAR__
2214                 ;;
2215 esac
2216
2217 echo $ac_n "checking whether f77 functions with underscore get an extra underscore""... $ac_c" 1>&6
2218 echo "configure:2219: checking whether f77 functions with underscore get an extra underscore" >&5
2219
2220
2221 ac_ext=c
2222 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2223 ac_cpp='$CPP $CPPFLAGS'
2224 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2225 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2226 cross_compiling=$ac_cv_prog_cc_cross
2227
2228 ac_save_LIBS="$LIBS"
2229 LIBS="mangle-func.o $FLIBS $LIBS"
2230 cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233
2234 int main() {
2235 $mangle_try();
2236 ; return 0; }
2237 EOF
2238 if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2239   rm -rf conftest*
2240   ac_f77_mangle_underscore=yes;
2241              cat >> confdefs.h <<\EOF
2242 #define F77_NAME_EXTRA_UNDERSCORE 
2243 EOF
2244
2245 else
2246   echo "configure: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   rm -rf conftest*
2249   ac_f77_mangle_underscore=no
2250 fi
2251 rm -f conftest*
2252 LIBS="$ac_save_LIBS"
2253 ac_ext=c
2254 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2257 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2258 cross_compiling=$ac_cv_prog_cc_cross
2259
2260 rm -f mangle-func*
2261 echo "$ac_t""$ac_f77_mangle_underscore" 1>&6
2262
2263 fi
2264
2265 # if we are using mpi, also get an MPICC. We cannot set that in the PROG_CC macro
2266 # above, since the autoconf checks that the created file can be executed. This would
2267 # fail on platforms where MPI executables can only be run through a batchqueue.
2268
2269 if test "$enable_mpi" = "yes"; then
2270   for ac_prog in mpicc mpcc mpxlf hcc
2271 do
2272 # Extract the first word of "$ac_prog", so it can be a program name with args.
2273 set dummy $ac_prog; ac_word=$2
2274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2275 echo "configure:2276: checking for $ac_word" >&5
2276 if eval "test \"`echo '$''{'ac_cv_prog_MPICC'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   if test -n "$MPICC"; then
2280   ac_cv_prog_MPICC="$MPICC" # Let the user override the test.
2281 else
2282   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2283   ac_dummy="$PATH"
2284   for ac_dir in $ac_dummy; do
2285     test -z "$ac_dir" && ac_dir=.
2286     if test -f $ac_dir/$ac_word; then
2287       ac_cv_prog_MPICC="$ac_prog"
2288       break
2289     fi
2290   done
2291   IFS="$ac_save_ifs"
2292 fi
2293 fi
2294 MPICC="$ac_cv_prog_MPICC"
2295 if test -n "$MPICC"; then
2296   echo "$ac_t""$MPICC" 1>&6
2297 else
2298   echo "$ac_t""no" 1>&6
2299 fi
2300
2301 test -n "$MPICC" && break
2302 done
2303 test -n "$MPICC" || MPICC="$CC"
2304         
2305 # now change the normal cc to the MPI one - see the comment above.
2306   CC=$MPICC
2307   echo $ac_n "checking whether the MPI cc command works""... $ac_c" 1>&6
2308 echo "configure:2309: checking whether the MPI cc command works" >&5 # be paranoid
2309   cat > conftest.$ac_ext <<EOF
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312 #include <mpi.h>
2313 int main() {
2314 int argc; char **argv; MPI_Init(&argc,&argv);
2315 ; return 0; }
2316 EOF
2317 if { (eval echo configure:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2318   rm -rf conftest*
2319   echo "$ac_t""yes" 1>&6
2320 else
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   { echo "configure: error: Cannot compile and link MPI code with $CC" 1>&2; exit 1; }
2325 fi
2326 rm -f conftest*
2327   
2328
2329 if true; then
2330   USE_MPI_TRUE=
2331   USE_MPI_FALSE='#'
2332 else
2333   USE_MPI_TRUE='#'
2334   USE_MPI_FALSE=
2335 fi
2336 else
2337   
2338
2339 if false; then
2340   USE_MPI_TRUE=
2341   USE_MPI_FALSE='#'
2342 else
2343   USE_MPI_TRUE='#'
2344   USE_MPI_FALSE=
2345 fi
2346 fi
2347
2348 # Find a good install program.  We prefer a C program (faster),
2349 # so one script is as good as another.  But avoid the broken or
2350 # incompatible versions:
2351 # SysV /etc/install, /usr/sbin/install
2352 # SunOS /usr/etc/install
2353 # IRIX /sbin/install
2354 # AIX /bin/install
2355 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2356 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2357 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2358 # ./install, which can be erroneously created by make from ./install.sh.
2359 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2360 echo "configure:2361: checking for a BSD compatible install" >&5
2361 if test -z "$INSTALL"; then
2362 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2363   echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2366   for ac_dir in $PATH; do
2367     # Account for people who put trailing slashes in PATH elements.
2368     case "$ac_dir/" in
2369     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2370     *)
2371       # OSF1 and SCO ODT 3.0 have their own names for install.
2372       # Don't use installbsd from OSF since it installs stuff as root
2373       # by default.
2374       for ac_prog in ginstall scoinst install; do
2375         if test -f $ac_dir/$ac_prog; then
2376           if test $ac_prog = install &&
2377             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2378             # AIX install.  It has an incompatible calling convention.
2379             :
2380           else
2381             ac_cv_path_install="$ac_dir/$ac_prog -c"
2382             break 2
2383           fi
2384         fi
2385       done
2386       ;;
2387     esac
2388   done
2389   IFS="$ac_save_IFS"
2390
2391 fi
2392   if test "${ac_cv_path_install+set}" = set; then
2393     INSTALL="$ac_cv_path_install"
2394   else
2395     # As a last resort, use the slow shell script.  We don't cache a
2396     # path for INSTALL within a source directory, because that will
2397     # break other packages using the cache if that directory is
2398     # removed, or if the path is relative.
2399     INSTALL="$ac_install_sh"
2400   fi
2401 fi
2402 echo "$ac_t""$INSTALL" 1>&6
2403
2404 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2405 # It thinks the first close brace ends the variable substitution.
2406 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2407
2408 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2409
2410 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2411
2412 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2413 echo "configure:2414: checking how to run the C preprocessor" >&5
2414 # On Suns, sometimes $CPP names a directory.
2415 if test -n "$CPP" && test -d "$CPP"; then
2416   CPP=
2417 fi
2418 if test -z "$CPP"; then
2419 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2420   echo $ac_n "(cached) $ac_c" 1>&6
2421 else
2422     # This must be in double quotes, not single quotes, because CPP may get
2423   # substituted into the Makefile and "${CC-cc}" will confuse make.
2424   CPP="${CC-cc} -E"
2425   # On the NeXT, cc -E runs the code through the compiler's parser,
2426   # not just through cpp.
2427   cat > conftest.$ac_ext <<EOF
2428 #line 2429 "configure"
2429 #include "confdefs.h"
2430 #include <assert.h>
2431 Syntax Error
2432 EOF
2433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2434 { (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2436 if test -z "$ac_err"; then
2437   :
2438 else
2439   echo "$ac_err" >&5
2440   echo "configure: failed program was:" >&5
2441   cat conftest.$ac_ext >&5
2442   rm -rf conftest*
2443   CPP="${CC-cc} -E -traditional-cpp"
2444   cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 #include <assert.h>
2448 Syntax Error
2449 EOF
2450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2451 { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2453 if test -z "$ac_err"; then
2454   :
2455 else
2456   echo "$ac_err" >&5
2457   echo "configure: failed program was:" >&5
2458   cat conftest.$ac_ext >&5
2459   rm -rf conftest*
2460   CPP="${CC-cc} -nologo -E"
2461   cat > conftest.$ac_ext <<EOF
2462 #line 2463 "configure"
2463 #include "confdefs.h"
2464 #include <assert.h>
2465 Syntax Error
2466 EOF
2467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2468 { (eval echo configure:2469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2470 if test -z "$ac_err"; then
2471   :
2472 else
2473   echo "$ac_err" >&5
2474   echo "configure: failed program was:" >&5
2475   cat conftest.$ac_ext >&5
2476   rm -rf conftest*
2477   CPP=/lib/cpp
2478 fi
2479 rm -f conftest*
2480 fi
2481 rm -f conftest*
2482 fi
2483 rm -f conftest*
2484   ac_cv_prog_CPP="$CPP"
2485 fi
2486   CPP="$ac_cv_prog_CPP"
2487 else
2488   ac_cv_prog_CPP="$CPP"
2489 fi
2490 echo "$ac_t""$CPP" 1>&6
2491
2492
2493 # A rather complicated check for the nasm program and x86 assembly capabilities
2494 # to run under windows we must insert a test a change nasm "-f elf" to "-f win32"
2495 if test "$x86" = "yes"; then
2496   if  test "$enable_sse" = "yes" -o "$enable_3dnow" = "yes"; then
2497     if test "$enable_double" = "yes"; then
2498       echo "configure: warning: SSE/3Dnow assembly can only be used in single precision" 1>&2
2499       enable_sse=no
2500       enable_3dnow=no
2501     else 
2502       # Extract the first word of "nasm", so it can be a program name with args.
2503 set dummy nasm; ac_word=$2
2504 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2505 echo "configure:2506: checking for $ac_word" >&5
2506 if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
2507   echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509   case "$NASM" in
2510   /*)
2511   ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
2512   ;;
2513   ?:/*)                  
2514   ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
2515   ;;
2516   *)
2517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2518   ac_dummy="$PATH"
2519   for ac_dir in $ac_dummy; do 
2520     test -z "$ac_dir" && ac_dir=.
2521     if test -f $ac_dir/$ac_word; then
2522       ac_cv_path_NASM="$ac_dir/$ac_word"
2523       break
2524     fi
2525   done
2526   IFS="$ac_save_ifs"
2527   test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
2528   ;;
2529 esac
2530 fi
2531 NASM="$ac_cv_path_NASM"
2532 if test -n "$NASM"; then
2533   echo "$ac_t""$NASM" 1>&6
2534 else
2535   echo "$ac_t""no" 1>&6
2536 fi
2537
2538       NASMFLAGS="-f elf" 
2539       
2540       if test "$NASM" = "no"; then 
2541           { echo "configure: error: Nasm is required for SSE and 3DNow loops." 1>&2; exit 1; }
2542       fi
2543       if test "$enable_sse" = "yes"; then
2544         echo $ac_n "checking whether nasm supports SSE instructions""... $ac_c" 1>&6
2545 echo "configure:2546: checking whether nasm supports SSE instructions" >&5
2546 cat > conftest_sse.s << EOF
2547         global checksse 
2548 checksse:
2549         emms
2550         xorps xmm0,xmm0
2551         emms
2552         ret
2553 EOF
2554         if { ac_try='$NASM conftest_sse.s'; { (eval echo configure:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2555           echo "$ac_t""yes" 1>&6
2556         else
2557           echo "$ac_t""no" 1>&6 
2558           { echo "configure: error: Download a patched nasm from the Gromacs homepage,     
2559                        or disable SSE assembly." 1>&2; exit 1; }
2560         fi
2561       fi        
2562       if test "$enable_3dnow" = "yes"; then
2563         echo $ac_n "checking whether nasm supports extended 3DNow instructions""... $ac_c" 1>&6
2564 echo "configure:2565: checking whether nasm supports extended 3DNow instructions" >&5
2565 cat > conftest_3dnow.s << EOF
2566         global check3dnow       
2567 check3dnow:     
2568         femms
2569         pswapd mm0,mm0
2570         femms
2571         ret
2572 EOF
2573         if { ac_try='$NASM -f elf conftest_3dnow.s'; { (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2574           echo "$ac_t""yes" 1>&6
2575         else
2576           echo "$ac_t""no" 1>&6
2577           { echo "configure: error: Download a patched nasm from the Gromacs homepage,
2578                        or disable 3DNow assembly." 1>&2; exit 1; }
2579         fi
2580       fi
2581     fi
2582   fi
2583 else # not x86
2584 enable_sse=no
2585 enable_3dnow=no
2586 fi
2587
2588 # Extract the first word of "ident", so it can be a program name with args.
2589 set dummy ident; ac_word=$2
2590 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2591 echo "configure:2592: checking for $ac_word" >&5
2592 if eval "test \"`echo '$''{'ac_cv_path_IDENT'+set}'`\" = set"; then
2593   echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595   case "$IDENT" in
2596   /*)
2597   ac_cv_path_IDENT="$IDENT" # Let the user override the test with a path.
2598   ;;
2599   ?:/*)                  
2600   ac_cv_path_IDENT="$IDENT" # Let the user override the test with a dos path.
2601   ;;
2602   *)
2603   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2604   ac_dummy="$PATH"
2605   for ac_dir in $ac_dummy; do 
2606     test -z "$ac_dir" && ac_dir=.
2607     if test -f $ac_dir/$ac_word; then
2608       ac_cv_path_IDENT="$ac_dir/$ac_word"
2609       break
2610     fi
2611   done
2612   IFS="$ac_save_ifs"
2613   test -z "$ac_cv_path_IDENT" && ac_cv_path_IDENT="no"
2614   ;;
2615 esac
2616 fi
2617 IDENT="$ac_cv_path_IDENT"
2618 if test -n "$IDENT"; then
2619   echo "$ac_t""$IDENT" 1>&6
2620 else
2621   echo "$ac_t""no" 1>&6
2622 fi
2623
2624 if test "$IDENT" != "no"; then
2625   # seems as if we have the ident program, but does the
2626   # compiler support it?
2627   echo $ac_n "checking whether the compiler supports ident""... $ac_c" 1>&6
2628 echo "configure:2629: checking whether the compiler supports ident" >&5 
2629   cat > conftest.$ac_ext <<EOF
2630 #line 2631 "configure"
2631 #include "confdefs.h"
2632 #ident  "@(#) file.h 1.1 12/16/92"
2633 EOF
2634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2635 { (eval echo configure:2636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2637 if test -z "$ac_err"; then
2638   rm -rf conftest*
2639   
2640     echo "$ac_t""yes" 1>&6 
2641     cat >> confdefs.h <<\EOF
2642 #define HAVE_IDENT 
2643 EOF
2644
2645 else
2646   echo "$ac_err" >&5
2647   echo "configure: failed program was:" >&5
2648   cat conftest.$ac_ext >&5
2649   rm -rf conftest*
2650   echo "$ac_t""no" 1>&6
2651 fi
2652 rm -f conftest*
2653 fi
2654
2655 # Extract the first word of "ranlib", so it can be a program name with args.
2656 set dummy ranlib; ac_word=$2
2657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2658 echo "configure:2659: checking for $ac_word" >&5
2659 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2660   echo $ac_n "(cached) $ac_c" 1>&6
2661 else
2662   if test -n "$RANLIB"; then
2663   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2664 else
2665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2666   ac_dummy="$PATH"
2667   for ac_dir in $ac_dummy; do
2668     test -z "$ac_dir" && ac_dir=.
2669     if test -f $ac_dir/$ac_word; then
2670       ac_cv_prog_RANLIB="ranlib"
2671       break
2672     fi
2673   done
2674   IFS="$ac_save_ifs"
2675   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2676 fi
2677 fi
2678 RANLIB="$ac_cv_prog_RANLIB"
2679 if test -n "$RANLIB"; then
2680   echo "$ac_t""$RANLIB" 1>&6
2681 else
2682   echo "$ac_t""no" 1>&6
2683 fi
2684
2685 for ac_func in strcasecmp
2686 do
2687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2688 echo "configure:2689: checking for $ac_func" >&5
2689 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2690   echo $ac_n "(cached) $ac_c" 1>&6
2691 else
2692   cat > conftest.$ac_ext <<EOF
2693 #line 2694 "configure"
2694 #include "confdefs.h"
2695 /* System header to define __stub macros and hopefully few prototypes,
2696     which can conflict with char $ac_func(); below.  */
2697 #include <assert.h>
2698 /* Override any gcc2 internal prototype to avoid an error.  */
2699 /* We use char because int might match the return type of a gcc2
2700     builtin and then its argument prototype would still apply.  */
2701 char $ac_func();
2702
2703 int main() {
2704
2705 /* The GNU C library defines this for functions which it implements
2706     to always fail with ENOSYS.  Some functions are actually named
2707     something starting with __ and the normal name is an alias.  */
2708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2709 choke me
2710 #else
2711 $ac_func();
2712 #endif
2713
2714 ; return 0; }
2715 EOF
2716 if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2717   rm -rf conftest*
2718   eval "ac_cv_func_$ac_func=yes"
2719 else
2720   echo "configure: failed program was:" >&5
2721   cat conftest.$ac_ext >&5
2722   rm -rf conftest*
2723   eval "ac_cv_func_$ac_func=no"
2724 fi
2725 rm -f conftest*
2726 fi
2727
2728 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2729   echo "$ac_t""yes" 1>&6
2730     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2731   cat >> confdefs.h <<EOF
2732 #define $ac_tr_func 1
2733 EOF
2734  
2735 else
2736   echo "$ac_t""no" 1>&6
2737 fi
2738 done
2739
2740 for ac_func in strdup
2741 do
2742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2743 echo "configure:2744: checking for $ac_func" >&5
2744 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2745   echo $ac_n "(cached) $ac_c" 1>&6
2746 else
2747   cat > conftest.$ac_ext <<EOF
2748 #line 2749 "configure"
2749 #include "confdefs.h"
2750 /* System header to define __stub macros and hopefully few prototypes,
2751     which can conflict with char $ac_func(); below.  */
2752 #include <assert.h>
2753 /* Override any gcc2 internal prototype to avoid an error.  */
2754 /* We use char because int might match the return type of a gcc2
2755     builtin and then its argument prototype would still apply.  */
2756 char $ac_func();
2757
2758 int main() {
2759
2760 /* The GNU C library defines this for functions which it implements
2761     to always fail with ENOSYS.  Some functions are actually named
2762     something starting with __ and the normal name is an alias.  */
2763 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2764 choke me
2765 #else
2766 $ac_func();
2767 #endif
2768
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2772   rm -rf conftest*
2773   eval "ac_cv_func_$ac_func=yes"
2774 else
2775   echo "configure: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   rm -rf conftest*
2778   eval "ac_cv_func_$ac_func=no"
2779 fi
2780 rm -f conftest*
2781 fi
2782
2783 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2784   echo "$ac_t""yes" 1>&6
2785     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2786   cat >> confdefs.h <<EOF
2787 #define $ac_tr_func 1
2788 EOF
2789  
2790 else
2791   echo "$ac_t""no" 1>&6
2792 fi
2793 done
2794
2795
2796 # Try to detect the cpu - must be done before some lib searches
2797 if test "$enable_cpu_detection" = "yes"; then
2798   
2799
2800
2801 #
2802 # Determine the exact cpu type on some common systems where it is 
2803 # not visible from the host triplet.
2804 # (on e.g. intel and dec/tru64 the host type is enough)
2805
2806 case "${host_cpu}-${host_os}" in
2807
2808 rs6000*-aix*)
2809   # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
2810   IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
2811   if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
2812     gmxcpu=power4
2813   elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
2814     gmxcpu=power3
2815   elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
2816     gmxcpu=power2
2817   else
2818     gmxcpu=""
2819   fi
2820   ;;
2821
2822 powerpc*-aix*)
2823   if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
2824     gmxcpu=ppc604
2825   elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
2826     gmxcpu=ppc603
2827   elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
2828     gmxcpu=rs64a
2829   elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
2830     gmxcpu=rs64b
2831   elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
2832     gmxcpu=rs64c
2833   else
2834     gmxcpu=""
2835   fi
2836   ;;
2837
2838 mips*-irix*)
2839   if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
2840     gmxcpu=r12000
2841   elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
2842     gmxcpu=r10000
2843   elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
2844     gmxcpu=r8000
2845   elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
2846     gmxcpu=r5000
2847   else
2848     gmxcpu=""
2849   fi
2850   ;;
2851
2852 sparc*-solaris*)
2853   if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
2854     gmxcpu=ultrasparc3
2855   elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
2856     gmxcpu=ultrasparc2i
2857   elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
2858     gmxcpu=ultrasparc2
2859   elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
2860     gmxcpu=ultrasparc
2861   else
2862     gmxcpu=""
2863   fi
2864   ;;
2865 *)
2866   gmxcpu=""
2867   ;;
2868
2869 esac
2870
2871 else
2872   gmxcpu=""
2873 fi
2874
2875 ############################################################################
2876 # Checks for libraries.
2877 ############################################################################
2878 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
2879 echo "configure:2880: checking for sqrt in -lm" >&5
2880 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
2881 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2882   echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2884   ac_save_LIBS="$LIBS"
2885 LIBS="-lm  $LIBS"
2886 cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2889 /* Override any gcc2 internal prototype to avoid an error.  */
2890 /* We use char because int might match the return type of a gcc2
2891     builtin and then its argument prototype would still apply.  */
2892 char sqrt();
2893
2894 int main() {
2895 sqrt()
2896 ; return 0; }
2897 EOF
2898 if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2899   rm -rf conftest*
2900   eval "ac_cv_lib_$ac_lib_var=yes"
2901 else
2902   echo "configure: failed program was:" >&5
2903   cat conftest.$ac_ext >&5
2904   rm -rf conftest*
2905   eval "ac_cv_lib_$ac_lib_var=no"
2906 fi
2907 rm -f conftest*
2908 LIBS="$ac_save_LIBS"
2909
2910 fi
2911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2912   echo "$ac_t""yes" 1>&6
2913     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2914     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2915   cat >> confdefs.h <<EOF
2916 #define $ac_tr_lib 1
2917 EOF
2918
2919   LIBS="-lm $LIBS"
2920
2921 else
2922   echo "$ac_t""no" 1>&6
2923 { echo "configure: error: No math library found" 1>&2; exit 1; }
2924 fi
2925
2926
2927 #####
2928 # IBM provides a MASS library with vectorized and optimized math stuff,
2929 # and an xlopt library which partly overlaps this. They must come before
2930 # libm in the link list, thus the test goes after m!
2931 if test "${host_vendor}" = "ibm"; then
2932   echo $ac_n "checking for main in -lxlopt""... $ac_c" 1>&6
2933 echo "configure:2934: checking for main in -lxlopt" >&5
2934 ac_lib_var=`echo xlopt'_'main | sed 'y%./+-%__p_%'`
2935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2936   echo $ac_n "(cached) $ac_c" 1>&6
2937 else
2938   ac_save_LIBS="$LIBS"
2939 LIBS="-lxlopt  $LIBS"
2940 cat > conftest.$ac_ext <<EOF
2941 #line 2942 "configure"
2942 #include "confdefs.h"
2943
2944 int main() {
2945 main()
2946 ; return 0; }
2947 EOF
2948 if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2949   rm -rf conftest*
2950   eval "ac_cv_lib_$ac_lib_var=yes"
2951 else
2952   echo "configure: failed program was:" >&5
2953   cat conftest.$ac_ext >&5
2954   rm -rf conftest*
2955   eval "ac_cv_lib_$ac_lib_var=no"
2956 fi
2957 rm -f conftest*
2958 LIBS="$ac_save_LIBS"
2959
2960 fi
2961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2962   echo "$ac_t""yes" 1>&6
2963     ac_tr_lib=HAVE_LIB`echo xlopt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2964     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2965   cat >> confdefs.h <<EOF
2966 #define $ac_tr_lib 1
2967 EOF
2968
2969   LIBS="-lxlopt $LIBS"
2970
2971 else
2972   echo "$ac_t""no" 1>&6
2973 fi
2974
2975   echo $ac_n "checking for main in -lmass""... $ac_c" 1>&6
2976 echo "configure:2977: checking for main in -lmass" >&5
2977 ac_lib_var=`echo mass'_'main | sed 'y%./+-%__p_%'`
2978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   ac_save_LIBS="$LIBS"
2982 LIBS="-lmass  $LIBS"
2983 cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986
2987 int main() {
2988 main()
2989 ; return 0; }
2990 EOF
2991 if { (eval echo configure:2992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2992   rm -rf conftest*
2993   eval "ac_cv_lib_$ac_lib_var=yes"
2994 else
2995   echo "configure: failed program was:" >&5
2996   cat conftest.$ac_ext >&5
2997   rm -rf conftest*
2998   eval "ac_cv_lib_$ac_lib_var=no"
2999 fi
3000 rm -f conftest*
3001 LIBS="$ac_save_LIBS"
3002
3003 fi
3004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3005   echo "$ac_t""yes" 1>&6
3006     ac_tr_lib=HAVE_LIB`echo mass | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3007     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3008   cat >> confdefs.h <<EOF
3009 #define $ac_tr_lib 1
3010 EOF
3011
3012   LIBS="-lmass $LIBS"
3013
3014 else
3015   echo "$ac_t""no" 1>&6
3016 fi
3017   
3018   vectmass=no
3019   case "$gmxcpu" in
3020     power4*)
3021       echo $ac_n "checking for main in -lmassvp4""... $ac_c" 1>&6
3022 echo "configure:3023: checking for main in -lmassvp4" >&5
3023 ac_lib_var=`echo massvp4'_'main | sed 'y%./+-%__p_%'`
3024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   ac_save_LIBS="$LIBS"
3028 LIBS="-lmassvp4  $LIBS"
3029 cat > conftest.$ac_ext <<EOF
3030 #line 3031 "configure"
3031 #include "confdefs.h"
3032
3033 int main() {
3034 main()
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3038   rm -rf conftest*
3039   eval "ac_cv_lib_$ac_lib_var=yes"
3040 else
3041   echo "configure: failed program was:" >&5
3042   cat conftest.$ac_ext >&5
3043   rm -rf conftest*
3044   eval "ac_cv_lib_$ac_lib_var=no"
3045 fi
3046 rm -f conftest*
3047 LIBS="$ac_save_LIBS"
3048
3049 fi
3050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3051   echo "$ac_t""yes" 1>&6
3052   vectmass=yes LIBS="$LIBS -lmassvp4"
3053 else
3054   echo "$ac_t""no" 1>&6
3055 fi
3056   ;;
3057     power3*)
3058       echo $ac_n "checking for main in -lmassvp3""... $ac_c" 1>&6
3059 echo "configure:3060: checking for main in -lmassvp3" >&5
3060 ac_lib_var=`echo massvp3'_'main | sed 'y%./+-%__p_%'`
3061 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3062   echo $ac_n "(cached) $ac_c" 1>&6
3063 else
3064   ac_save_LIBS="$LIBS"
3065 LIBS="-lmassvp3  $LIBS"
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069
3070 int main() {
3071 main()
3072 ; return 0; }
3073 EOF
3074 if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3075   rm -rf conftest*
3076   eval "ac_cv_lib_$ac_lib_var=yes"
3077 else
3078   echo "configure: failed program was:" >&5
3079   cat conftest.$ac_ext >&5
3080   rm -rf conftest*
3081   eval "ac_cv_lib_$ac_lib_var=no"
3082 fi
3083 rm -f conftest*
3084 LIBS="$ac_save_LIBS"
3085
3086 fi
3087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3088   echo "$ac_t""yes" 1>&6
3089   vectmass=yes LIBS="$LIBS -lmassvp3"
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093   ;;
3094     power2*)
3095       echo $ac_n "checking for main in -lmassvp3""... $ac_c" 1>&6
3096 echo "configure:3097: checking for main in -lmassvp3" >&5
3097 ac_lib_var=`echo massvp3'_'main | sed 'y%./+-%__p_%'`
3098 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   ac_save_LIBS="$LIBS"
3102 LIBS="-lmassvp3  $LIBS"
3103 cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3106
3107 int main() {
3108 main()
3109 ; return 0; }
3110 EOF
3111 if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3112   rm -rf conftest*
3113   eval "ac_cv_lib_$ac_lib_var=yes"
3114 else
3115   echo "configure: failed program was:" >&5
3116   cat conftest.$ac_ext >&5
3117   rm -rf conftest*
3118   eval "ac_cv_lib_$ac_lib_var=no"
3119 fi
3120 rm -f conftest*
3121 LIBS="$ac_save_LIBS"
3122
3123 fi
3124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3125   echo "$ac_t""yes" 1>&6
3126   vectmass=yes LIBS="$LIBS -lmassvp2"
3127 else
3128   echo "$ac_t""no" 1>&6
3129 fi
3130   ;;
3131     *)
3132       echo $ac_n "checking for main in -lmassv""... $ac_c" 1>&6
3133 echo "configure:3134: checking for main in -lmassv" >&5
3134 ac_lib_var=`echo massv'_'main | sed 'y%./+-%__p_%'`
3135 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3136   echo $ac_n "(cached) $ac_c" 1>&6
3137 else
3138   ac_save_LIBS="$LIBS"
3139 LIBS="-lmassv  $LIBS"
3140 cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143
3144 int main() {
3145 main()
3146 ; return 0; }
3147 EOF
3148 if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3149   rm -rf conftest*
3150   eval "ac_cv_lib_$ac_lib_var=yes"
3151 else
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   eval "ac_cv_lib_$ac_lib_var=no"
3156 fi
3157 rm -f conftest*
3158 LIBS="$ac_save_LIBS"
3159
3160 fi
3161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3162   echo "$ac_t""yes" 1>&6
3163   vectmass=yes LIBS="$LIBS -lmassv"
3164 else
3165   echo "$ac_t""no" 1>&6
3166 fi
3167   ;;
3168   esac
3169   if test "$vectmass" = "yes"; then
3170     cat >> confdefs.h <<\EOF
3171 #define USE_IBM_MASS 
3172 EOF
3173
3174   fi
3175 fi 
3176
3177 if test "$enable_double" = "yes"; then
3178   precision=8
3179 else
3180   precision=4
3181 fi
3182
3183 if test "$enable_mpi" = "yes"; then
3184   
3185 if test -z "$ac_fftw_firstname"; then
3186
3187 if test "$precision" = "8"; then
3188   prec="double"
3189   fftwcheckprefix=d
3190 else
3191   prec="single"
3192   fftwcheckprefix=s
3193 fi
3194
3195 usedprefix=""
3196 ok="no"
3197 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3198 echo $ac_n "checking for fftw_mpi.h""... $ac_c" 1>&6
3199 echo "configure:3200: checking for fftw_mpi.h" >&5
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203 #include <fftw_mpi.h>
3204 int main() {
3205
3206 ; return 0; }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3209   rm -rf conftest*
3210   
3211 fftwname=fftw_mpi 
3212 echo "$ac_t""yes" 1>&6
3213
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -rf conftest*
3218   echo "$ac_t""no" 1>&6
3219 fi
3220 rm -f conftest*
3221
3222
3223 if test -n "$fftwname"; then
3224 # we cannot run the code since MPI program might not be allowed outside a charge queue
3225 cat > conftest.$ac_ext <<EOF
3226 #line 3227 "configure"
3227 #include "confdefs.h"
3228 #include <$fftwname.h>
3229 int main() {
3230 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)]; 
3231 ; return 0; }
3232 EOF
3233 if { (eval echo configure:3234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3234   rm -rf conftest*
3235   ok="yes"
3236 else
3237   echo "configure: failed program was:" >&5
3238   cat conftest.$ac_ext >&5
3239   rm -rf conftest*
3240   ok="no"
3241 fi
3242 rm -f conftest*
3243 fi
3244
3245 fftwname=fftw_mpi
3246
3247 if test "$ok" != "yes"; then
3248   xfftwname=${fftwcheckprefix}${fftwname}
3249   echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $xfftwname.h" >&5
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <$xfftwname.h>
3255 int main() {
3256
3257 ; return 0; }
3258 EOF
3259 if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3260   rm -rf conftest*
3261   echo "$ac_t""yes" 1>&6
3262 else
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   
3267 echo "$ac_t""no" 1>&6
3268 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3269 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
3270 Note that the default FFTW setup is double precision. You change the
3271 FFTW configuration to single with --enable-float and turn on MPI support
3272 with --enable-mpi. It is a good idea to install both single & double. 
3273 If your sysadm doesn't want to install it you can do it to a location
3274 in your home directory and provide Gromacs configure with the correct
3275 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3276 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3277
3278 fi
3279 rm -f conftest*
3280 cat > conftest.$ac_ext <<EOF
3281 #line 3282 "configure"
3282 #include "confdefs.h"
3283 #include <$xfftwname.h>
3284 int main() {
3285 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3286 ; return 0; }
3287 EOF
3288 if { (eval echo configure:3289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3289   rm -rf conftest*
3290   
3291 fftwname=$xfftwname 
3292 usedprefix=$fftwcheckprefix
3293
3294 else
3295   echo "configure: failed program was:" >&5
3296   cat conftest.$ac_ext >&5
3297   rm -rf conftest*
3298   { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3299 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
3300 Note that the default FFTW setup is double precision. You change the
3301 FFTW configuration to single with --enable-float and turn on MPI support
3302 with --enable-mpi. It is a good idea to install both single & double. 
3303 If your sysadm doesn't want to install it you can do it to a location
3304 in your home directory and provide Gromacs configure with the correct
3305 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3306 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3307 fi
3308 rm -f conftest*
3309 fi
3310
3311 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3312 echo "configure:3313: checking for main in -l$fftwname" >&5
3313 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3315   echo $ac_n "(cached) $ac_c" 1>&6
3316 else
3317   ac_save_LIBS="$LIBS"
3318 LIBS="-l$fftwname  $LIBS"
3319 cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322
3323 int main() {
3324 main()
3325 ; return 0; }
3326 EOF
3327 if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3328   rm -rf conftest*
3329   eval "ac_cv_lib_$ac_lib_var=yes"
3330 else
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   eval "ac_cv_lib_$ac_lib_var=no"
3335 fi
3336 rm -f conftest*
3337 LIBS="$ac_save_LIBS"
3338
3339 fi
3340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3341   echo "$ac_t""yes" 1>&6
3342     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3343     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3344   cat >> confdefs.h <<EOF
3345 #define $ac_tr_lib 1
3346 EOF
3347
3348   LIBS="-l$fftwname $LIBS"
3349
3350 else
3351   echo "$ac_t""no" 1>&6
3352 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3353 fi
3354
3355 ac_fftw_savedprefix=$usedprefix
3356 ac_fftw_firstname=$fftwname
3357
3358 else
3359
3360 fftwname=${ac_fftw_savedprefix}fftw_mpi
3361 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
3362 echo "configure:3363: checking for $fftwname.h" >&5
3363 cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366 #include <$fftwname.h>
3367 int main() {
3368
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3372   rm -rf conftest*
3373   echo "$ac_t""yes" 1>&6
3374 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3375 echo "configure:3376: checking for main in -l$fftwname" >&5
3376 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   ac_save_LIBS="$LIBS"
3381 LIBS="-l$fftwname  $LIBS"
3382 cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385
3386 int main() {
3387 main()
3388 ; return 0; }
3389 EOF
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3391   rm -rf conftest*
3392   eval "ac_cv_lib_$ac_lib_var=yes"
3393 else
3394   echo "configure: failed program was:" >&5
3395   cat conftest.$ac_ext >&5
3396   rm -rf conftest*
3397   eval "ac_cv_lib_$ac_lib_var=no"
3398 fi
3399 rm -f conftest*
3400 LIBS="$ac_save_LIBS"
3401
3402 fi
3403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404   echo "$ac_t""yes" 1>&6
3405     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
3406     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3407   cat >> confdefs.h <<EOF
3408 #define $ac_tr_lib 1
3409 EOF
3410
3411   LIBS="-l$fftwname $LIBS"
3412
3413 else
3414   echo "$ac_t""no" 1>&6
3415 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3416 fi
3417
3418 else
3419   echo "configure: failed program was:" >&5
3420   cat conftest.$ac_ext >&5
3421   rm -rf conftest*
3422   
3423 echo "$ac_t""no" 1>&6
3424 { echo "configure: error: Cant find $fftwname.h header. Make sure all your fftw prefixes match - we already use $ac_fftw_firstname.h" 1>&2; exit 1; }
3425
3426 fi
3427 rm -f conftest*
3428
3429 fi
3430
3431
3432   
3433 if test -z "$ac_fftw_firstname"; then
3434
3435 if test "$precision" = "8"; then
3436   prec="double"
3437   fftwcheckprefix=d
3438 else
3439   prec="single"
3440   fftwcheckprefix=s
3441 fi
3442
3443 usedprefix=""
3444 ok="no"
3445 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3446 echo $ac_n "checking for rfftw_mpi.h""... $ac_c" 1>&6
3447 echo "configure:3448: checking for rfftw_mpi.h" >&5
3448 cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 #include <rfftw_mpi.h>
3452 int main() {
3453
3454 ; return 0; }
3455 EOF
3456 if { (eval echo configure:3457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3457   rm -rf conftest*
3458   
3459 fftwname=rfftw_mpi 
3460 echo "$ac_t""yes" 1>&6
3461
3462 else
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   rm -rf conftest*
3466   echo "$ac_t""no" 1>&6
3467 fi
3468 rm -f conftest*
3469
3470
3471 if test -n "$fftwname"; then
3472 # we cannot run the code since MPI program might not be allowed outside a charge queue
3473 cat > conftest.$ac_ext <<EOF
3474 #line 3475 "configure"
3475 #include "confdefs.h"
3476 #include <$fftwname.h>
3477 int main() {
3478 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)]; 
3479 ; return 0; }
3480 EOF
3481 if { (eval echo configure:3482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3482   rm -rf conftest*
3483   ok="yes"
3484 else
3485   echo "configure: failed program was:" >&5
3486   cat conftest.$ac_ext >&5
3487   rm -rf conftest*
3488   ok="no"
3489 fi
3490 rm -f conftest*
3491 fi
3492
3493 fftwname=rfftw_mpi
3494
3495 if test "$ok" != "yes"; then
3496   xfftwname=${fftwcheckprefix}${fftwname}
3497   echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3498 echo "configure:3499: checking for $xfftwname.h" >&5
3499   cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502 #include <$xfftwname.h>
3503 int main() {
3504
3505 ; return 0; }
3506 EOF
3507 if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3508   rm -rf conftest*
3509   echo "$ac_t""yes" 1>&6
3510 else
3511   echo "configure: failed program was:" >&5
3512   cat conftest.$ac_ext >&5
3513   rm -rf conftest*
3514   
3515 echo "$ac_t""no" 1>&6
3516 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3517 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
3518 Note that the default FFTW setup is double precision. You change the
3519 FFTW configuration to single with --enable-float and turn on MPI support
3520 with --enable-mpi. It is a good idea to install both single & double. 
3521 If your sysadm doesn't want to install it you can do it to a location
3522 in your home directory and provide Gromacs configure with the correct
3523 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3524 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3525
3526 fi
3527 rm -f conftest*
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 #include <$xfftwname.h>
3532 int main() {
3533 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3534 ; return 0; }
3535 EOF
3536 if { (eval echo configure:3537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3537   rm -rf conftest*
3538   
3539 fftwname=$xfftwname 
3540 usedprefix=$fftwcheckprefix
3541
3542 else
3543   echo "configure: failed program was:" >&5
3544   cat conftest.$ac_ext >&5
3545   rm -rf conftest*
3546   { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3547 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
3548 Note that the default FFTW setup is double precision. You change the
3549 FFTW configuration to single with --enable-float and turn on MPI support
3550 with --enable-mpi. It is a good idea to install both single & double. 
3551 If your sysadm doesn't want to install it you can do it to a location
3552 in your home directory and provide Gromacs configure with the correct
3553 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3554 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3555 fi
3556 rm -f conftest*
3557 fi
3558
3559 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3560 echo "configure:3561: checking for main in -l$fftwname" >&5
3561 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3562 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3563   echo $ac_n "(cached) $ac_c" 1>&6
3564 else
3565   ac_save_LIBS="$LIBS"
3566 LIBS="-l$fftwname  $LIBS"
3567 cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570
3571 int main() {
3572 main()
3573 ; return 0; }
3574 EOF
3575 if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3576   rm -rf conftest*
3577   eval "ac_cv_lib_$ac_lib_var=yes"
3578 else
3579   echo "configure: failed program was:" >&5
3580   cat conftest.$ac_ext >&5
3581   rm -rf conftest*
3582   eval "ac_cv_lib_$ac_lib_var=no"
3583 fi
3584 rm -f conftest*
3585 LIBS="$ac_save_LIBS"
3586
3587 fi
3588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3589   echo "$ac_t""yes" 1>&6
3590     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3591     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3592   cat >> confdefs.h <<EOF
3593 #define $ac_tr_lib 1
3594 EOF
3595
3596   LIBS="-l$fftwname $LIBS"
3597
3598 else
3599   echo "$ac_t""no" 1>&6
3600 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3601 fi
3602
3603 ac_fftw_savedprefix=$usedprefix
3604 ac_fftw_firstname=$fftwname
3605
3606 else
3607
3608 fftwname=${ac_fftw_savedprefix}rfftw_mpi
3609 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
3610 echo "configure:3611: checking for $fftwname.h" >&5
3611 cat > conftest.$ac_ext <<EOF
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614 #include <$fftwname.h>
3615 int main() {
3616
3617 ; return 0; }
3618 EOF
3619 if { (eval echo configure:3620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3620   rm -rf conftest*
3621   echo "$ac_t""yes" 1>&6
3622 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3623 echo "configure:3624: checking for main in -l$fftwname" >&5
3624 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3625 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   ac_save_LIBS="$LIBS"
3629 LIBS="-l$fftwname  $LIBS"
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633
3634 int main() {
3635 main()
3636 ; return 0; }
3637 EOF
3638 if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3639   rm -rf conftest*
3640   eval "ac_cv_lib_$ac_lib_var=yes"
3641 else
3642   echo "configure: failed program was:" >&5
3643   cat conftest.$ac_ext >&5
3644   rm -rf conftest*
3645   eval "ac_cv_lib_$ac_lib_var=no"
3646 fi
3647 rm -f conftest*
3648 LIBS="$ac_save_LIBS"
3649
3650 fi
3651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3652   echo "$ac_t""yes" 1>&6
3653     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
3654     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3655   cat >> confdefs.h <<EOF
3656 #define $ac_tr_lib 1
3657 EOF
3658
3659   LIBS="-l$fftwname $LIBS"
3660
3661 else
3662   echo "$ac_t""no" 1>&6
3663 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3664 fi
3665
3666 else
3667   echo "configure: failed program was:" >&5
3668   cat conftest.$ac_ext >&5
3669   rm -rf conftest*
3670   
3671 echo "$ac_t""no" 1>&6
3672 { echo "configure: error: Cant find $fftwname.h header. Make sure all your fftw prefixes match - we already use $ac_fftw_firstname.h" 1>&2; exit 1; }
3673
3674 fi
3675 rm -f conftest*
3676
3677 fi
3678
3679
3680 fi
3681
3682
3683 if test -z "$ac_fftw_firstname"; then
3684
3685 if test "$precision" = "8"; then
3686   prec="double"
3687   fftwcheckprefix=d
3688 else
3689   prec="single"
3690   fftwcheckprefix=s
3691 fi
3692
3693 usedprefix=""
3694 ok="no"
3695 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3696 echo $ac_n "checking for fftw.h""... $ac_c" 1>&6
3697 echo "configure:3698: checking for fftw.h" >&5
3698 cat > conftest.$ac_ext <<EOF
3699 #line 3700 "configure"
3700 #include "confdefs.h"
3701 #include <fftw.h>
3702 int main() {
3703
3704 ; return 0; }
3705 EOF
3706 if { (eval echo configure:3707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3707   rm -rf conftest*
3708   
3709 fftwname=fftw 
3710 echo "$ac_t""yes" 1>&6
3711
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   echo "$ac_t""no" 1>&6
3717 fi
3718 rm -f conftest*
3719
3720
3721 if test -n "$fftwname"; then
3722 # we cannot run the code since MPI program might not be allowed outside a charge queue
3723 cat > conftest.$ac_ext <<EOF
3724 #line 3725 "configure"
3725 #include "confdefs.h"
3726 #include <$fftwname.h>
3727 int main() {
3728 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)]; 
3729 ; return 0; }
3730 EOF
3731 if { (eval echo configure:3732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3732   rm -rf conftest*
3733   ok="yes"
3734 else
3735   echo "configure: failed program was:" >&5
3736   cat conftest.$ac_ext >&5
3737   rm -rf conftest*
3738   ok="no"
3739 fi
3740 rm -f conftest*
3741 fi
3742
3743 fftwname=fftw
3744
3745 if test "$ok" != "yes"; then
3746   xfftwname=${fftwcheckprefix}${fftwname}
3747   echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3748 echo "configure:3749: checking for $xfftwname.h" >&5
3749   cat > conftest.$ac_ext <<EOF
3750 #line 3751 "configure"
3751 #include "confdefs.h"
3752 #include <$xfftwname.h>
3753 int main() {
3754
3755 ; return 0; }
3756 EOF
3757 if { (eval echo configure:3758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3758   rm -rf conftest*
3759   echo "$ac_t""yes" 1>&6
3760 else
3761   echo "configure: failed program was:" >&5
3762   cat conftest.$ac_ext >&5
3763   rm -rf conftest*
3764   
3765 echo "$ac_t""no" 1>&6
3766 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3767 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
3768 Note that the default FFTW setup is double precision. You change the
3769 FFTW configuration to single with --enable-float and turn on MPI support
3770 with --enable-mpi. It is a good idea to install both single & double. 
3771 If your sysadm doesn't want to install it you can do it to a location
3772 in your home directory and provide Gromacs configure with the correct
3773 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3774 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3775
3776 fi
3777 rm -f conftest*
3778 cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3781 #include <$xfftwname.h>
3782 int main() {
3783 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3784 ; return 0; }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3787   rm -rf conftest*
3788   
3789 fftwname=$xfftwname 
3790 usedprefix=$fftwcheckprefix
3791
3792 else
3793   echo "configure: failed program was:" >&5
3794   cat conftest.$ac_ext >&5
3795   rm -rf conftest*
3796   { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3797 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
3798 Note that the default FFTW setup is double precision. You change the
3799 FFTW configuration to single with --enable-float and turn on MPI support
3800 with --enable-mpi. It is a good idea to install both single & double. 
3801 If your sysadm doesn't want to install it you can do it to a location
3802 in your home directory and provide Gromacs configure with the correct
3803 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3804 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3805 fi
3806 rm -f conftest*
3807 fi
3808
3809 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3810 echo "configure:3811: checking for main in -l$fftwname" >&5
3811 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3813   echo $ac_n "(cached) $ac_c" 1>&6
3814 else
3815   ac_save_LIBS="$LIBS"
3816 LIBS="-l$fftwname  $LIBS"
3817 cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820
3821 int main() {
3822 main()
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3826   rm -rf conftest*
3827   eval "ac_cv_lib_$ac_lib_var=yes"
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   eval "ac_cv_lib_$ac_lib_var=no"
3833 fi
3834 rm -f conftest*
3835 LIBS="$ac_save_LIBS"
3836
3837 fi
3838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3839   echo "$ac_t""yes" 1>&6
3840     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3841     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3842   cat >> confdefs.h <<EOF
3843 #define $ac_tr_lib 1
3844 EOF
3845
3846   LIBS="-l$fftwname $LIBS"
3847
3848 else
3849   echo "$ac_t""no" 1>&6
3850 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3851 fi
3852
3853 ac_fftw_savedprefix=$usedprefix
3854 ac_fftw_firstname=$fftwname
3855
3856 else
3857
3858 fftwname=${ac_fftw_savedprefix}fftw
3859 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
3860 echo "configure:3861: checking for $fftwname.h" >&5
3861 cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864 #include <$fftwname.h>
3865 int main() {
3866
3867 ; return 0; }
3868 EOF
3869 if { (eval echo configure:3870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3870   rm -rf conftest*
3871   echo "$ac_t""yes" 1>&6
3872 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3873 echo "configure:3874: checking for main in -l$fftwname" >&5
3874 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3876   echo $ac_n "(cached) $ac_c" 1>&6
3877 else
3878   ac_save_LIBS="$LIBS"
3879 LIBS="-l$fftwname  $LIBS"
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883
3884 int main() {
3885 main()
3886 ; return 0; }
3887 EOF
3888 if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3889   rm -rf conftest*
3890   eval "ac_cv_lib_$ac_lib_var=yes"
3891 else
3892   echo "configure: failed program was:" >&5
3893   cat conftest.$ac_ext >&5
3894   rm -rf conftest*
3895   eval "ac_cv_lib_$ac_lib_var=no"
3896 fi
3897 rm -f conftest*
3898 LIBS="$ac_save_LIBS"
3899
3900 fi
3901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3902   echo "$ac_t""yes" 1>&6
3903     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
3904     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3905   cat >> confdefs.h <<EOF
3906 #define $ac_tr_lib 1
3907 EOF
3908
3909   LIBS="-l$fftwname $LIBS"
3910
3911 else
3912   echo "$ac_t""no" 1>&6
3913 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3914 fi
3915
3916 else
3917   echo "configure: failed program was:" >&5
3918   cat conftest.$ac_ext >&5
3919   rm -rf conftest*
3920   
3921 echo "$ac_t""no" 1>&6
3922 { echo "configure: error: Cant find $fftwname.h header. Make sure all your fftw prefixes match - we already use $ac_fftw_firstname.h" 1>&2; exit 1; }
3923
3924 fi
3925 rm -f conftest*
3926
3927 fi
3928
3929
3930
3931 if test -z "$ac_fftw_firstname"; then
3932
3933 if test "$precision" = "8"; then
3934   prec="double"
3935   fftwcheckprefix=d
3936 else
3937   prec="single"
3938   fftwcheckprefix=s
3939 fi
3940
3941 usedprefix=""
3942 ok="no"
3943 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3944 echo $ac_n "checking for rfftw.h""... $ac_c" 1>&6
3945 echo "configure:3946: checking for rfftw.h" >&5
3946 cat > conftest.$ac_ext <<EOF
3947 #line 3948 "configure"
3948 #include "confdefs.h"
3949 #include <rfftw.h>
3950 int main() {
3951
3952 ; return 0; }
3953 EOF
3954 if { (eval echo configure:3955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3955   rm -rf conftest*
3956   
3957 fftwname=rfftw 
3958 echo "$ac_t""yes" 1>&6
3959
3960 else
3961   echo "configure: failed program was:" >&5
3962   cat conftest.$ac_ext >&5
3963   rm -rf conftest*
3964   echo "$ac_t""no" 1>&6
3965 fi
3966 rm -f conftest*
3967
3968
3969 if test -n "$fftwname"; then
3970 # we cannot run the code since MPI program might not be allowed outside a charge queue
3971 cat > conftest.$ac_ext <<EOF
3972 #line 3973 "configure"
3973 #include "confdefs.h"
3974 #include <$fftwname.h>
3975 int main() {
3976 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)]; 
3977 ; return 0; }
3978 EOF
3979 if { (eval echo configure:3980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3980   rm -rf conftest*
3981   ok="yes"
3982 else
3983   echo "configure: failed program was:" >&5
3984   cat conftest.$ac_ext >&5
3985   rm -rf conftest*
3986   ok="no"
3987 fi
3988 rm -f conftest*
3989 fi
3990
3991 fftwname=rfftw
3992
3993 if test "$ok" != "yes"; then
3994   xfftwname=${fftwcheckprefix}${fftwname}
3995   echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3996 echo "configure:3997: checking for $xfftwname.h" >&5
3997   cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <$xfftwname.h>
4001 int main() {
4002
4003 ; return 0; }
4004 EOF
4005 if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4006   rm -rf conftest*
4007   echo "$ac_t""yes" 1>&6
4008 else
4009   echo "configure: failed program was:" >&5
4010   cat conftest.$ac_ext >&5
4011   rm -rf conftest*
4012   
4013 echo "$ac_t""no" 1>&6
4014 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
4015 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
4016 Note that the default FFTW setup is double precision. You change the
4017 FFTW configuration to single with --enable-float and turn on MPI support
4018 with --enable-mpi. It is a good idea to install both single & double. 
4019 If your sysadm doesn't want to install it you can do it to a location
4020 in your home directory and provide Gromacs configure with the correct
4021 paths by setting the CPPFLAGS and LDFLAGS environment variables.
4022 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
4023
4024 fi
4025 rm -f conftest*
4026 cat > conftest.$ac_ext <<EOF
4027 #line 4028 "configure"
4028 #include "confdefs.h"
4029 #include <$xfftwname.h>
4030 int main() {
4031 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
4032 ; return 0; }
4033 EOF
4034 if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4035   rm -rf conftest*
4036   
4037 fftwname=$xfftwname 
4038 usedprefix=$fftwcheckprefix
4039
4040 else
4041   echo "configure: failed program was:" >&5
4042   cat conftest.$ac_ext >&5
4043   rm -rf conftest*
4044   { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
4045 Do you have $prec precision FFTW installed? You can find it at www.fftw.org 
4046 Note that the default FFTW setup is double precision. You change the
4047 FFTW configuration to single with --enable-float and turn on MPI support
4048 with --enable-mpi. It is a good idea to install both single & double. 
4049 If your sysadm doesn't want to install it you can do it to a location
4050 in your home directory and provide Gromacs configure with the correct
4051 paths by setting the CPPFLAGS and LDFLAGS environment variables.
4052 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
4053 fi
4054 rm -f conftest*
4055 fi
4056
4057 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
4058 echo "configure:4059: checking for main in -l$fftwname" >&5
4059 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
4060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4061   echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063   ac_save_LIBS="$LIBS"
4064 LIBS="-l$fftwname  $LIBS"
4065 cat > conftest.$ac_ext <<EOF
4066 #line 4067 "configure"
4067 #include "confdefs.h"
4068
4069 int main() {
4070 main()
4071 ; return 0; }
4072 EOF
4073 if { (eval echo configure:4074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4074   rm -rf conftest*
4075   eval "ac_cv_lib_$ac_lib_var=yes"
4076 else
4077   echo "configure: failed program was:" >&5
4078   cat conftest.$ac_ext >&5
4079   rm -rf conftest*
4080   eval "ac_cv_lib_$ac_lib_var=no"
4081 fi
4082 rm -f conftest*
4083 LIBS="$ac_save_LIBS"
4084
4085 fi
4086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4087   echo "$ac_t""yes" 1>&6
4088     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4090   cat >> confdefs.h <<EOF
4091 #define $ac_tr_lib 1
4092 EOF
4093
4094   LIBS="-l$fftwname $LIBS"
4095
4096 else
4097   echo "$ac_t""no" 1>&6
4098 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
4099 fi
4100
4101 ac_fftw_savedprefix=$usedprefix
4102 ac_fftw_firstname=$fftwname
4103
4104 else
4105
4106 fftwname=${ac_fftw_savedprefix}rfftw
4107 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
4108 echo "configure:4109: checking for $fftwname.h" >&5
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4112 #include <$fftwname.h>
4113 int main() {
4114
4115 ; return 0; }
4116 EOF
4117 if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4118   rm -rf conftest*
4119   echo "$ac_t""yes" 1>&6
4120 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
4121 echo "configure:4122: checking for main in -l$fftwname" >&5
4122 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
4123 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4124   echo $ac_n "(cached) $ac_c" 1>&6
4125 else
4126   ac_save_LIBS="$LIBS"
4127 LIBS="-l$fftwname  $LIBS"
4128 cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131
4132 int main() {
4133 main()
4134 ; return 0; }
4135 EOF
4136 if { (eval echo configure:4137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4137   rm -rf conftest*
4138   eval "ac_cv_lib_$ac_lib_var=yes"
4139 else
4140   echo "configure: failed program was:" >&5
4141   cat conftest.$ac_ext >&5
4142   rm -rf conftest*
4143   eval "ac_cv_lib_$ac_lib_var=no"
4144 fi
4145 rm -f conftest*
4146 LIBS="$ac_save_LIBS"
4147
4148 fi
4149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4150   echo "$ac_t""yes" 1>&6
4151     ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
4152     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4153   cat >> confdefs.h <<EOF
4154 #define $ac_tr_lib 1
4155 EOF
4156
4157   LIBS="-l$fftwname $LIBS"
4158
4159 else
4160   echo "$ac_t""no" 1>&6
4161 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
4162 fi
4163
4164 else
4165   echo "configure: failed program was:" >&5
4166   cat conftest.$ac_ext >&5
4167   rm -rf conftest*
4168   
4169 echo "$ac_t""no" 1>&6
4170 { echo "configure: error: Cant find $fftwname.h header. Make sure all your fftw prefixes match - we already use $ac_fftw_firstname.h" 1>&2; exit 1; }
4171
4172 fi
4173 rm -f conftest*
4174
4175 fi
4176
4177
4178
4179 case ${ac_fftw_savedprefix} in
4180  d)
4181    cat >> confdefs.h <<\EOF
4182 #define FFTW_NAME_DFFTW 
4183 EOF
4184
4185    ;;   
4186  s)
4187    cat >> confdefs.h <<\EOF
4188 #define FFTW_NAME_SFFTW 
4189 EOF
4190
4191    ;;   
4192  *)
4193    cat >> confdefs.h <<\EOF
4194 #define FFTW_NAME_FFTW 
4195 EOF
4196
4197    ;;   
4198 esac
4199
4200 ######
4201 if test "$enable_xdr" = "no"; then
4202   echo "configure: warning: * Not using XDR cripples Gromacs significantly. You won't be able to *
4203               * read or write any hardware independent or compressed trajectories. *
4204               * We strongly suggest you try to locate the RPC routines instead!    *" 1>&2
4205 else
4206 # check for xtc headers
4207   for ac_hdr in rpc/rpc.h rpc/xdr.h
4208 do
4209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4211 echo "configure:4212: checking for $ac_hdr" >&5
4212 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4213   echo $ac_n "(cached) $ac_c" 1>&6
4214 else
4215   cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <$ac_hdr>
4219 EOF
4220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4221 { (eval echo configure:4222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4223 if test -z "$ac_err"; then
4224   rm -rf conftest*
4225   eval "ac_cv_header_$ac_safe=yes"
4226 else
4227   echo "$ac_err" >&5
4228   echo "configure: failed program was:" >&5
4229   cat conftest.$ac_ext >&5
4230   rm -rf conftest*
4231   eval "ac_cv_header_$ac_safe=no"
4232 fi
4233 rm -f conftest*
4234 fi
4235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4236   echo "$ac_t""yes" 1>&6
4237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4238   cat >> confdefs.h <<EOF
4239 #define $ac_tr_hdr 1
4240 EOF
4241  
4242 else
4243   echo "$ac_t""no" 1>&6
4244 { echo "configure: error: RPC/XDR include headers not found" 1>&2; exit 1; }
4245 fi
4246 done
4247
4248 # check for xtc libs
4249 # on solaris the xdr stuff is in -lnsl
4250   echo $ac_n "checking for xdr_float in -lnsl""... $ac_c" 1>&6
4251 echo "configure:4252: checking for xdr_float in -lnsl" >&5
4252 ac_lib_var=`echo nsl'_'xdr_float | sed 'y%./+-%__p_%'`
4253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4254   echo $ac_n "(cached) $ac_c" 1>&6
4255 else
4256   ac_save_LIBS="$LIBS"
4257 LIBS="-lnsl  $LIBS"
4258 cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 /* Override any gcc2 internal prototype to avoid an error.  */
4262 /* We use char because int might match the return type of a gcc2
4263     builtin and then its argument prototype would still apply.  */
4264 char xdr_float();
4265
4266 int main() {
4267 xdr_float()
4268 ; return 0; }
4269 EOF
4270 if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4271   rm -rf conftest*
4272   eval "ac_cv_lib_$ac_lib_var=yes"
4273 else
4274   echo "configure: failed program was:" >&5
4275   cat conftest.$ac_ext >&5
4276   rm -rf conftest*
4277   eval "ac_cv_lib_$ac_lib_var=no"
4278 fi
4279 rm -f conftest*
4280 LIBS="$ac_save_LIBS"
4281
4282 fi
4283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4284   echo "$ac_t""yes" 1>&6
4285     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4287   cat >> confdefs.h <<EOF
4288 #define $ac_tr_lib 1
4289 EOF
4290
4291   LIBS="-lnsl $LIBS"
4292
4293 else
4294   echo "$ac_t""no" 1>&6
4295 fi
4296
4297   cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 #include<rpc/rpc.h> 
4301  #include<rpc/xdr.h>
4302 int main() {
4303  XDR *xd; float f; xdr_float(xd,&f);
4304 ; return 0; }
4305 EOF
4306 if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4307   :
4308 else
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   { echo "configure: error: RPC/XDR libraries not found" 1>&2; exit 1; }
4313 fi
4314 rm -f conftest*
4315
4316
4317 if true; then
4318   GMX_USE_XDR_TRUE=
4319   GMX_USE_XDR_FALSE='#'
4320 else
4321   GMX_USE_XDR_TRUE='#'
4322   GMX_USE_XDR_FALSE=
4323 fi
4324 fi
4325
4326 #####
4327 # Look for X
4328 # If we find X, set shell vars x_includes and x_libraries to the
4329 # paths, otherwise set no_x=yes.
4330 # Uses ac_ vars as temps to allow command line to override cache and checks.
4331 # --without-x overrides everything else, but does not touch the cache.
4332 echo $ac_n "checking for X""... $ac_c" 1>&6
4333 echo "configure:4334: checking for X" >&5
4334
4335 # Check whether --with-x or --without-x was given.
4336 if test "${with_x+set}" = set; then
4337   withval="$with_x"
4338   :
4339 fi
4340
4341 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4342 if test "x$with_x" = xno; then
4343   # The user explicitly disabled X.
4344   have_x=disabled
4345 else
4346   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4347     # Both variables are already set.
4348     have_x=yes
4349   else
4350 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   # One or both of the vars are not set, and there is no cached value.
4354 ac_x_includes=NO ac_x_libraries=NO
4355 rm -fr conftestdir
4356 if mkdir conftestdir; then
4357   cd conftestdir
4358   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4359   cat > Imakefile <<'EOF'
4360 acfindx:
4361         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4362 EOF
4363   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4364     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4365     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4366     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4367     for ac_extension in a so sl; do
4368       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4369         test -f $ac_im_libdir/libX11.$ac_extension; then
4370         ac_im_usrlibdir=$ac_im_libdir; break
4371       fi
4372     done
4373     # Screen out bogus values from the imake configuration.  They are
4374     # bogus both because they are the default anyway, and because
4375     # using them would break gcc on systems where it needs fixed includes.
4376     case "$ac_im_incroot" in
4377         /usr/include) ;;
4378         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4379     esac
4380     case "$ac_im_usrlibdir" in
4381         /usr/lib | /lib) ;;
4382         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4383     esac
4384   fi
4385   cd ..
4386   rm -fr conftestdir
4387 fi
4388
4389 if test "$ac_x_includes" = NO; then
4390   # Guess where to find include files, by looking for this one X11 .h file.
4391   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4392
4393   # First, try using that file with no special directory specified.
4394 cat > conftest.$ac_ext <<EOF
4395 #line 4396 "configure"
4396 #include "confdefs.h"
4397 #include <$x_direct_test_include>
4398 EOF
4399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4400 { (eval echo configure:4401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4402 if test -z "$ac_err"; then
4403   rm -rf conftest*
4404   # We can compile using X headers with no special include directory.
4405 ac_x_includes=
4406 else
4407   echo "$ac_err" >&5
4408   echo "configure: failed program was:" >&5
4409   cat conftest.$ac_ext >&5
4410   rm -rf conftest*
4411   # Look for the header file in a standard set of common directories.
4412 # Check X11 before X11Rn because it is often a symlink to the current release.
4413   for ac_dir in               \
4414     /usr/X11/include          \
4415     /usr/X11R6/include        \
4416     /usr/X11R5/include        \
4417     /usr/X11R4/include        \
4418                               \
4419     /usr/include/X11          \
4420     /usr/include/X11R6        \
4421     /usr/include/X11R5        \
4422     /usr/include/X11R4        \
4423                               \
4424     /usr/local/X11/include    \
4425     /usr/local/X11R6/include  \
4426     /usr/local/X11R5/include  \
4427     /usr/local/X11R4/include  \
4428                               \
4429     /usr/local/include/X11    \
4430     /usr/local/include/X11R6  \
4431     /usr/local/include/X11R5  \
4432     /usr/local/include/X11R4  \
4433                               \
4434     /usr/X386/include         \
4435     /usr/x386/include         \
4436     /usr/XFree86/include/X11  \
4437                               \
4438     /usr/include              \
4439     /usr/local/include        \
4440     /usr/unsupported/include  \
4441     /usr/athena/include       \
4442     /usr/local/x11r5/include  \
4443     /usr/lpp/Xamples/include  \
4444                               \
4445     /usr/openwin/include      \
4446     /usr/openwin/share/include \
4447     ; \
4448   do
4449     if test -r "$ac_dir/$x_direct_test_include"; then
4450       ac_x_includes=$ac_dir
4451       break
4452     fi
4453   done
4454 fi
4455 rm -f conftest*
4456 fi # $ac_x_includes = NO
4457
4458 if test "$ac_x_libraries" = NO; then
4459   # Check for the libraries.
4460
4461   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4462   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4463
4464   # See if we find them without any special options.
4465   # Don't add to $LIBS permanently.
4466   ac_save_LIBS="$LIBS"
4467   LIBS="-l$x_direct_test_library $LIBS"
4468 cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471
4472 int main() {
4473 ${x_direct_test_function}()
4474 ; return 0; }
4475 EOF
4476 if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4477   rm -rf conftest*
4478   LIBS="$ac_save_LIBS"
4479 # We can link X programs with no special library path.
4480 ac_x_libraries=
4481 else
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -rf conftest*
4485   LIBS="$ac_save_LIBS"
4486 # First see if replacing the include by lib works.
4487 # Check X11 before X11Rn because it is often a symlink to the current release.
4488 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4489     /usr/X11/lib          \
4490     /usr/X11R6/lib        \
4491     /usr/X11R5/lib        \
4492     /usr/X11R4/lib        \
4493                           \
4494     /usr/lib/X11          \
4495     /usr/lib/X11R6        \
4496     /usr/lib/X11R5        \
4497     /usr/lib/X11R4        \
4498                           \
4499     /usr/local/X11/lib    \
4500     /usr/local/X11R6/lib  \
4501     /usr/local/X11R5/lib  \
4502     /usr/local/X11R4/lib  \
4503                           \
4504     /usr/local/lib/X11    \
4505     /usr/local/lib/X11R6  \
4506     /usr/local/lib/X11R5  \
4507     /usr/local/lib/X11R4  \
4508                           \
4509     /usr/X386/lib         \
4510     /usr/x386/lib         \
4511     /usr/XFree86/lib/X11  \
4512                           \
4513     /usr/lib              \
4514     /usr/local/lib        \
4515     /usr/unsupported/lib  \
4516     /usr/athena/lib       \
4517     /usr/local/x11r5/lib  \
4518     /usr/lpp/Xamples/lib  \
4519     /lib/usr/lib/X11      \
4520                           \
4521     /usr/openwin/lib      \
4522     /usr/openwin/share/lib \
4523     ; \
4524 do
4525   for ac_extension in a so sl; do
4526     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4527       ac_x_libraries=$ac_dir
4528       break 2
4529     fi
4530   done
4531 done
4532 fi
4533 rm -f conftest*
4534 fi # $ac_x_libraries = NO
4535
4536 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4537   # Didn't find X anywhere.  Cache the known absence of X.
4538   ac_cv_have_x="have_x=no"
4539 else
4540   # Record where we found X for the cache.
4541   ac_cv_have_x="have_x=yes \
4542                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4543 fi
4544 fi
4545   fi
4546   eval "$ac_cv_have_x"
4547 fi # $with_x != no
4548
4549 if test "$have_x" != yes; then
4550   echo "$ac_t""$have_x" 1>&6
4551   no_x=yes
4552 else
4553   # If each of the values was on the command line, it overrides each guess.
4554   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4555   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4556   # Update the cache value to reflect the command line values.
4557   ac_cv_have_x="have_x=yes \
4558                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4559   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4560 fi
4561
4562 if test "$no_x" = yes; then
4563   # Not all programs may use this symbol, but it does not hurt to define it.
4564   cat >> confdefs.h <<\EOF
4565 #define X_DISPLAY_MISSING 1
4566 EOF
4567
4568   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4569 else
4570   if test -n "$x_includes"; then
4571     X_CFLAGS="$X_CFLAGS -I$x_includes"
4572   fi
4573
4574   # It would also be nice to do this for all -L options, not just this one.
4575   if test -n "$x_libraries"; then
4576     X_LIBS="$X_LIBS -L$x_libraries"
4577     # For Solaris; some versions of Sun CC require a space after -R and
4578     # others require no space.  Words are not sufficient . . . .
4579     case "`(uname -sr) 2>/dev/null`" in
4580     "SunOS 5"*)
4581       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4582 echo "configure:4583: checking whether -R must be followed by a space" >&5
4583       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4584       cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587
4588 int main() {
4589
4590 ; return 0; }
4591 EOF
4592 if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4593   rm -rf conftest*
4594   ac_R_nospace=yes
4595 else
4596   echo "configure: failed program was:" >&5
4597   cat conftest.$ac_ext >&5
4598   rm -rf conftest*
4599   ac_R_nospace=no
4600 fi
4601 rm -f conftest*
4602       if test $ac_R_nospace = yes; then
4603         echo "$ac_t""no" 1>&6
4604         X_LIBS="$X_LIBS -R$x_libraries"
4605       else
4606         LIBS="$ac_xsave_LIBS -R $x_libraries"
4607         cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610
4611 int main() {
4612
4613 ; return 0; }
4614 EOF
4615 if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4616   rm -rf conftest*
4617   ac_R_space=yes
4618 else
4619   echo "configure: failed program was:" >&5
4620   cat conftest.$ac_ext >&5
4621   rm -rf conftest*
4622   ac_R_space=no
4623 fi
4624 rm -f conftest*
4625         if test $ac_R_space = yes; then
4626           echo "$ac_t""yes" 1>&6
4627           X_LIBS="$X_LIBS -R $x_libraries"
4628         else
4629           echo "$ac_t""neither works" 1>&6
4630         fi
4631       fi
4632       LIBS="$ac_xsave_LIBS"
4633     esac
4634   fi
4635
4636   # Check for system-dependent libraries X programs must link with.
4637   # Do this before checking for the system-independent R6 libraries
4638   # (-lICE), since we may need -lsocket or whatever for X linking.
4639
4640   if test "$ISC" = yes; then
4641     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4642   else
4643     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4644     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4645     # the Alpha needs dnet_stub (dnet does not exist).
4646     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4647 echo "configure:4648: checking for dnet_ntoa in -ldnet" >&5
4648 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   ac_save_LIBS="$LIBS"
4653 LIBS="-ldnet  $LIBS"
4654 cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 /* Override any gcc2 internal prototype to avoid an error.  */
4658 /* We use char because int might match the return type of a gcc2
4659     builtin and then its argument prototype would still apply.  */
4660 char dnet_ntoa();
4661
4662 int main() {
4663 dnet_ntoa()
4664 ; return 0; }
4665 EOF
4666 if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4667   rm -rf conftest*
4668   eval "ac_cv_lib_$ac_lib_var=yes"
4669 else
4670   echo "configure: failed program was:" >&5
4671   cat conftest.$ac_ext >&5
4672   rm -rf conftest*
4673   eval "ac_cv_lib_$ac_lib_var=no"
4674 fi
4675 rm -f conftest*
4676 LIBS="$ac_save_LIBS"
4677
4678 fi
4679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4680   echo "$ac_t""yes" 1>&6
4681   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4687       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4688 echo "configure:4689: checking for dnet_ntoa in -ldnet_stub" >&5
4689 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4690 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4691   echo $ac_n "(cached) $ac_c" 1>&6
4692 else
4693   ac_save_LIBS="$LIBS"
4694 LIBS="-ldnet_stub  $LIBS"
4695 cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 /* We use char because int might match the return type of a gcc2
4700     builtin and then its argument prototype would still apply.  */
4701 char dnet_ntoa();
4702
4703 int main() {
4704 dnet_ntoa()
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708   rm -rf conftest*
4709   eval "ac_cv_lib_$ac_lib_var=yes"
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   eval "ac_cv_lib_$ac_lib_var=no"
4715 fi
4716 rm -f conftest*
4717 LIBS="$ac_save_LIBS"
4718
4719 fi
4720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4721   echo "$ac_t""yes" 1>&6
4722   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4723 else
4724   echo "$ac_t""no" 1>&6
4725 fi
4726
4727     fi
4728
4729     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4730     # to get the SysV transport functions.
4731     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4732     # needs -lnsl.
4733     # The nsl library prevents programs from opening the X display
4734     # on Irix 5.2, according to dickey@clark.net.
4735     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4736 echo "configure:4737: checking for gethostbyname" >&5
4737 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743 /* System header to define __stub macros and hopefully few prototypes,
4744     which can conflict with char gethostbyname(); below.  */
4745 #include <assert.h>
4746 /* Override any gcc2 internal prototype to avoid an error.  */
4747 /* We use char because int might match the return type of a gcc2
4748     builtin and then its argument prototype would still apply.  */
4749 char gethostbyname();
4750
4751 int main() {
4752
4753 /* The GNU C library defines this for functions which it implements
4754     to always fail with ENOSYS.  Some functions are actually named
4755     something starting with __ and the normal name is an alias.  */
4756 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4757 choke me
4758 #else
4759 gethostbyname();
4760 #endif
4761
4762 ; return 0; }
4763 EOF
4764 if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4765   rm -rf conftest*
4766   eval "ac_cv_func_gethostbyname=yes"
4767 else
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   eval "ac_cv_func_gethostbyname=no"
4772 fi
4773 rm -f conftest*
4774 fi
4775
4776 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4777   echo "$ac_t""yes" 1>&6
4778   :
4779 else
4780   echo "$ac_t""no" 1>&6
4781 fi
4782
4783     if test $ac_cv_func_gethostbyname = no; then
4784       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4785 echo "configure:4786: checking for gethostbyname in -lnsl" >&5
4786 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4787 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   ac_save_LIBS="$LIBS"
4791 LIBS="-lnsl  $LIBS"
4792 cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795 /* Override any gcc2 internal prototype to avoid an error.  */
4796 /* We use char because int might match the return type of a gcc2
4797     builtin and then its argument prototype would still apply.  */
4798 char gethostbyname();
4799
4800 int main() {
4801 gethostbyname()
4802 ; return 0; }
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4805   rm -rf conftest*
4806   eval "ac_cv_lib_$ac_lib_var=yes"
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -rf conftest*
4811   eval "ac_cv_lib_$ac_lib_var=no"
4812 fi
4813 rm -f conftest*
4814 LIBS="$ac_save_LIBS"
4815
4816 fi
4817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4818   echo "$ac_t""yes" 1>&6
4819   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4820 else
4821   echo "$ac_t""no" 1>&6
4822 fi
4823
4824     fi
4825
4826     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4827     # socket/setsockopt and other routines are undefined under SCO ODT
4828     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4829     # on later versions), says simon@lia.di.epfl.ch: it contains
4830     # gethostby* variants that don't use the nameserver (or something).
4831     # -lsocket must be given before -lnsl if both are needed.
4832     # We assume that if connect needs -lnsl, so does gethostbyname.
4833     echo $ac_n "checking for connect""... $ac_c" 1>&6
4834 echo "configure:4835: checking for connect" >&5
4835 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   cat > conftest.$ac_ext <<EOF
4839 #line 4840 "configure"
4840 #include "confdefs.h"
4841 /* System header to define __stub macros and hopefully few prototypes,
4842     which can conflict with char connect(); below.  */
4843 #include <assert.h>
4844 /* Override any gcc2 internal prototype to avoid an error.  */
4845 /* We use char because int might match the return type of a gcc2
4846     builtin and then its argument prototype would still apply.  */
4847 char connect();
4848
4849 int main() {
4850
4851 /* The GNU C library defines this for functions which it implements
4852     to always fail with ENOSYS.  Some functions are actually named
4853     something starting with __ and the normal name is an alias.  */
4854 #if defined (__stub_connect) || defined (__stub___connect)
4855 choke me
4856 #else
4857 connect();
4858 #endif
4859
4860 ; return 0; }
4861 EOF
4862 if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4863   rm -rf conftest*
4864   eval "ac_cv_func_connect=yes"
4865 else
4866   echo "configure: failed program was:" >&5
4867   cat conftest.$ac_ext >&5
4868   rm -rf conftest*
4869   eval "ac_cv_func_connect=no"
4870 fi
4871 rm -f conftest*
4872 fi
4873
4874 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4875   echo "$ac_t""yes" 1>&6
4876   :
4877 else
4878   echo "$ac_t""no" 1>&6
4879 fi
4880
4881     if test $ac_cv_func_connect = no; then
4882       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4883 echo "configure:4884: checking for connect in -lsocket" >&5
4884 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4885 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4886   echo $ac_n "(cached) $ac_c" 1>&6
4887 else
4888   ac_save_LIBS="$LIBS"
4889 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4890 cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893 /* Override any gcc2 internal prototype to avoid an error.  */
4894 /* We use char because int might match the return type of a gcc2
4895     builtin and then its argument prototype would still apply.  */
4896 char connect();
4897
4898 int main() {
4899 connect()
4900 ; return 0; }
4901 EOF
4902 if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4903   rm -rf conftest*
4904   eval "ac_cv_lib_$ac_lib_var=yes"
4905 else
4906   echo "configure: failed program was:" >&5
4907   cat conftest.$ac_ext >&5
4908   rm -rf conftest*
4909   eval "ac_cv_lib_$ac_lib_var=no"
4910 fi
4911 rm -f conftest*
4912 LIBS="$ac_save_LIBS"
4913
4914 fi
4915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4916   echo "$ac_t""yes" 1>&6
4917   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4918 else
4919   echo "$ac_t""no" 1>&6
4920 fi
4921
4922     fi
4923
4924     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4925     echo $ac_n "checking for remove""... $ac_c" 1>&6
4926 echo "configure:4927: checking for remove" >&5
4927 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4928   echo $ac_n "(cached) $ac_c" 1>&6
4929 else
4930   cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933 /* System header to define __stub macros and hopefully few prototypes,
4934     which can conflict with char remove(); below.  */
4935 #include <assert.h>
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 /* We use char because int might match the return type of a gcc2
4938     builtin and then its argument prototype would still apply.  */
4939 char remove();
4940
4941 int main() {
4942
4943 /* The GNU C library defines this for functions which it implements
4944     to always fail with ENOSYS.  Some functions are actually named
4945     something starting with __ and the normal name is an alias.  */
4946 #if defined (__stub_remove) || defined (__stub___remove)
4947 choke me
4948 #else
4949 remove();
4950 #endif
4951
4952 ; return 0; }
4953 EOF
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955   rm -rf conftest*
4956   eval "ac_cv_func_remove=yes"
4957 else
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   eval "ac_cv_func_remove=no"
4962 fi
4963 rm -f conftest*
4964 fi
4965
4966 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968   :
4969 else
4970   echo "$ac_t""no" 1>&6
4971 fi
4972
4973     if test $ac_cv_func_remove = no; then
4974       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
4975 echo "configure:4976: checking for remove in -lposix" >&5
4976 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
4977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4978   echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980   ac_save_LIBS="$LIBS"
4981 LIBS="-lposix  $LIBS"
4982 cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 /* Override any gcc2 internal prototype to avoid an error.  */
4986 /* We use char because int might match the return type of a gcc2
4987     builtin and then its argument prototype would still apply.  */
4988 char remove();
4989
4990 int main() {
4991 remove()
4992 ; return 0; }
4993 EOF
4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4995   rm -rf conftest*
4996   eval "ac_cv_lib_$ac_lib_var=yes"
4997 else
4998   echo "configure: failed program was:" >&5
4999   cat conftest.$ac_ext >&5
5000   rm -rf conftest*
5001   eval "ac_cv_lib_$ac_lib_var=no"
5002 fi
5003 rm -f conftest*
5004 LIBS="$ac_save_LIBS"
5005
5006 fi
5007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5008   echo "$ac_t""yes" 1>&6
5009   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5010 else
5011   echo "$ac_t""no" 1>&6
5012 fi
5013
5014     fi
5015
5016     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5017     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5018 echo "configure:5019: checking for shmat" >&5
5019 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   cat > conftest.$ac_ext <<EOF
5023 #line 5024 "configure"
5024 #include "confdefs.h"
5025 /* System header to define __stub macros and hopefully few prototypes,
5026     which can conflict with char shmat(); below.  */
5027 #include <assert.h>
5028 /* Override any gcc2 internal prototype to avoid an error.  */
5029 /* We use char because int might match the return type of a gcc2
5030     builtin and then its argument prototype would still apply.  */
5031 char shmat();
5032
5033 int main() {
5034
5035 /* The GNU C library defines this for functions which it implements
5036     to always fail with ENOSYS.  Some functions are actually named
5037     something starting with __ and the normal name is an alias.  */
5038 #if defined (__stub_shmat) || defined (__stub___shmat)
5039 choke me
5040 #else
5041 shmat();
5042 #endif
5043
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   eval "ac_cv_func_shmat=yes"
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   eval "ac_cv_func_shmat=no"
5054 fi
5055 rm -f conftest*
5056 fi
5057
5058 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5059   echo "$ac_t""yes" 1>&6
5060   :
5061 else
5062   echo "$ac_t""no" 1>&6
5063 fi
5064
5065     if test $ac_cv_func_shmat = no; then
5066       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5067 echo "configure:5068: checking for shmat in -lipc" >&5
5068 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072   ac_save_LIBS="$LIBS"
5073 LIBS="-lipc  $LIBS"
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077 /* Override any gcc2 internal prototype to avoid an error.  */
5078 /* We use char because int might match the return type of a gcc2
5079     builtin and then its argument prototype would still apply.  */
5080 char shmat();
5081
5082 int main() {
5083 shmat()
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087   rm -rf conftest*
5088   eval "ac_cv_lib_$ac_lib_var=yes"
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -rf conftest*
5093   eval "ac_cv_lib_$ac_lib_var=no"
5094 fi
5095 rm -f conftest*
5096 LIBS="$ac_save_LIBS"
5097
5098 fi
5099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5100   echo "$ac_t""yes" 1>&6
5101   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5102 else
5103   echo "$ac_t""no" 1>&6
5104 fi
5105
5106     fi
5107   fi
5108
5109   # Check for libraries that X11R6 Xt/Xaw programs need.
5110   ac_save_LDFLAGS="$LDFLAGS"
5111   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5112   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5113   # check for ICE first), but we must link in the order -lSM -lICE or
5114   # we get undefined symbols.  So assume we have SM if we have ICE.
5115   # These have to be linked with before -lX11, unlike the other
5116   # libraries we check for below, so use a different variable.
5117   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5118   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5119 echo "configure:5120: checking for IceConnectionNumber in -lICE" >&5
5120 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5122   echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124   ac_save_LIBS="$LIBS"
5125 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5126 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* Override any gcc2 internal prototype to avoid an error.  */
5130 /* We use char because int might match the return type of a gcc2
5131     builtin and then its argument prototype would still apply.  */
5132 char IceConnectionNumber();
5133
5134 int main() {
5135 IceConnectionNumber()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 LIBS="$ac_save_LIBS"
5149
5150 fi
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5152   echo "$ac_t""yes" 1>&6
5153   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5154 else
5155   echo "$ac_t""no" 1>&6
5156 fi
5157
5158   LDFLAGS="$ac_save_LDFLAGS"
5159
5160 fi
5161
5162
5163 # try to find motif headers and libraries
5164
5165
5166
5167 motif_includes=
5168 motif_libraries=
5169
5170
5171 if test "$no_x" = "yes"
5172 then
5173   motif_includes=none
5174   motif_libraries=none
5175 fi
5176
5177 # Check whether --with-motif-includes or --without-motif-includes was given.
5178 if test "${with_motif_includes+set}" = set; then
5179   withval="$with_motif_includes"
5180   motif_includes="$withval"
5181 fi
5182
5183
5184 # Check whether --with-motif-libraries or --without-motif-libraries was given.
5185 if test "${with_motif_libraries+set}" = set; then
5186   withval="$with_motif_libraries"
5187   motif_libraries="$withval"
5188 fi
5189
5190
5191 echo $ac_n "checking for Motif""... $ac_c" 1>&6
5192 echo "configure:5193: checking for Motif" >&5
5193
5194
5195 #
5196 #
5197 # Search the include files.
5198 #
5199 if test "$motif_includes" = ""; then
5200 if eval "test \"`echo '$''{'ac_cv_motif_includes'+set}'`\" = set"; then
5201   echo $ac_n "(cached) $ac_c" 1>&6
5202 else
5203   
5204 ac_motif_save_LIBS="$LIBS"
5205 ac_motif_save_INCLUDES="$INCLUDES"
5206 ac_motif_save_CPPFLAGS="$CPPFLAGS"
5207 ac_motif_save_LDFLAGS="$LDFLAGS"
5208 #
5209 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
5210 INCLUDES="$X_CFLAGS $INCLUDES"
5211 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
5212 LDFLAGS="$X_LIBS $LDFLAGS"
5213 #
5214 ac_cv_motif_includes="none"
5215 cat > conftest.$ac_ext <<EOF
5216 #line 5217 "configure"
5217 #include "confdefs.h"
5218 #include <Xm/Xm.h>
5219 int main() {
5220 int a;
5221 ; return 0; }
5222 EOF
5223 if { (eval echo configure:5224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5224   rm -rf conftest*
5225   
5226 # Xm/Xm.h is in the standard search path.
5227 ac_cv_motif_includes=
5228
5229 else
5230   echo "configure: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   rm -rf conftest*
5233   
5234 # Xm/Xm.h is not in the standard search path.
5235 # Locate it and put its directory in `motif_includes'
5236 #
5237 # /usr/include/Motif* are used on HP-UX (Motif).
5238 # /usr/include/X11* are used on HP-UX (X and Athena).
5239 # /usr/dt is used on Solaris (Motif).
5240 # /usr/openwin is used on Solaris (X and Athena).
5241 # Other directories are just guesses.
5242 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
5243            /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
5244            /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
5245            /usr/dt/include /usr/openwin/include \
5246            /usr/dt/*/include /opt/*/include /usr/include/Motif* \
5247            "${prefix}"/*/include /usr/*/include /usr/local/*/include \
5248            "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
5249 if test -f "$dir/Xm/Xm.h"; then
5250 ac_cv_motif_includes="$dir"
5251 break
5252 fi
5253 done
5254
5255 fi
5256 rm -f conftest*
5257 #
5258 LIBS="$ac_motif_save_LIBS"
5259 INCLUDES="$ac_motif_save_INCLUDES"
5260 CPPFLAGS="$ac_motif_save_CPPFLAGS"
5261 LDFLAGS="$ac_motif_save_LDFLAGS"
5262
5263 fi
5264
5265 motif_includes="$ac_cv_motif_includes"
5266 fi
5267 #
5268 #
5269 # Now for the libraries.
5270 #
5271 if test "$motif_libraries" = ""; then
5272 if eval "test \"`echo '$''{'ac_cv_motif_libraries'+set}'`\" = set"; then
5273   echo $ac_n "(cached) $ac_c" 1>&6
5274 else
5275   
5276 ac_motif_save_LIBS="$LIBS"
5277 ac_motif_save_INCLUDES="$INCLUDES"
5278 ac_motif_save_CPPFLAGS="$CPPFLAGS"
5279 ac_motif_save_LDFLAGS="$LDFLAGS"
5280 #
5281 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
5282 INCLUDES="$X_CFLAGS $INCLUDES"
5283 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
5284 LDFLAGS="$X_LIBS $LDFLAGS"
5285 #
5286 ac_cv_motif_libraries="none"
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290 #include <Xm/Xm.h>
5291 int main() {
5292 XtToolkitInitialize();
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5296   rm -rf conftest*
5297   
5298 # libXm.a is in the standard search path.
5299 ac_cv_motif_libraries=
5300
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304   rm -rf conftest*
5305   
5306 # libXm.a is not in the standard search path.
5307 # Locate it and put its directory in `motif_libraries'
5308 #
5309 # /usr/lib/Motif* are used on HP-UX (Motif).
5310 # /usr/lib/X11* are used on HP-UX (X and Athena).
5311 # /usr/dt is used on Solaris (Motif).
5312 # /usr/lesstif is used on Linux (Lesstif).
5313 # /usr/openwin is used on Solaris (X and Athena).
5314 # Other directories are just guesses.
5315 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
5316            /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
5317            /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
5318            /usr/dt/lib /usr/openwin/lib \
5319            /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
5320            /usr/lesstif*/lib /usr/lib/Lesstif* \
5321            "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
5322            "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
5323 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
5324 ac_cv_motif_libraries="$dir"
5325 break
5326 fi
5327 done
5328
5329 fi
5330 rm -f conftest*
5331 #
5332 LIBS="$ac_motif_save_LIBS"
5333 INCLUDES="$ac_motif_save_INCLUDES"
5334 CPPFLAGS="$ac_motif_save_CPPFLAGS"
5335 LDFLAGS="$ac_motif_save_LDFLAGS"
5336
5337 fi
5338
5339 #
5340 motif_libraries="$ac_cv_motif_libraries"
5341 fi
5342 #
5343 # Provide an easier way to link
5344 #
5345 if test "$motif_includes" = "none" -o "$motif_libraries" = "none"; then
5346         with_motif="no"
5347 else
5348         with_motif="yes"
5349 fi
5350
5351 if test "$with_motif" != "no"; then
5352         if test "$motif_libraries" = ""; then
5353                 link_motif="-lXm -lXt"
5354                 MOTIF_LIBS="-lXm -lXt"
5355         else
5356                 link_motif="-L$motif_libraries -lXm -lXt"
5357                 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
5358         fi
5359         if test "$motif_includes" != ""; then
5360                 include_motif="-I$motif_includes"
5361                 MOTIF_INCLUDES="-I$motif_includes"
5362         fi
5363         LIBS="$LIBS $MOTIF_LIBS"
5364         INCLUDES="$INCLUDES $MOTIF_INCLUDES"
5365         cat >> confdefs.h <<\EOF
5366 #define HAVE_MOTIF 
5367 EOF
5368
5369 else
5370         with_motif="no"
5371 fi
5372 #
5373 #
5374 #
5375 #
5376 motif_libraries_result="$motif_libraries"
5377 motif_includes_result="$motif_includes"
5378 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
5379 test "$motif_includes_result" = "" && motif_includes_result="in default path"
5380 test "$motif_libraries_result" = "none" && motif_libraries_result="(none)"
5381 test "$motif_includes_result" = "none" && motif_includes_result="(none)"
5382 echo "$ac_t""libraries $motif_libraries_result, headers $motif_includes_result" 1>&6
5383
5384 if test "$motif_includes" = "none" -a "$motif_libraries" != "none"; then
5385   echo "configure: warning:  In addition to Motif/Lesstif libraries we also need includes. Disabling." 1>&2
5386   motif_include=none
5387 fi
5388
5389 if test "$motif_includes" != "none"; then
5390   use_motif="yes"
5391 else
5392   use_motif="no"
5393 fi
5394
5395 #####
5396 # Checks for header files.
5397
5398 for ac_hdr in limits.h malloc.h strings.h unistd.h
5399 do
5400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5402 echo "configure:5403: checking for $ac_hdr" >&5
5403 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5404   echo $ac_n "(cached) $ac_c" 1>&6
5405 else
5406   cat > conftest.$ac_ext <<EOF
5407 #line 5408 "configure"
5408 #include "confdefs.h"
5409 #include <$ac_hdr>
5410 EOF
5411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5412 { (eval echo configure:5413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5414 if test -z "$ac_err"; then
5415   rm -rf conftest*
5416   eval "ac_cv_header_$ac_safe=yes"
5417 else
5418   echo "$ac_err" >&5
5419   echo "configure: failed program was:" >&5
5420   cat conftest.$ac_ext >&5
5421   rm -rf conftest*
5422   eval "ac_cv_header_$ac_safe=no"
5423 fi
5424 rm -f conftest*
5425 fi
5426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5427   echo "$ac_t""yes" 1>&6
5428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5429   cat >> confdefs.h <<EOF
5430 #define $ac_tr_hdr 1
5431 EOF
5432  
5433 else
5434   echo "$ac_t""no" 1>&6
5435 { echo "configure: error: Include headers not found" 1>&2; exit 1; }
5436 fi
5437 done
5438
5439
5440 #####
5441 # Checks for typedefs, structures, and compiler characteristics.
5442 echo $ac_n "checking for working const""... $ac_c" 1>&6
5443 echo "configure:5444: checking for working const" >&5
5444 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5445   echo $ac_n "(cached) $ac_c" 1>&6
5446 else
5447   cat > conftest.$ac_ext <<EOF
5448 #line 5449 "configure"
5449 #include "confdefs.h"
5450
5451 int main() {
5452
5453 /* Ultrix mips cc rejects this.  */
5454 typedef int charset[2]; const charset x;
5455 /* SunOS 4.1.1 cc rejects this.  */
5456 char const *const *ccp;
5457 char **p;
5458 /* NEC SVR4.0.2 mips cc rejects this.  */
5459 struct point {int x, y;};
5460 static struct point const zero = {0,0};
5461 /* AIX XL C 1.02.0.0 rejects this.
5462    It does not let you subtract one const X* pointer from another in an arm
5463    of an if-expression whose if-part is not a constant expression */
5464 const char *g = "string";
5465 ccp = &g + (g ? g-g : 0);
5466 /* HPUX 7.0 cc rejects these. */
5467 ++ccp;
5468 p = (char**) ccp;
5469 ccp = (char const *const *) p;
5470 { /* SCO 3.2v4 cc rejects this.  */
5471   char *t;
5472   char const *s = 0 ? (char *) 0 : (char const *) 0;
5473
5474   *t++ = 0;
5475 }
5476 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5477   int x[] = {25, 17};
5478   const int *foo = &x[0];
5479   ++foo;
5480 }
5481 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5482   typedef const int *iptr;
5483   iptr p = 0;
5484   ++p;
5485 }
5486 { /* AIX XL C 1.02.0.0 rejects this saying
5487      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5488   struct s { int j; const int *ap[3]; };
5489   struct s *b; b->j = 5;
5490 }
5491 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5492   const int foo = 10;
5493 }
5494
5495 ; return 0; }
5496 EOF
5497 if { (eval echo configure:5498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5498   rm -rf conftest*
5499   ac_cv_c_const=yes
5500 else
5501   echo "configure: failed program was:" >&5
5502   cat conftest.$ac_ext >&5
5503   rm -rf conftest*
5504   ac_cv_c_const=no
5505 fi
5506 rm -f conftest*
5507 fi
5508
5509 echo "$ac_t""$ac_cv_c_const" 1>&6
5510 if test $ac_cv_c_const = no; then
5511   cat >> confdefs.h <<\EOF
5512 #define const 
5513 EOF
5514
5515 fi
5516
5517 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5518 echo "configure:5519: checking for ANSI C header files" >&5
5519 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5520   echo $ac_n "(cached) $ac_c" 1>&6
5521 else
5522   cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 #include <stdlib.h>
5526 #include <stdarg.h>
5527 #include <string.h>
5528 #include <float.h>
5529 EOF
5530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5531 { (eval echo configure:5532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5533 if test -z "$ac_err"; then
5534   rm -rf conftest*
5535   ac_cv_header_stdc=yes
5536 else
5537   echo "$ac_err" >&5
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   ac_cv_header_stdc=no
5542 fi
5543 rm -f conftest*
5544
5545 if test $ac_cv_header_stdc = yes; then
5546   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 #include <string.h>
5551 EOF
5552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5553   egrep "memchr" >/dev/null 2>&1; then
5554   :
5555 else
5556   rm -rf conftest*
5557   ac_cv_header_stdc=no
5558 fi
5559 rm -f conftest*
5560
5561 fi
5562
5563 if test $ac_cv_header_stdc = yes; then
5564   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5565 cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 #include <stdlib.h>
5569 EOF
5570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5571   egrep "free" >/dev/null 2>&1; then
5572   :
5573 else
5574   rm -rf conftest*
5575   ac_cv_header_stdc=no
5576 fi
5577 rm -f conftest*
5578
5579 fi
5580
5581 if test $ac_cv_header_stdc = yes; then
5582   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5583 if test "$cross_compiling" = yes; then
5584   :
5585 else
5586   cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 #include <ctype.h>
5590 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5591 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5592 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5593 int main () { int i; for (i = 0; i < 256; i++)
5594 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5595 exit (0); }
5596
5597 EOF
5598 if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5599 then
5600   :
5601 else
5602   echo "configure: failed program was:" >&5
5603   cat conftest.$ac_ext >&5
5604   rm -fr conftest*
5605   ac_cv_header_stdc=no
5606 fi
5607 rm -fr conftest*
5608 fi
5609
5610 fi
5611 fi
5612
5613 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5614 if test $ac_cv_header_stdc = yes; then
5615   cat >> confdefs.h <<\EOF
5616 #define STDC_HEADERS 1
5617 EOF
5618
5619 fi
5620
5621 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5622 echo "configure:5623: checking for size_t" >&5
5623 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5624   echo $ac_n "(cached) $ac_c" 1>&6
5625 else
5626   cat > conftest.$ac_ext <<EOF
5627 #line 5628 "configure"
5628 #include "confdefs.h"
5629 #include <sys/types.h>
5630 #if STDC_HEADERS
5631 #include <stdlib.h>
5632 #include <stddef.h>
5633 #endif
5634 EOF
5635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5636   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5637   rm -rf conftest*
5638   ac_cv_type_size_t=yes
5639 else
5640   rm -rf conftest*
5641   ac_cv_type_size_t=no
5642 fi
5643 rm -f conftest*
5644
5645 fi
5646 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5647 if test $ac_cv_type_size_t = no; then
5648   cat >> confdefs.h <<\EOF
5649 #define size_t unsigned
5650 EOF
5651
5652 fi
5653
5654 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5655 echo "configure:5656: checking whether struct tm is in sys/time.h or time.h" >&5
5656 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5657   echo $ac_n "(cached) $ac_c" 1>&6
5658 else
5659   cat > conftest.$ac_ext <<EOF
5660 #line 5661 "configure"
5661 #include "confdefs.h"
5662 #include <sys/types.h>
5663 #include <time.h>
5664 int main() {
5665 struct tm *tp; tp->tm_sec;
5666 ; return 0; }
5667 EOF
5668 if { (eval echo configure:5669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5669   rm -rf conftest*
5670   ac_cv_struct_tm=time.h
5671 else
5672   echo "configure: failed program was:" >&5
5673   cat conftest.$ac_ext >&5
5674   rm -rf conftest*
5675   ac_cv_struct_tm=sys/time.h
5676 fi
5677 rm -f conftest*
5678 fi
5679
5680 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5681 if test $ac_cv_struct_tm = sys/time.h; then
5682   cat >> confdefs.h <<\EOF
5683 #define TM_IN_SYS_TIME 1
5684 EOF
5685
5686 fi
5687
5688 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5689 echo "configure:5690: checking for uid_t in sys/types.h" >&5
5690 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5691   echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693   cat > conftest.$ac_ext <<EOF
5694 #line 5695 "configure"
5695 #include "confdefs.h"
5696 #include <sys/types.h>
5697 EOF
5698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5699   egrep "uid_t" >/dev/null 2>&1; then
5700   rm -rf conftest*
5701   ac_cv_type_uid_t=yes
5702 else
5703   rm -rf conftest*
5704   ac_cv_type_uid_t=no
5705 fi
5706 rm -f conftest*
5707
5708 fi
5709
5710 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
5711 if test $ac_cv_type_uid_t = no; then
5712   cat >> confdefs.h <<\EOF
5713 #define uid_t int
5714 EOF
5715
5716   cat >> confdefs.h <<\EOF
5717 #define gid_t int
5718 EOF
5719
5720 fi
5721
5722 echo $ac_n "checking for inline""... $ac_c" 1>&6
5723 echo "configure:5724: checking for inline" >&5
5724 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   ac_cv_c_inline=no
5728 for ac_kw in inline __inline__ __inline; do
5729   cat > conftest.$ac_ext <<EOF
5730 #line 5731 "configure"
5731 #include "confdefs.h"
5732
5733 int main() {
5734 } $ac_kw foo() {
5735 ; return 0; }
5736 EOF
5737 if { (eval echo configure:5738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5738   rm -rf conftest*
5739   ac_cv_c_inline=$ac_kw; break
5740 else
5741   echo "configure: failed program was:" >&5
5742   cat conftest.$ac_ext >&5
5743 fi
5744 rm -f conftest*
5745 done
5746
5747 fi
5748
5749 echo "$ac_t""$ac_cv_c_inline" 1>&6
5750 case "$ac_cv_c_inline" in
5751   inline | yes) ;;
5752   no) cat >> confdefs.h <<\EOF
5753 #define inline 
5754 EOF
5755  ;;
5756   *)  cat >> confdefs.h <<EOF
5757 #define inline $ac_cv_c_inline
5758 EOF
5759  ;;
5760 esac
5761
5762
5763 #####
5764 # Checks for library functions.
5765 #AC_FUNC_MALLOC
5766 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
5767 echo "configure:5768: checking for 8-bit clean memcmp" >&5
5768 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
5769   echo $ac_n "(cached) $ac_c" 1>&6
5770 else
5771   if test "$cross_compiling" = yes; then
5772   ac_cv_func_memcmp_clean=no
5773 else
5774   cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777
5778 main()
5779 {
5780   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5781   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
5782 }
5783
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5786 then
5787   ac_cv_func_memcmp_clean=yes
5788 else
5789   echo "configure: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   rm -fr conftest*
5792   ac_cv_func_memcmp_clean=no
5793 fi
5794 rm -fr conftest*
5795 fi
5796
5797 fi
5798
5799 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
5800 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
5801
5802 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5803 echo "configure:5804: checking return type of signal handlers" >&5
5804 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5805   echo $ac_n "(cached) $ac_c" 1>&6
5806 else
5807   cat > conftest.$ac_ext <<EOF
5808 #line 5809 "configure"
5809 #include "confdefs.h"
5810 #include <sys/types.h>
5811 #include <signal.h>
5812 #ifdef signal
5813 #undef signal
5814 #endif
5815 #ifdef __cplusplus
5816 extern "C" void (*signal (int, void (*)(int)))(int);
5817 #else
5818 void (*signal ()) ();
5819 #endif
5820
5821 int main() {
5822 int i;
5823 ; return 0; }
5824 EOF
5825 if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5826   rm -rf conftest*
5827   ac_cv_type_signal=void
5828 else
5829   echo "configure: failed program was:" >&5
5830   cat conftest.$ac_ext >&5
5831   rm -rf conftest*
5832   ac_cv_type_signal=int
5833 fi
5834 rm -f conftest*
5835 fi
5836
5837 echo "$ac_t""$ac_cv_type_signal" 1>&6
5838 cat >> confdefs.h <<EOF
5839 #define RETSIGTYPE $ac_cv_type_signal
5840 EOF
5841
5842
5843 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
5844 echo "configure:5845: checking for vprintf" >&5
5845 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
5846   echo $ac_n "(cached) $ac_c" 1>&6
5847 else
5848   cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851 /* System header to define __stub macros and hopefully few prototypes,
5852     which can conflict with char vprintf(); below.  */
5853 #include <assert.h>
5854 /* Override any gcc2 internal prototype to avoid an error.  */
5855 /* We use char because int might match the return type of a gcc2
5856     builtin and then its argument prototype would still apply.  */
5857 char vprintf();
5858
5859 int main() {
5860
5861 /* The GNU C library defines this for functions which it implements
5862     to always fail with ENOSYS.  Some functions are actually named
5863     something starting with __ and the normal name is an alias.  */
5864 #if defined (__stub_vprintf) || defined (__stub___vprintf)
5865 choke me
5866 #else
5867 vprintf();
5868 #endif
5869
5870 ; return 0; }
5871 EOF
5872 if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5873   rm -rf conftest*
5874   eval "ac_cv_func_vprintf=yes"
5875 else
5876   echo "configure: failed program was:" >&5
5877   cat conftest.$ac_ext >&5
5878   rm -rf conftest*
5879   eval "ac_cv_func_vprintf=no"
5880 fi
5881 rm -f conftest*
5882 fi
5883
5884 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
5885   echo "$ac_t""yes" 1>&6
5886   cat >> confdefs.h <<\EOF
5887 #define HAVE_VPRINTF 1
5888 EOF
5889
5890 else
5891   echo "$ac_t""no" 1>&6
5892 fi
5893
5894 if test "$ac_cv_func_vprintf" != yes; then
5895 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
5896 echo "configure:5897: checking for _doprnt" >&5
5897 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
5898   echo $ac_n "(cached) $ac_c" 1>&6
5899 else
5900   cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5903 /* System header to define __stub macros and hopefully few prototypes,
5904     which can conflict with char _doprnt(); below.  */
5905 #include <assert.h>
5906 /* Override any gcc2 internal prototype to avoid an error.  */
5907 /* We use char because int might match the return type of a gcc2
5908     builtin and then its argument prototype would still apply.  */
5909 char _doprnt();
5910
5911 int main() {
5912
5913 /* The GNU C library defines this for functions which it implements
5914     to always fail with ENOSYS.  Some functions are actually named
5915     something starting with __ and the normal name is an alias.  */
5916 #if defined (__stub__doprnt) || defined (__stub____doprnt)
5917 choke me
5918 #else
5919 _doprnt();
5920 #endif
5921
5922 ; return 0; }
5923 EOF
5924 if { (eval echo configure:5925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5925   rm -rf conftest*
5926   eval "ac_cv_func__doprnt=yes"
5927 else
5928   echo "configure: failed program was:" >&5
5929   cat conftest.$ac_ext >&5
5930   rm -rf conftest*
5931   eval "ac_cv_func__doprnt=no"
5932 fi
5933 rm -f conftest*
5934 fi
5935
5936 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
5937   echo "$ac_t""yes" 1>&6
5938   cat >> confdefs.h <<\EOF
5939 #define HAVE_DOPRNT 1
5940 EOF
5941
5942 else
5943   echo "$ac_t""no" 1>&6
5944 fi
5945
5946 fi
5947
5948
5949 #####
5950 # Collect the libraries and includes for X and/or motif
5951 if test "$no_x" != "yes"; then
5952   LIBS="$X_LIBS $LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
5953   INCLUDES="$INCLUDES $X_CFLAGS $MOTIF_CFLAGS" 
5954   
5955
5956 if true; then
5957   USE_X11_TRUE=
5958   USE_X11_FALSE='#'
5959 else
5960   USE_X11_TRUE='#'
5961   USE_X11_FALSE=
5962 fi
5963   use_x11="yes"
5964 else
5965   use_x11="no"
5966   
5967
5968 if false; then
5969   USE_X11_TRUE=
5970   USE_X11_FALSE='#'
5971 else
5972   USE_X11_TRUE='#'
5973   USE_X11_FALSE=
5974 fi
5975 fi
5976
5977 #### 
5978 # And collect the f77 libs to the linker - on Solaris, f77 stuff must go first,
5979 # but on e.g. ibm the mass libraries must come before -lm...
5980 case "${host_cpu}-${host_os}" in
5981   sparc*-solaris*)
5982     LIBS="$FLIBS $LIBS"
5983     ;;
5984   *)
5985     LIBS="$LIBS $FLIBS"
5986     ;;
5987 esac
5988     
5989 ########################################################################
5990 # Substitute things in output and header files.
5991 ########################################################################
5992 SUFFIX=""
5993
5994 if test "$enable_mpi" = "yes"; then
5995         cat >> confdefs.h <<\EOF
5996 #define USE_MPI 
5997 EOF
5998
5999         PAR_OBJ='${mpi_obj}'
6000         if test "$enable_mpi_suffix" = "yes"; then
6001           SUFFIX="_mpi"
6002         fi
6003 else
6004         PAR_OBJ='${libnet_obj}' 
6005 fi
6006
6007 if test "$enable_vector" = "yes"; then
6008         cat >> confdefs.h <<\EOF
6009 #define USE_VECTOR 
6010 EOF
6011
6012 fi
6013
6014 if test "$enable_fortran" = "yes"; then
6015         cat >> confdefs.h <<\EOF
6016 #define USE_FORTRAN 
6017 EOF
6018
6019         INNER_F77_OBJ='${inner_f77_obj}'
6020         
6021
6022 if true; then
6023   USE_FORTRAN_TRUE=
6024   USE_FORTRAN_FALSE='#'
6025 else
6026   USE_FORTRAN_TRUE='#'
6027   USE_FORTRAN_FALSE=
6028 fi
6029 else
6030         INNER_C_OBJ='${inner_c_obj}'
6031         
6032
6033 if false; then
6034   USE_FORTRAN_TRUE=
6035   USE_FORTRAN_FALSE='#'
6036 else
6037   USE_FORTRAN_TRUE='#'
6038   USE_FORTRAN_FALSE=
6039 fi
6040 fi
6041
6042 if test "$enable_double" = "yes"; then
6043         cat >> confdefs.h <<\EOF
6044 #define DOUBLE 
6045 EOF
6046
6047         if test "$enable_type_suffix" = "yes"; then
6048           SUFFIX="${SUFFIX}_d"
6049         fi
6050         
6051
6052 if true; then
6053   USE_DOUBLE_TRUE=
6054   USE_DOUBLE_FALSE='#'
6055 else
6056   USE_DOUBLE_TRUE='#'
6057   USE_DOUBLE_FALSE=
6058 fi
6059 else
6060         
6061
6062 if false; then
6063   USE_DOUBLE_TRUE=
6064   USE_DOUBLE_FALSE='#'
6065 else
6066   USE_DOUBLE_TRUE='#'
6067   USE_DOUBLE_FALSE=
6068 fi
6069 fi
6070
6071 if test "$enable_simplewater" = "yes"; then
6072         cat >> confdefs.h <<\EOF
6073 #define SIMPLEWATER 
6074 EOF
6075
6076 fi
6077
6078 if test "$enable_waterwater_loops" = "no"; then
6079         cat >> confdefs.h <<\EOF
6080 #define DISABLE_WATERWATER_LOOPS 
6081 EOF
6082
6083 fi
6084
6085 if test "$enable_nice" = "no"; then
6086         cat >> confdefs.h <<\EOF
6087 #define NO_NICE 
6088 EOF
6089
6090 fi
6091
6092 if test "$enable_sse" = "yes"; then
6093         cat >> confdefs.h <<\EOF
6094 #define USE_SSE 
6095 EOF
6096
6097         SSE_OBJ='${sse_obj}'
6098 fi
6099
6100 if test "$enable_3dnow" = "yes"; then
6101         cat >> confdefs.h <<\EOF
6102 #define USE_3DNOW 
6103 EOF
6104
6105         TDN_OBJ='${tdn_obj}'
6106 fi
6107
6108 if test "$enable_sse" = "yes" -o "$enable_3dnow" = "yes"; then
6109         X86_ASM_OBJ='${x86_asm_obj}'    
6110 fi
6111
6112 if test "$motif_includes" != "none" -a "$motif_libraries" != "none"; then
6113         MOTIF_OBJ='${motif_obj}'
6114 fi
6115
6116 if test "$enable_xdr" = "yes"; then
6117         cat >> confdefs.h <<\EOF
6118 #define USE_XDR 
6119 EOF
6120
6121         XDR_OBJ='${xdr_obj}'
6122 else
6123         XDR_OBJ='${noxdr_obj}'
6124 fi
6125
6126 if test "$enable_softwaresqrt" = "yes"; then
6127         cat >> confdefs.h <<\EOF
6128 #define SOFTWARE_SQRT 
6129 EOF
6130
6131 fi
6132
6133 if test "$enable_softwarerecip" = "yes"; then
6134         cat >> confdefs.h <<\EOF
6135 #define SOFTWARE_RECIP 
6136 EOF
6137
6138 fi
6139
6140 if test "$enable_hide_square_latency" = "yes"; then
6141         cat >> confdefs.h <<\EOF
6142 #define DECREASE_SQUARE_LATENCY 
6143 EOF
6144
6145 fi
6146
6147 if test "$enable_hide_table_latency" = "yes"; then
6148         cat >> confdefs.h <<\EOF
6149 #define DECREASE_LOOKUP_LATENCY 
6150 EOF
6151
6152 fi
6153
6154 if test "$with_mpi_environment" != "no" -a "$enable_mpi" = "yes"; then
6155         cat >> confdefs.h <<EOF
6156 #define CHECK_MPI_ENV "$with_mpi_environment"
6157 EOF
6158
6159 fi
6160
6161
6162 list_of_vectorized_sqrt=""
6163 if test "$enable_vectorized_sqrt" != "no"; then
6164   if test "$enable_vectorized_sqrt" = "yes"; then
6165     enable_vectorized_sqrt="normal,solvent,water,water-water"
6166   fi
6167   if echo $enable_vectorized_sqrt | grep "normal" >/dev/null; then
6168     list_of_vectorized_sqrt="normal "
6169     cat >> confdefs.h <<\EOF
6170 #define VECTORIZE_INVSQRT 
6171 EOF
6172
6173   fi
6174   if echo $enable_vectorized_sqrt | grep "solvent" >/dev/null; then
6175     list_of_vectorized_sqrt="${list_of_vectorized_sqrt}solvent "
6176     cat >> confdefs.h <<\EOF
6177 #define VECTORIZE_INVSQRT_S 
6178 EOF
6179
6180   fi
6181   if echo $enable_vectorized_sqrt | sed 's/water-water//' | grep "water" >/dev/null; then
6182     list_of_vectorized_sqrt="${list_of_vectorized_sqrt}water "
6183     cat >> confdefs.h <<\EOF
6184 #define VECTORIZE_INVSQRT_W 
6185 EOF
6186
6187   fi
6188   if echo $enable_vectorized_sqrt | grep "water-water" >/dev/null; then
6189     list_of_vectorized_sqrt="${list_of_vectorized_sqrt}water-water "
6190     cat >> confdefs.h <<\EOF
6191 #define VECTORIZE_INVSQRT_WW 
6192 EOF
6193
6194   fi
6195 fi
6196 if test -z "$list_of_vectorized_sqrt"; then
6197   list_of_vectorized_sqrt="no"
6198 fi
6199
6200
6201 list_of_prefetch_x=""
6202 if test "$enable_prefetch_x" != "no"; then
6203   if test "$enable_prefetch_x" = "yes"; then
6204     enable_prefetch_x="normal,solvent,water,water-water"
6205   fi
6206   if echo $enable_prefetch_x | grep "normal" >/dev/null; then
6207     list_of_prefetch_x="normal "
6208     cat >> confdefs.h <<\EOF
6209 #define PREFETCH_X 
6210 EOF
6211
6212   fi
6213   if echo $enable_prefetch_x | grep "solvent" >/dev/null; then
6214     list_of_prefetch_x="${list_of_prefetch_x}solvent "
6215     cat >> confdefs.h <<\EOF
6216 #define PREFETCH_X_S 
6217 EOF
6218
6219   fi
6220   if echo $enable_prefetch_x | sed 's/water-water//' | grep "water" >/dev/null; then
6221     list_of_prefetch_x="${list_of_prefetch_x}water "
6222     cat >> confdefs.h <<\EOF
6223 #define PREFETCH_X_W 
6224 EOF
6225
6226   fi
6227   if echo $enable_prefetch_x | grep "water-water" >/dev/null; then
6228     list_of_prefetch_x="${list_of_prefetch_x}water-water "
6229     cat >> confdefs.h <<\EOF
6230 #define PREFETCH_X_WW 
6231 EOF
6232
6233   fi
6234 fi
6235 if test -z "$list_of_prefetch_x"; then
6236   list_of_prefetch_x="no"
6237 fi
6238
6239 list_of_prefetch_f=""
6240 if test "$enable_prefetch_f" != "no"; then
6241   if test "$enable_prefetch_f" = "yes"; then
6242     enable_prefetch_f="normal,solvent,water,water-water"
6243   fi
6244   if echo $enable_prefetch_f | grep "normal" >/dev/null; then
6245     list_of_prefetch_f="normal "
6246     cat >> confdefs.h <<\EOF
6247 #define PREFETCH_F 
6248 EOF
6249
6250   fi
6251   if echo $enable_prefetch_f | grep "solvent" >/dev/null; then
6252     list_of_prefetch_f="${list_of_prefetch_f}solvent "
6253     cat >> confdefs.h <<\EOF
6254 #define PREFETCH_F_S 
6255 EOF
6256
6257   fi
6258   if echo $enable_prefetch_f | sed 's/water-water//' | grep "water"; then
6259     list_of_prefetch_f="${list_of_prefetch_f}water "
6260     cat >> confdefs.h <<\EOF
6261 #define PREFETCH_F_W 
6262 EOF
6263
6264   fi
6265   if echo $enable_prefetch_f | grep "water-water" >/dev/null; then
6266     list_of_prefetch_f="${list_of_prefetch_f}water-water "
6267     cat >> confdefs.h <<\EOF
6268 #define PREFETCH_F_WW 
6269 EOF
6270
6271   fi
6272 fi
6273 if test -z "$list_of_prefetch_f"; then
6274   list_of_prefetch_f="no"
6275 fi
6276
6277 if test "$enable_vectorized_recip" != "yes" -a "$enable_vectorized_recip" != "no"; then
6278   { echo "configure: error: Vectorized reciprocal is only meaningful for normal loops" 1>&2; exit 1; }
6279 fi
6280
6281 if test "$enable_vectorized_recip" = "yes"; then
6282   cat >> confdefs.h <<\EOF
6283 #define VECTORIZE_RECIP 
6284 EOF
6285
6286 fi
6287
6288 if test "${prefix}" = "NONE"; then
6289   cat >> confdefs.h <<EOF
6290 #define GMXLIBDIR "${ac_default_prefix}/top"
6291 EOF
6292
6293 else
6294   cat >> confdefs.h <<EOF
6295 #define GMXLIBDIR "${prefix}/top"
6296 EOF
6297
6298 fi
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308  # not used right now
6309
6310
6311
6312 # Check if there are any optimizations and options for this arch and cpu
6313
6314
6315
6316
6317
6318 # Try to determine "good" native compiler flags if none specified on command
6319 # line. To avoid repeating the entire procedure for fortran flags, we first
6320 # determine our suggested choices for both C and fortran, and then possibly
6321 # override them with user choices.
6322
6323 case "${host_cpu}-${host_os}" in
6324
6325   *-solaris2*) 
6326     case "${gmxcpu}" in
6327       ultrasparc3*)
6328         xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
6329         xFFLAGS=$xCFLAGS
6330         ;;
6331       ultrasparc2i*)
6332         xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
6333         xFFLAGS=$xCFLAGS
6334         ;;
6335       ultrasparc2*)
6336         xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
6337         xFFLAGS=$xCFLAGS
6338         ;;
6339       ultrasparc*)
6340         xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
6341         xFFLAGS=$xCFLAGS
6342         ;;
6343       *)
6344         xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
6345         xFFLAGS=$xCFLAGS
6346         ;;
6347     esac
6348     ;;
6349
6350   *-hpux*)  
6351     xCFLAGS="-Ae +O3 +Oall"
6352     xFFLAGS=$xCFLAGS
6353     # If you haven't noticed, we don't like hp very much...
6354     # but perhaps that will change if they make something nice out of ia64.
6355     ;;
6356
6357   rs6000*-aix*)
6358     # dont use inter-procedure analysis for the innerloops - they take
6359     # forever to compile with it, and it doesnt help at all.
6360     case "${gmxcpu}" in
6361       power4*)
6362         xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qlanglvl=ansi -qmaxmem=16384"
6363         xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
6364         ;;
6365       power3*)
6366         xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qlanglvl=ansi -qmaxmem=16384"
6367         xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
6368         ;;
6369       power2*)
6370         xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qlanglvl=ansi -qmaxmem=16384"
6371         xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
6372         ;;
6373       power)
6374         xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qlanglvl=ansi -qmaxmem=16384"
6375         xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
6376         ;;
6377       *)
6378         # I don't think people are using anything older than power2, so we tune for
6379         # pwr, but dont set the arch since it is nice to have common binaries 
6380         # that run also on powerpc.
6381         xCFLAGS="-O3 -qlanglvl=ansi -qtune=pwr -qmaxmem=16384"
6382         xFFLAGS="-O3 -Q -qtune=pwr -qmaxmem=16384 -qhot"
6383         ;;
6384     esac
6385     ;;
6386
6387   powerpc*-aix*)
6388     case "${gmxcpu}" in
6389       ppc604)
6390         xCFLAGS="-O3 -qarch=604 -qtune=604 -qlanglvl=ansi -qmaxmem=16384"
6391         xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
6392         ;;
6393       ppc603)
6394         xCFLAGS="-O3 -qarch=603 -qtune=603 -qlanglvl=ansi -qmaxmem=16384"
6395         xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
6396         ;;
6397       rs64a)
6398         xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qlanglvl=ansi -qmaxmem=16384"
6399         xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
6400         ;;
6401       rs64b)
6402         xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qlanglvl=ansi -qmaxmem=16384"
6403         xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
6404         ;;
6405       rs64c)
6406         xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qlanglvl=ansi -qmaxmem=16384"
6407         xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
6408         ;;
6409       *)
6410         xCFLAGS="-O3 -qlanglvl=ansi -qmaxmem=16384"
6411         xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
6412         ;;
6413     esac
6414     ;;
6415
6416   mips*-irix*)
6417     xCFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -fullwarn -woff 1174 -D__INLINE_INTRINSICS"
6418     xFFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -OPT:cray_ivdep=TRUE"
6419
6420     if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
6421       xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation" 
6422       xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation" 
6423     fi
6424
6425     if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
6426       xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms" 
6427       xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms" 
6428     fi
6429
6430     case "${gmxcpu}" in
6431       r12000*)
6432         xCFLAGS="-n32 -r12000 -mips4 $xCFLAGS"
6433         xFFLAGS="-n32 -r12000 -mips4 $xFFLAGS"
6434         xLDFLAGS="-n32 -r12000 -mips4"
6435         ;;
6436       r10000*)
6437         xCFLAGS="-n32 -r10000 -mips4 $xCFLAGS"
6438         xFFLAGS="-n32 -r10000 -mips4 $xFFLAGS"
6439         xLDFLAGS="-n32 -r10000 -mips4"
6440         ;;
6441       r8000*)
6442         xCFLAGS="-n32 -r8000 -mips4 $xCFLAGS"
6443         xFFLAGS="-n32 -r8000 -mips4 $xFFLAGS"
6444         xLDFLAGS="-n32 -r8000 -mips4"
6445         ;;
6446       r5000*)
6447         xCFLAGS="-n32 -r5000 -mips4 $xCFLAGS"
6448         xFFLAGS="-n32 -r5000 -mips4 $xFFLAGS"
6449         xLDFLAGS="-n32 -r5000 -mips4"
6450         ;;
6451       *)                
6452         xCFLAGS="-n32 $xCFLAGS"
6453         xFFLAGS="-n32 $xFFLAGS"
6454         xLDFLAGS="-n32"
6455         ;;
6456     esac
6457     ;;
6458
6459   alpha*-osf*)
6460     case "${host_cpu}" in
6461       alphaev*)
6462         # extract the processor from cpu type (e.g. alphaev56 -> ev56)
6463         evtype=`echo ${host_cpu} | sed 's/alpha//'`
6464         xCFLAGS="-O5 -arch $evtype -tune $evtype -fast -unroll 2 -fp_reorder"
6465         xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
6466         xLDFLAGS="-O4"
6467         ;;
6468       *)
6469         xCFLAGS="-O5 -arch host -tune host -fast -unroll 2 -fp_reorder"
6470         xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
6471         xLDFLAGS="-O4"
6472         ;;
6473     esac
6474     ;;
6475
6476   alpha*-linux*)
6477     case "${host_cpu}" in
6478       alphaev*)
6479         # extract the processor from cpu type (e.g. alphaev56 -> ev56)
6480         evtype=`echo ${host_cpu} | sed 's/alpha//'`
6481         tmpCFLAGS="-O5 -arch $evtype -tune $evtype -fast -unroll 2 -fp_reorder"
6482         tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
6483         tmpLDFLAGS="-O4"
6484         ;;
6485       *)
6486         tmpCFLAGS="-O5 -arch host -tune host -fast -unroll 2 -fp_reorder"
6487         tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
6488         tmpLDFLAGS="-O4"
6489         ;;
6490     esac
6491     if $CC -V 2>  /dev/null | grep Compaq > /dev/null 2>&1; then
6492       xCFLAGS="$tmpCFLAGS"
6493     fi
6494     if test "$enable_fortran" = "yes"; then
6495       if $F77 -V 2>  /dev/null | grep Compaq > /dev/null 2>&1; then
6496         xFFLAGS="$tmpFFLAGS"
6497       fi
6498     fi
6499     ;;
6500
6501   *-*)
6502     # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
6503     # further down, but we can at least check if the Portland compilers are used:
6504     if $CC -V 2>  /dev/null | grep Portland > /dev/null 2>&1; then
6505       case "${host_cpu}" in
6506         i586)
6507           pgiopt="-tp p5" 
6508           ;;
6509         i686)
6510           pgiopt="-tp p6" 
6511           ;;
6512       esac
6513       xCFLAGS="$pgiopt -fast -Minfo=loop -pc 32"
6514     fi
6515     if test "$enable_fortran" = "yes"; then
6516       if $F77 -V 2>  /dev/null | grep Portland /dev/null 2>&1; then
6517         xFFLAGS="$xCFLAGS -Mneginfo=loop"
6518       fi        
6519     fi
6520     ;;
6521 esac    
6522 # Phew, end of all those operating systems and processors!                      
6523
6524 # use default flags for gcc/g77 on all systems
6525 if test $ac_cv_prog_gcc = yes; then
6526   xCFLAGS="-O6 -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
6527   # -malign-double for x86 systems
6528   
6529
6530 echo $ac_n "checking whether $CC accepts -malign-double""... $ac_c" 1>&6
6531 echo "configure:6532: checking whether $CC accepts -malign-double" >&5
6532 if eval "test \"`echo '$''{'ac_align_double'+set}'`\" = set"; then
6533   echo $ac_n "(cached) $ac_c" 1>&6
6534 else
6535   echo 'void f(){}' > conftest.c
6536 if test -z "`$CC -malign-double -c conftest.c 2>&1`"; then
6537         ac_align_double=yes
6538 else
6539         ac_align_double=no
6540 fi
6541 rm -f conftest*
6542
6543 fi
6544
6545 echo "$ac_t""$ac_align_double" 1>&6
6546 if test "$ac_align_double" = yes; then
6547         :
6548         xCFLAGS="$xCFLAGS -malign-double"
6549 else
6550         :
6551         
6552 fi
6553
6554 fi
6555   
6556 if test $enable_fortran = yes; then
6557   if test $ac_cv_prog_g77 = yes; then
6558     xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
6559     # -malign-double for f77 on x86 systems - haven't checked that this works yet.
6560     #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
6561   fi
6562 fi
6563
6564 CPU_FLAGS=""
6565 if test "$GCC" = "yes"; then
6566   # try to guess correct CPU flags, at least for linux
6567   case "${host_cpu}" in
6568     # i586/i686 cpu flags don't improve speed, thus no need to use them.
6569     # don't check f77 separately - we assume f77 and gcc are similar
6570           
6571     powerpc*)
6572       cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
6573       is60x=`echo $cputype | egrep "^600-9e?$"`
6574       if test -n "$is60x"; then
6575         
6576
6577 echo $ac_n "checking whether $CC accepts -mcpu=$cputype""... $ac_c" 1>&6
6578 echo "configure:6579: checking whether $CC accepts -mcpu=$cputype" >&5
6579 if eval "test \"`echo '$''{'ac_m_cpu_60x'+set}'`\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   echo 'void f(){}' > conftest.c
6583 if test -z "`$CC -mcpu=$cputype -c conftest.c 2>&1`"; then
6584         ac_m_cpu_60x=yes
6585 else
6586         ac_m_cpu_60x=no
6587 fi
6588 rm -f conftest*
6589
6590 fi
6591
6592 echo "$ac_t""$ac_m_cpu_60x" 1>&6
6593 if test "$ac_m_cpu_60x" = yes; then
6594         :
6595         CPU_FLAGS=-mcpu=$cputype
6596 else
6597         :
6598         
6599 fi
6600
6601       elif test "$cputype" = 750; then
6602         
6603
6604 echo $ac_n "checking whether $CC accepts -mcpu=750""... $ac_c" 1>&6
6605 echo "configure:6606: checking whether $CC accepts -mcpu=750" >&5
6606 if eval "test \"`echo '$''{'ac_m_cpu_750'+set}'`\" = set"; then
6607   echo $ac_n "(cached) $ac_c" 1>&6
6608 else
6609   echo 'void f(){}' > conftest.c
6610 if test -z "`$CC -mcpu=750 -c conftest.c 2>&1`"; then
6611         ac_m_cpu_750=yes
6612 else
6613         ac_m_cpu_750=no
6614 fi
6615 rm -f conftest*
6616
6617 fi
6618
6619 echo "$ac_t""$ac_m_cpu_750" 1>&6
6620 if test "$ac_m_cpu_750" = yes; then
6621         :
6622         CPU_FLAGS=-mcpu=750
6623 else
6624         :
6625         
6626 fi
6627
6628       fi
6629       if test -z "$CPU_FLAGS"; then
6630         
6631
6632 echo $ac_n "checking whether $CC accepts -mcpu=powerpc""... $ac_c" 1>&6
6633 echo "configure:6634: checking whether $CC accepts -mcpu=powerpc" >&5
6634 if eval "test \"`echo '$''{'ac_m_cpu_powerpc'+set}'`\" = set"; then
6635   echo $ac_n "(cached) $ac_c" 1>&6
6636 else
6637   echo 'void f(){}' > conftest.c
6638 if test -z "`$CC -mcpu=powerpc -c conftest.c 2>&1`"; then
6639         ac_m_cpu_powerpc=yes
6640 else
6641         ac_m_cpu_powerpc=no
6642 fi
6643 rm -f conftest*
6644
6645 fi
6646
6647 echo "$ac_t""$ac_m_cpu_powerpc" 1>&6
6648 if test "$ac_m_cpu_powerpc" = yes; then
6649         :
6650         CPU_FLAGS=-mcpu=powerpc
6651 else
6652         :
6653         
6654 fi
6655
6656       fi
6657       if test -z "$CPU_FLAGS"; then
6658         
6659
6660 echo $ac_n "checking whether $CC accepts -mpowerpc""... $ac_c" 1>&6
6661 echo "configure:6662: checking whether $CC accepts -mpowerpc" >&5
6662 if eval "test \"`echo '$''{'ac_m_powerpc'+set}'`\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   echo 'void f(){}' > conftest.c
6666 if test -z "`$CC -mpowerpc -c conftest.c 2>&1`"; then
6667         ac_m_powerpc=yes
6668 else
6669         ac_m_powerpc=no
6670 fi
6671 rm -f conftest*
6672
6673 fi
6674
6675 echo "$ac_t""$ac_m_powerpc" 1>&6
6676 if test "$ac_m_powerpc" = yes; then
6677         :
6678         CPU_FLAGS=-mpowerpc
6679 else
6680         :
6681         
6682 fi
6683
6684       fi
6685    esac
6686 fi
6687
6688 if test -n "$CPU_FLAGS"; then
6689   xCFLAGS="$xCFLAGS $CPU_FLAGS"
6690   xFFLAGS="$xFFLAGS $CPU_FLAGS"
6691 fi
6692
6693 # Now check if the user provided anything special for C or fortran...
6694 # Not nice to have checked everything then, but otherwise we would have
6695 # to use entirely separate checks for C and fortran flags, doubling the code.
6696 if test "$ac_test_CFLAGS" != "set"; then
6697   CFLAGS="$xCFLAGS"
6698   # Use the extra link optimization flags on e.g. irix only when
6699   # we are using our own C compiler flags
6700   LDFLAGS="$LDFLAGS $xLDFLAGS"
6701   
6702   if test -z "$CFLAGS"; then
6703     echo "*******************************************************************"
6704     echo "* WARNING: No special optimization settings found for the C       *"
6705     echo "* compiler. Use  make CFLAGS=..., or edit the top level Makefile. *"
6706     echo "* Reverting to the default setting CFLAGS=-O3. (mail us about it)  *"
6707     echo "*******************************************************************"
6708     CFLAGS="-O3"
6709   fi
6710   
6711
6712 echo $ac_n "checking whether $CC accepts ${CFLAGS}""... $ac_c" 1>&6
6713 echo "configure:6714: checking whether $CC accepts ${CFLAGS}" >&5
6714 if eval "test \"`echo '$''{'ac_guessed_cflags'+set}'`\" = set"; then
6715   echo $ac_n "(cached) $ac_c" 1>&6
6716 else
6717   echo 'void f(){}' > conftest.c
6718 if test -z "`$CC ${CFLAGS} -c conftest.c 2>&1`"; then
6719         ac_guessed_cflags=yes
6720 else
6721         ac_guessed_cflags=no
6722 fi
6723 rm -f conftest*
6724
6725 fi
6726
6727 echo "$ac_t""$ac_guessed_cflags" 1>&6
6728 if test "$ac_guessed_cflags" = yes; then
6729         :
6730         
6731 else
6732         :
6733         
6734     echo "*******************************************************************"
6735     echo "* Sorry, these optimization settings don't seem to work for       *"
6736     echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
6737     echo "*******************************************************************"
6738     CFLAGS=""
6739   
6740 fi
6741
6742 else
6743   echo "******************************************"
6744   echo "* Using CFLAGS from environment variable *"
6745   echo "******************************************"
6746 fi
6747
6748 if test "$enable_fortran" = "yes"; then 
6749   if test "$ac_test_FFLAGS" != "set"; then
6750     FFLAGS="$xFFLAGS"
6751     
6752     if test -z "$FFLAGS"; then
6753       echo "*******************************************************************"
6754       echo "* WARNING: No special optimization settings found for the fortran *"
6755       echo "* compiler. Use  make FFLAGS=..., or edit the top level Makefile. *"
6756       echo "* Reverting to the default setting FFLAGS=-O3. (mail us about it) *"
6757       echo "*******************************************************************"
6758       FFLAGS="-O3"
6759     fi
6760     
6761
6762 echo $ac_n "checking whether $F77 accepts ${FFLAGS}""... $ac_c" 1>&6
6763 echo "configure:6764: checking whether $F77 accepts ${FFLAGS}" >&5
6764 if eval "test \"`echo '$''{'ac_guessed_fflags'+set}'`\" = set"; then
6765   echo $ac_n "(cached) $ac_c" 1>&6
6766 else
6767   cat > conftest.f << EOF
6768       subroutine f
6769       return 
6770       end
6771 EOF
6772 if test -z "`$F77 ${FFLAGS} -c conftest.f `"; then
6773         ac_guessed_fflags=yes
6774 else
6775         ac_guessed_fflags=no
6776 fi
6777 rm -f conftest*
6778
6779 fi
6780
6781 echo "$ac_t""$ac_guessed_fflags" 1>&6
6782 if test "$ac_guessed_fflags" = yes; then
6783         :
6784         
6785 else
6786         :
6787         
6788       echo "*******************************************************************"
6789       echo "* Sorry, these optimization settings don't seem to work for       *"
6790       echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
6791       echo "*******************************************************************"
6792       FFLAGS=""
6793     
6794 fi
6795
6796   else
6797     echo "******************************************"
6798     echo "* Using FFLAGS from environment variable *"
6799     echo "******************************************"
6800   fi
6801 fi
6802
6803           # should be automatic, but doesnt seem to be?
6804
6805 # put binaries and libraries in subdirectories named as the arch
6806 if test -n "$gmxcpu"; then
6807   bindir="\${exec_prefix}/bin/${host}/${gmxcpu}"
6808   libdir="\${exec_prefix}/lib/${host}/${gmxcpu}"
6809 else
6810   bindir="\${exec_prefix}/bin/${host}"
6811   libdir="\${exec_prefix}/lib/${host}"
6812 fi
6813
6814
6815
6816
6817
6818 trap '' 1 2 15
6819 cat > confcache <<\EOF
6820 # This file is a shell script that caches the results of configure
6821 # tests run on this system so they can be shared between configure
6822 # scripts and configure runs.  It is not useful on other systems.
6823 # If it contains results you don't want to keep, you may remove or edit it.
6824 #
6825 # By default, configure uses ./config.cache as the cache file,
6826 # creating it if it does not exist already.  You can give configure
6827 # the --cache-file=FILE option to use a different cache file; that is
6828 # what configure does when it calls configure scripts in
6829 # subdirectories, so they share the cache.
6830 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6831 # config.status only pays attention to the cache file if you give it the
6832 # --recheck option to rerun configure.
6833 #
6834 EOF
6835 # The following way of writing the cache mishandles newlines in values,
6836 # but we know of no workaround that is simple, portable, and efficient.
6837 # So, don't put newlines in cache variables' values.
6838 # Ultrix sh set writes to stderr and can't be redirected directly,
6839 # and sets the high bit in the cache file unless we assign to the vars.
6840 (set) 2>&1 |
6841   case `(ac_space=' '; set | grep ac_space) 2>&1` in
6842   *ac_space=\ *)
6843     # `set' does not quote correctly, so add quotes (double-quote substitution
6844     # turns \\\\ into \\, and sed turns \\ into \).
6845     sed -n \
6846       -e "s/'/'\\\\''/g" \
6847       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6848     ;;
6849   *)
6850     # `set' quotes correctly as required by POSIX, so do not add quotes.
6851     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6852     ;;
6853   esac >> confcache
6854 if cmp -s $cache_file confcache; then
6855   :
6856 else
6857   if test -w $cache_file; then
6858     echo "updating cache $cache_file"
6859     cat confcache > $cache_file
6860   else
6861     echo "not updating unwritable cache $cache_file"
6862   fi
6863 fi
6864 rm -f confcache
6865
6866 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6867
6868 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6869 # Let make expand exec_prefix.
6870 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6871
6872 # Any assignment to VPATH causes Sun make to only execute
6873 # the first set of double-colon rules, so remove it if not needed.
6874 # If there is a colon in the path, we need to keep it.
6875 if test "x$srcdir" = x.; then
6876   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6877 fi
6878
6879 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6880
6881 DEFS=-DHAVE_CONFIG_H
6882
6883 # Without the "./", some shells look in PATH for config.status.
6884 : ${CONFIG_STATUS=./config.status}
6885
6886 echo creating $CONFIG_STATUS
6887 rm -f $CONFIG_STATUS
6888 cat > $CONFIG_STATUS <<EOF
6889 #! /bin/sh
6890 # Generated automatically by configure.
6891 # Run this file to recreate the current configuration.
6892 # This directory was configured as follows,
6893 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6894 #
6895 # $0 $ac_configure_args
6896 #
6897 # Compiler output produced by configure, useful for debugging
6898 # configure, is in ./config.log if it exists.
6899
6900 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6901 for ac_option
6902 do
6903   case "\$ac_option" in
6904   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6905     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6906     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6907   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6908     echo "$CONFIG_STATUS generated by autoconf version 2.13"
6909     exit 0 ;;
6910   -help | --help | --hel | --he | --h)
6911     echo "\$ac_cs_usage"; exit 0 ;;
6912   *) echo "\$ac_cs_usage"; exit 1 ;;
6913   esac
6914 done
6915
6916 ac_given_srcdir=$srcdir
6917 ac_given_INSTALL="$INSTALL"
6918
6919 trap 'rm -fr `echo "Makefile
6920                  src/Makefile
6921                  src/gmxlib/Makefile
6922                  src/mdlib/Makefile
6923                  src/kernel/Makefile
6924                  src/tools/Makefile
6925                  src/ngmx/Makefile
6926                  src/include/Makefile
6927                  src/include/types/Makefile
6928                  tutor/Makefile
6929                  tutor/gmxdemo/Makefile
6930                  tutor/nmr1/Makefile
6931                  tutor/nmr2/Makefile
6932                  tutor/water/Makefile
6933                  tutor/speptide/Makefile
6934                  tutor/template/Makefile
6935                  tutor/template/Template.mak
6936                  top/Makefile
6937                  html/Makefile
6938                  html/gif/Makefile
6939                  html/online/Makefile src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6940 EOF
6941 cat >> $CONFIG_STATUS <<EOF
6942
6943 # Protect against being on the right side of a sed subst in config.status.
6944 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6945  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6946 $ac_vpsub
6947 $extrasub
6948 s%@SHELL@%$SHELL%g
6949 s%@CFLAGS@%$CFLAGS%g
6950 s%@CPPFLAGS@%$CPPFLAGS%g
6951 s%@CXXFLAGS@%$CXXFLAGS%g
6952 s%@FFLAGS@%$FFLAGS%g
6953 s%@DEFS@%$DEFS%g
6954 s%@LDFLAGS@%$LDFLAGS%g
6955 s%@LIBS@%$LIBS%g
6956 s%@exec_prefix@%$exec_prefix%g
6957 s%@prefix@%$prefix%g
6958 s%@program_transform_name@%$program_transform_name%g
6959 s%@bindir@%$bindir%g
6960 s%@sbindir@%$sbindir%g
6961 s%@libexecdir@%$libexecdir%g
6962 s%@datadir@%$datadir%g
6963 s%@sysconfdir@%$sysconfdir%g
6964 s%@sharedstatedir@%$sharedstatedir%g
6965 s%@localstatedir@%$localstatedir%g
6966 s%@libdir@%$libdir%g
6967 s%@includedir@%$includedir%g
6968 s%@oldincludedir@%$oldincludedir%g
6969 s%@infodir@%$infodir%g
6970 s%@mandir@%$mandir%g
6971 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6972 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6973 s%@INSTALL_DATA@%$INSTALL_DATA%g
6974 s%@PACKAGE@%$PACKAGE%g
6975 s%@VERSION@%$VERSION%g
6976 s%@ACLOCAL@%$ACLOCAL%g
6977 s%@AUTOCONF@%$AUTOCONF%g
6978 s%@AUTOMAKE@%$AUTOMAKE%g
6979 s%@AUTOHEADER@%$AUTOHEADER%g
6980 s%@MAKEINFO@%$MAKEINFO%g
6981 s%@AMTAR@%$AMTAR%g
6982 s%@install_sh@%$install_sh%g
6983 s%@AWK@%$AWK%g
6984 s%@SET_MAKE@%$SET_MAKE%g
6985 s%@AMDEP@%$AMDEP%g
6986 s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%g
6987 s%@DEPDIR@%$DEPDIR%g
6988 s%@host@%$host%g
6989 s%@host_alias@%$host_alias%g
6990 s%@host_cpu@%$host_cpu%g
6991 s%@host_vendor@%$host_vendor%g
6992 s%@host_os@%$host_os%g
6993 s%@F77@%$F77%g
6994 s%@CC@%$CC%g
6995 s%@CPP@%$CPP%g
6996 s%@_am_include@%$_am_include%g
6997 s%@CCDEPMODE@%$CCDEPMODE%g
6998 s%@BUILD_CC@%$BUILD_CC%g
6999 s%@FLIBS@%$FLIBS%g
7000 s%@MPICC@%$MPICC%g
7001 s%@USE_MPI_TRUE@%$USE_MPI_TRUE%g
7002 s%@USE_MPI_FALSE@%$USE_MPI_FALSE%g
7003 s%@NASM@%$NASM%g
7004 s%@NASMFLAGS@%$NASMFLAGS%g
7005 s%@IDENT@%$IDENT%g
7006 s%@RANLIB@%$RANLIB%g
7007 s%@GMX_USE_XDR_TRUE@%$GMX_USE_XDR_TRUE%g
7008 s%@GMX_USE_XDR_FALSE@%$GMX_USE_XDR_FALSE%g
7009 s%@X_CFLAGS@%$X_CFLAGS%g
7010 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7011 s%@X_LIBS@%$X_LIBS%g
7012 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7013 s%@LIBOBJS@%$LIBOBJS%g
7014 s%@USE_X11_TRUE@%$USE_X11_TRUE%g
7015 s%@USE_X11_FALSE@%$USE_X11_FALSE%g
7016 s%@USE_FORTRAN_TRUE@%$USE_FORTRAN_TRUE%g
7017 s%@USE_FORTRAN_FALSE@%$USE_FORTRAN_FALSE%g
7018 s%@USE_DOUBLE_TRUE@%$USE_DOUBLE_TRUE%g
7019 s%@USE_DOUBLE_FALSE@%$USE_DOUBLE_FALSE%g
7020 s%@PAR_OBJ@%$PAR_OBJ%g
7021 s%@INNER_F77_OBJ@%$INNER_F77_OBJ%g
7022 s%@INNER_C_OBJ@%$INNER_C_OBJ%g
7023 s%@SSE_OBJ@%$SSE_OBJ%g
7024 s%@TDN_OBJ@%$TDN_OBJ%g
7025 s%@X86_ASM_OBJ@%$X86_ASM_OBJ%g
7026 s%@MOTIF_OBJ@%$MOTIF_OBJ%g
7027 s%@XDR_OBJ@%$XDR_OBJ%g
7028 s%@AXP_ASM_OBJ@%$AXP_ASM_OBJ%g
7029 s=XXX_SUFFIX_XXX=$SUFFIX=g
7030 s%@SUFFIX@%$SUFFIX%g
7031 s%@INCLUDES@%$INCLUDES%g
7032
7033 CEOF
7034 EOF
7035
7036 cat >> $CONFIG_STATUS <<\EOF
7037
7038 # Split the substitutions into bite-sized pieces for seds with
7039 # small command number limits, like on Digital OSF/1 and HP-UX.
7040 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7041 ac_file=1 # Number of current file.
7042 ac_beg=1 # First line for current file.
7043 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7044 ac_more_lines=:
7045 ac_sed_cmds=""
7046 while $ac_more_lines; do
7047   if test $ac_beg -gt 1; then
7048     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7049   else
7050     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7051   fi
7052   if test ! -s conftest.s$ac_file; then
7053     ac_more_lines=false
7054     rm -f conftest.s$ac_file
7055   else
7056     if test -z "$ac_sed_cmds"; then
7057       ac_sed_cmds="sed -f conftest.s$ac_file"
7058     else
7059       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7060     fi
7061     ac_file=`expr $ac_file + 1`
7062     ac_beg=$ac_end
7063     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7064   fi
7065 done
7066 if test -z "$ac_sed_cmds"; then
7067   ac_sed_cmds=cat
7068 fi
7069 EOF
7070
7071 cat >> $CONFIG_STATUS <<EOF
7072
7073 CONFIG_FILES=\${CONFIG_FILES-"Makefile
7074                  src/Makefile
7075                  src/gmxlib/Makefile
7076                  src/mdlib/Makefile
7077                  src/kernel/Makefile
7078                  src/tools/Makefile
7079                  src/ngmx/Makefile
7080                  src/include/Makefile
7081                  src/include/types/Makefile
7082                  tutor/Makefile
7083                  tutor/gmxdemo/Makefile
7084                  tutor/nmr1/Makefile
7085                  tutor/nmr2/Makefile
7086                  tutor/water/Makefile
7087                  tutor/speptide/Makefile
7088                  tutor/template/Makefile
7089                  tutor/template/Template.mak
7090                  top/Makefile
7091                  html/Makefile
7092                  html/gif/Makefile
7093                  html/online/Makefile"}
7094 EOF
7095 cat >> $CONFIG_STATUS <<\EOF
7096 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7097   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7098   case "$ac_file" in
7099   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7100        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7101   *) ac_file_in="${ac_file}.in" ;;
7102   esac
7103
7104   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7105
7106   # Remove last slash and all that follows it.  Not all systems have dirname.
7107   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7108   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7109     # The file is in a subdirectory.
7110     test ! -d "$ac_dir" && mkdir "$ac_dir"
7111     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7112     # A "../" for each directory in $ac_dir_suffix.
7113     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7114   else
7115     ac_dir_suffix= ac_dots=
7116   fi
7117
7118   case "$ac_given_srcdir" in
7119   .)  srcdir=.
7120       if test -z "$ac_dots"; then top_srcdir=.
7121       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7122   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7123   *) # Relative path.
7124     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7125     top_srcdir="$ac_dots$ac_given_srcdir" ;;
7126   esac
7127
7128   case "$ac_given_INSTALL" in
7129   [/$]*) INSTALL="$ac_given_INSTALL" ;;
7130   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7131   esac
7132
7133   echo creating "$ac_file"
7134   rm -f "$ac_file"
7135   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7136   case "$ac_file" in
7137   *Makefile*) ac_comsub="1i\\
7138 # $configure_input" ;;
7139   *) ac_comsub= ;;
7140   esac
7141
7142   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7143   sed -e "$ac_comsub
7144 s%@configure_input@%$configure_input%g
7145 s%@srcdir@%$srcdir%g
7146 s%@top_srcdir@%$top_srcdir%g
7147 s%@INSTALL@%$INSTALL%g
7148 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7149 fi; done
7150 rm -f conftest.s*
7151
7152 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7153 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7154 #
7155 # ac_d sets the value in "#define NAME VALUE" lines.
7156 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
7157 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
7158 ac_dC='\3'
7159 ac_dD='%g'
7160 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7161 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7162 ac_uB='\([      ]\)%\1#\2define\3'
7163 ac_uC=' '
7164 ac_uD='\4%g'
7165 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7166 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
7167 ac_eB='$%\1#\2define\3'
7168 ac_eC=' '
7169 ac_eD='%g'
7170
7171 if test "${CONFIG_HEADERS+set}" != set; then
7172 EOF
7173 cat >> $CONFIG_STATUS <<EOF
7174   CONFIG_HEADERS="src/include/config.h"
7175 EOF
7176 cat >> $CONFIG_STATUS <<\EOF
7177 fi
7178 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7179   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7180   case "$ac_file" in
7181   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7182        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7183   *) ac_file_in="${ac_file}.in" ;;
7184   esac
7185
7186   echo creating $ac_file
7187
7188   rm -f conftest.frag conftest.in conftest.out
7189   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7190   cat $ac_file_inputs > conftest.in
7191
7192 EOF
7193
7194 # Transform confdefs.h into a sed script conftest.vals that substitutes
7195 # the proper values into config.h.in to produce config.h.  And first:
7196 # Protect against being on the right side of a sed subst in config.status.
7197 # Protect against being in an unquoted here document in config.status.
7198 rm -f conftest.vals
7199 cat > conftest.hdr <<\EOF
7200 s/[\\&%]/\\&/g
7201 s%[\\$`]%\\&%g
7202 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7203 s%ac_d%ac_u%gp
7204 s%ac_u%ac_e%gp
7205 EOF
7206 sed -n -f conftest.hdr confdefs.h > conftest.vals
7207 rm -f conftest.hdr
7208
7209 # This sed command replaces #undef with comments.  This is necessary, for
7210 # example, in the case of _POSIX_SOURCE, which is predefined and required
7211 # on some systems where configure will not decide to define it.
7212 cat >> conftest.vals <<\EOF
7213 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7214 EOF
7215
7216 # Break up conftest.vals because some shells have a limit on
7217 # the size of here documents, and old seds have small limits too.
7218
7219 rm -f conftest.tail
7220 while :
7221 do
7222   ac_lines=`grep -c . conftest.vals`
7223   # grep -c gives empty output for an empty file on some AIX systems.
7224   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7225   # Write a limited-size here document to conftest.frag.
7226   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7227   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7228   echo 'CEOF
7229   sed -f conftest.frag conftest.in > conftest.out
7230   rm -f conftest.in
7231   mv conftest.out conftest.in
7232 ' >> $CONFIG_STATUS
7233   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7234   rm -f conftest.vals
7235   mv conftest.tail conftest.vals
7236 done
7237 rm -f conftest.vals
7238
7239 cat >> $CONFIG_STATUS <<\EOF
7240   rm -f conftest.frag conftest.h
7241   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
7242   cat conftest.in >> conftest.h
7243   rm -f conftest.in
7244   if cmp -s $ac_file conftest.h 2>/dev/null; then
7245     echo "$ac_file is unchanged"
7246     rm -f conftest.h
7247   else
7248     # Remove last slash and all that follows it.  Not all systems have dirname.
7249       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7250       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7251       # The file is in a subdirectory.
7252       test ! -d "$ac_dir" && mkdir "$ac_dir"
7253     fi
7254     rm -f $ac_file
7255     mv conftest.h $ac_file
7256   fi
7257 fi; done
7258
7259 EOF
7260 cat >> $CONFIG_STATUS <<EOF
7261 am_indx=1
7262   for am_file in src/include/config.h; do
7263     case " $CONFIG_HEADERS " in
7264     *" $am_file "*)
7265       echo timestamp > `echo $am_file | sed 's%:.*%%;s%[^/]*$%%'`stamp-h$am_indx
7266       ;;
7267     esac
7268     am_indx=\`expr \$am_indx + 1\`
7269   done
7270 AMDEP="$AMDEP"
7271 ac_aux_dir="$ac_aux_dir"
7272
7273 EOF
7274 cat >> $CONFIG_STATUS <<\EOF
7275 test -z "$CONFIG_HEADERS" || echo timestamp >      src/include/stamp-h
7276
7277 test x"$AMDEP" != x"" ||
7278 for mf in $CONFIG_FILES; do
7279   case "$mf" in
7280   Makefile) dirpart=.;;
7281   */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
7282   *) continue;;
7283   esac
7284   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
7285   # Extract the definition of DEP_FILES from the Makefile without
7286   # running `make'.
7287   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
7288   test -z "$DEPDIR" && continue
7289   # When using ansi2knr, U may be empty or an underscore; expand it
7290   U=`sed -n -e '/^U = / s///p' < "$mf"`
7291   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
7292   # We invoke sed twice because it is the simplest approach to
7293   # changing $(DEPDIR) to its actual value in the expansion.
7294   for file in `sed -n -e '
7295     /^DEP_FILES = .*\\\\$/ {
7296       s/^DEP_FILES = //
7297       :loop
7298         s/\\\\$//
7299         p
7300         n
7301         /\\\\$/ b loop
7302       p
7303     }
7304     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7305        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7306     # Make sure the directory exists.
7307     test -f "$dirpart/$file" && continue
7308     fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
7309     $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
7310     # echo "creating $dirpart/$file"
7311     echo '# dummy' > "$dirpart/$file"
7312   done
7313 done
7314
7315
7316 exit 0
7317 EOF
7318 chmod +x $CONFIG_STATUS
7319 rm -fr confdefs* $ac_clean_files
7320 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7321
7322
7323 echo ""
7324 echo "Gromacs is ready to compile. Summary of options used:"
7325 echo "Architecture                  : $host"
7326 if test "$enable_cpu_detection" = "yes"; then
7327 if test -n "$gmxcpu"; then
7328 echo "Optimize for CPU              : $gmxcpu"
7329 else
7330 echo "(Extra CPU detection not necessary or unavailable on this host)"  
7331 fi
7332 fi
7333 echo "MPI parallelization           : $enable_mpi"
7334 if test "$enable_mpi" = "yes"; then
7335 echo "Checking MPI environment      : $with_mpi_environment"
7336 echo "MPI suffix on files           : $enable_mpi_suffix"
7337 fi
7338 echo "Vector architecture           : $enable_vector"
7339 echo "Using Fortran code            : $enable_fortran"
7340 echo "Double precision              : $enable_double"
7341 if test "$enable_double" = "yes"; then
7342 echo "Type suffix on files          : $enable_type_suffix"
7343 fi
7344 echo "Expanding water loops         : $enable_simplewater"
7345 echo "Using water-water loops       : $enable_waterwater_loops"
7346 echo "Automatically nice mdrun      : $enable_nice"
7347 echo "Using x86 SSE assembly        : $enable_sse"
7348 echo "Using x86 3DNow assembly      : $enable_3dnow"
7349 echo "Portable trajectories (xdr)   : $enable_xdr"
7350 echo "Software 1/x                  : $enable_softwarerecip"
7351 echo "Software 1/sqrt(x)            : $enable_softwaresqrt"
7352 echo "Vectorize 1/x                 : $enable_vectorized_recip"
7353 echo "Vectorize 1/sqrt(x)           : $list_of_vectorized_sqrt"
7354 echo "Prefetch coordinates in loops : $list_of_prefetch_x"
7355 echo "Prefetch forces in loops      : $list_of_prefetch_f"
7356 echo "Hide square latency           : $enable_hide_square_latency"
7357 echo "Hide table lookup latency     : $enable_hide_table_latency"
7358 echo "Using X11                     : $use_x11"
7359 echo "Motif support                 : $use_motif"
7360 echo ""