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