Fixed a bug in grompp generating bad energy group exclusions.
[gromacs.git] / configure
blobd0022dbbcc5dede1b611f3fc169df0ec82259c72
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --disable-dependency-tracking Speeds up one-time builds
16 --enable-dependency-tracking Do not reject slow dependency extractors"
17 ac_default_prefix=/usr/local/gromacs
18 ac_help="$ac_help
19 --enable-mpi Compile parallel version of Gromacs"
20 ac_help="$ac_help
21 --enable-vector Compile for a vector machine"
22 ac_help="$ac_help
23 --enable-fortran Dortran loops (default on sgi,ibm,sun,tru64/dec)"
24 ac_help="$ac_help
25 --enable-double Compile double precision Gromacs"
26 ac_help="$ac_help
27 --disable-type-suffix Remove the suffix on MPI or double precision files"
28 ac_help="$ac_help
29 --enable-simplewater Unroll water innerloops (default on sgi)"
30 ac_help="$ac_help
31 --disable-waterwater-loops No special water-water loops (default on sgi)"
32 ac_help="$ac_help
33 --disable-nice Disable the nice priority on mdrun"
34 ac_help="$ac_help
35 --disable-sse Disable SSE assembly loops on x86"
36 ac_help="$ac_help
37 --disable-3dnow Disable 3DNow assembly loops on x86"
38 ac_help="$ac_help
39 --disable-xdr Disable portable trajectory routines"
40 ac_help="$ac_help
41 --disable-cpu-detection Don't extend detection with exact cpu type"
42 ac_help="$ac_help
43 --enable-software-recip Do software 1/x (might be slower)"
44 ac_help="$ac_help
45 --disable-software-sqrt No software 1/sqrt (default on sgi,rs6000)"
46 ac_help="$ac_help
47 --enable-vectorized-recip Vectorize the reciprocal in LJ-only loops"
48 ac_help="$ac_help
49 --enable-vectorized-sqrt=A,B Loops to vectorize, default none.
50 Choices: normal,solvent,water,water-water"
51 ac_help="$ac_help
52 --enable-prefetch-x=A,B Prefetch coordinates in selected innerloops"
53 ac_help="$ac_help
54 --enable-prefetch-f=A,B Prefetch forces in selected innerloops"
55 ac_help="$ac_help
56 --enable-hide-square-latency Try to get coords to cache before using them"
57 ac_help="$ac_help
58 --enable-hide-table-latency Try to get table data to cache before using it"
59 ac_help="$ac_help
60 --with-mpi-environment=VAR Only start MPI mdrun when VAR is set"
61 ac_help="$ac_help
62 --with-x use the X Window System"
63 ac_help="$ac_help
64 --with-motif-includes=DIR Motif include files are in DIR"
65 ac_help="$ac_help
66 --with-motif-libraries=DIR Motif libraries are in DIR"
68 # Initialize some variables set by options.
69 # The variables have the same names as the options, with
70 # dashes changed to underlines.
71 build=NONE
72 cache_file=./config.cache
73 exec_prefix=NONE
74 host=NONE
75 no_create=
76 nonopt=NONE
77 no_recursion=
78 prefix=NONE
79 program_prefix=NONE
80 program_suffix=NONE
81 program_transform_name=s,x,x,
82 silent=
83 site=
84 srcdir=
85 target=NONE
86 verbose=
87 x_includes=NONE
88 x_libraries=NONE
89 bindir='${exec_prefix}/bin'
90 sbindir='${exec_prefix}/sbin'
91 libexecdir='${exec_prefix}/libexec'
92 datadir='${prefix}/share'
93 sysconfdir='${prefix}/etc'
94 sharedstatedir='${prefix}/com'
95 localstatedir='${prefix}/var'
96 libdir='${exec_prefix}/lib'
97 includedir='${prefix}/include'
98 oldincludedir='/usr/include'
99 infodir='${prefix}/info'
100 mandir='${prefix}/man'
102 # Initialize some other variables.
103 subdirs=
104 MFLAGS= MAKEFLAGS=
105 SHELL=${CONFIG_SHELL-/bin/sh}
106 # Maximum number of lines to put in a shell here document.
107 ac_max_here_lines=12
109 ac_prev=
110 for ac_option
113 # If the previous option needs an argument, assign it.
114 if test -n "$ac_prev"; then
115 eval "$ac_prev=\$ac_option"
116 ac_prev=
117 continue
120 case "$ac_option" in
121 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
122 *) ac_optarg= ;;
123 esac
125 # Accept the important Cygnus configure options, so we can diagnose typos.
127 case "$ac_option" in
129 -bindir | --bindir | --bindi | --bind | --bin | --bi)
130 ac_prev=bindir ;;
131 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
132 bindir="$ac_optarg" ;;
134 -build | --build | --buil | --bui | --bu)
135 ac_prev=build ;;
136 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
137 build="$ac_optarg" ;;
139 -cache-file | --cache-file | --cache-fil | --cache-fi \
140 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
141 ac_prev=cache_file ;;
142 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
143 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
144 cache_file="$ac_optarg" ;;
146 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
147 ac_prev=datadir ;;
148 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
149 | --da=*)
150 datadir="$ac_optarg" ;;
152 -disable-* | --disable-*)
153 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
154 # Reject names that are not valid shell variable names.
155 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
156 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
159 eval "enable_${ac_feature}=no" ;;
161 -enable-* | --enable-*)
162 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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; }
167 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
168 case "$ac_option" in
169 *=*) ;;
170 *) ac_optarg=yes ;;
171 esac
172 eval "enable_${ac_feature}='$ac_optarg'" ;;
174 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
175 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
176 | --exec | --exe | --ex)
177 ac_prev=exec_prefix ;;
178 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
179 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
180 | --exec=* | --exe=* | --ex=*)
181 exec_prefix="$ac_optarg" ;;
183 -gas | --gas | --ga | --g)
184 # Obsolete; use --with-gas.
185 with_gas=yes ;;
187 -help | --help | --hel | --he)
188 # Omit some internal or obsolete options to make the list less imposing.
189 # This message is too long to be a string in the A/UX 3.1 sh.
190 cat << EOF
191 Usage: configure [options] [host]
192 Options: [defaults in brackets after descriptions]
193 Configuration:
194 --cache-file=FILE cache test results in FILE
195 --help print this message
196 --no-create do not create output files
197 --quiet, --silent do not print \`checking...' messages
198 --version print the version of autoconf that created configure
199 Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
224 cat << EOF
225 Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229 Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
240 exit 0 ;;
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
368 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
369 ac_prev=srcdir ;;
370 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
371 srcdir="$ac_optarg" ;;
373 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
374 | --syscon | --sysco | --sysc | --sys | --sy)
375 ac_prev=sysconfdir ;;
376 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
377 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
378 sysconfdir="$ac_optarg" ;;
380 -target | --target | --targe | --targ | --tar | --ta | --t)
381 ac_prev=target ;;
382 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
383 target="$ac_optarg" ;;
385 -v | -verbose | --verbose | --verbos | --verbo | --verb)
386 verbose=yes ;;
388 -version | --version | --versio | --versi | --vers)
389 echo "configure generated by autoconf version 2.13"
390 exit 0 ;;
392 -with-* | --with-*)
393 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
394 # Reject names that are not valid shell variable names.
395 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
396 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
398 ac_package=`echo $ac_package| sed 's/-/_/g'`
399 case "$ac_option" in
400 *=*) ;;
401 *) ac_optarg=yes ;;
402 esac
403 eval "with_${ac_package}='$ac_optarg'" ;;
405 -without-* | --without-*)
406 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
407 # Reject names that are not valid shell variable names.
408 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
409 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411 ac_package=`echo $ac_package| sed 's/-/_/g'`
412 eval "with_${ac_package}=no" ;;
414 --x)
415 # Obsolete; use --with-x.
416 with_x=yes ;;
418 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
419 | --x-incl | --x-inc | --x-in | --x-i)
420 ac_prev=x_includes ;;
421 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
422 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
423 x_includes="$ac_optarg" ;;
425 -x-libraries | --x-libraries | --x-librarie | --x-librari \
426 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
427 ac_prev=x_libraries ;;
428 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
429 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
430 x_libraries="$ac_optarg" ;;
432 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
436 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
437 echo "configure: warning: $ac_option: invalid host type" 1>&2
439 if test "x$nonopt" != xNONE; then
440 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
442 nonopt="$ac_option"
445 esac
446 done
448 if test -n "$ac_prev"; then
449 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
452 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454 # File descriptor usage:
455 # 0 standard input
456 # 1 file creation
457 # 2 errors and warnings
458 # 3 some systems may open it to /dev/tty
459 # 4 used on the Kubota Titan
460 # 6 checking for... messages and results
461 # 5 compiler messages saved in config.log
462 if test "$silent" = yes; then
463 exec 6>/dev/null
464 else
465 exec 6>&1
467 exec 5>./config.log
469 echo "\
470 This file contains any messages produced by compilers while
471 running configure, to aid debugging if configure makes a mistake.
472 " 1>&5
474 # Strip out --no-create and --no-recursion so they do not pile up.
475 # Also quote any args containing shell metacharacters.
476 ac_configure_args=
477 for ac_arg
479 case "$ac_arg" in
480 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
481 | --no-cr | --no-c) ;;
482 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
483 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
484 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
485 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
486 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
487 esac
488 done
490 # NLS nuisances.
491 # Only set these to C if already set. These must not be set unconditionally
492 # because not all systems understand e.g. LANG=C (notably SCO).
493 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
494 # Non-C LC_CTYPE values break the ctype check.
495 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
496 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
497 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
498 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
500 # confdefs.h avoids OS command line length limits that DEFS can exceed.
501 rm -rf conftest* confdefs.h
502 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
503 echo > confdefs.h
505 # A filename unique to this package, relative to the directory that
506 # configure is in, which we can look for to find out if srcdir is correct.
507 ac_unique_file=src/gmxlib/3dview.c
509 # Find the source files, if location was not specified.
510 if test -z "$srcdir"; then
511 ac_srcdir_defaulted=yes
512 # Try the directory containing this script, then its parent.
513 ac_prog=$0
514 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
515 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
516 srcdir=$ac_confdir
517 if test ! -r $srcdir/$ac_unique_file; then
518 srcdir=..
520 else
521 ac_srcdir_defaulted=no
523 if test ! -r $srcdir/$ac_unique_file; then
524 if test "$ac_srcdir_defaulted" = yes; then
525 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
526 else
527 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
530 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
532 # Prefer explicitly selected file to automatically selected ones.
533 if test -z "$CONFIG_SITE"; then
534 if test "x$prefix" != xNONE; then
535 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
536 else
537 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
540 for ac_site_file in $CONFIG_SITE; do
541 if test -r "$ac_site_file"; then
542 echo "loading site script $ac_site_file"
543 . "$ac_site_file"
545 done
547 if test -r "$cache_file"; then
548 echo "loading cache $cache_file"
549 . $cache_file
550 else
551 echo "creating cache $cache_file"
552 > $cache_file
555 ac_ext=c
556 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
557 ac_cpp='$CPP $CPPFLAGS'
558 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
559 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
560 cross_compiling=$ac_cv_prog_cc_cross
562 ac_exeext=
563 ac_objext=o
564 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
565 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
566 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
567 ac_n= ac_c='
568 ' ac_t=' '
569 else
570 ac_n=-n ac_c= ac_t=
572 else
573 ac_n= ac_c='\c' ac_t=
578 ac_aux_dir=
579 for ac_dir in ./config $srcdir/./config; do
580 if test -f $ac_dir/install-sh; then
581 ac_aux_dir=$ac_dir
582 ac_install_sh="$ac_aux_dir/install-sh -c"
583 break
584 elif test -f $ac_dir/install.sh; then
585 ac_aux_dir=$ac_dir
586 ac_install_sh="$ac_aux_dir/install.sh -c"
587 break
589 done
590 if test -z "$ac_aux_dir"; then
591 { echo "configure: error: can not find install-sh or install.sh in ./config $srcdir/./config" 1>&2; exit 1; }
593 ac_config_guess=$ac_aux_dir/config.guess
594 ac_config_sub=$ac_aux_dir/config.sub
595 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
597 # Find a good install program. We prefer a C program (faster),
598 # so one script is as good as another. But avoid the broken or
599 # incompatible versions:
600 # SysV /etc/install, /usr/sbin/install
601 # SunOS /usr/etc/install
602 # IRIX /sbin/install
603 # AIX /bin/install
604 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
605 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
606 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
607 # ./install, which can be erroneously created by make from ./install.sh.
608 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
609 echo "configure:610: checking for a BSD compatible install" >&5
610 if test -z "$INSTALL"; then
611 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
612 echo $ac_n "(cached) $ac_c" 1>&6
613 else
614 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
615 for ac_dir in $PATH; do
616 # Account for people who put trailing slashes in PATH elements.
617 case "$ac_dir/" in
618 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
620 # OSF1 and SCO ODT 3.0 have their own names for install.
621 # Don't use installbsd from OSF since it installs stuff as root
622 # by default.
623 for ac_prog in ginstall scoinst install; do
624 if test -f $ac_dir/$ac_prog; then
625 if test $ac_prog = install &&
626 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
627 # AIX install. It has an incompatible calling convention.
629 else
630 ac_cv_path_install="$ac_dir/$ac_prog -c"
631 break 2
634 done
636 esac
637 done
638 IFS="$ac_save_IFS"
641 if test "${ac_cv_path_install+set}" = set; then
642 INSTALL="$ac_cv_path_install"
643 else
644 # As a last resort, use the slow shell script. We don't cache a
645 # path for INSTALL within a source directory, because that will
646 # break other packages using the cache if that directory is
647 # removed, or if the path is relative.
648 INSTALL="$ac_install_sh"
651 echo "$ac_t""$INSTALL" 1>&6
653 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
654 # It thinks the first close brace ends the variable substitution.
655 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
657 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
659 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
661 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
662 echo "configure:663: checking whether build environment is sane" >&5
663 # Just in case
664 sleep 1
665 echo timestamp > conftest.file
666 # Do `set' in a subshell so we don't clobber the current shell's
667 # arguments. Must try -L first in case configure is actually a
668 # symlink; some systems play weird games with the mod time of symlinks
669 # (eg FreeBSD returns the mod time of the symlink's containing
670 # directory).
671 if (
672 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
673 if test "$*" = "X"; then
674 # -L didn't work.
675 set X `ls -t $srcdir/configure conftest.file`
677 if test "$*" != "X $srcdir/configure conftest.file" \
678 && test "$*" != "X conftest.file $srcdir/configure"; then
680 # If neither matched, then we have a broken ls. This can happen
681 # if, for instance, CONFIG_SHELL is bash and it inherits a
682 # broken ls alias from the environment. This has actually
683 # happened. Such a system could not be considered "sane".
684 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
685 alias in your environment" 1>&2; exit 1; }
688 test "$2" = conftest.file
690 then
691 # Ok.
693 else
694 { echo "configure: error: newly created file is older than distributed files!
695 Check your system clock" 1>&2; exit 1; }
697 rm -f conftest*
698 echo "$ac_t""yes" 1>&6
699 if test "$program_transform_name" = s,x,x,; then
700 program_transform_name=
701 else
702 # Double any \ or $. echo might interpret backslashes.
703 cat <<\EOF_SED > conftestsed
704 s,\\,\\\\,g; s,\$,$$,g
705 EOF_SED
706 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
707 rm -f conftestsed
709 test "$program_prefix" != NONE &&
710 program_transform_name="s,^,${program_prefix},; $program_transform_name"
711 # Use a double $ so make ignores it.
712 test "$program_suffix" != NONE &&
713 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
715 # sed with no file args requires a program.
716 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
718 test x"${MISSING+set}" = xset ||
719 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
720 # Use eval to expand $SHELL
721 if eval "$MISSING --run :"; then
722 am_missing_run="$MISSING --run "
723 else
724 am_missing_run=
725 am_backtick='`'
726 echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
729 for ac_prog in mawk gawk nawk awk
731 # Extract the first word of "$ac_prog", so it can be a program name with args.
732 set dummy $ac_prog; ac_word=$2
733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
734 echo "configure:735: checking for $ac_word" >&5
735 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
736 echo $ac_n "(cached) $ac_c" 1>&6
737 else
738 if test -n "$AWK"; then
739 ac_cv_prog_AWK="$AWK" # Let the user override the test.
740 else
741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
742 ac_dummy="$PATH"
743 for ac_dir in $ac_dummy; do
744 test -z "$ac_dir" && ac_dir=.
745 if test -f $ac_dir/$ac_word; then
746 ac_cv_prog_AWK="$ac_prog"
747 break
749 done
750 IFS="$ac_save_ifs"
753 AWK="$ac_cv_prog_AWK"
754 if test -n "$AWK"; then
755 echo "$ac_t""$AWK" 1>&6
756 else
757 echo "$ac_t""no" 1>&6
760 test -n "$AWK" && break
761 done
763 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
764 echo "configure:765: checking whether ${MAKE-make} sets \${MAKE}" >&5
765 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
766 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
767 echo $ac_n "(cached) $ac_c" 1>&6
768 else
769 cat > conftestmake <<\EOF
770 all:
771 @echo 'ac_maketemp="${MAKE}"'
773 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
774 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
775 if test -n "$ac_maketemp"; then
776 eval ac_cv_prog_make_${ac_make}_set=yes
777 else
778 eval ac_cv_prog_make_${ac_make}_set=no
780 rm -f conftestmake
782 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
783 echo "$ac_t""yes" 1>&6
784 SET_MAKE=
785 else
786 echo "$ac_t""no" 1>&6
787 SET_MAKE="MAKE=${MAKE-make}"
790 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
791 if test "${enable_dependency_tracking+set}" = set; then
792 enableval="$enable_dependency_tracking"
796 if test "x$enable_dependency_tracking" = xno; then
797 AMDEP="#"
798 else
799 am_depcomp="$ac_aux_dir/depcomp"
800 if test ! -f "$am_depcomp"; then
801 AMDEP="#"
802 else
803 AMDEP=
807 if test -z "$AMDEP"; then
808 AMDEPBACKSLASH='\'
809 else
810 AMDEPBACKSLASH=
816 if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
817 DEPDIR=.deps
818 # We redirect because .deps might already exist and be populated.
819 # In this situation we don't want to see an error.
820 rmdir .deps > /dev/null 2>&1
821 else
822 DEPDIR=_deps
826 # test to see if srcdir already configured
827 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
828 test -f $srcdir/config.status; then
829 { echo "configure: error: source directory already configured; run \"make distclean\" there first" 1>&2; exit 1; }
832 # Define the identity of the package.
833 PACKAGE=gromacs
834 VERSION=3.0b
835 cat >> confdefs.h <<EOF
836 #define PACKAGE "$PACKAGE"
839 cat >> confdefs.h <<EOF
840 #define VERSION "$VERSION"
844 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
845 # the ones we care about.
854 # Some tools Automake needs.
856 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
859 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
862 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
865 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
868 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
871 AMTAR=${AMTAR-"${am_missing_run}tar"}
874 if test -z "$install_sh"; then
875 for install_sh in "$ac_aux_dir/install-sh" \
876 "$ac_aux_dir/install.sh" \
877 "${am_missing_run}${ac_auxdir}/install-sh";
879 test -f "$install_sh" && break
880 done
881 # FIXME: an evil hack: we remove the SHELL invocation from
882 # install_sh because automake adds it back in. Sigh.
883 install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
886 # We need awk for the "check" target. The system "awk" is bad on
887 # some platforms.
894 #######################################################################
895 # User options
896 #######################################################################
898 #####
900 # Check whether --enable-mpi or --disable-mpi was given.
901 if test "${enable_mpi+set}" = set; then
902 enableval="$enable_mpi"
903 enable_mpi=$enableval
904 else
905 enable_mpi=no
910 #####
912 # Check whether --enable-vector or --disable-vector was given.
913 if test "${enable_vector+set}" = set; then
914 enableval="$enable_vector"
915 enable_vector=$enableval
916 else
917 enable_vector=no
922 #####
924 # Check whether --enable-fortran or --disable-fortran was given.
925 if test "${enable_fortran+set}" = set; then
926 enableval="$enable_fortran"
927 enable_fortran=$enableval
928 else
929 enable_fortran=check
934 #####
936 # Check whether --enable-double or --disable-double was given.
937 if test "${enable_double+set}" = set; then
938 enableval="$enable_double"
939 enable_double=$enableval
940 else
941 enable_double=no
946 #####
948 # Check whether --enable-type-suffix or --disable-type-suffix was given.
949 if test "${enable_type_suffix+set}" = set; then
950 enableval="$enable_type_suffix"
951 enable_type_suffix=$enableval
952 else
953 enable_type_suffix=yes
958 #####
960 # Check whether --enable-simplewater or --disable-simplewater was given.
961 if test "${enable_simplewater+set}" = set; then
962 enableval="$enable_simplewater"
963 enable_simplewater=$enableval
964 else
965 enable_simplewater=check
970 #####
971 # Check whether --enable-waterwater-loops or --disable-waterwater-loops was given.
972 if test "${enable_waterwater_loops+set}" = set; then
973 enableval="$enable_waterwater_loops"
974 enable_waterwater_loops=$enableval
975 else
976 enable_waterwater_loops=check
981 #####
983 # Check whether --enable-nice or --disable-nice was given.
984 if test "${enable_nice+set}" = set; then
985 enableval="$enable_nice"
986 enable_nice=$enableval
987 else
988 enable_nice=yes
993 #####
995 # Check whether --enable-sse or --disable-sse was given.
996 if test "${enable_sse+set}" = set; then
997 enableval="$enable_sse"
998 enable_sse=$enableval
999 else
1000 enable_sse=yes
1005 #####
1007 # Check whether --enable-3dnow or --disable-3dnow was given.
1008 if test "${enable_3dnow+set}" = set; then
1009 enableval="$enable_3dnow"
1010 enable_3dnow=$enableval
1011 else
1012 enable_3dnow=yes
1017 #####
1019 # Check whether --enable-xdr or --disable-xdr was given.
1020 if test "${enable_xdr+set}" = set; then
1021 enableval="$enable_xdr"
1022 enable_xdr=$enableval
1023 else
1024 enable_xdr=yes
1029 #####
1031 # Check whether --enable-cpu-detection or --disable-cpu-detection was given.
1032 if test "${enable_cpu_detection+set}" = set; then
1033 enableval="$enable_cpu_detection"
1034 enable_cpu_detection=$enableval
1035 else
1036 enable_cpu_detection=yes
1041 #####
1043 # Check whether --enable-software-recip or --disable-software-recip was given.
1044 if test "${enable_software_recip+set}" = set; then
1045 enableval="$enable_software_recip"
1046 enable_softwarerecip=$enableval
1047 else
1048 enable_softwarerecip=no
1053 #####
1055 # Check whether --enable-software-sqrt or --disable-software-sqrt was given.
1056 if test "${enable_software_sqrt+set}" = set; then
1057 enableval="$enable_software_sqrt"
1058 enable_softwaresqrt=$enableval
1059 else
1060 enable_softwaresqrt=check
1065 #####
1067 # Check whether --enable-vectorized_recip or --disable-vectorized_recip was given.
1068 if test "${enable_vectorized_recip+set}" = set; then
1069 enableval="$enable_vectorized_recip"
1070 enable_vectorized_recip=$enableval
1071 else
1072 enable_vectorized_recip=no
1077 #####
1079 # Check whether --enable-vectorized_sqrt or --disable-vectorized_sqrt was given.
1080 if test "${enable_vectorized_sqrt+set}" = set; then
1081 enableval="$enable_vectorized_sqrt"
1082 enable_vectorized_sqrt=$enableval
1083 else
1084 enable_vectorized_sqrt=no
1089 #####
1090 # Check whether --enable-prefetch_x or --disable-prefetch_x was given.
1091 if test "${enable_prefetch_x+set}" = set; then
1092 enableval="$enable_prefetch_x"
1093 enable_prefetch_x=$enableval
1094 else
1095 enable_prefetch_x=no
1100 #####
1101 # Check whether --enable-prefetch_f or --disable-prefetch_f was given.
1102 if test "${enable_prefetch_f+set}" = set; then
1103 enableval="$enable_prefetch_f"
1104 enable_prefetch_f=$enableval
1105 else
1106 enable_prefetch_f=no
1111 #####
1112 # Check whether --enable-hide_square_latency or --disable-hide_square_latency was given.
1113 if test "${enable_hide_square_latency+set}" = set; then
1114 enableval="$enable_hide_square_latency"
1115 enable_hide_square_latency=$enableval
1116 else
1117 enable_hide_square_latency=no
1122 #####
1123 # Check whether --enable-hide_table_latency or --disable-hide_table_latency was given.
1124 if test "${enable_hide_table_latency+set}" = set; then
1125 enableval="$enable_hide_table_latency"
1126 enable_hide_table_latency=$enableval
1127 else
1128 enable_hide_table_latency=no
1133 #####
1135 # Check whether --with-mpi-environment or --without-mpi-environment was given.
1136 if test "${with_mpi_environment+set}" = set; then
1137 withval="$with_mpi_environment"
1138 with_mpi_environment=$enableval
1139 else
1140 with_mpi_environment=no
1145 ########################################################################
1146 # Process the options
1147 ########################################################################
1150 # Make sure we can run config.sub.
1151 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1152 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1155 echo $ac_n "checking host system type""... $ac_c" 1>&6
1156 echo "configure:1157: checking host system type" >&5
1158 host_alias=$host
1159 case "$host_alias" in
1160 NONE)
1161 case $nonopt in
1162 NONE)
1163 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1164 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1165 fi ;;
1166 *) host_alias=$nonopt ;;
1167 esac ;;
1168 esac
1170 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1171 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1172 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1173 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1174 echo "$ac_t""$host" 1>&6
1177 case "${host_cpu}" in
1178 i?86)
1179 x86=yes
1182 x86=false
1184 esac
1186 if test "$enable_fortran" = "check"; then
1187 case "${host_cpu}-${host_os}" in
1189 sparc*-solaris* | alpha*-osf* | rs6000*-aix* | mips*-irix*)
1190 enable_fortran=yes
1194 enable_fortran=no
1196 esac
1199 if test "$enable_simplewater" = "check"; then
1200 case "${host_cpu}-${host_os}" in
1202 mips*-irix*)
1203 enable_simplewater=yes
1207 enable_simplewater=no
1209 esac
1212 if test "$enable_waterwater_loops" = "check"; then
1213 case "${host_cpu}-${host_os}" in
1215 mips*-irix*)
1216 enable_waterwater_loops=no
1220 enable_waterwater_loops=yes
1222 esac
1225 if test "$enable_softwaresqrt" = "check"; then
1226 case "${host_cpu}-${host_os}" in
1228 mips*-irix* | rs6000*-aix*)
1229 enable_softwaresqrt=no
1233 enable_softwaresqrt=yes
1235 esac
1238 case "${host_cpu}" in
1239 alpha*)
1240 cat >> confdefs.h <<\EOF
1241 #define USE_AXP_ASM
1247 esac
1249 if test "$enable_fortran" = "yes"; then
1250 # vendor f77 before g77
1251 for ac_prog in f77 xlf xlf77 cf77 fl32 g77 fort77 f90 xlf90 pgf77 cf77 fort fort77 pgf90
1253 # Extract the first word of "$ac_prog", so it can be a program name with args.
1254 set dummy $ac_prog; ac_word=$2
1255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1256 echo "configure:1257: checking for $ac_word" >&5
1257 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1259 else
1260 if test -n "$F77"; then
1261 ac_cv_prog_F77="$F77" # Let the user override the test.
1262 else
1263 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1264 ac_dummy="$PATH"
1265 for ac_dir in $ac_dummy; do
1266 test -z "$ac_dir" && ac_dir=.
1267 if test -f $ac_dir/$ac_word; then
1268 ac_cv_prog_F77="$ac_prog"
1269 break
1271 done
1272 IFS="$ac_save_ifs"
1275 F77="$ac_cv_prog_F77"
1276 if test -n "$F77"; then
1277 echo "$ac_t""$F77" 1>&6
1278 else
1279 echo "$ac_t""no" 1>&6
1282 test -n "$F77" && break
1283 done
1285 if test -z "$F77"; then
1286 for ac_prog in g77 f77 f2c
1288 # Extract the first word of "$ac_prog", so it can be a program name with args.
1289 set dummy $ac_prog; ac_word=$2
1290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1291 echo "configure:1292: checking for $ac_word" >&5
1292 if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
1293 echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295 if test -n "$F77"; then
1296 ac_cv_prog_F77="$F77" # Let the user override the test.
1297 else
1298 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1299 ac_dummy="$PATH"
1300 for ac_dir in $ac_dummy; do
1301 test -z "$ac_dir" && ac_dir=.
1302 if test -f $ac_dir/$ac_word; then
1303 ac_cv_prog_F77="$ac_prog"
1304 break
1306 done
1307 IFS="$ac_save_ifs"
1310 F77="$ac_cv_prog_F77"
1311 if test -n "$F77"; then
1312 echo "$ac_t""$F77" 1>&6
1313 else
1314 echo "$ac_t""no" 1>&6
1317 test -n "$F77" && break
1318 done
1320 test -z "$F77" && { echo "configure: error: no acceptable Fortran 77 compiler found in \$PATH" 1>&2; exit 1; }
1323 echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1324 echo "configure:1325: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works" >&5
1326 ac_ext=f
1327 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5'
1328 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1329 cross_compiling=$ac_cv_prog_f77_cross
1331 cat > conftest.$ac_ext << EOF
1333 program conftest
1337 if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1338 ac_cv_prog_f77_works=yes
1339 # If we can't run a trivial program, we are probably using a cross compiler.
1340 if (./conftest; exit) 2>/dev/null; then
1341 ac_cv_prog_f77_cross=no
1342 else
1343 ac_cv_prog_f77_cross=yes
1345 else
1346 echo "configure: failed program was:" >&5
1347 cat conftest.$ac_ext >&5
1348 ac_cv_prog_f77_works=no
1350 rm -fr conftest*
1351 ac_ext=c
1352 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1353 ac_cpp='$CPP $CPPFLAGS'
1354 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1355 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1356 cross_compiling=$ac_cv_prog_cc_cross
1358 echo "$ac_t""$ac_cv_prog_f77_works" 1>&6
1359 if test $ac_cv_prog_f77_works = no; then
1360 { echo "configure: error: installation or configuration problem: Fortran 77 compiler cannot create executables." 1>&2; exit 1; }
1362 echo $ac_n "checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1363 echo "configure:1364: checking whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler" >&5
1364 echo "$ac_t""$ac_cv_prog_f77_cross" 1>&6
1365 cross_compiling=$ac_cv_prog_f77_cross
1367 echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6
1368 echo "configure:1369: checking whether we are using GNU Fortran 77" >&5
1369 if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1371 else
1372 cat > conftest.fpp <<EOF
1373 #ifdef __GNUC__
1375 #endif
1377 if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1378 ac_cv_prog_g77=yes
1379 else
1380 ac_cv_prog_g77=no
1384 echo "$ac_t""$ac_cv_prog_g77" 1>&6
1386 if test $ac_cv_prog_g77 = yes; then
1387 G77=yes
1388 ac_test_FFLAGS="${FFLAGS+set}"
1389 ac_save_FFLAGS="$FFLAGS"
1390 FFLAGS=
1391 echo $ac_n "checking whether $F77 accepts -g""... $ac_c" 1>&6
1392 echo "configure:1393: checking whether $F77 accepts -g" >&5
1393 if eval "test \"`echo '$''{'ac_cv_prog_f77_g'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395 else
1396 cat > conftest.f << EOF
1397 program conftest
1400 if test -z "`$F77 -g -c conftest.f 2>&1`"; then
1401 ac_cv_prog_f77_g=yes
1402 else
1403 ac_cv_prog_f77_g=no
1405 rm -f conftest*
1409 echo "$ac_t""$ac_cv_prog_f77_g" 1>&6
1410 if test "$ac_test_FFLAGS" = set; then
1411 FFLAGS="$ac_save_FFLAGS"
1412 elif test $ac_cv_prog_f77_g = yes; then
1413 FFLAGS="-g -O2"
1414 else
1415 FFLAGS="-O2"
1417 else
1418 G77=
1419 test "${FFLAGS+set}" = set || FFLAGS="-g"
1422 if test -z "$F77"; then
1423 { echo "configure: error: No fortran compiler found" 1>&2; exit 1; }
1427 # Checks for programs.
1428 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1429 echo "configure:1430: checking whether ${MAKE-make} sets \${MAKE}" >&5
1430 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1431 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1432 echo $ac_n "(cached) $ac_c" 1>&6
1433 else
1434 cat > conftestmake <<\EOF
1435 all:
1436 @echo 'ac_maketemp="${MAKE}"'
1438 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1439 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1440 if test -n "$ac_maketemp"; then
1441 eval ac_cv_prog_make_${ac_make}_set=yes
1442 else
1443 eval ac_cv_prog_make_${ac_make}_set=no
1445 rm -f conftestmake
1447 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1448 echo "$ac_t""yes" 1>&6
1449 SET_MAKE=
1450 else
1451 echo "$ac_t""no" 1>&6
1452 SET_MAKE="MAKE=${MAKE-make}"
1456 # Extract the first word of "cc", so it can be a program name with args.
1457 set dummy cc; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463 if test -n "$CC"; then
1464 ac_cv_prog_CC="$CC" # Let the user override the test.
1465 else
1466 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1467 ac_dummy="$PATH"
1468 for ac_dir in $ac_dummy; do
1469 test -z "$ac_dir" && ac_dir=.
1470 if test -f $ac_dir/$ac_word; then
1471 ac_cv_prog_CC="cc"
1472 break
1474 done
1475 IFS="$ac_save_ifs"
1478 CC="$ac_cv_prog_CC"
1479 if test -n "$CC"; then
1480 echo "$ac_t""$CC" 1>&6
1481 else
1482 echo "$ac_t""no" 1>&6
1484 # do vendor cc before gcc
1485 # Extract the first word of "gcc", so it can be a program name with args.
1486 set dummy gcc; ac_word=$2
1487 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1488 echo "configure:1489: checking for $ac_word" >&5
1489 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1490 echo $ac_n "(cached) $ac_c" 1>&6
1491 else
1492 if test -n "$CC"; then
1493 ac_cv_prog_CC="$CC" # Let the user override the test.
1494 else
1495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1496 ac_dummy="$PATH"
1497 for ac_dir in $ac_dummy; do
1498 test -z "$ac_dir" && ac_dir=.
1499 if test -f $ac_dir/$ac_word; then
1500 ac_cv_prog_CC="gcc"
1501 break
1503 done
1504 IFS="$ac_save_ifs"
1507 CC="$ac_cv_prog_CC"
1508 if test -n "$CC"; then
1509 echo "$ac_t""$CC" 1>&6
1510 else
1511 echo "$ac_t""no" 1>&6
1514 if test -z "$CC"; then
1515 # Extract the first word of "cc", so it can be a program name with args.
1516 set dummy cc; ac_word=$2
1517 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1518 echo "configure:1519: checking for $ac_word" >&5
1519 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1520 echo $ac_n "(cached) $ac_c" 1>&6
1521 else
1522 if test -n "$CC"; then
1523 ac_cv_prog_CC="$CC" # Let the user override the test.
1524 else
1525 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1526 ac_prog_rejected=no
1527 ac_dummy="$PATH"
1528 for ac_dir in $ac_dummy; do
1529 test -z "$ac_dir" && ac_dir=.
1530 if test -f $ac_dir/$ac_word; then
1531 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1532 ac_prog_rejected=yes
1533 continue
1535 ac_cv_prog_CC="cc"
1536 break
1538 done
1539 IFS="$ac_save_ifs"
1540 if test $ac_prog_rejected = yes; then
1541 # We found a bogon in the path, so make sure we never use it.
1542 set dummy $ac_cv_prog_CC
1543 shift
1544 if test $# -gt 0; then
1545 # We chose a different compiler from the bogus one.
1546 # However, it has the same basename, so the bogon will be chosen
1547 # first if we set CC to just the basename; use the full file name.
1548 shift
1549 set dummy "$ac_dir/$ac_word" "$@"
1550 shift
1551 ac_cv_prog_CC="$@"
1556 CC="$ac_cv_prog_CC"
1557 if test -n "$CC"; then
1558 echo "$ac_t""$CC" 1>&6
1559 else
1560 echo "$ac_t""no" 1>&6
1563 if test -z "$CC"; then
1564 case "`uname -s`" in
1565 *win32* | *WIN32*)
1566 # Extract the first word of "cl", so it can be a program name with args.
1567 set dummy cl; ac_word=$2
1568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1569 echo "configure:1570: checking for $ac_word" >&5
1570 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573 if test -n "$CC"; then
1574 ac_cv_prog_CC="$CC" # Let the user override the test.
1575 else
1576 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1577 ac_dummy="$PATH"
1578 for ac_dir in $ac_dummy; do
1579 test -z "$ac_dir" && ac_dir=.
1580 if test -f $ac_dir/$ac_word; then
1581 ac_cv_prog_CC="cl"
1582 break
1584 done
1585 IFS="$ac_save_ifs"
1588 CC="$ac_cv_prog_CC"
1589 if test -n "$CC"; then
1590 echo "$ac_t""$CC" 1>&6
1591 else
1592 echo "$ac_t""no" 1>&6
1595 esac
1597 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1600 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1601 echo "configure:1602: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1603 ac_ext=c
1604 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1605 ac_cpp='$CPP $CPPFLAGS'
1606 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1607 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1608 cross_compiling=$ac_cv_prog_cc_cross
1610 cat > conftest.$ac_ext << EOF
1612 #line 1613 "configure"
1613 #include "confdefs.h"
1615 main(){return(0);}
1617 if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1618 ac_cv_prog_cc_works=yes
1619 # If we can't run a trivial program, we are probably using a cross compiler.
1620 if (./conftest; exit) 2>/dev/null; then
1621 ac_cv_prog_cc_cross=no
1622 else
1623 ac_cv_prog_cc_cross=yes
1625 else
1626 echo "configure: failed program was:" >&5
1627 cat conftest.$ac_ext >&5
1628 ac_cv_prog_cc_works=no
1630 rm -fr conftest*
1631 ac_ext=c
1632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1633 ac_cpp='$CPP $CPPFLAGS'
1634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1636 cross_compiling=$ac_cv_prog_cc_cross
1638 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1639 if test $ac_cv_prog_cc_works = no; then
1640 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1642 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1643 echo "configure:1644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1644 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1645 cross_compiling=$ac_cv_prog_cc_cross
1647 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1648 echo "configure:1649: checking whether we are using GNU C" >&5
1649 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1650 echo $ac_n "(cached) $ac_c" 1>&6
1651 else
1652 cat > conftest.c <<EOF
1653 #ifdef __GNUC__
1654 yes;
1655 #endif
1657 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1658 ac_cv_prog_gcc=yes
1659 else
1660 ac_cv_prog_gcc=no
1664 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1666 if test $ac_cv_prog_gcc = yes; then
1667 GCC=yes
1668 else
1669 GCC=
1672 ac_test_CFLAGS="${CFLAGS+set}"
1673 ac_save_CFLAGS="$CFLAGS"
1674 CFLAGS=
1675 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1676 echo "configure:1677: checking whether ${CC-cc} accepts -g" >&5
1677 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1678 echo $ac_n "(cached) $ac_c" 1>&6
1679 else
1680 echo 'void f(){}' > conftest.c
1681 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1682 ac_cv_prog_cc_g=yes
1683 else
1684 ac_cv_prog_cc_g=no
1686 rm -f conftest*
1690 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1691 if test "$ac_test_CFLAGS" = set; then
1692 CFLAGS="$ac_save_CFLAGS"
1693 elif test $ac_cv_prog_cc_g = yes; then
1694 if test "$GCC" = yes; then
1695 CFLAGS="-g -O2"
1696 else
1697 CFLAGS="-g"
1699 else
1700 if test "$GCC" = yes; then
1701 CFLAGS="-O2"
1702 else
1703 CFLAGS=
1708 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1709 echo "configure:1710: checking how to run the C preprocessor" >&5
1710 # On Suns, sometimes $CPP names a directory.
1711 if test -n "$CPP" && test -d "$CPP"; then
1712 CPP=
1714 if test -z "$CPP"; then
1715 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1716 echo $ac_n "(cached) $ac_c" 1>&6
1717 else
1718 # This must be in double quotes, not single quotes, because CPP may get
1719 # substituted into the Makefile and "${CC-cc}" will confuse make.
1720 CPP="${CC-cc} -E"
1721 # On the NeXT, cc -E runs the code through the compiler's parser,
1722 # not just through cpp.
1723 cat > conftest.$ac_ext <<EOF
1724 #line 1725 "configure"
1725 #include "confdefs.h"
1726 #include <assert.h>
1727 Syntax Error
1729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1730 { (eval echo configure:1731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1732 if test -z "$ac_err"; then
1734 else
1735 echo "$ac_err" >&5
1736 echo "configure: failed program was:" >&5
1737 cat conftest.$ac_ext >&5
1738 rm -rf conftest*
1739 CPP="${CC-cc} -E -traditional-cpp"
1740 cat > conftest.$ac_ext <<EOF
1741 #line 1742 "configure"
1742 #include "confdefs.h"
1743 #include <assert.h>
1744 Syntax Error
1746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1747 { (eval echo configure:1748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1749 if test -z "$ac_err"; then
1751 else
1752 echo "$ac_err" >&5
1753 echo "configure: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1755 rm -rf conftest*
1756 CPP="${CC-cc} -nologo -E"
1757 cat > conftest.$ac_ext <<EOF
1758 #line 1759 "configure"
1759 #include "confdefs.h"
1760 #include <assert.h>
1761 Syntax Error
1763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1764 { (eval echo configure:1765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1766 if test -z "$ac_err"; then
1768 else
1769 echo "$ac_err" >&5
1770 echo "configure: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1772 rm -rf conftest*
1773 CPP=/lib/cpp
1775 rm -f conftest*
1777 rm -f conftest*
1779 rm -f conftest*
1780 ac_cv_prog_CPP="$CPP"
1782 CPP="$ac_cv_prog_CPP"
1783 else
1784 ac_cv_prog_CPP="$CPP"
1786 echo "$ac_t""$CPP" 1>&6
1788 am_make=${MAKE-make}
1789 # BSD make uses .include
1790 cat > confinc << 'END'
1791 doit:
1792 @echo done
1794 # If we don't find an include directive, just comment out the code.
1795 echo $ac_n "checking for style of include used by $am_make""... $ac_c" 1>&6
1796 echo "configure:1797: checking for style of include used by $am_make" >&5
1797 _am_include='#'
1798 for am_inc in include .include; do
1799 echo "$am_inc confinc" > confmf
1800 if test "`$am_make -f confmf 2> /dev/null`" = "done"; then
1801 _am_include=$am_inc
1802 break
1804 done
1806 echo "$ac_t""$_am_include" 1>&6
1807 rm -f confinc confmf
1810 depcc="$CC"
1811 depcpp="$CPP"
1815 echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
1816 echo "configure:1817: checking dependency style of $depcc" >&5
1817 if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820 if test -z "$AMDEP"; then
1821 # We make a subdir and do the tests there. Otherwise we can end up
1822 # making bogus files that we don't know about and never remove. For
1823 # instance it was reported that on HP-UX the gcc test will end up
1824 # making a dummy file named `D' -- because `-MD' means `put the output
1825 # in D'.
1826 mkdir confdir
1827 # Copy depcomp to subdir because otherwise we won't find it if we're
1828 # using a relative directory.
1829 cp "$am_depcomp" confdir
1830 cd confdir
1832 am_cv_CC_dependencies_compiler_type=none
1833 for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "./depcomp"`; do
1834 # We need to recreate these files for each test, as the compiler may
1835 # overwrite some of them when testing with obscure command lines.
1836 # This happens at least with the AIX C compiler.
1837 echo '#include "conftest.h"' > conftest.c
1838 echo 'int i;' > conftest.h
1840 case "$depmode" in
1841 nosideeffect)
1842 # after this tag, mechanisms are not by side-effect, so they'll
1843 # only be used when explicitly requested
1844 if test "x$enable_dependency_tracking" = xyes; then
1845 continue
1846 else
1847 break
1850 none) break ;;
1851 esac
1852 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1853 # mode. It turns out that the SunPro C++ compiler does not properly
1854 # handle `-M -o', and we need to detect this.
1855 if depmode="$depmode" \
1856 source=conftest.c object=conftest.o \
1857 depfile=conftest.Po tmpdepfile=conftest.TPo \
1858 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
1859 grep conftest.h conftest.Po > /dev/null 2>&1; then
1860 am_cv_CC_dependencies_compiler_type="$depmode"
1861 break
1863 done
1865 cd ..
1866 rm -rf confdir
1867 else
1868 am_cv_CC_dependencies_compiler_type=none
1873 echo "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
1874 CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
1877 BUILD_CC=$CC
1880 if test "$enable_fortran" = "yes"; then
1881 echo $ac_n "checking for Fortran 77 libraries""... $ac_c" 1>&6
1882 echo "configure:1883: checking for Fortran 77 libraries" >&5
1885 if eval "test \"`echo '$''{'ac_cv_flibs'+set}'`\" = set"; then
1886 echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888 echo " END" > conftest.f
1889 foutput=`${F77} -v -o conftest conftest.f 2>&1`
1890 xlf_p=`echo $foutput | grep xlfentry`
1891 if test -n "$xlf_p"; then
1892 foutput=`echo $foutput | sed 's/,/ /g'`
1894 ld_run_path=`echo $foutput | \
1895 sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`
1896 case "$ld_run_path" in
1898 if test "$ac_cv_prog_gcc" = yes; then
1899 ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
1900 else
1901 ld_run_path="-R $ld_run_path"
1905 ld_run_path=
1907 esac
1908 flibs=
1909 lflags=
1910 want_arg=
1911 for arg in $foutput; do
1912 old_want_arg=$want_arg
1913 want_arg=
1914 if test -n "$old_want_arg"; then
1915 case "$arg" in
1917 old_want_arg=
1919 esac
1921 case "$old_want_arg" in
1923 case $arg in
1924 /*.a)
1925 exists=false
1926 for f in $lflags; do
1927 if test x$arg = x$f; then
1928 exists=true
1930 done
1931 if $exists; then
1932 arg=
1933 else
1934 lflags="$lflags $arg"
1937 -bI:*)
1938 exists=false
1939 for f in $lflags; do
1940 if test x$arg = x$f; then
1941 exists=true
1943 done
1944 if $exists; then
1945 arg=
1946 else
1947 if test "$ac_cv_prog_gcc" = yes; then
1948 lflags="$lflags -Xlinker $arg"
1949 else
1950 lflags="$lflags $arg"
1954 -lang* | -lcrt0.o | -lc | -lgcc)
1955 arg=
1957 -[lLR])
1958 want_arg=$arg
1959 arg=
1961 -[lLR]*)
1962 exists=false
1963 for f in $lflags; do
1964 if test x$arg = x$f; then
1965 exists=true
1967 done
1968 if $exists; then
1969 arg=
1970 else
1971 case "$arg" in
1972 -lkernel32)
1973 case "$canonical_host_type" in
1974 *-*-cygwin*)
1975 arg=
1978 lflags="$lflags $arg"
1980 esac
1982 -lm)
1985 lflags="$lflags $arg"
1987 esac
1991 want_arg=$arg
1992 arg=
1995 want_arg=$arg
1996 arg=
1999 arg=
2001 esac
2003 -[lLR])
2004 arg="$old_want_arg $arg"
2007 arg="-u $arg"
2010 arg=`echo $arg | sed -e 's%^P,%%'`
2011 SAVE_IFS=$IFS
2012 IFS=:
2013 list=
2014 for elt in $arg; do
2015 list="$list -L$elt"
2016 done
2017 IFS=$SAVE_IFS
2018 arg="$list"
2020 esac
2021 if test -n "$arg"; then
2022 flibs="$flibs $arg"
2024 done
2025 if test -n "$ld_run_path"; then
2026 flibs_result="$ld_run_path $flibs"
2027 else
2028 flibs_result="$flibs"
2030 ac_cv_flibs="$flibs_result"
2033 FLIBS="$ac_cv_flibs"
2034 echo "$ac_t""$FLIBS" 1>&6
2040 echo $ac_n "checking fortran name mangling""... $ac_c" 1>&6
2041 echo "configure:2042: checking fortran name mangling" >&5
2042 cat > mangle-func.f <<EOF
2043 subroutine foobar()
2044 return
2046 subroutine foo_bar()
2047 return
2050 ac_try='$F77 -c $FFLAGS mangle-func.f 1>&5'
2051 if { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then
2052 ac_try=""
2053 else
2054 echo "configure: failed program was:" >&5
2055 cat mangle-func.f >&5
2056 rm -f mangle-func*
2057 { echo "configure: error: failed to compile fortran test program" 1>&2; exit 1; }
2060 ac_f77_mangle_type=unknown
2062 ac_ext=c
2063 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2064 ac_cpp='$CPP $CPPFLAGS'
2065 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2066 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2067 cross_compiling=$ac_cv_prog_cc_cross
2069 ac_save_LIBS="$LIBS"
2070 LIBS="mangle-func.o $FLIBS $LIBS"
2071 cat > conftest.$ac_ext <<EOF
2072 #line 2073 "configure"
2073 #include "confdefs.h"
2075 int main() {
2076 foobar();
2077 ; return 0; }
2079 if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2080 rm -rf conftest*
2081 ac_f77_mangle_type=lowercase
2082 else
2083 echo "configure: failed program was:" >&5
2084 cat conftest.$ac_ext >&5
2085 rm -rf conftest*
2086 cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2090 int main() {
2091 foobar_();
2092 ; return 0; }
2094 if { (eval echo configure:2095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2095 rm -rf conftest*
2096 ac_f77_mangle_type=lowercase-underscore
2097 else
2098 echo "configure: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2100 rm -rf conftest*
2101 cat > conftest.$ac_ext <<EOF
2102 #line 2103 "configure"
2103 #include "confdefs.h"
2105 int main() {
2106 FOOBAR();
2107 ; return 0; }
2109 if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2110 rm -rf conftest*
2111 ac_f77_mangle_type=uppercase
2112 else
2113 echo "configure: failed program was:" >&5
2114 cat conftest.$ac_ext >&5
2115 rm -rf conftest*
2116 cat > conftest.$ac_ext <<EOF
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2120 int main() {
2121 FOOBAR_();
2122 ; return 0; }
2124 if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2125 rm -rf conftest*
2126 ac_f77_mangle_type=uppercase-underscore
2127 else
2128 echo "configure: failed program was:" >&5
2129 cat conftest.$ac_ext >&5
2131 rm -f conftest*
2133 rm -f conftest*
2135 rm -f conftest*
2137 rm -f conftest*
2138 LIBS="$ac_save_LIBS"
2139 ac_ext=c
2140 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2141 ac_cpp='$CPP $CPPFLAGS'
2142 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2143 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2144 cross_compiling=$ac_cv_prog_cc_cross
2146 echo "$ac_t""$ac_f77_mangle_type" 1>&6
2148 mangle_try=unknown
2149 case $ac_f77_mangle_type in
2150 lowercase)
2151 cat >> confdefs.h <<\EOF
2152 #define F77_NAME_LOWERCASE
2155 mangle_try=foo_bar_
2157 lowercase-underscore)
2158 cat >> confdefs.h <<\EOF
2159 #define F77_NAME_LOWERCASE_UNDERSCORE
2162 mangle_try=foo_bar__
2164 uppercase)
2165 cat >> confdefs.h <<\EOF
2166 #define F77_NAME_UPPERCASE
2169 mangle_try=FOO_BAR_
2171 uppercase-underscore)
2172 cat >> confdefs.h <<\EOF
2173 #define F77_NAME_UPPERCASE_UNDERSCORE
2176 mangle_try=FOO_BAR__
2178 esac
2180 echo $ac_n "checking whether f77 functions with underscore get an extra underscore""... $ac_c" 1>&6
2181 echo "configure:2182: checking whether f77 functions with underscore get an extra underscore" >&5
2184 ac_ext=c
2185 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2186 ac_cpp='$CPP $CPPFLAGS'
2187 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2188 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2189 cross_compiling=$ac_cv_prog_cc_cross
2191 ac_save_LIBS="$LIBS"
2192 LIBS="mangle-func.o $FLIBS $LIBS"
2193 cat > conftest.$ac_ext <<EOF
2194 #line 2195 "configure"
2195 #include "confdefs.h"
2197 int main() {
2198 $mangle_try();
2199 ; return 0; }
2201 if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2202 rm -rf conftest*
2203 ac_f77_mangle_underscore=yes;
2204 cat >> confdefs.h <<\EOF
2205 #define F77_NAME_EXTRA_UNDERSCORE
2208 else
2209 echo "configure: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
2211 rm -rf conftest*
2212 ac_f77_mangle_underscore=no
2214 rm -f conftest*
2215 LIBS="$ac_save_LIBS"
2216 ac_ext=c
2217 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2218 ac_cpp='$CPP $CPPFLAGS'
2219 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2220 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2221 cross_compiling=$ac_cv_prog_cc_cross
2223 rm -f mangle-func*
2224 echo "$ac_t""$ac_f77_mangle_underscore" 1>&6
2228 # if we are using mpi, also get an MPICC. We cannot set that in the PROG_CC macro
2229 # above, since the autoconf checks that the created file can be executed. This would
2230 # fail on platforms where MPI executables can only be run through a batchqueue.
2232 if test "$enable_mpi" = "yes"; then
2233 for ac_prog in mpicc mpcc mpxlf hcc
2235 # Extract the first word of "$ac_prog", so it can be a program name with args.
2236 set dummy $ac_prog; ac_word=$2
2237 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2238 echo "configure:2239: checking for $ac_word" >&5
2239 if eval "test \"`echo '$''{'ac_cv_prog_MPICC'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241 else
2242 if test -n "$MPICC"; then
2243 ac_cv_prog_MPICC="$MPICC" # Let the user override the test.
2244 else
2245 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2246 ac_dummy="$PATH"
2247 for ac_dir in $ac_dummy; do
2248 test -z "$ac_dir" && ac_dir=.
2249 if test -f $ac_dir/$ac_word; then
2250 ac_cv_prog_MPICC="$ac_prog"
2251 break
2253 done
2254 IFS="$ac_save_ifs"
2257 MPICC="$ac_cv_prog_MPICC"
2258 if test -n "$MPICC"; then
2259 echo "$ac_t""$MPICC" 1>&6
2260 else
2261 echo "$ac_t""no" 1>&6
2264 test -n "$MPICC" && break
2265 done
2266 test -n "$MPICC" || MPICC="$CC"
2268 # now change the normal cc to the MPI one - see the comment above.
2269 CC=$MPICC
2270 echo $ac_n "checking whether the MPI cc command works""... $ac_c" 1>&6
2271 echo "configure:2272: checking whether the MPI cc command works" >&5 # be paranoid
2272 cat > conftest.$ac_ext <<EOF
2273 #line 2274 "configure"
2274 #include "confdefs.h"
2275 #include <mpi.h>
2276 int main() {
2277 int argc; char **argv; MPI_Init(&argc,&argv);
2278 ; return 0; }
2280 if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2281 rm -rf conftest*
2282 echo "$ac_t""yes" 1>&6
2283 else
2284 echo "configure: failed program was:" >&5
2285 cat conftest.$ac_ext >&5
2286 rm -rf conftest*
2287 { echo "configure: error: Cannot compile and link MPI code with $CC" 1>&2; exit 1; }
2289 rm -f conftest*
2292 if true; then
2293 USE_MPI_TRUE=
2294 USE_MPI_FALSE='#'
2295 else
2296 USE_MPI_TRUE='#'
2297 USE_MPI_FALSE=
2299 else
2302 if false; then
2303 USE_MPI_TRUE=
2304 USE_MPI_FALSE='#'
2305 else
2306 USE_MPI_TRUE='#'
2307 USE_MPI_FALSE=
2311 # Find a good install program. We prefer a C program (faster),
2312 # so one script is as good as another. But avoid the broken or
2313 # incompatible versions:
2314 # SysV /etc/install, /usr/sbin/install
2315 # SunOS /usr/etc/install
2316 # IRIX /sbin/install
2317 # AIX /bin/install
2318 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2319 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2320 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2321 # ./install, which can be erroneously created by make from ./install.sh.
2322 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2323 echo "configure:2324: checking for a BSD compatible install" >&5
2324 if test -z "$INSTALL"; then
2325 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2326 echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2329 for ac_dir in $PATH; do
2330 # Account for people who put trailing slashes in PATH elements.
2331 case "$ac_dir/" in
2332 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2334 # OSF1 and SCO ODT 3.0 have their own names for install.
2335 # Don't use installbsd from OSF since it installs stuff as root
2336 # by default.
2337 for ac_prog in ginstall scoinst install; do
2338 if test -f $ac_dir/$ac_prog; then
2339 if test $ac_prog = install &&
2340 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2341 # AIX install. It has an incompatible calling convention.
2343 else
2344 ac_cv_path_install="$ac_dir/$ac_prog -c"
2345 break 2
2348 done
2350 esac
2351 done
2352 IFS="$ac_save_IFS"
2355 if test "${ac_cv_path_install+set}" = set; then
2356 INSTALL="$ac_cv_path_install"
2357 else
2358 # As a last resort, use the slow shell script. We don't cache a
2359 # path for INSTALL within a source directory, because that will
2360 # break other packages using the cache if that directory is
2361 # removed, or if the path is relative.
2362 INSTALL="$ac_install_sh"
2365 echo "$ac_t""$INSTALL" 1>&6
2367 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2368 # It thinks the first close brace ends the variable substitution.
2369 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2371 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2373 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
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=
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
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
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
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
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
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
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
2442 rm -f conftest*
2444 rm -f conftest*
2446 rm -f conftest*
2447 ac_cv_prog_CPP="$CPP"
2449 CPP="$ac_cv_prog_CPP"
2450 else
2451 ac_cv_prog_CPP="$CPP"
2453 echo "$ac_t""$CPP" 1>&6
2456 # A rather complicated check for the nasm program and x86 assembly capabilities
2457 # to run under windows we must insert a test a change nasm "-f elf" to "-f win32"
2458 if test "$x86" = "yes"; then
2459 if test "$enable_sse" = "yes" -o "$enable_3dnow" = "yes"; then
2460 if test "$enable_double" = "yes"; then
2461 echo "configure: warning: SSE/3Dnow assembly can only be used in single precision" 1>&2
2462 enable_sse=no
2463 enable_3dnow=no
2464 else
2465 # Extract the first word of "nasm", so it can be a program name with args.
2466 set dummy nasm; ac_word=$2
2467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2468 echo "configure:2469: checking for $ac_word" >&5
2469 if eval "test \"`echo '$''{'ac_cv_path_NASM'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472 case "$NASM" in
2474 ac_cv_path_NASM="$NASM" # Let the user override the test with a path.
2476 ?:/*)
2477 ac_cv_path_NASM="$NASM" # Let the user override the test with a dos path.
2480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2481 ac_dummy="$PATH"
2482 for ac_dir in $ac_dummy; do
2483 test -z "$ac_dir" && ac_dir=.
2484 if test -f $ac_dir/$ac_word; then
2485 ac_cv_path_NASM="$ac_dir/$ac_word"
2486 break
2488 done
2489 IFS="$ac_save_ifs"
2490 test -z "$ac_cv_path_NASM" && ac_cv_path_NASM="no"
2492 esac
2494 NASM="$ac_cv_path_NASM"
2495 if test -n "$NASM"; then
2496 echo "$ac_t""$NASM" 1>&6
2497 else
2498 echo "$ac_t""no" 1>&6
2501 NASMFLAGS="-f elf"
2503 if test "$NASM" = "no"; then
2504 { echo "configure: error: Nasm is required for SSE and 3DNow loops." 1>&2; exit 1; }
2506 if test "$enable_sse" = "yes"; then
2507 echo $ac_n "checking whether nasm supports SSE instructions""... $ac_c" 1>&6
2508 echo "configure:2509: checking whether nasm supports SSE instructions" >&5
2509 cat > conftest_sse.s << EOF
2510 global checksse
2511 checksse:
2512 emms
2513 xorps xmm0,xmm0
2514 emms
2517 if { ac_try='$NASM conftest_sse.s'; { (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2518 echo "$ac_t""yes" 1>&6
2519 else
2520 echo "$ac_t""no" 1>&6
2521 { echo "configure: error: Download a patched nasm from the Gromacs homepage,
2522 or disable SSE assembly." 1>&2; exit 1; }
2525 if test "$enable_3dnow" = "yes"; then
2526 echo $ac_n "checking whether nasm supports extended 3DNow instructions""... $ac_c" 1>&6
2527 echo "configure:2528: checking whether nasm supports extended 3DNow instructions" >&5
2528 cat > conftest_3dnow.s << EOF
2529 global check3dnow
2530 check3dnow:
2531 femms
2532 pswapd mm0,mm0
2533 femms
2536 if { ac_try='$NASM -f elf conftest_3dnow.s'; { (eval echo configure:2537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
2537 echo "$ac_t""yes" 1>&6
2538 else
2539 echo "$ac_t""no" 1>&6
2540 { echo "configure: error: Download a patched nasm from the Gromacs homepage,
2541 or disable 3DNow assembly." 1>&2; exit 1; }
2546 else # not x86
2547 enable_sse=no
2548 enable_3dnow=no
2551 # Extract the first word of "ident", so it can be a program name with args.
2552 set dummy ident; ac_word=$2
2553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2554 echo "configure:2555: checking for $ac_word" >&5
2555 if eval "test \"`echo '$''{'ac_cv_path_IDENT'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558 case "$IDENT" in
2560 ac_cv_path_IDENT="$IDENT" # Let the user override the test with a path.
2562 ?:/*)
2563 ac_cv_path_IDENT="$IDENT" # Let the user override the test with a dos path.
2566 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2567 ac_dummy="$PATH"
2568 for ac_dir in $ac_dummy; do
2569 test -z "$ac_dir" && ac_dir=.
2570 if test -f $ac_dir/$ac_word; then
2571 ac_cv_path_IDENT="$ac_dir/$ac_word"
2572 break
2574 done
2575 IFS="$ac_save_ifs"
2576 test -z "$ac_cv_path_IDENT" && ac_cv_path_IDENT="no"
2578 esac
2580 IDENT="$ac_cv_path_IDENT"
2581 if test -n "$IDENT"; then
2582 echo "$ac_t""$IDENT" 1>&6
2583 else
2584 echo "$ac_t""no" 1>&6
2587 if test "$IDENT" != "no"; then
2588 cat >> confdefs.h <<\EOF
2589 #define HAVE_IDENT
2594 # Extract the first word of "ranlib", so it can be a program name with args.
2595 set dummy ranlib; ac_word=$2
2596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2597 echo "configure:2598: checking for $ac_word" >&5
2598 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2599 echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601 if test -n "$RANLIB"; then
2602 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2603 else
2604 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2605 ac_dummy="$PATH"
2606 for ac_dir in $ac_dummy; do
2607 test -z "$ac_dir" && ac_dir=.
2608 if test -f $ac_dir/$ac_word; then
2609 ac_cv_prog_RANLIB="ranlib"
2610 break
2612 done
2613 IFS="$ac_save_ifs"
2614 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2617 RANLIB="$ac_cv_prog_RANLIB"
2618 if test -n "$RANLIB"; then
2619 echo "$ac_t""$RANLIB" 1>&6
2620 else
2621 echo "$ac_t""no" 1>&6
2624 for ac_func in strcasecmp
2626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2627 echo "configure:2628: checking for $ac_func" >&5
2628 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2629 echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631 cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 /* System header to define __stub macros and hopefully few prototypes,
2635 which can conflict with char $ac_func(); below. */
2636 #include <assert.h>
2637 /* Override any gcc2 internal prototype to avoid an error. */
2638 /* We use char because int might match the return type of a gcc2
2639 builtin and then its argument prototype would still apply. */
2640 char $ac_func();
2642 int main() {
2644 /* The GNU C library defines this for functions which it implements
2645 to always fail with ENOSYS. Some functions are actually named
2646 something starting with __ and the normal name is an alias. */
2647 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2648 choke me
2649 #else
2650 $ac_func();
2651 #endif
2653 ; return 0; }
2655 if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2656 rm -rf conftest*
2657 eval "ac_cv_func_$ac_func=yes"
2658 else
2659 echo "configure: failed program was:" >&5
2660 cat conftest.$ac_ext >&5
2661 rm -rf conftest*
2662 eval "ac_cv_func_$ac_func=no"
2664 rm -f conftest*
2667 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2668 echo "$ac_t""yes" 1>&6
2669 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2670 cat >> confdefs.h <<EOF
2671 #define $ac_tr_func 1
2674 else
2675 echo "$ac_t""no" 1>&6
2677 done
2679 for ac_func in strdup
2681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2682 echo "configure:2683: checking for $ac_func" >&5
2683 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2684 echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686 cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 /* System header to define __stub macros and hopefully few prototypes,
2690 which can conflict with char $ac_func(); below. */
2691 #include <assert.h>
2692 /* Override any gcc2 internal prototype to avoid an error. */
2693 /* We use char because int might match the return type of a gcc2
2694 builtin and then its argument prototype would still apply. */
2695 char $ac_func();
2697 int main() {
2699 /* The GNU C library defines this for functions which it implements
2700 to always fail with ENOSYS. Some functions are actually named
2701 something starting with __ and the normal name is an alias. */
2702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2703 choke me
2704 #else
2705 $ac_func();
2706 #endif
2708 ; return 0; }
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2711 rm -rf conftest*
2712 eval "ac_cv_func_$ac_func=yes"
2713 else
2714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -rf conftest*
2717 eval "ac_cv_func_$ac_func=no"
2719 rm -f conftest*
2722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2723 echo "$ac_t""yes" 1>&6
2724 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2725 cat >> confdefs.h <<EOF
2726 #define $ac_tr_func 1
2729 else
2730 echo "$ac_t""no" 1>&6
2732 done
2735 # Try to detect the cpu - must be done before some lib searches
2736 if test "$enable_cpu_detection" = "yes"; then
2741 # Determine the exact cpu type on some common systems where it is
2742 # not visible from the host triplet.
2743 # (on e.g. intel and dec/tru64 the host type is enough)
2745 case "${host_cpu}-${host_os}" in
2747 rs6000*-aix*)
2748 # we need to fool the combination of m4, sh and awk - thus the seemingly unnecessary n
2749 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ n=1; print $n }'`
2750 if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER4 >/dev/null 2>&1; then
2751 gmxcpu=power4
2752 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER3 >/dev/null 2>&1; then
2753 gmxcpu=power3
2754 elif /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER2 >/dev/null 2>&1; then
2755 gmxcpu=power2
2756 else
2757 gmxcpu=""
2761 powerpc*-aix*)
2762 if /usr/sbin/lscfg -vp | grep PowerPC | grep 604 >/dev/null 2>&1; then
2763 gmxcpu=ppc604
2764 elif /usr/sbin/lscfg -vp | grep PowerPC | grep 603 >/dev/null 2>&1; then
2765 gmxcpu=ppc603
2766 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64a >/dev/null 2>&1; then
2767 gmxcpu=rs64a
2768 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64b >/dev/null 2>&1; then
2769 gmxcpu=rs64b
2770 elif /usr/sbin/lscfg -vp | grep PowerPC | grep rs64c >/dev/null 2>&1; then
2771 gmxcpu=rs64c
2772 else
2773 gmxcpu=""
2777 mips*-irix*)
2778 if /sbin/hinv | grep CPU | grep R12000 >/dev/null 2>&1; then
2779 gmxcpu=r12000
2780 elif /sbin/hinv | grep CPU | grep R10000 >/dev/null 2>&1; then
2781 gmxcpu=r10000
2782 elif /sbin/hinv | grep CPU | grep R8000 >/dev/null 2>&1; then
2783 gmxcpu=r8000
2784 elif /sbin/hinv | grep CPU | grep R5000 >/dev/null 2>&1; then
2785 gmxcpu=r5000
2786 else
2787 gmxcpu=""
2791 sparc*-solaris*)
2792 if /usr/sbin/prtconf | grep UltraSPARC-III >/dev/null 2>&1; then
2793 gmxcpu=ultrasparc3
2794 elif /usr/sbin/prtconf | grep UltraSPARC-IIi >/dev/null 2>&1; then
2795 gmxcpu=ultrasparc2i
2796 elif /usr/sbin/prtconf | grep UltraSPARC-II >/dev/null 2>&1; then
2797 gmxcpu=ultrasparc2
2798 elif /usr/sbin/prtconf | grep UltraSPARC >/dev/null 2>&1; then
2799 gmxcpu=ultrasparc
2800 else
2801 gmxcpu=""
2805 gmxcpu=""
2808 esac
2810 else
2811 gmxcpu=""
2814 ############################################################################
2815 # Checks for libraries.
2816 ############################################################################
2817 #####
2818 # IBM provides a MASS library with vectorized and optimized math stuff,
2819 # and an xlopt library which partly overlaps this. They must come before
2820 # libm in the link list.
2821 if test "${host_vendor}" = "ibm"; then
2822 vectmass=no
2823 case "$gmxcpu" in
2824 power4*)
2825 echo $ac_n "checking for main in -lmassvp4""... $ac_c" 1>&6
2826 echo "configure:2827: checking for main in -lmassvp4" >&5
2827 ac_lib_var=`echo massvp4'_'main | sed 'y%./+-%__p_%'`
2828 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2829 echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831 ac_save_LIBS="$LIBS"
2832 LIBS="-lmassvp4 $LIBS"
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2837 int main() {
2838 main()
2839 ; return 0; }
2841 if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2842 rm -rf conftest*
2843 eval "ac_cv_lib_$ac_lib_var=yes"
2844 else
2845 echo "configure: failed program was:" >&5
2846 cat conftest.$ac_ext >&5
2847 rm -rf conftest*
2848 eval "ac_cv_lib_$ac_lib_var=no"
2850 rm -f conftest*
2851 LIBS="$ac_save_LIBS"
2854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2855 echo "$ac_t""yes" 1>&6
2856 vectmass=yes
2857 else
2858 echo "$ac_t""no" 1>&6
2861 power3*)
2862 echo $ac_n "checking for main in -lmassvp3""... $ac_c" 1>&6
2863 echo "configure:2864: checking for main in -lmassvp3" >&5
2864 ac_lib_var=`echo massvp3'_'main | sed 'y%./+-%__p_%'`
2865 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2866 echo $ac_n "(cached) $ac_c" 1>&6
2867 else
2868 ac_save_LIBS="$LIBS"
2869 LIBS="-lmassvp3 $LIBS"
2870 cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2874 int main() {
2875 main()
2876 ; return 0; }
2878 if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2879 rm -rf conftest*
2880 eval "ac_cv_lib_$ac_lib_var=yes"
2881 else
2882 echo "configure: failed program was:" >&5
2883 cat conftest.$ac_ext >&5
2884 rm -rf conftest*
2885 eval "ac_cv_lib_$ac_lib_var=no"
2887 rm -f conftest*
2888 LIBS="$ac_save_LIBS"
2891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2892 echo "$ac_t""yes" 1>&6
2893 vectmass=yes
2894 else
2895 echo "$ac_t""no" 1>&6
2898 power2*)
2899 echo $ac_n "checking for main in -lmassvp3""... $ac_c" 1>&6
2900 echo "configure:2901: checking for main in -lmassvp3" >&5
2901 ac_lib_var=`echo massvp3'_'main | sed 'y%./+-%__p_%'`
2902 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2903 echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905 ac_save_LIBS="$LIBS"
2906 LIBS="-lmassvp3 $LIBS"
2907 cat > conftest.$ac_ext <<EOF
2908 #line 2909 "configure"
2909 #include "confdefs.h"
2911 int main() {
2912 main()
2913 ; return 0; }
2915 if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2916 rm -rf conftest*
2917 eval "ac_cv_lib_$ac_lib_var=yes"
2918 else
2919 echo "configure: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 rm -rf conftest*
2922 eval "ac_cv_lib_$ac_lib_var=no"
2924 rm -f conftest*
2925 LIBS="$ac_save_LIBS"
2928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2929 echo "$ac_t""yes" 1>&6
2930 vectmass=yes
2931 else
2932 echo "$ac_t""no" 1>&6
2936 echo $ac_n "checking for main in -lmassv""... $ac_c" 1>&6
2937 echo "configure:2938: checking for main in -lmassv" >&5
2938 ac_lib_var=`echo massv'_'main | sed 'y%./+-%__p_%'`
2939 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2940 echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942 ac_save_LIBS="$LIBS"
2943 LIBS="-lmassv $LIBS"
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2948 int main() {
2949 main()
2950 ; return 0; }
2952 if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2953 rm -rf conftest*
2954 eval "ac_cv_lib_$ac_lib_var=yes"
2955 else
2956 echo "configure: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 rm -rf conftest*
2959 eval "ac_cv_lib_$ac_lib_var=no"
2961 rm -f conftest*
2962 LIBS="$ac_save_LIBS"
2965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2966 echo "$ac_t""yes" 1>&6
2967 vectmass=yes
2968 else
2969 echo "$ac_t""no" 1>&6
2972 esac
2973 echo $ac_n "checking for main in -lmass""... $ac_c" 1>&6
2974 echo "configure:2975: checking for main in -lmass" >&5
2975 ac_lib_var=`echo mass'_'main | sed 'y%./+-%__p_%'`
2976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2977 echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979 ac_save_LIBS="$LIBS"
2980 LIBS="-lmass $LIBS"
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2985 int main() {
2986 main()
2987 ; return 0; }
2989 if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2990 rm -rf conftest*
2991 eval "ac_cv_lib_$ac_lib_var=yes"
2992 else
2993 echo "configure: failed program was:" >&5
2994 cat conftest.$ac_ext >&5
2995 rm -rf conftest*
2996 eval "ac_cv_lib_$ac_lib_var=no"
2998 rm -f conftest*
2999 LIBS="$ac_save_LIBS"
3002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3003 echo "$ac_t""yes" 1>&6
3004 ac_tr_lib=HAVE_LIB`echo mass | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3005 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3006 cat >> confdefs.h <<EOF
3007 #define $ac_tr_lib 1
3010 LIBS="-lmass $LIBS"
3012 else
3013 echo "$ac_t""no" 1>&6
3016 if test "$vectmass" = "yes"; then
3017 cat >> confdefs.h <<\EOF
3018 #define USE_IBM_MASS
3022 echo $ac_n "checking for main in -lxlopt""... $ac_c" 1>&6
3023 echo "configure:3024: checking for main in -lxlopt" >&5
3024 ac_lib_var=`echo xlopt'_'main | sed 'y%./+-%__p_%'`
3025 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3026 echo $ac_n "(cached) $ac_c" 1>&6
3027 else
3028 ac_save_LIBS="$LIBS"
3029 LIBS="-lxlopt $LIBS"
3030 cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3034 int main() {
3035 main()
3036 ; return 0; }
3038 if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3039 rm -rf conftest*
3040 eval "ac_cv_lib_$ac_lib_var=yes"
3041 else
3042 echo "configure: failed program was:" >&5
3043 cat conftest.$ac_ext >&5
3044 rm -rf conftest*
3045 eval "ac_cv_lib_$ac_lib_var=no"
3047 rm -f conftest*
3048 LIBS="$ac_save_LIBS"
3051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3052 echo "$ac_t""yes" 1>&6
3053 ac_tr_lib=HAVE_LIB`echo xlopt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3054 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3055 cat >> confdefs.h <<EOF
3056 #define $ac_tr_lib 1
3059 LIBS="-lxlopt $LIBS"
3061 else
3062 echo "$ac_t""no" 1>&6
3067 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
3068 echo "configure:3069: checking for sqrt in -lm" >&5
3069 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071 echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073 ac_save_LIBS="$LIBS"
3074 LIBS="-lm $LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078 /* Override any gcc2 internal prototype to avoid an error. */
3079 /* We use char because int might match the return type of a gcc2
3080 builtin and then its argument prototype would still apply. */
3081 char sqrt();
3083 int main() {
3084 sqrt()
3085 ; return 0; }
3087 if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3088 rm -rf conftest*
3089 eval "ac_cv_lib_$ac_lib_var=yes"
3090 else
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 rm -rf conftest*
3094 eval "ac_cv_lib_$ac_lib_var=no"
3096 rm -f conftest*
3097 LIBS="$ac_save_LIBS"
3100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3101 echo "$ac_t""yes" 1>&6
3102 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3103 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3104 cat >> confdefs.h <<EOF
3105 #define $ac_tr_lib 1
3108 LIBS="-lm $LIBS"
3110 else
3111 echo "$ac_t""no" 1>&6
3112 { echo "configure: error: No math library found" 1>&2; exit 1; }
3116 if test "$enable_double" = "yes"; then
3117 precision=8
3118 else
3119 precision=4
3122 if test "$enable_mpi" = "yes"; then
3124 if test -z "$ac_fftw_firstname"; then
3126 if test "$precision" = "8"; then
3127 prec="double"
3128 fftwcheckprefix=d
3129 else
3130 prec="single"
3131 fftwcheckprefix=s
3134 usedprefix=""
3135 ok="no"
3136 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3137 echo $ac_n "checking for fftw_mpi.h""... $ac_c" 1>&6
3138 echo "configure:3139: checking for fftw_mpi.h" >&5
3139 cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142 #include <fftw_mpi.h>
3143 int main() {
3145 ; return 0; }
3147 if { (eval echo configure:3148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3148 rm -rf conftest*
3150 fftwname=fftw_mpi
3151 echo "$ac_t""yes" 1>&6
3153 else
3154 echo "configure: failed program was:" >&5
3155 cat conftest.$ac_ext >&5
3156 rm -rf conftest*
3157 echo "$ac_t""no" 1>&6
3159 rm -f conftest*
3162 if test -n "$fftwname"; then
3163 # we cannot run the code since MPI program might not be allowed outside a charge queue
3164 cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <$fftwname.h>
3168 int main() {
3169 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3170 ; return 0; }
3172 if { (eval echo configure:3173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3173 rm -rf conftest*
3174 ok="yes"
3175 else
3176 echo "configure: failed program was:" >&5
3177 cat conftest.$ac_ext >&5
3178 rm -rf conftest*
3179 ok="no"
3181 rm -f conftest*
3184 fftwname=fftw_mpi
3186 if test "$ok" != "yes"; then
3187 xfftwname=${fftwcheckprefix}${fftwname}
3188 echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3189 echo "configure:3190: checking for $xfftwname.h" >&5
3190 cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <$xfftwname.h>
3194 int main() {
3196 ; return 0; }
3198 if { (eval echo configure:3199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3199 rm -rf conftest*
3200 echo "$ac_t""yes" 1>&6
3201 else
3202 echo "configure: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3204 rm -rf conftest*
3206 echo "$ac_t""no" 1>&6
3207 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3208 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3209 Note that the default FFTW setup is double precision. You change the
3210 FFTW configuration to single with --enable-float and turn on MPI support
3211 with --enable-mpi. It is a good idea to install both single & double.
3212 If your sysadm doesn't want to install it you can do it to a location
3213 in your home directory and provide Gromacs configure with the correct
3214 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3215 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3218 rm -f conftest*
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 #include <$xfftwname.h>
3223 int main() {
3224 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3225 ; return 0; }
3227 if { (eval echo configure:3228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3228 rm -rf conftest*
3230 fftwname=$xfftwname
3231 usedprefix=$fftwcheckprefix
3233 else
3234 echo "configure: failed program was:" >&5
3235 cat conftest.$ac_ext >&5
3236 rm -rf conftest*
3237 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3238 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3239 Note that the default FFTW setup is double precision. You change the
3240 FFTW configuration to single with --enable-float and turn on MPI support
3241 with --enable-mpi. It is a good idea to install both single & double.
3242 If your sysadm doesn't want to install it you can do it to a location
3243 in your home directory and provide Gromacs configure with the correct
3244 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3245 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3247 rm -f conftest*
3250 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3251 echo "configure:3252: checking for main in -l$fftwname" >&5
3252 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3253 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3254 echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256 ac_save_LIBS="$LIBS"
3257 LIBS="-l$fftwname $LIBS"
3258 cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3262 int main() {
3263 main()
3264 ; return 0; }
3266 if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3267 rm -rf conftest*
3268 eval "ac_cv_lib_$ac_lib_var=yes"
3269 else
3270 echo "configure: failed program was:" >&5
3271 cat conftest.$ac_ext >&5
3272 rm -rf conftest*
3273 eval "ac_cv_lib_$ac_lib_var=no"
3275 rm -f conftest*
3276 LIBS="$ac_save_LIBS"
3279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3280 echo "$ac_t""yes" 1>&6
3281 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3282 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3283 cat >> confdefs.h <<EOF
3284 #define $ac_tr_lib 1
3287 LIBS="-l$fftwname $LIBS"
3289 else
3290 echo "$ac_t""no" 1>&6
3291 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3294 ac_fftw_savedprefix=$usedprefix
3295 ac_fftw_firstname=$fftwname
3297 else
3299 fftwname=${ac_fftw_savedprefix}fftw_mpi
3300 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $fftwname.h" >&5
3302 cat > conftest.$ac_ext <<EOF
3303 #line 3304 "configure"
3304 #include "confdefs.h"
3305 #include <$fftwname.h>
3306 int main() {
3308 ; return 0; }
3310 if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3311 rm -rf conftest*
3312 echo "$ac_t""yes" 1>&6
3313 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3314 echo "configure:3315: checking for main in -l$fftwname" >&5
3315 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3316 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3317 echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319 ac_save_LIBS="$LIBS"
3320 LIBS="-l$fftwname $LIBS"
3321 cat > conftest.$ac_ext <<EOF
3322 #line 3323 "configure"
3323 #include "confdefs.h"
3325 int main() {
3326 main()
3327 ; return 0; }
3329 if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3330 rm -rf conftest*
3331 eval "ac_cv_lib_$ac_lib_var=yes"
3332 else
3333 echo "configure: failed program was:" >&5
3334 cat conftest.$ac_ext >&5
3335 rm -rf conftest*
3336 eval "ac_cv_lib_$ac_lib_var=no"
3338 rm -f conftest*
3339 LIBS="$ac_save_LIBS"
3342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3343 echo "$ac_t""yes" 1>&6
3344 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
3345 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3346 cat >> confdefs.h <<EOF
3347 #define $ac_tr_lib 1
3350 LIBS="-l$fftwname $LIBS"
3352 else
3353 echo "$ac_t""no" 1>&6
3354 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3357 else
3358 echo "configure: failed program was:" >&5
3359 cat conftest.$ac_ext >&5
3360 rm -rf conftest*
3362 echo "$ac_t""no" 1>&6
3363 { 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; }
3366 rm -f conftest*
3372 if test -z "$ac_fftw_firstname"; then
3374 if test "$precision" = "8"; then
3375 prec="double"
3376 fftwcheckprefix=d
3377 else
3378 prec="single"
3379 fftwcheckprefix=s
3382 usedprefix=""
3383 ok="no"
3384 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3385 echo $ac_n "checking for rfftw_mpi.h""... $ac_c" 1>&6
3386 echo "configure:3387: checking for rfftw_mpi.h" >&5
3387 cat > conftest.$ac_ext <<EOF
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390 #include <rfftw_mpi.h>
3391 int main() {
3393 ; return 0; }
3395 if { (eval echo configure:3396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3396 rm -rf conftest*
3398 fftwname=rfftw_mpi
3399 echo "$ac_t""yes" 1>&6
3401 else
3402 echo "configure: failed program was:" >&5
3403 cat conftest.$ac_ext >&5
3404 rm -rf conftest*
3405 echo "$ac_t""no" 1>&6
3407 rm -f conftest*
3410 if test -n "$fftwname"; then
3411 # we cannot run the code since MPI program might not be allowed outside a charge queue
3412 cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include <$fftwname.h>
3416 int main() {
3417 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3418 ; return 0; }
3420 if { (eval echo configure:3421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3421 rm -rf conftest*
3422 ok="yes"
3423 else
3424 echo "configure: failed program was:" >&5
3425 cat conftest.$ac_ext >&5
3426 rm -rf conftest*
3427 ok="no"
3429 rm -f conftest*
3432 fftwname=rfftw_mpi
3434 if test "$ok" != "yes"; then
3435 xfftwname=${fftwcheckprefix}${fftwname}
3436 echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3437 echo "configure:3438: checking for $xfftwname.h" >&5
3438 cat > conftest.$ac_ext <<EOF
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441 #include <$xfftwname.h>
3442 int main() {
3444 ; return 0; }
3446 if { (eval echo configure:3447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3447 rm -rf conftest*
3448 echo "$ac_t""yes" 1>&6
3449 else
3450 echo "configure: failed program was:" >&5
3451 cat conftest.$ac_ext >&5
3452 rm -rf conftest*
3454 echo "$ac_t""no" 1>&6
3455 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3456 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3457 Note that the default FFTW setup is double precision. You change the
3458 FFTW configuration to single with --enable-float and turn on MPI support
3459 with --enable-mpi. It is a good idea to install both single & double.
3460 If your sysadm doesn't want to install it you can do it to a location
3461 in your home directory and provide Gromacs configure with the correct
3462 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3463 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3466 rm -f conftest*
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <$xfftwname.h>
3471 int main() {
3472 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3473 ; return 0; }
3475 if { (eval echo configure:3476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3476 rm -rf conftest*
3478 fftwname=$xfftwname
3479 usedprefix=$fftwcheckprefix
3481 else
3482 echo "configure: failed program was:" >&5
3483 cat conftest.$ac_ext >&5
3484 rm -rf conftest*
3485 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3486 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3487 Note that the default FFTW setup is double precision. You change the
3488 FFTW configuration to single with --enable-float and turn on MPI support
3489 with --enable-mpi. It is a good idea to install both single & double.
3490 If your sysadm doesn't want to install it you can do it to a location
3491 in your home directory and provide Gromacs configure with the correct
3492 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3493 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3495 rm -f conftest*
3498 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3499 echo "configure:3500: checking for main in -l$fftwname" >&5
3500 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3502 echo $ac_n "(cached) $ac_c" 1>&6
3503 else
3504 ac_save_LIBS="$LIBS"
3505 LIBS="-l$fftwname $LIBS"
3506 cat > conftest.$ac_ext <<EOF
3507 #line 3508 "configure"
3508 #include "confdefs.h"
3510 int main() {
3511 main()
3512 ; return 0; }
3514 if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3515 rm -rf conftest*
3516 eval "ac_cv_lib_$ac_lib_var=yes"
3517 else
3518 echo "configure: failed program was:" >&5
3519 cat conftest.$ac_ext >&5
3520 rm -rf conftest*
3521 eval "ac_cv_lib_$ac_lib_var=no"
3523 rm -f conftest*
3524 LIBS="$ac_save_LIBS"
3527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3528 echo "$ac_t""yes" 1>&6
3529 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3530 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3531 cat >> confdefs.h <<EOF
3532 #define $ac_tr_lib 1
3535 LIBS="-l$fftwname $LIBS"
3537 else
3538 echo "$ac_t""no" 1>&6
3539 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3542 ac_fftw_savedprefix=$usedprefix
3543 ac_fftw_firstname=$fftwname
3545 else
3547 fftwname=${ac_fftw_savedprefix}rfftw_mpi
3548 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
3549 echo "configure:3550: checking for $fftwname.h" >&5
3550 cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553 #include <$fftwname.h>
3554 int main() {
3556 ; return 0; }
3558 if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3559 rm -rf conftest*
3560 echo "$ac_t""yes" 1>&6
3561 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3562 echo "configure:3563: checking for main in -l$fftwname" >&5
3563 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3565 echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567 ac_save_LIBS="$LIBS"
3568 LIBS="-l$fftwname $LIBS"
3569 cat > conftest.$ac_ext <<EOF
3570 #line 3571 "configure"
3571 #include "confdefs.h"
3573 int main() {
3574 main()
3575 ; return 0; }
3577 if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3578 rm -rf conftest*
3579 eval "ac_cv_lib_$ac_lib_var=yes"
3580 else
3581 echo "configure: failed program was:" >&5
3582 cat conftest.$ac_ext >&5
3583 rm -rf conftest*
3584 eval "ac_cv_lib_$ac_lib_var=no"
3586 rm -f conftest*
3587 LIBS="$ac_save_LIBS"
3590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3591 echo "$ac_t""yes" 1>&6
3592 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
3593 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3594 cat >> confdefs.h <<EOF
3595 #define $ac_tr_lib 1
3598 LIBS="-l$fftwname $LIBS"
3600 else
3601 echo "$ac_t""no" 1>&6
3602 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3605 else
3606 echo "configure: failed program was:" >&5
3607 cat conftest.$ac_ext >&5
3608 rm -rf conftest*
3610 echo "$ac_t""no" 1>&6
3611 { 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; }
3614 rm -f conftest*
3622 if test -z "$ac_fftw_firstname"; then
3624 if test "$precision" = "8"; then
3625 prec="double"
3626 fftwcheckprefix=d
3627 else
3628 prec="single"
3629 fftwcheckprefix=s
3632 usedprefix=""
3633 ok="no"
3634 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3635 echo $ac_n "checking for fftw.h""... $ac_c" 1>&6
3636 echo "configure:3637: checking for fftw.h" >&5
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 #include <fftw.h>
3641 int main() {
3643 ; return 0; }
3645 if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646 rm -rf conftest*
3648 fftwname=fftw
3649 echo "$ac_t""yes" 1>&6
3651 else
3652 echo "configure: failed program was:" >&5
3653 cat conftest.$ac_ext >&5
3654 rm -rf conftest*
3655 echo "$ac_t""no" 1>&6
3657 rm -f conftest*
3660 if test -n "$fftwname"; then
3661 # we cannot run the code since MPI program might not be allowed outside a charge queue
3662 cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665 #include <$fftwname.h>
3666 int main() {
3667 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3668 ; return 0; }
3670 if { (eval echo configure:3671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3671 rm -rf conftest*
3672 ok="yes"
3673 else
3674 echo "configure: failed program was:" >&5
3675 cat conftest.$ac_ext >&5
3676 rm -rf conftest*
3677 ok="no"
3679 rm -f conftest*
3682 fftwname=fftw
3684 if test "$ok" != "yes"; then
3685 xfftwname=${fftwcheckprefix}${fftwname}
3686 echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3687 echo "configure:3688: checking for $xfftwname.h" >&5
3688 cat > conftest.$ac_ext <<EOF
3689 #line 3690 "configure"
3690 #include "confdefs.h"
3691 #include <$xfftwname.h>
3692 int main() {
3694 ; return 0; }
3696 if { (eval echo configure:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3697 rm -rf conftest*
3698 echo "$ac_t""yes" 1>&6
3699 else
3700 echo "configure: failed program was:" >&5
3701 cat conftest.$ac_ext >&5
3702 rm -rf conftest*
3704 echo "$ac_t""no" 1>&6
3705 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3706 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3707 Note that the default FFTW setup is double precision. You change the
3708 FFTW configuration to single with --enable-float and turn on MPI support
3709 with --enable-mpi. It is a good idea to install both single & double.
3710 If your sysadm doesn't want to install it you can do it to a location
3711 in your home directory and provide Gromacs configure with the correct
3712 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3713 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3716 rm -f conftest*
3717 cat > conftest.$ac_ext <<EOF
3718 #line 3719 "configure"
3719 #include "confdefs.h"
3720 #include <$xfftwname.h>
3721 int main() {
3722 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3723 ; return 0; }
3725 if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3726 rm -rf conftest*
3728 fftwname=$xfftwname
3729 usedprefix=$fftwcheckprefix
3731 else
3732 echo "configure: failed program was:" >&5
3733 cat conftest.$ac_ext >&5
3734 rm -rf conftest*
3735 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3736 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3737 Note that the default FFTW setup is double precision. You change the
3738 FFTW configuration to single with --enable-float and turn on MPI support
3739 with --enable-mpi. It is a good idea to install both single & double.
3740 If your sysadm doesn't want to install it you can do it to a location
3741 in your home directory and provide Gromacs configure with the correct
3742 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3743 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3745 rm -f conftest*
3748 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3749 echo "configure:3750: checking for main in -l$fftwname" >&5
3750 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3751 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3752 echo $ac_n "(cached) $ac_c" 1>&6
3753 else
3754 ac_save_LIBS="$LIBS"
3755 LIBS="-l$fftwname $LIBS"
3756 cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3760 int main() {
3761 main()
3762 ; return 0; }
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3765 rm -rf conftest*
3766 eval "ac_cv_lib_$ac_lib_var=yes"
3767 else
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3770 rm -rf conftest*
3771 eval "ac_cv_lib_$ac_lib_var=no"
3773 rm -f conftest*
3774 LIBS="$ac_save_LIBS"
3777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3778 echo "$ac_t""yes" 1>&6
3779 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3780 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3781 cat >> confdefs.h <<EOF
3782 #define $ac_tr_lib 1
3785 LIBS="-l$fftwname $LIBS"
3787 else
3788 echo "$ac_t""no" 1>&6
3789 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3792 ac_fftw_savedprefix=$usedprefix
3793 ac_fftw_firstname=$fftwname
3795 else
3797 fftwname=${ac_fftw_savedprefix}fftw
3798 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
3799 echo "configure:3800: checking for $fftwname.h" >&5
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 #include <$fftwname.h>
3804 int main() {
3806 ; return 0; }
3808 if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3809 rm -rf conftest*
3810 echo "$ac_t""yes" 1>&6
3811 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3812 echo "configure:3813: checking for main in -l$fftwname" >&5
3813 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3814 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3815 echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817 ac_save_LIBS="$LIBS"
3818 LIBS="-l$fftwname $LIBS"
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3823 int main() {
3824 main()
3825 ; return 0; }
3827 if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3828 rm -rf conftest*
3829 eval "ac_cv_lib_$ac_lib_var=yes"
3830 else
3831 echo "configure: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 rm -rf conftest*
3834 eval "ac_cv_lib_$ac_lib_var=no"
3836 rm -f conftest*
3837 LIBS="$ac_save_LIBS"
3840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3841 echo "$ac_t""yes" 1>&6
3842 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
3843 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3844 cat >> confdefs.h <<EOF
3845 #define $ac_tr_lib 1
3848 LIBS="-l$fftwname $LIBS"
3850 else
3851 echo "$ac_t""no" 1>&6
3852 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
3855 else
3856 echo "configure: failed program was:" >&5
3857 cat conftest.$ac_ext >&5
3858 rm -rf conftest*
3860 echo "$ac_t""no" 1>&6
3861 { 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; }
3864 rm -f conftest*
3870 if test -z "$ac_fftw_firstname"; then
3872 if test "$precision" = "8"; then
3873 prec="double"
3874 fftwcheckprefix=d
3875 else
3876 prec="single"
3877 fftwcheckprefix=s
3880 usedprefix=""
3881 ok="no"
3882 # check header doesn't work, since we must use mpicc to get includes, not just /lib/cpp
3883 echo $ac_n "checking for rfftw.h""... $ac_c" 1>&6
3884 echo "configure:3885: checking for rfftw.h" >&5
3885 cat > conftest.$ac_ext <<EOF
3886 #line 3887 "configure"
3887 #include "confdefs.h"
3888 #include <rfftw.h>
3889 int main() {
3891 ; return 0; }
3893 if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3894 rm -rf conftest*
3896 fftwname=rfftw
3897 echo "$ac_t""yes" 1>&6
3899 else
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902 rm -rf conftest*
3903 echo "$ac_t""no" 1>&6
3905 rm -f conftest*
3908 if test -n "$fftwname"; then
3909 # we cannot run the code since MPI program might not be allowed outside a charge queue
3910 cat > conftest.$ac_ext <<EOF
3911 #line 3912 "configure"
3912 #include "confdefs.h"
3913 #include <$fftwname.h>
3914 int main() {
3915 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3916 ; return 0; }
3918 if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3919 rm -rf conftest*
3920 ok="yes"
3921 else
3922 echo "configure: failed program was:" >&5
3923 cat conftest.$ac_ext >&5
3924 rm -rf conftest*
3925 ok="no"
3927 rm -f conftest*
3930 fftwname=rfftw
3932 if test "$ok" != "yes"; then
3933 xfftwname=${fftwcheckprefix}${fftwname}
3934 echo $ac_n "checking for $xfftwname.h""... $ac_c" 1>&6
3935 echo "configure:3936: checking for $xfftwname.h" >&5
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 #include <$xfftwname.h>
3940 int main() {
3942 ; return 0; }
3944 if { (eval echo configure:3945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3945 rm -rf conftest*
3946 echo "$ac_t""yes" 1>&6
3947 else
3948 echo "configure: failed program was:" >&5
3949 cat conftest.$ac_ext >&5
3950 rm -rf conftest*
3952 echo "$ac_t""no" 1>&6
3953 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3954 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3955 Note that the default FFTW setup is double precision. You change the
3956 FFTW configuration to single with --enable-float and turn on MPI support
3957 with --enable-mpi. It is a good idea to install both single & double.
3958 If your sysadm doesn't want to install it you can do it to a location
3959 in your home directory and provide Gromacs configure with the correct
3960 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3961 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3964 rm -f conftest*
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 #include <$xfftwname.h>
3969 int main() {
3970 int _array_ [1 - 2 * !((sizeof(fftw_real)) == $precision)];
3971 ; return 0; }
3973 if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3974 rm -rf conftest*
3976 fftwname=$xfftwname
3977 usedprefix=$fftwcheckprefix
3979 else
3980 echo "configure: failed program was:" >&5
3981 cat conftest.$ac_ext >&5
3982 rm -rf conftest*
3983 { echo "configure: error: Cannot find any $prec precision $fftwname.h or $xfftwname.h
3984 Do you have $prec precision FFTW installed? You can find it at www.fftw.org
3985 Note that the default FFTW setup is double precision. You change the
3986 FFTW configuration to single with --enable-float and turn on MPI support
3987 with --enable-mpi. It is a good idea to install both single & double.
3988 If your sysadm doesn't want to install it you can do it to a location
3989 in your home directory and provide Gromacs configure with the correct
3990 paths by setting the CPPFLAGS and LDFLAGS environment variables.
3991 Check the Gromacs INSTALL file for additional information." 1>&2; exit 1; }
3993 rm -f conftest*
3996 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
3997 echo "configure:3998: checking for main in -l$fftwname" >&5
3998 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
3999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4000 echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002 ac_save_LIBS="$LIBS"
4003 LIBS="-l$fftwname $LIBS"
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4008 int main() {
4009 main()
4010 ; return 0; }
4012 if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4013 rm -rf conftest*
4014 eval "ac_cv_lib_$ac_lib_var=yes"
4015 else
4016 echo "configure: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
4018 rm -rf conftest*
4019 eval "ac_cv_lib_$ac_lib_var=no"
4021 rm -f conftest*
4022 LIBS="$ac_save_LIBS"
4025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4026 echo "$ac_t""yes" 1>&6
4027 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4028 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4029 cat >> confdefs.h <<EOF
4030 #define $ac_tr_lib 1
4033 LIBS="-l$fftwname $LIBS"
4035 else
4036 echo "$ac_t""no" 1>&6
4037 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
4040 ac_fftw_savedprefix=$usedprefix
4041 ac_fftw_firstname=$fftwname
4043 else
4045 fftwname=${ac_fftw_savedprefix}rfftw
4046 echo $ac_n "checking for $fftwname.h""... $ac_c" 1>&6
4047 echo "configure:4048: checking for $fftwname.h" >&5
4048 cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 #include <$fftwname.h>
4052 int main() {
4054 ; return 0; }
4056 if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4057 rm -rf conftest*
4058 echo "$ac_t""yes" 1>&6
4059 echo $ac_n "checking for main in -l$fftwname""... $ac_c" 1>&6
4060 echo "configure:4061: checking for main in -l$fftwname" >&5
4061 ac_lib_var=`echo $fftwname'_'main | sed 'y%./+-%__p_%'`
4062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4063 echo $ac_n "(cached) $ac_c" 1>&6
4064 else
4065 ac_save_LIBS="$LIBS"
4066 LIBS="-l$fftwname $LIBS"
4067 cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4071 int main() {
4072 main()
4073 ; return 0; }
4075 if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4076 rm -rf conftest*
4077 eval "ac_cv_lib_$ac_lib_var=yes"
4078 else
4079 echo "configure: failed program was:" >&5
4080 cat conftest.$ac_ext >&5
4081 rm -rf conftest*
4082 eval "ac_cv_lib_$ac_lib_var=no"
4084 rm -f conftest*
4085 LIBS="$ac_save_LIBS"
4088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4089 echo "$ac_t""yes" 1>&6
4090 ac_tr_lib=HAVE_LIB`echo $fftwname | sed -e 's/^a-zA-Z0-9_/_/g' \
4091 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4092 cat >> confdefs.h <<EOF
4093 #define $ac_tr_lib 1
4096 LIBS="-l$fftwname $LIBS"
4098 else
4099 echo "$ac_t""no" 1>&6
4100 { echo "configure: error: Can't find a library to match the $fftwname header" 1>&2; exit 1; }
4103 else
4104 echo "configure: failed program was:" >&5
4105 cat conftest.$ac_ext >&5
4106 rm -rf conftest*
4108 echo "$ac_t""no" 1>&6
4109 { 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; }
4112 rm -f conftest*
4118 case ${ac_fftw_savedprefix} in
4120 cat >> confdefs.h <<\EOF
4121 #define FFTW_NAME_DFFTW
4126 cat >> confdefs.h <<\EOF
4127 #define FFTW_NAME_SFFTW
4132 cat >> confdefs.h <<\EOF
4133 #define FFTW_NAME_FFTW
4137 esac
4139 ######
4140 if test "$enable_xdr" = "no"; then
4141 echo "configure: warning: * Not using XDR cripples Gromacs significantly. You won't be able to *
4142 * read or write any hardware independent or compressed trajectories. *
4143 * We strongly suggest you try to locate the RPC routines instead! *" 1>&2
4144 else
4145 # check for xtc headers
4146 for ac_hdr in rpc/rpc.h rpc/xdr.h
4148 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4149 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4150 echo "configure:4151: checking for $ac_hdr" >&5
4151 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4152 echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154 cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 #include <$ac_hdr>
4159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4160 { (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4162 if test -z "$ac_err"; then
4163 rm -rf conftest*
4164 eval "ac_cv_header_$ac_safe=yes"
4165 else
4166 echo "$ac_err" >&5
4167 echo "configure: failed program was:" >&5
4168 cat conftest.$ac_ext >&5
4169 rm -rf conftest*
4170 eval "ac_cv_header_$ac_safe=no"
4172 rm -f conftest*
4174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4175 echo "$ac_t""yes" 1>&6
4176 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4177 cat >> confdefs.h <<EOF
4178 #define $ac_tr_hdr 1
4181 else
4182 echo "$ac_t""no" 1>&6
4183 { echo "configure: error: RPC/XDR include headers not found" 1>&2; exit 1; }
4185 done
4187 # check for xtc libs
4188 # on solaris the xdr stuff is in -lnsl
4189 echo $ac_n "checking for xdr_float in -lnsl""... $ac_c" 1>&6
4190 echo "configure:4191: checking for xdr_float in -lnsl" >&5
4191 ac_lib_var=`echo nsl'_'xdr_float | sed 'y%./+-%__p_%'`
4192 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4193 echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195 ac_save_LIBS="$LIBS"
4196 LIBS="-lnsl $LIBS"
4197 cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 /* Override any gcc2 internal prototype to avoid an error. */
4201 /* We use char because int might match the return type of a gcc2
4202 builtin and then its argument prototype would still apply. */
4203 char xdr_float();
4205 int main() {
4206 xdr_float()
4207 ; return 0; }
4209 if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4210 rm -rf conftest*
4211 eval "ac_cv_lib_$ac_lib_var=yes"
4212 else
4213 echo "configure: failed program was:" >&5
4214 cat conftest.$ac_ext >&5
4215 rm -rf conftest*
4216 eval "ac_cv_lib_$ac_lib_var=no"
4218 rm -f conftest*
4219 LIBS="$ac_save_LIBS"
4222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4223 echo "$ac_t""yes" 1>&6
4224 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4225 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4226 cat >> confdefs.h <<EOF
4227 #define $ac_tr_lib 1
4230 LIBS="-lnsl $LIBS"
4232 else
4233 echo "$ac_t""no" 1>&6
4236 cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 #include<rpc/rpc.h>
4240 #include<rpc/xdr.h>
4241 int main() {
4242 XDR *xd; float f; xdr_float(xd,&f);
4243 ; return 0; }
4245 if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4247 else
4248 echo "configure: failed program was:" >&5
4249 cat conftest.$ac_ext >&5
4250 rm -rf conftest*
4251 { echo "configure: error: RPC/XDR libraries not found" 1>&2; exit 1; }
4253 rm -f conftest*
4256 if true; then
4257 GMX_USE_XDR_TRUE=
4258 GMX_USE_XDR_FALSE='#'
4259 else
4260 GMX_USE_XDR_TRUE='#'
4261 GMX_USE_XDR_FALSE=
4265 #####
4266 # Look for X
4267 # If we find X, set shell vars x_includes and x_libraries to the
4268 # paths, otherwise set no_x=yes.
4269 # Uses ac_ vars as temps to allow command line to override cache and checks.
4270 # --without-x overrides everything else, but does not touch the cache.
4271 echo $ac_n "checking for X""... $ac_c" 1>&6
4272 echo "configure:4273: checking for X" >&5
4274 # Check whether --with-x or --without-x was given.
4275 if test "${with_x+set}" = set; then
4276 withval="$with_x"
4280 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4281 if test "x$with_x" = xno; then
4282 # The user explicitly disabled X.
4283 have_x=disabled
4284 else
4285 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4286 # Both variables are already set.
4287 have_x=yes
4288 else
4289 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4290 echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292 # One or both of the vars are not set, and there is no cached value.
4293 ac_x_includes=NO ac_x_libraries=NO
4294 rm -fr conftestdir
4295 if mkdir conftestdir; then
4296 cd conftestdir
4297 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4298 cat > Imakefile <<'EOF'
4299 acfindx:
4300 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4302 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4303 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4304 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4305 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4306 for ac_extension in a so sl; do
4307 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4308 test -f $ac_im_libdir/libX11.$ac_extension; then
4309 ac_im_usrlibdir=$ac_im_libdir; break
4311 done
4312 # Screen out bogus values from the imake configuration. They are
4313 # bogus both because they are the default anyway, and because
4314 # using them would break gcc on systems where it needs fixed includes.
4315 case "$ac_im_incroot" in
4316 /usr/include) ;;
4317 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4318 esac
4319 case "$ac_im_usrlibdir" in
4320 /usr/lib | /lib) ;;
4321 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4322 esac
4324 cd ..
4325 rm -fr conftestdir
4328 if test "$ac_x_includes" = NO; then
4329 # Guess where to find include files, by looking for this one X11 .h file.
4330 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4332 # First, try using that file with no special directory specified.
4333 cat > conftest.$ac_ext <<EOF
4334 #line 4335 "configure"
4335 #include "confdefs.h"
4336 #include <$x_direct_test_include>
4338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4339 { (eval echo configure:4340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4341 if test -z "$ac_err"; then
4342 rm -rf conftest*
4343 # We can compile using X headers with no special include directory.
4344 ac_x_includes=
4345 else
4346 echo "$ac_err" >&5
4347 echo "configure: failed program was:" >&5
4348 cat conftest.$ac_ext >&5
4349 rm -rf conftest*
4350 # Look for the header file in a standard set of common directories.
4351 # Check X11 before X11Rn because it is often a symlink to the current release.
4352 for ac_dir in \
4353 /usr/X11/include \
4354 /usr/X11R6/include \
4355 /usr/X11R5/include \
4356 /usr/X11R4/include \
4358 /usr/include/X11 \
4359 /usr/include/X11R6 \
4360 /usr/include/X11R5 \
4361 /usr/include/X11R4 \
4363 /usr/local/X11/include \
4364 /usr/local/X11R6/include \
4365 /usr/local/X11R5/include \
4366 /usr/local/X11R4/include \
4368 /usr/local/include/X11 \
4369 /usr/local/include/X11R6 \
4370 /usr/local/include/X11R5 \
4371 /usr/local/include/X11R4 \
4373 /usr/X386/include \
4374 /usr/x386/include \
4375 /usr/XFree86/include/X11 \
4377 /usr/include \
4378 /usr/local/include \
4379 /usr/unsupported/include \
4380 /usr/athena/include \
4381 /usr/local/x11r5/include \
4382 /usr/lpp/Xamples/include \
4384 /usr/openwin/include \
4385 /usr/openwin/share/include \
4388 if test -r "$ac_dir/$x_direct_test_include"; then
4389 ac_x_includes=$ac_dir
4390 break
4392 done
4394 rm -f conftest*
4395 fi # $ac_x_includes = NO
4397 if test "$ac_x_libraries" = NO; then
4398 # Check for the libraries.
4400 test -z "$x_direct_test_library" && x_direct_test_library=Xt
4401 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4403 # See if we find them without any special options.
4404 # Don't add to $LIBS permanently.
4405 ac_save_LIBS="$LIBS"
4406 LIBS="-l$x_direct_test_library $LIBS"
4407 cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4411 int main() {
4412 ${x_direct_test_function}()
4413 ; return 0; }
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4416 rm -rf conftest*
4417 LIBS="$ac_save_LIBS"
4418 # We can link X programs with no special library path.
4419 ac_x_libraries=
4420 else
4421 echo "configure: failed program was:" >&5
4422 cat conftest.$ac_ext >&5
4423 rm -rf conftest*
4424 LIBS="$ac_save_LIBS"
4425 # First see if replacing the include by lib works.
4426 # Check X11 before X11Rn because it is often a symlink to the current release.
4427 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4428 /usr/X11/lib \
4429 /usr/X11R6/lib \
4430 /usr/X11R5/lib \
4431 /usr/X11R4/lib \
4433 /usr/lib/X11 \
4434 /usr/lib/X11R6 \
4435 /usr/lib/X11R5 \
4436 /usr/lib/X11R4 \
4438 /usr/local/X11/lib \
4439 /usr/local/X11R6/lib \
4440 /usr/local/X11R5/lib \
4441 /usr/local/X11R4/lib \
4443 /usr/local/lib/X11 \
4444 /usr/local/lib/X11R6 \
4445 /usr/local/lib/X11R5 \
4446 /usr/local/lib/X11R4 \
4448 /usr/X386/lib \
4449 /usr/x386/lib \
4450 /usr/XFree86/lib/X11 \
4452 /usr/lib \
4453 /usr/local/lib \
4454 /usr/unsupported/lib \
4455 /usr/athena/lib \
4456 /usr/local/x11r5/lib \
4457 /usr/lpp/Xamples/lib \
4458 /lib/usr/lib/X11 \
4460 /usr/openwin/lib \
4461 /usr/openwin/share/lib \
4464 for ac_extension in a so sl; do
4465 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4466 ac_x_libraries=$ac_dir
4467 break 2
4469 done
4470 done
4472 rm -f conftest*
4473 fi # $ac_x_libraries = NO
4475 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4476 # Didn't find X anywhere. Cache the known absence of X.
4477 ac_cv_have_x="have_x=no"
4478 else
4479 # Record where we found X for the cache.
4480 ac_cv_have_x="have_x=yes \
4481 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4485 eval "$ac_cv_have_x"
4486 fi # $with_x != no
4488 if test "$have_x" != yes; then
4489 echo "$ac_t""$have_x" 1>&6
4490 no_x=yes
4491 else
4492 # If each of the values was on the command line, it overrides each guess.
4493 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4494 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4495 # Update the cache value to reflect the command line values.
4496 ac_cv_have_x="have_x=yes \
4497 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4498 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4501 if test "$no_x" = yes; then
4502 # Not all programs may use this symbol, but it does not hurt to define it.
4503 cat >> confdefs.h <<\EOF
4504 #define X_DISPLAY_MISSING 1
4507 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4508 else
4509 if test -n "$x_includes"; then
4510 X_CFLAGS="$X_CFLAGS -I$x_includes"
4513 # It would also be nice to do this for all -L options, not just this one.
4514 if test -n "$x_libraries"; then
4515 X_LIBS="$X_LIBS -L$x_libraries"
4516 # For Solaris; some versions of Sun CC require a space after -R and
4517 # others require no space. Words are not sufficient . . . .
4518 case "`(uname -sr) 2>/dev/null`" in
4519 "SunOS 5"*)
4520 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4521 echo "configure:4522: checking whether -R must be followed by a space" >&5
4522 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4523 cat > conftest.$ac_ext <<EOF
4524 #line 4525 "configure"
4525 #include "confdefs.h"
4527 int main() {
4529 ; return 0; }
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4532 rm -rf conftest*
4533 ac_R_nospace=yes
4534 else
4535 echo "configure: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
4537 rm -rf conftest*
4538 ac_R_nospace=no
4540 rm -f conftest*
4541 if test $ac_R_nospace = yes; then
4542 echo "$ac_t""no" 1>&6
4543 X_LIBS="$X_LIBS -R$x_libraries"
4544 else
4545 LIBS="$ac_xsave_LIBS -R $x_libraries"
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4550 int main() {
4552 ; return 0; }
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4555 rm -rf conftest*
4556 ac_R_space=yes
4557 else
4558 echo "configure: failed program was:" >&5
4559 cat conftest.$ac_ext >&5
4560 rm -rf conftest*
4561 ac_R_space=no
4563 rm -f conftest*
4564 if test $ac_R_space = yes; then
4565 echo "$ac_t""yes" 1>&6
4566 X_LIBS="$X_LIBS -R $x_libraries"
4567 else
4568 echo "$ac_t""neither works" 1>&6
4571 LIBS="$ac_xsave_LIBS"
4572 esac
4575 # Check for system-dependent libraries X programs must link with.
4576 # Do this before checking for the system-independent R6 libraries
4577 # (-lICE), since we may need -lsocket or whatever for X linking.
4579 if test "$ISC" = yes; then
4580 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4581 else
4582 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4583 # libraries were built with DECnet support. And karl@cs.umb.edu says
4584 # the Alpha needs dnet_stub (dnet does not exist).
4585 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4586 echo "configure:4587: checking for dnet_ntoa in -ldnet" >&5
4587 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4589 echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591 ac_save_LIBS="$LIBS"
4592 LIBS="-ldnet $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error. */
4597 /* We use char because int might match the return type of a gcc2
4598 builtin and then its argument prototype would still apply. */
4599 char dnet_ntoa();
4601 int main() {
4602 dnet_ntoa()
4603 ; return 0; }
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606 rm -rf conftest*
4607 eval "ac_cv_lib_$ac_lib_var=yes"
4608 else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_lib_$ac_lib_var=no"
4614 rm -f conftest*
4615 LIBS="$ac_save_LIBS"
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619 echo "$ac_t""yes" 1>&6
4620 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4621 else
4622 echo "$ac_t""no" 1>&6
4625 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4626 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4627 echo "configure:4628: checking for dnet_ntoa in -ldnet_stub" >&5
4628 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4630 echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632 ac_save_LIBS="$LIBS"
4633 LIBS="-ldnet_stub $LIBS"
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 /* Override any gcc2 internal prototype to avoid an error. */
4638 /* We use char because int might match the return type of a gcc2
4639 builtin and then its argument prototype would still apply. */
4640 char dnet_ntoa();
4642 int main() {
4643 dnet_ntoa()
4644 ; return 0; }
4646 if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4647 rm -rf conftest*
4648 eval "ac_cv_lib_$ac_lib_var=yes"
4649 else
4650 echo "configure: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4652 rm -rf conftest*
4653 eval "ac_cv_lib_$ac_lib_var=no"
4655 rm -f conftest*
4656 LIBS="$ac_save_LIBS"
4659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4660 echo "$ac_t""yes" 1>&6
4661 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4662 else
4663 echo "$ac_t""no" 1>&6
4668 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4669 # to get the SysV transport functions.
4670 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4671 # needs -lnsl.
4672 # The nsl library prevents programs from opening the X display
4673 # on Irix 5.2, according to dickey@clark.net.
4674 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4675 echo "configure:4676: checking for gethostbyname" >&5
4676 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4677 echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.h"
4682 /* System header to define __stub macros and hopefully few prototypes,
4683 which can conflict with char gethostbyname(); below. */
4684 #include <assert.h>
4685 /* Override any gcc2 internal prototype to avoid an error. */
4686 /* We use char because int might match the return type of a gcc2
4687 builtin and then its argument prototype would still apply. */
4688 char gethostbyname();
4690 int main() {
4692 /* The GNU C library defines this for functions which it implements
4693 to always fail with ENOSYS. Some functions are actually named
4694 something starting with __ and the normal name is an alias. */
4695 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4696 choke me
4697 #else
4698 gethostbyname();
4699 #endif
4701 ; return 0; }
4703 if { (eval echo configure:4704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4704 rm -rf conftest*
4705 eval "ac_cv_func_gethostbyname=yes"
4706 else
4707 echo "configure: failed program was:" >&5
4708 cat conftest.$ac_ext >&5
4709 rm -rf conftest*
4710 eval "ac_cv_func_gethostbyname=no"
4712 rm -f conftest*
4715 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4716 echo "$ac_t""yes" 1>&6
4718 else
4719 echo "$ac_t""no" 1>&6
4722 if test $ac_cv_func_gethostbyname = no; then
4723 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4724 echo "configure:4725: checking for gethostbyname in -lnsl" >&5
4725 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4726 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4727 echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729 ac_save_LIBS="$LIBS"
4730 LIBS="-lnsl $LIBS"
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 /* Override any gcc2 internal prototype to avoid an error. */
4735 /* We use char because int might match the return type of a gcc2
4736 builtin and then its argument prototype would still apply. */
4737 char gethostbyname();
4739 int main() {
4740 gethostbyname()
4741 ; return 0; }
4743 if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4744 rm -rf conftest*
4745 eval "ac_cv_lib_$ac_lib_var=yes"
4746 else
4747 echo "configure: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 rm -rf conftest*
4750 eval "ac_cv_lib_$ac_lib_var=no"
4752 rm -f conftest*
4753 LIBS="$ac_save_LIBS"
4756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4757 echo "$ac_t""yes" 1>&6
4758 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4759 else
4760 echo "$ac_t""no" 1>&6
4765 # lieder@skyler.mavd.honeywell.com says without -lsocket,
4766 # socket/setsockopt and other routines are undefined under SCO ODT
4767 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
4768 # on later versions), says simon@lia.di.epfl.ch: it contains
4769 # gethostby* variants that don't use the nameserver (or something).
4770 # -lsocket must be given before -lnsl if both are needed.
4771 # We assume that if connect needs -lnsl, so does gethostbyname.
4772 echo $ac_n "checking for connect""... $ac_c" 1>&6
4773 echo "configure:4774: checking for connect" >&5
4774 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4775 echo $ac_n "(cached) $ac_c" 1>&6
4776 else
4777 cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 /* System header to define __stub macros and hopefully few prototypes,
4781 which can conflict with char connect(); below. */
4782 #include <assert.h>
4783 /* Override any gcc2 internal prototype to avoid an error. */
4784 /* We use char because int might match the return type of a gcc2
4785 builtin and then its argument prototype would still apply. */
4786 char connect();
4788 int main() {
4790 /* The GNU C library defines this for functions which it implements
4791 to always fail with ENOSYS. Some functions are actually named
4792 something starting with __ and the normal name is an alias. */
4793 #if defined (__stub_connect) || defined (__stub___connect)
4794 choke me
4795 #else
4796 connect();
4797 #endif
4799 ; return 0; }
4801 if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4802 rm -rf conftest*
4803 eval "ac_cv_func_connect=yes"
4804 else
4805 echo "configure: failed program was:" >&5
4806 cat conftest.$ac_ext >&5
4807 rm -rf conftest*
4808 eval "ac_cv_func_connect=no"
4810 rm -f conftest*
4813 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4814 echo "$ac_t""yes" 1>&6
4816 else
4817 echo "$ac_t""no" 1>&6
4820 if test $ac_cv_func_connect = no; then
4821 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4822 echo "configure:4823: checking for connect in -lsocket" >&5
4823 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4824 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4825 echo $ac_n "(cached) $ac_c" 1>&6
4826 else
4827 ac_save_LIBS="$LIBS"
4828 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4829 cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 /* Override any gcc2 internal prototype to avoid an error. */
4833 /* We use char because int might match the return type of a gcc2
4834 builtin and then its argument prototype would still apply. */
4835 char connect();
4837 int main() {
4838 connect()
4839 ; return 0; }
4841 if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4842 rm -rf conftest*
4843 eval "ac_cv_lib_$ac_lib_var=yes"
4844 else
4845 echo "configure: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
4847 rm -rf conftest*
4848 eval "ac_cv_lib_$ac_lib_var=no"
4850 rm -f conftest*
4851 LIBS="$ac_save_LIBS"
4854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4855 echo "$ac_t""yes" 1>&6
4856 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4857 else
4858 echo "$ac_t""no" 1>&6
4863 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4864 echo $ac_n "checking for remove""... $ac_c" 1>&6
4865 echo "configure:4866: checking for remove" >&5
4866 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4867 echo $ac_n "(cached) $ac_c" 1>&6
4868 else
4869 cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872 /* System header to define __stub macros and hopefully few prototypes,
4873 which can conflict with char remove(); below. */
4874 #include <assert.h>
4875 /* Override any gcc2 internal prototype to avoid an error. */
4876 /* We use char because int might match the return type of a gcc2
4877 builtin and then its argument prototype would still apply. */
4878 char remove();
4880 int main() {
4882 /* The GNU C library defines this for functions which it implements
4883 to always fail with ENOSYS. Some functions are actually named
4884 something starting with __ and the normal name is an alias. */
4885 #if defined (__stub_remove) || defined (__stub___remove)
4886 choke me
4887 #else
4888 remove();
4889 #endif
4891 ; return 0; }
4893 if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4894 rm -rf conftest*
4895 eval "ac_cv_func_remove=yes"
4896 else
4897 echo "configure: failed program was:" >&5
4898 cat conftest.$ac_ext >&5
4899 rm -rf conftest*
4900 eval "ac_cv_func_remove=no"
4902 rm -f conftest*
4905 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
4906 echo "$ac_t""yes" 1>&6
4908 else
4909 echo "$ac_t""no" 1>&6
4912 if test $ac_cv_func_remove = no; then
4913 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
4914 echo "configure:4915: checking for remove in -lposix" >&5
4915 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
4916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4917 echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919 ac_save_LIBS="$LIBS"
4920 LIBS="-lposix $LIBS"
4921 cat > conftest.$ac_ext <<EOF
4922 #line 4923 "configure"
4923 #include "confdefs.h"
4924 /* Override any gcc2 internal prototype to avoid an error. */
4925 /* We use char because int might match the return type of a gcc2
4926 builtin and then its argument prototype would still apply. */
4927 char remove();
4929 int main() {
4930 remove()
4931 ; return 0; }
4933 if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4934 rm -rf conftest*
4935 eval "ac_cv_lib_$ac_lib_var=yes"
4936 else
4937 echo "configure: failed program was:" >&5
4938 cat conftest.$ac_ext >&5
4939 rm -rf conftest*
4940 eval "ac_cv_lib_$ac_lib_var=no"
4942 rm -f conftest*
4943 LIBS="$ac_save_LIBS"
4946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4947 echo "$ac_t""yes" 1>&6
4948 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
4949 else
4950 echo "$ac_t""no" 1>&6
4955 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
4956 echo $ac_n "checking for shmat""... $ac_c" 1>&6
4957 echo "configure:4958: checking for shmat" >&5
4958 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
4959 echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961 cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964 /* System header to define __stub macros and hopefully few prototypes,
4965 which can conflict with char shmat(); below. */
4966 #include <assert.h>
4967 /* Override any gcc2 internal prototype to avoid an error. */
4968 /* We use char because int might match the return type of a gcc2
4969 builtin and then its argument prototype would still apply. */
4970 char shmat();
4972 int main() {
4974 /* The GNU C library defines this for functions which it implements
4975 to always fail with ENOSYS. Some functions are actually named
4976 something starting with __ and the normal name is an alias. */
4977 #if defined (__stub_shmat) || defined (__stub___shmat)
4978 choke me
4979 #else
4980 shmat();
4981 #endif
4983 ; return 0; }
4985 if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4986 rm -rf conftest*
4987 eval "ac_cv_func_shmat=yes"
4988 else
4989 echo "configure: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4991 rm -rf conftest*
4992 eval "ac_cv_func_shmat=no"
4994 rm -f conftest*
4997 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
4998 echo "$ac_t""yes" 1>&6
5000 else
5001 echo "$ac_t""no" 1>&6
5004 if test $ac_cv_func_shmat = no; then
5005 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5006 echo "configure:5007: checking for shmat in -lipc" >&5
5007 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5009 echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011 ac_save_LIBS="$LIBS"
5012 LIBS="-lipc $LIBS"
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016 /* Override any gcc2 internal prototype to avoid an error. */
5017 /* We use char because int might match the return type of a gcc2
5018 builtin and then its argument prototype would still apply. */
5019 char shmat();
5021 int main() {
5022 shmat()
5023 ; return 0; }
5025 if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5026 rm -rf conftest*
5027 eval "ac_cv_lib_$ac_lib_var=yes"
5028 else
5029 echo "configure: failed program was:" >&5
5030 cat conftest.$ac_ext >&5
5031 rm -rf conftest*
5032 eval "ac_cv_lib_$ac_lib_var=no"
5034 rm -f conftest*
5035 LIBS="$ac_save_LIBS"
5038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5039 echo "$ac_t""yes" 1>&6
5040 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5041 else
5042 echo "$ac_t""no" 1>&6
5048 # Check for libraries that X11R6 Xt/Xaw programs need.
5049 ac_save_LDFLAGS="$LDFLAGS"
5050 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5051 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5052 # check for ICE first), but we must link in the order -lSM -lICE or
5053 # we get undefined symbols. So assume we have SM if we have ICE.
5054 # These have to be linked with before -lX11, unlike the other
5055 # libraries we check for below, so use a different variable.
5056 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5057 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5058 echo "configure:5059: checking for IceConnectionNumber in -lICE" >&5
5059 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5060 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5061 echo $ac_n "(cached) $ac_c" 1>&6
5062 else
5063 ac_save_LIBS="$LIBS"
5064 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5065 cat > conftest.$ac_ext <<EOF
5066 #line 5067 "configure"
5067 #include "confdefs.h"
5068 /* Override any gcc2 internal prototype to avoid an error. */
5069 /* We use char because int might match the return type of a gcc2
5070 builtin and then its argument prototype would still apply. */
5071 char IceConnectionNumber();
5073 int main() {
5074 IceConnectionNumber()
5075 ; return 0; }
5077 if { (eval echo configure:5078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5078 rm -rf conftest*
5079 eval "ac_cv_lib_$ac_lib_var=yes"
5080 else
5081 echo "configure: failed program was:" >&5
5082 cat conftest.$ac_ext >&5
5083 rm -rf conftest*
5084 eval "ac_cv_lib_$ac_lib_var=no"
5086 rm -f conftest*
5087 LIBS="$ac_save_LIBS"
5090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5091 echo "$ac_t""yes" 1>&6
5092 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5093 else
5094 echo "$ac_t""no" 1>&6
5097 LDFLAGS="$ac_save_LDFLAGS"
5102 # try to find motif headers and libraries
5106 motif_includes=
5107 motif_libraries=
5110 if test "$no_x" = "yes"
5111 then
5112 motif_includes=none
5113 motif_libraries=none
5116 # Check whether --with-motif-includes or --without-motif-includes was given.
5117 if test "${with_motif_includes+set}" = set; then
5118 withval="$with_motif_includes"
5119 motif_includes="$withval"
5123 # Check whether --with-motif-libraries or --without-motif-libraries was given.
5124 if test "${with_motif_libraries+set}" = set; then
5125 withval="$with_motif_libraries"
5126 motif_libraries="$withval"
5130 echo $ac_n "checking for Motif""... $ac_c" 1>&6
5131 echo "configure:5132: checking for Motif" >&5
5136 # Search the include files.
5138 if test "$motif_includes" = ""; then
5139 if eval "test \"`echo '$''{'ac_cv_motif_includes'+set}'`\" = set"; then
5140 echo $ac_n "(cached) $ac_c" 1>&6
5141 else
5143 ac_motif_save_LIBS="$LIBS"
5144 ac_motif_save_INCLUDES="$INCLUDES"
5145 ac_motif_save_CPPFLAGS="$CPPFLAGS"
5146 ac_motif_save_LDFLAGS="$LDFLAGS"
5148 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
5149 INCLUDES="$X_CFLAGS $INCLUDES"
5150 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
5151 LDFLAGS="$X_LIBS $LDFLAGS"
5153 ac_cv_motif_includes="none"
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 #include <Xm/Xm.h>
5158 int main() {
5159 int a;
5160 ; return 0; }
5162 if { (eval echo configure:5163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5163 rm -rf conftest*
5165 # Xm/Xm.h is in the standard search path.
5166 ac_cv_motif_includes=
5168 else
5169 echo "configure: failed program was:" >&5
5170 cat conftest.$ac_ext >&5
5171 rm -rf conftest*
5173 # Xm/Xm.h is not in the standard search path.
5174 # Locate it and put its directory in `motif_includes'
5176 # /usr/include/Motif* are used on HP-UX (Motif).
5177 # /usr/include/X11* are used on HP-UX (X and Athena).
5178 # /usr/dt is used on Solaris (Motif).
5179 # /usr/openwin is used on Solaris (X and Athena).
5180 # Other directories are just guesses.
5181 for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
5182 /usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
5183 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
5184 /usr/dt/include /usr/openwin/include \
5185 /usr/dt/*/include /opt/*/include /usr/include/Motif* \
5186 "${prefix}"/*/include /usr/*/include /usr/local/*/include \
5187 "${prefix}"/include/* /usr/include/* /usr/local/include/*; do
5188 if test -f "$dir/Xm/Xm.h"; then
5189 ac_cv_motif_includes="$dir"
5190 break
5192 done
5195 rm -f conftest*
5197 LIBS="$ac_motif_save_LIBS"
5198 INCLUDES="$ac_motif_save_INCLUDES"
5199 CPPFLAGS="$ac_motif_save_CPPFLAGS"
5200 LDFLAGS="$ac_motif_save_LDFLAGS"
5204 motif_includes="$ac_cv_motif_includes"
5208 # Now for the libraries.
5210 if test "$motif_libraries" = ""; then
5211 if eval "test \"`echo '$''{'ac_cv_motif_libraries'+set}'`\" = set"; then
5212 echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5215 ac_motif_save_LIBS="$LIBS"
5216 ac_motif_save_INCLUDES="$INCLUDES"
5217 ac_motif_save_CPPFLAGS="$CPPFLAGS"
5218 ac_motif_save_LDFLAGS="$LDFLAGS"
5220 LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
5221 INCLUDES="$X_CFLAGS $INCLUDES"
5222 CPPFLAGS="$X_CFLAGS $CPPFLAGS"
5223 LDFLAGS="$X_LIBS $LDFLAGS"
5225 ac_cv_motif_libraries="none"
5226 cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229 #include <Xm/Xm.h>
5230 int main() {
5231 XtToolkitInitialize();
5232 ; return 0; }
5234 if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5235 rm -rf conftest*
5237 # libXm.a is in the standard search path.
5238 ac_cv_motif_libraries=
5240 else
5241 echo "configure: failed program was:" >&5
5242 cat conftest.$ac_ext >&5
5243 rm -rf conftest*
5245 # libXm.a is not in the standard search path.
5246 # Locate it and put its directory in `motif_libraries'
5248 # /usr/lib/Motif* are used on HP-UX (Motif).
5249 # /usr/lib/X11* are used on HP-UX (X and Athena).
5250 # /usr/dt is used on Solaris (Motif).
5251 # /usr/lesstif is used on Linux (Lesstif).
5252 # /usr/openwin is used on Solaris (X and Athena).
5253 # Other directories are just guesses.
5254 for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
5255 /usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
5256 /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
5257 /usr/dt/lib /usr/openwin/lib \
5258 /usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
5259 /usr/lesstif*/lib /usr/lib/Lesstif* \
5260 "${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
5261 "${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
5262 if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
5263 ac_cv_motif_libraries="$dir"
5264 break
5266 done
5269 rm -f conftest*
5271 LIBS="$ac_motif_save_LIBS"
5272 INCLUDES="$ac_motif_save_INCLUDES"
5273 CPPFLAGS="$ac_motif_save_CPPFLAGS"
5274 LDFLAGS="$ac_motif_save_LDFLAGS"
5279 motif_libraries="$ac_cv_motif_libraries"
5282 # Provide an easier way to link
5284 if test "$motif_includes" = "none" -o "$motif_libraries" = "none"; then
5285 with_motif="no"
5286 else
5287 with_motif="yes"
5290 if test "$with_motif" != "no"; then
5291 if test "$motif_libraries" = ""; then
5292 link_motif="-lXm -lXt"
5293 MOTIF_LIBS="-lXm -lXt"
5294 else
5295 link_motif="-L$motif_libraries -lXm -lXt"
5296 MOTIF_LIBS="-L$motif_libraries -lXm -lXt"
5298 if test "$motif_includes" != ""; then
5299 include_motif="-I$motif_includes"
5300 MOTIF_INCLUDES="-I$motif_includes"
5302 LIBS="$LIBS $MOTIF_LIBS"
5303 INCLUDES="$INCLUDES $MOTIF_INCLUDES"
5304 cat >> confdefs.h <<\EOF
5305 #define HAVE_MOTIF
5308 else
5309 with_motif="no"
5315 motif_libraries_result="$motif_libraries"
5316 motif_includes_result="$motif_includes"
5317 test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
5318 test "$motif_includes_result" = "" && motif_includes_result="in default path"
5319 test "$motif_libraries_result" = "none" && motif_libraries_result="(none)"
5320 test "$motif_includes_result" = "none" && motif_includes_result="(none)"
5321 echo "$ac_t""libraries $motif_libraries_result, headers $motif_includes_result" 1>&6
5323 if test "$motif_includes" = "none" -a "$motif_libraries" != "none"; then
5324 echo "configure: warning: In addition to Motif/Lesstif libraries we also need includes. Disabling." 1>&2
5325 motif_include=none
5328 if test "$motif_includes" != "none"; then
5329 use_motif="yes"
5330 else
5331 use_motif="no"
5334 #####
5335 # Checks for header files.
5337 for ac_hdr in limits.h malloc.h strings.h unistd.h
5339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5341 echo "configure:5342: checking for $ac_hdr" >&5
5342 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5343 echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345 cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 #include <$ac_hdr>
5350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5351 { (eval echo configure:5352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5353 if test -z "$ac_err"; then
5354 rm -rf conftest*
5355 eval "ac_cv_header_$ac_safe=yes"
5356 else
5357 echo "$ac_err" >&5
5358 echo "configure: failed program was:" >&5
5359 cat conftest.$ac_ext >&5
5360 rm -rf conftest*
5361 eval "ac_cv_header_$ac_safe=no"
5363 rm -f conftest*
5365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5366 echo "$ac_t""yes" 1>&6
5367 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5368 cat >> confdefs.h <<EOF
5369 #define $ac_tr_hdr 1
5372 else
5373 echo "$ac_t""no" 1>&6
5374 { echo "configure: error: Include headers not found" 1>&2; exit 1; }
5376 done
5379 #####
5380 # Checks for typedefs, structures, and compiler characteristics.
5381 echo $ac_n "checking for working const""... $ac_c" 1>&6
5382 echo "configure:5383: checking for working const" >&5
5383 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5384 echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386 cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5390 int main() {
5392 /* Ultrix mips cc rejects this. */
5393 typedef int charset[2]; const charset x;
5394 /* SunOS 4.1.1 cc rejects this. */
5395 char const *const *ccp;
5396 char **p;
5397 /* NEC SVR4.0.2 mips cc rejects this. */
5398 struct point {int x, y;};
5399 static struct point const zero = {0,0};
5400 /* AIX XL C 1.02.0.0 rejects this.
5401 It does not let you subtract one const X* pointer from another in an arm
5402 of an if-expression whose if-part is not a constant expression */
5403 const char *g = "string";
5404 ccp = &g + (g ? g-g : 0);
5405 /* HPUX 7.0 cc rejects these. */
5406 ++ccp;
5407 p = (char**) ccp;
5408 ccp = (char const *const *) p;
5409 { /* SCO 3.2v4 cc rejects this. */
5410 char *t;
5411 char const *s = 0 ? (char *) 0 : (char const *) 0;
5413 *t++ = 0;
5415 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5416 int x[] = {25, 17};
5417 const int *foo = &x[0];
5418 ++foo;
5420 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5421 typedef const int *iptr;
5422 iptr p = 0;
5423 ++p;
5425 { /* AIX XL C 1.02.0.0 rejects this saying
5426 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5427 struct s { int j; const int *ap[3]; };
5428 struct s *b; b->j = 5;
5430 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5431 const int foo = 10;
5434 ; return 0; }
5436 if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5437 rm -rf conftest*
5438 ac_cv_c_const=yes
5439 else
5440 echo "configure: failed program was:" >&5
5441 cat conftest.$ac_ext >&5
5442 rm -rf conftest*
5443 ac_cv_c_const=no
5445 rm -f conftest*
5448 echo "$ac_t""$ac_cv_c_const" 1>&6
5449 if test $ac_cv_c_const = no; then
5450 cat >> confdefs.h <<\EOF
5451 #define const
5456 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5457 echo "configure:5458: checking for ANSI C header files" >&5
5458 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5459 echo $ac_n "(cached) $ac_c" 1>&6
5460 else
5461 cat > conftest.$ac_ext <<EOF
5462 #line 5463 "configure"
5463 #include "confdefs.h"
5464 #include <stdlib.h>
5465 #include <stdarg.h>
5466 #include <string.h>
5467 #include <float.h>
5469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5470 { (eval echo configure:5471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5472 if test -z "$ac_err"; then
5473 rm -rf conftest*
5474 ac_cv_header_stdc=yes
5475 else
5476 echo "$ac_err" >&5
5477 echo "configure: failed program was:" >&5
5478 cat conftest.$ac_ext >&5
5479 rm -rf conftest*
5480 ac_cv_header_stdc=no
5482 rm -f conftest*
5484 if test $ac_cv_header_stdc = yes; then
5485 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5486 cat > conftest.$ac_ext <<EOF
5487 #line 5488 "configure"
5488 #include "confdefs.h"
5489 #include <string.h>
5491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5492 egrep "memchr" >/dev/null 2>&1; then
5494 else
5495 rm -rf conftest*
5496 ac_cv_header_stdc=no
5498 rm -f conftest*
5502 if test $ac_cv_header_stdc = yes; then
5503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5504 cat > conftest.$ac_ext <<EOF
5505 #line 5506 "configure"
5506 #include "confdefs.h"
5507 #include <stdlib.h>
5509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5510 egrep "free" >/dev/null 2>&1; then
5512 else
5513 rm -rf conftest*
5514 ac_cv_header_stdc=no
5516 rm -f conftest*
5520 if test $ac_cv_header_stdc = yes; then
5521 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5522 if test "$cross_compiling" = yes; then
5524 else
5525 cat > conftest.$ac_ext <<EOF
5526 #line 5527 "configure"
5527 #include "confdefs.h"
5528 #include <ctype.h>
5529 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5530 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5531 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5532 int main () { int i; for (i = 0; i < 256; i++)
5533 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5534 exit (0); }
5537 if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5538 then
5540 else
5541 echo "configure: failed program was:" >&5
5542 cat conftest.$ac_ext >&5
5543 rm -fr conftest*
5544 ac_cv_header_stdc=no
5546 rm -fr conftest*
5552 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5553 if test $ac_cv_header_stdc = yes; then
5554 cat >> confdefs.h <<\EOF
5555 #define STDC_HEADERS 1
5560 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5561 echo "configure:5562: checking for size_t" >&5
5562 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5563 echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565 cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 #include <sys/types.h>
5569 #if STDC_HEADERS
5570 #include <stdlib.h>
5571 #include <stddef.h>
5572 #endif
5574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5575 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5576 rm -rf conftest*
5577 ac_cv_type_size_t=yes
5578 else
5579 rm -rf conftest*
5580 ac_cv_type_size_t=no
5582 rm -f conftest*
5585 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5586 if test $ac_cv_type_size_t = no; then
5587 cat >> confdefs.h <<\EOF
5588 #define size_t unsigned
5593 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5594 echo "configure:5595: checking whether struct tm is in sys/time.h or time.h" >&5
5595 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5596 echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 #include <sys/types.h>
5602 #include <time.h>
5603 int main() {
5604 struct tm *tp; tp->tm_sec;
5605 ; return 0; }
5607 if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5608 rm -rf conftest*
5609 ac_cv_struct_tm=time.h
5610 else
5611 echo "configure: failed program was:" >&5
5612 cat conftest.$ac_ext >&5
5613 rm -rf conftest*
5614 ac_cv_struct_tm=sys/time.h
5616 rm -f conftest*
5619 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5620 if test $ac_cv_struct_tm = sys/time.h; then
5621 cat >> confdefs.h <<\EOF
5622 #define TM_IN_SYS_TIME 1
5627 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
5628 echo "configure:5629: checking for uid_t in sys/types.h" >&5
5629 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
5630 echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632 cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635 #include <sys/types.h>
5637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5638 egrep "uid_t" >/dev/null 2>&1; then
5639 rm -rf conftest*
5640 ac_cv_type_uid_t=yes
5641 else
5642 rm -rf conftest*
5643 ac_cv_type_uid_t=no
5645 rm -f conftest*
5649 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
5650 if test $ac_cv_type_uid_t = no; then
5651 cat >> confdefs.h <<\EOF
5652 #define uid_t int
5655 cat >> confdefs.h <<\EOF
5656 #define gid_t int
5661 echo $ac_n "checking for inline""... $ac_c" 1>&6
5662 echo "configure:5663: checking for inline" >&5
5663 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5664 echo $ac_n "(cached) $ac_c" 1>&6
5665 else
5666 ac_cv_c_inline=no
5667 for ac_kw in inline __inline__ __inline; do
5668 cat > conftest.$ac_ext <<EOF
5669 #line 5670 "configure"
5670 #include "confdefs.h"
5672 int main() {
5673 } $ac_kw foo() {
5674 ; return 0; }
5676 if { (eval echo configure:5677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5677 rm -rf conftest*
5678 ac_cv_c_inline=$ac_kw; break
5679 else
5680 echo "configure: failed program was:" >&5
5681 cat conftest.$ac_ext >&5
5683 rm -f conftest*
5684 done
5688 echo "$ac_t""$ac_cv_c_inline" 1>&6
5689 case "$ac_cv_c_inline" in
5690 inline | yes) ;;
5691 no) cat >> confdefs.h <<\EOF
5692 #define inline
5695 *) cat >> confdefs.h <<EOF
5696 #define inline $ac_cv_c_inline
5699 esac
5702 #####
5703 # Checks for library functions.
5704 #AC_FUNC_MALLOC
5705 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
5706 echo "configure:5707: checking for 8-bit clean memcmp" >&5
5707 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
5708 echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710 if test "$cross_compiling" = yes; then
5711 ac_cv_func_memcmp_clean=no
5712 else
5713 cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5717 main()
5719 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5720 exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
5724 if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5725 then
5726 ac_cv_func_memcmp_clean=yes
5727 else
5728 echo "configure: failed program was:" >&5
5729 cat conftest.$ac_ext >&5
5730 rm -fr conftest*
5731 ac_cv_func_memcmp_clean=no
5733 rm -fr conftest*
5738 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
5739 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
5741 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5742 echo "configure:5743: checking return type of signal handlers" >&5
5743 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5744 echo $ac_n "(cached) $ac_c" 1>&6
5745 else
5746 cat > conftest.$ac_ext <<EOF
5747 #line 5748 "configure"
5748 #include "confdefs.h"
5749 #include <sys/types.h>
5750 #include <signal.h>
5751 #ifdef signal
5752 #undef signal
5753 #endif
5754 #ifdef __cplusplus
5755 extern "C" void (*signal (int, void (*)(int)))(int);
5756 #else
5757 void (*signal ()) ();
5758 #endif
5760 int main() {
5761 int i;
5762 ; return 0; }
5764 if { (eval echo configure:5765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5765 rm -rf conftest*
5766 ac_cv_type_signal=void
5767 else
5768 echo "configure: failed program was:" >&5
5769 cat conftest.$ac_ext >&5
5770 rm -rf conftest*
5771 ac_cv_type_signal=int
5773 rm -f conftest*
5776 echo "$ac_t""$ac_cv_type_signal" 1>&6
5777 cat >> confdefs.h <<EOF
5778 #define RETSIGTYPE $ac_cv_type_signal
5782 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
5783 echo "configure:5784: checking for vprintf" >&5
5784 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
5785 echo $ac_n "(cached) $ac_c" 1>&6
5786 else
5787 cat > conftest.$ac_ext <<EOF
5788 #line 5789 "configure"
5789 #include "confdefs.h"
5790 /* System header to define __stub macros and hopefully few prototypes,
5791 which can conflict with char vprintf(); below. */
5792 #include <assert.h>
5793 /* Override any gcc2 internal prototype to avoid an error. */
5794 /* We use char because int might match the return type of a gcc2
5795 builtin and then its argument prototype would still apply. */
5796 char vprintf();
5798 int main() {
5800 /* The GNU C library defines this for functions which it implements
5801 to always fail with ENOSYS. Some functions are actually named
5802 something starting with __ and the normal name is an alias. */
5803 #if defined (__stub_vprintf) || defined (__stub___vprintf)
5804 choke me
5805 #else
5806 vprintf();
5807 #endif
5809 ; return 0; }
5811 if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5812 rm -rf conftest*
5813 eval "ac_cv_func_vprintf=yes"
5814 else
5815 echo "configure: failed program was:" >&5
5816 cat conftest.$ac_ext >&5
5817 rm -rf conftest*
5818 eval "ac_cv_func_vprintf=no"
5820 rm -f conftest*
5823 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
5824 echo "$ac_t""yes" 1>&6
5825 cat >> confdefs.h <<\EOF
5826 #define HAVE_VPRINTF 1
5829 else
5830 echo "$ac_t""no" 1>&6
5833 if test "$ac_cv_func_vprintf" != yes; then
5834 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
5835 echo "configure:5836: checking for _doprnt" >&5
5836 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
5837 echo $ac_n "(cached) $ac_c" 1>&6
5838 else
5839 cat > conftest.$ac_ext <<EOF
5840 #line 5841 "configure"
5841 #include "confdefs.h"
5842 /* System header to define __stub macros and hopefully few prototypes,
5843 which can conflict with char _doprnt(); below. */
5844 #include <assert.h>
5845 /* Override any gcc2 internal prototype to avoid an error. */
5846 /* We use char because int might match the return type of a gcc2
5847 builtin and then its argument prototype would still apply. */
5848 char _doprnt();
5850 int main() {
5852 /* The GNU C library defines this for functions which it implements
5853 to always fail with ENOSYS. Some functions are actually named
5854 something starting with __ and the normal name is an alias. */
5855 #if defined (__stub__doprnt) || defined (__stub____doprnt)
5856 choke me
5857 #else
5858 _doprnt();
5859 #endif
5861 ; return 0; }
5863 if { (eval echo configure:5864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5864 rm -rf conftest*
5865 eval "ac_cv_func__doprnt=yes"
5866 else
5867 echo "configure: failed program was:" >&5
5868 cat conftest.$ac_ext >&5
5869 rm -rf conftest*
5870 eval "ac_cv_func__doprnt=no"
5872 rm -f conftest*
5875 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
5876 echo "$ac_t""yes" 1>&6
5877 cat >> confdefs.h <<\EOF
5878 #define HAVE_DOPRNT 1
5881 else
5882 echo "$ac_t""no" 1>&6
5888 #####
5889 # Collect the libraries and includes for X and/or motif
5890 if test "$no_x" != "yes"; then
5891 LIBS="$X_LIBS $LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
5892 INCLUDES="$INCLUDES $X_CFLAGS $MOTIF_CFLAGS"
5895 if true; then
5896 USE_X11_TRUE=
5897 USE_X11_FALSE='#'
5898 else
5899 USE_X11_TRUE='#'
5900 USE_X11_FALSE=
5902 use_x11="yes"
5903 else
5904 use_x11="no"
5907 ####
5908 # And collect the f77 libs to the linker - at least on Solaris, f77 stuff must go first
5909 LIBS="$FLIBS $LIBS"
5911 ########################################################################
5912 # Substitute things in output and header files.
5913 ########################################################################
5914 SUFFIX=""
5916 if test "$enable_mpi" = "yes"; then
5917 cat >> confdefs.h <<\EOF
5918 #define USE_MPI
5921 PAR_OBJ='${mpi_obj}'
5922 if test "$enable_type_suffix" = "yes"; then
5923 SUFFIX="_mpi"
5925 else
5926 PAR_OBJ='${libnet_obj}'
5929 if test "$enable_vector" = "yes"; then
5930 cat >> confdefs.h <<\EOF
5931 #define USE_VECTOR
5936 if test "$enable_fortran" = "yes"; then
5937 cat >> confdefs.h <<\EOF
5938 #define USE_FORTRAN
5941 INNER_F77_OBJ='${inner_f77_obj}'
5944 if true; then
5945 USE_FORTRAN_TRUE=
5946 USE_FORTRAN_FALSE='#'
5947 else
5948 USE_FORTRAN_TRUE='#'
5949 USE_FORTRAN_FALSE=
5951 else
5952 INNER_C_OBJ='${inner_c_obj}'
5955 if false; then
5956 USE_FORTRAN_TRUE=
5957 USE_FORTRAN_FALSE='#'
5958 else
5959 USE_FORTRAN_TRUE='#'
5960 USE_FORTRAN_FALSE=
5964 if test "$enable_double" = "yes"; then
5965 cat >> confdefs.h <<\EOF
5966 #define DOUBLE
5969 if test "$enable_type_suffix" = "yes"; then
5970 SUFFIX="${SUFFIX}_d"
5974 if true; then
5975 USE_DOUBLE_TRUE=
5976 USE_DOUBLE_FALSE='#'
5977 else
5978 USE_DOUBLE_TRUE='#'
5979 USE_DOUBLE_FALSE=
5981 else
5984 if false; then
5985 USE_DOUBLE_TRUE=
5986 USE_DOUBLE_FALSE='#'
5987 else
5988 USE_DOUBLE_TRUE='#'
5989 USE_DOUBLE_FALSE=
5993 if test "$enable_simplewater" = "yes"; then
5994 cat >> confdefs.h <<\EOF
5995 #define SIMPLEWATER
6000 if test "$enable_waterwater_loops" = "no"; then
6001 cat >> confdefs.h <<\EOF
6002 #define DISABLE_WATERWATER_LOOPS
6007 if test "$enable_nice" = "no"; then
6008 cat >> confdefs.h <<\EOF
6009 #define NO_NICE
6014 if test "$enable_sse" = "yes"; then
6015 cat >> confdefs.h <<\EOF
6016 #define USE_SSE
6019 SSE_OBJ='${sse_obj}'
6022 if test "$enable_3dnow" = "yes"; then
6023 cat >> confdefs.h <<\EOF
6024 #define USE_3DNOW
6027 TDN_OBJ='${tdn_obj}'
6030 if test "$enable_sse" = "yes" -o "$enable_3dnow" = "yes"; then
6031 X86_ASM_OBJ='${x86_asm_obj}'
6034 if test "$motif_includes" != "none" -a "$motif_libraries" != "none"; then
6035 MOTIF_OBJ='${motif_obj}'
6038 if test "$enable_xdr" = "yes"; then
6039 cat >> confdefs.h <<\EOF
6040 #define USE_XDR
6043 XDR_OBJ='${xdr_obj}'
6044 else
6045 XDR_OBJ='${noxdr_obj}'
6048 if test "$enable_softwaresqrt" = "yes"; then
6049 cat >> confdefs.h <<\EOF
6050 #define SOFTWARE_SQRT
6055 if test "$enable_softwarerecip" = "yes"; then
6056 cat >> confdefs.h <<\EOF
6057 #define SOFTWARE_RECIP
6062 if test "$enable_hide_square_latency" = "yes"; then
6063 cat >> confdefs.h <<\EOF
6064 #define DECREASE_SQUARE_LATENCY
6069 if test "$enable_hide_table_latency" = "yes"; then
6070 cat >> confdefs.h <<\EOF
6071 #define DECREASE_LOOKUP_LATENCY
6076 if test "$with_mpi_environment" != "no" -a "$enable_mpi" = "yes"; then
6077 cat >> confdefs.h <<\EOF
6078 #define CHECK_MPI_ENV "$with_mpi_environment"
6084 list_of_vectorized_sqrt=""
6085 if test "$enable_vectorized_sqrt" != "no"; then
6086 if test "$enable_vectorized_sqrt" = "yes"; then
6087 enable_vectorized_sqrt="normal,solvent,water,water-water"
6089 if echo $enable_vectorized_sqrt | grep "normal" >/dev/null; then
6090 list_of_vectorized_sqrt="normal "
6091 cat >> confdefs.h <<\EOF
6092 #define VECTORIZE_INVSQRT
6096 if echo $enable_vectorized_sqrt | grep "solvent" >/dev/null; then
6097 list_of_vectorized_sqrt="${list_of_vectorized_sqrt}solvent "
6098 cat >> confdefs.h <<\EOF
6099 #define VECTORIZE_INVSQRT_S
6103 if echo $enable_vectorized_sqrt | sed 's/water-water//' | grep "water" >/dev/null; then
6104 list_of_vectorized_sqrt="${list_of_vectorized_sqrt}water "
6105 cat >> confdefs.h <<\EOF
6106 #define VECTORIZE_INVSQRT_W
6110 if echo $enable_vectorized_sqrt | grep "water-water" >/dev/null; then
6111 list_of_vectorized_sqrt="${list_of_vectorized_sqrt}water-water "
6112 cat >> confdefs.h <<\EOF
6113 #define VECTORIZE_INVSQRT_WW
6118 if test -z "$list_of_vectorized_sqrt"; then
6119 list_of_vectorized_sqrt="no"
6123 list_of_prefetch_x=""
6124 if test "$enable_prefetch_x" != "no"; then
6125 if test "$enable_prefetch_x" = "yes"; then
6126 enable_prefetch_x="normal,solvent,water,water-water"
6128 if echo $enable_prefetch_x | grep "normal" >/dev/null; then
6129 list_of_prefetch_x="normal "
6130 cat >> confdefs.h <<\EOF
6131 #define PREFETCH_X
6135 if echo $enable_prefetch_x | grep "solvent" >/dev/null; then
6136 list_of_prefetch_x="${list_of_prefetch_x}solvent "
6137 cat >> confdefs.h <<\EOF
6138 #define PREFETCH_X_S
6142 if echo $enable_prefetch_x | sed 's/water-water//' | grep "water" >/dev/null; then
6143 list_of_prefetch_x="${list_of_prefetch_x}water "
6144 cat >> confdefs.h <<\EOF
6145 #define PREFETCH_X_W
6149 if echo $enable_prefetch_x | grep "water-water" >/dev/null; then
6150 list_of_prefetch_x="${list_of_prefetch_x}water-water "
6151 cat >> confdefs.h <<\EOF
6152 #define PREFETCH_X_WW
6157 if test -z "$list_of_prefetch_x"; then
6158 list_of_prefetch_x="no"
6161 list_of_prefetch_f=""
6162 if test "$enable_prefetch_f" != "no"; then
6163 if test "$enable_prefetch_f" = "yes"; then
6164 enable_prefetch_f="normal,solvent,water,water-water"
6166 if echo $enable_prefetch_f | grep "normal" >/dev/null; then
6167 list_of_prefetch_f="normal "
6168 cat >> confdefs.h <<\EOF
6169 #define PREFETCH_F
6173 if echo $enable_prefetch_f | grep "solvent" >/dev/null; then
6174 list_of_prefetch_f="${list_of_prefetch_f}solvent "
6175 cat >> confdefs.h <<\EOF
6176 #define PREFETCH_F_S
6180 if echo $enable_prefetch_f | sed 's/water-water//' | grep "water"; then
6181 list_of_prefetch_f="${list_of_prefetch_f}water "
6182 cat >> confdefs.h <<\EOF
6183 #define PREFETCH_F_W
6187 if echo $enable_prefetch_f | grep "water-water" >/dev/null; then
6188 list_of_prefetch_f="${list_of_prefetch_f}water-water "
6189 cat >> confdefs.h <<\EOF
6190 #define PREFETCH_F_WW
6195 if test -z "$list_of_prefetch_f"; then
6196 list_of_prefetch_f="no"
6199 if test "$enable_vectorized_recip" != "yes" -a "$enable_vectorized_recip" != "no"; then
6200 { echo "configure: error: Vectorized reciprocal is only meaningful for normal loops" 1>&2; exit 1; }
6203 if test "$enable_vectorized_recip" = "yes"; then
6204 cat >> confdefs.h <<\EOF
6205 #define VECTORIZE_RECIP
6210 if test "${prefix}" = "NONE"; then
6211 cat >> confdefs.h <<EOF
6212 #define GMXLIBDIR "${ac_default_prefix}/top"
6215 else
6216 cat >> confdefs.h <<EOF
6217 #define GMXLIBDIR "${prefix}/top"
6230 # not used right now
6234 # Check if there are any optimizations and options for this arch and cpu
6240 # Try to determine "good" native compiler flags if none specified on command
6241 # line. To avoid repeating the entire procedure for fortran flags, we first
6242 # determine our suggested choices for both C and fortran, and then possibly
6243 # override them with user choices.
6245 case "${host_cpu}-${host_os}" in
6247 *-solaris2*)
6248 case "${gmxcpu}" in
6249 ultrasparc3*)
6250 xCFLAGS="-fast -xO5 -xtarget=ultra3 -fsimple=2 -fnonstd -dalign"
6251 xFFLAGS=$xCFLAGS
6253 ultrasparc2i*)
6254 xCFLAGS="-fast -xO5 -xtarget=ultra2i -fsimple=2 -fnonstd -dalign"
6255 xFFLAGS=$xCFLAGS
6257 ultrasparc2*)
6258 xCFLAGS="-fast -xO5 -xtarget=ultra2 -fsimple=2 -fnonstd -dalign"
6259 xFFLAGS=$xCFLAGS
6261 ultrasparc*)
6262 xCFLAGS="-fast -xO5 -xtarget=ultra -fsimple=2 -fnonstd -dalign"
6263 xFFLAGS=$xCFLAGS
6266 xCFLAGS="-native -fast -xO5 -fsimple=2 -fnonstd -dalign"
6267 xFFLAGS=$xCFLAGS
6269 esac
6272 *-hpux*)
6273 xCFLAGS="-Ae +O3 +Oall"
6274 xFFLAGS=$xCFLAGS
6275 # If you haven't noticed, we don't like hp very much...
6276 # but perhaps that will change if they make something nice out of ia64.
6279 rs6000*-aix*)
6280 # dont use inter-procedure analysis for the innerloops - they take
6281 # forever to compile with it, and it doesnt help at all.
6282 case "${gmxcpu}" in
6283 power4*)
6284 xCFLAGS="-O3 -qarch=pwr4 -qtune=pwr4 -qlanglvl=ansi -qmaxmem=16384"
6285 xFFLAGS="-O3 -Q -qarch=pwr4 -qtune=pwr4 -qmaxmem=16384 -qhot -qnoipa"
6287 power3*)
6288 xCFLAGS="-O3 -qarch=pwr3 -qtune=pwr3 -qlanglvl=ansi -qmaxmem=16384"
6289 xFFLAGS="-O3 -Q -qarch=pwr3 -qtune=pwr3 -qmaxmem=16384 -qhot -qnoipa"
6291 power2*)
6292 xCFLAGS="-O3 -qarch=pwr2 -qtune=pwr2 -qlanglvl=ansi -qmaxmem=16384"
6293 xFFLAGS="-O3 -Q -qarch=pwr2 -qtune=pwr2 -qmaxmem=16384 -qhot -qnoipa"
6295 power)
6296 xCFLAGS="-O3 -qarch=pwr -qtune=pwr -qlanglvl=ansi -qmaxmem=16384"
6297 xFFLAGS="-O3 -Q -qarch=pwr -qtune=pwr -qmaxmem=16384 -qhot -qnoipa"
6300 # I don't think people are using anything older than power2, so we tune for
6301 # pwr, but dont set the arch since it is nice to have common binaries
6302 # that run also on powerpc.
6303 xCFLAGS="-O3 -qlanglvl=ansi -qtune=pwr -qmaxmem=16384"
6304 xFFLAGS="-O3 -Q -qtune=pwr -qmaxmem=16384 -qhot"
6306 esac
6309 powerpc*-aix*)
6310 case "${gmxcpu}" in
6311 ppc604)
6312 xCFLAGS="-O3 -qarch=604 -qtune=604 -qlanglvl=ansi -qmaxmem=16384"
6313 xFFLAGS="-O3 -Q -qarch=604 -qtune=604 -qmaxmem=16384 -qhot"
6315 ppc603)
6316 xCFLAGS="-O3 -qarch=603 -qtune=603 -qlanglvl=ansi -qmaxmem=16384"
6317 xFFLAGS="-O3 -Q -qarch=603 -qtune=603 -qmaxmem=16384 -qhot"
6319 rs64a)
6320 xCFLAGS="-O3 -qarch=rs64a -qtune=rs64a -qlanglvl=ansi -qmaxmem=16384"
6321 xFFLAGS="-O3 -Q -qarch=rs64a -qtune=rs64a -qmaxmem=16384 -qhot"
6323 rs64b)
6324 xCFLAGS="-O3 -qarch=rs64b -qtune=rs64b -qlanglvl=ansi -qmaxmem=16384"
6325 xFFLAGS="-O3 -Q -qarch=rs64b -qtune=rs64b -qmaxmem=16384 -qhot"
6327 rs64c)
6328 xCFLAGS="-O3 -qarch=rs64c -qtune=rs64c -qlanglvl=ansi -qmaxmem=16384"
6329 xFFLAGS="-O3 -Q -qarch=rs64c -qtune=rs64c -qmaxmem=16384 -qhot"
6332 xCFLAGS="-O3 -qlanglvl=ansi -qmaxmem=16384"
6333 xFFLAGS="-O3 -Q -qmaxmem=16384 -qhot"
6335 esac
6338 mips*-irix*)
6339 xCFLAGS="-O3 -OPT:IEEE_arithmetic=3 -OPT:rsqrt=ON -SWP:loop_overhead -INLINE:=ON -LNO:opt=1 -LNO:ou_further=3 -OPT:Olimit=0:roundoff=3:alias=typed -fullwarn -woff 1174 -D__INLINE_INTRINSICS"
6340 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"
6342 if $CC -version | grep "Version 7.1" > /dev/null 2>&1; then
6343 xCFLAGS="$xCFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
6344 xFFLAGS="$xFFLAGS -GCM:aggressive_speculation -GCM:array_speculation"
6347 if $CC -version | grep "Version 7.3" > /dev/null 2>&1; then
6348 xCFLAGS="$xCFLAGS -SWP:heur=fdms,nhms,fdnms"
6349 xFFLAGS="$xFFLAGS -SWP:heur=fdms,nhms,fdnms"
6352 case "${gmxcpu}" in
6353 r12000*)
6354 xCFLAGS="-n32 -r12000 -mips4 $xCFLAGS"
6355 xFFLAGS="-n32 -r12000 -mips4 $xFFLAGS"
6356 xLDFLAGS="-n32 -r12000 -mips4"
6358 r10000*)
6359 xCFLAGS="-n32 -r10000 -mips4 $xCFLAGS"
6360 xFFLAGS="-n32 -r10000 -mips4 $xFFLAGS"
6361 xLDFLAGS="-n32 -r10000 -mips4"
6363 r8000*)
6364 xCFLAGS="-n32 -r8000 -mips4 $xCFLAGS"
6365 xFFLAGS="-n32 -r8000 -mips4 $xFFLAGS"
6366 xLDFLAGS="-n32 -r8000 -mips4"
6368 r5000*)
6369 xCFLAGS="-n32 -r5000 -mips4 $xCFLAGS"
6370 xFFLAGS="-n32 -r5000 -mips4 $xFFLAGS"
6371 xLDFLAGS="-n32 -r5000 -mips4"
6374 xCFLAGS="-n32 $xCFLAGS"
6375 xFFLAGS="-n32 $xFFLAGS"
6376 xLDFLAGS="-n32"
6378 esac
6381 alpha*-osf*)
6382 case "${host_cpu}" in
6383 alphaev*)
6384 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
6385 evtype=`echo ${host_cpu} | sed 's/alpha//'`
6386 xCFLAGS="-O5 -arch $evtype -tune $evtype -fast -unroll 2 -fp_reorder"
6387 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
6388 xLDFLAGS="-O4"
6391 xCFLAGS="-O5 -arch host -tune host -fast -unroll 2 -fp_reorder"
6392 xFFLAGS="$xCFLAGS -assume noaccuracy_sensitive"
6393 xLDFLAGS="-O4"
6395 esac
6398 alpha*-linux*)
6399 case "${host_cpu}" in
6400 alphaev*)
6401 # extract the processor from cpu type (e.g. alphaev56 -> ev56)
6402 evtype=`echo ${host_cpu} | sed 's/alpha//'`
6403 tmpCFLAGS="-O5 -arch $evtype -tune $evtype -fast -unroll 2 -fp_reorder"
6404 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
6405 tmpLDFLAGS="-O4"
6408 tmpCFLAGS="-O5 -arch host -tune host -fast -unroll 2 -fp_reorder"
6409 tmpFFLAGS="$tmpCFLAGS -assume noaccuracy_sensitive"
6410 tmpLDFLAGS="-O4"
6412 esac
6413 if $CC -V 2> /dev/null | grep Compaq > /dev/null 2>&1; then
6414 xCFLAGS="$tmpCFLAGS"
6416 if test "$enable_fortran" = "yes"; then
6417 if $F77 -V 2> /dev/null | grep Compaq > /dev/null 2>&1; then
6418 xFFLAGS="$tmpFFLAGS"
6423 *-*)
6424 # most of these systems (e.g. linux, FreeBSD) use gcc which is treated
6425 # further down, but we can at least check if the Portland compilers are used:
6426 if $CC -V 2> /dev/null | grep Portland > /dev/null 2>&1; then
6427 case "${host_cpu}" in
6428 i586)
6429 pgiopt="-tp p5"
6431 i686)
6432 pgiopt="-tp p6"
6434 esac
6435 xCFLAGS="$pgiopt -fast -Minfo=loop -pc 32"
6437 if test "$enable_fortran" = "yes"; then
6438 if $F77 -V 2> /dev/null | grep Portland /dev/null 2>&1; then
6439 xFFLAGS="$xCFLAGS -Mneginfo=loop"
6443 esac
6444 # Phew, end of all those operating systems and processors!
6446 # use default flags for gcc/g77 on all systems
6447 if test $ac_cv_prog_gcc = yes; then
6448 xCFLAGS="-O6 -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
6449 # -malign-double for x86 systems
6452 echo $ac_n "checking whether $CC accepts -malign-double""... $ac_c" 1>&6
6453 echo "configure:6454: checking whether $CC accepts -malign-double" >&5
6454 if eval "test \"`echo '$''{'ac_align_double'+set}'`\" = set"; then
6455 echo $ac_n "(cached) $ac_c" 1>&6
6456 else
6457 echo 'void f(){}' > conftest.c
6458 if test -z "`$CC -malign-double -c conftest.c 2>&1`"; then
6459 ac_align_double=yes
6460 else
6461 ac_align_double=no
6463 rm -f conftest*
6467 echo "$ac_t""$ac_align_double" 1>&6
6468 if test "$ac_align_double" = yes; then
6470 xCFLAGS="$xCFLAGS -malign-double"
6471 else
6478 if test $enable_fortran = yes; then
6479 if test $ac_cv_prog_g77 = yes; then
6480 xFFLAGS="-O3 -ffast-math -fomit-frame-pointer -finline-functions -funroll-all-loops -Wall -Wno-unused"
6481 # -malign-double for f77 on x86 systems - haven't checked that this works yet.
6482 #ACX_CHECK_F77_FLAGS(-malign-double,align_double,xFFLAGS="$xFFLAGS -malign-double")
6486 CPU_FLAGS=""
6487 if test "$GCC" = "yes"; then
6488 # try to guess correct CPU flags, at least for linux
6489 case "${host_cpu}" in
6490 # i586/i686 cpu flags don't improve speed, thus no need to use them.
6491 # don't check f77 separately - we assume f77 and gcc are similar
6493 powerpc*)
6494 cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
6495 is60x=`echo $cputype | egrep "^600-9e?$"`
6496 if test -n "$is60x"; then
6499 echo $ac_n "checking whether $CC accepts -mcpu=$cputype""... $ac_c" 1>&6
6500 echo "configure:6501: checking whether $CC accepts -mcpu=$cputype" >&5
6501 if eval "test \"`echo '$''{'ac_m_cpu_60x'+set}'`\" = set"; then
6502 echo $ac_n "(cached) $ac_c" 1>&6
6503 else
6504 echo 'void f(){}' > conftest.c
6505 if test -z "`$CC -mcpu=$cputype -c conftest.c 2>&1`"; then
6506 ac_m_cpu_60x=yes
6507 else
6508 ac_m_cpu_60x=no
6510 rm -f conftest*
6514 echo "$ac_t""$ac_m_cpu_60x" 1>&6
6515 if test "$ac_m_cpu_60x" = yes; then
6517 CPU_FLAGS=-mcpu=$cputype
6518 else
6523 elif test "$cputype" = 750; then
6526 echo $ac_n "checking whether $CC accepts -mcpu=750""... $ac_c" 1>&6
6527 echo "configure:6528: checking whether $CC accepts -mcpu=750" >&5
6528 if eval "test \"`echo '$''{'ac_m_cpu_750'+set}'`\" = set"; then
6529 echo $ac_n "(cached) $ac_c" 1>&6
6530 else
6531 echo 'void f(){}' > conftest.c
6532 if test -z "`$CC -mcpu=750 -c conftest.c 2>&1`"; then
6533 ac_m_cpu_750=yes
6534 else
6535 ac_m_cpu_750=no
6537 rm -f conftest*
6541 echo "$ac_t""$ac_m_cpu_750" 1>&6
6542 if test "$ac_m_cpu_750" = yes; then
6544 CPU_FLAGS=-mcpu=750
6545 else
6551 if test -z "$CPU_FLAGS"; then
6554 echo $ac_n "checking whether $CC accepts -mcpu=powerpc""... $ac_c" 1>&6
6555 echo "configure:6556: checking whether $CC accepts -mcpu=powerpc" >&5
6556 if eval "test \"`echo '$''{'ac_m_cpu_powerpc'+set}'`\" = set"; then
6557 echo $ac_n "(cached) $ac_c" 1>&6
6558 else
6559 echo 'void f(){}' > conftest.c
6560 if test -z "`$CC -mcpu=powerpc -c conftest.c 2>&1`"; then
6561 ac_m_cpu_powerpc=yes
6562 else
6563 ac_m_cpu_powerpc=no
6565 rm -f conftest*
6569 echo "$ac_t""$ac_m_cpu_powerpc" 1>&6
6570 if test "$ac_m_cpu_powerpc" = yes; then
6572 CPU_FLAGS=-mcpu=powerpc
6573 else
6579 if test -z "$CPU_FLAGS"; then
6582 echo $ac_n "checking whether $CC accepts -mpowerpc""... $ac_c" 1>&6
6583 echo "configure:6584: checking whether $CC accepts -mpowerpc" >&5
6584 if eval "test \"`echo '$''{'ac_m_powerpc'+set}'`\" = set"; then
6585 echo $ac_n "(cached) $ac_c" 1>&6
6586 else
6587 echo 'void f(){}' > conftest.c
6588 if test -z "`$CC -mpowerpc -c conftest.c 2>&1`"; then
6589 ac_m_powerpc=yes
6590 else
6591 ac_m_powerpc=no
6593 rm -f conftest*
6597 echo "$ac_t""$ac_m_powerpc" 1>&6
6598 if test "$ac_m_powerpc" = yes; then
6600 CPU_FLAGS=-mpowerpc
6601 else
6607 esac
6610 if test -n "$CPU_FLAGS"; then
6611 xCFLAGS="$xCFLAGS $CPU_FLAGS"
6612 xFFLAGS="$xFFLAGS $CPU_FLAGS"
6615 # Now check if the user provided anything special for C or fortran...
6616 # Not nice to have checked everything then, but otherwise we would have
6617 # to use entirely separate checks for C and fortran flags, doubling the code.
6618 if test "$ac_test_CFLAGS" != "set"; then
6619 CFLAGS="$xCFLAGS"
6620 # Use the extra link optimization flags on e.g. irix only when
6621 # we are using our own C compiler flags
6622 LDFLAGS="$LDFLAGS $xLDFLAGS"
6624 if test -z "$CFLAGS"; then
6625 echo "*******************************************************************"
6626 echo "* WARNING: No special optimization settings found for the C *"
6627 echo "* compiler. Use make CFLAGS=..., or edit the top level Makefile. *"
6628 echo "* Reverting to the default setting CFLAGS=-O3. (mail us about it) *"
6629 echo "*******************************************************************"
6630 CFLAGS="-O3"
6634 echo $ac_n "checking whether $CC accepts ${CFLAGS}""... $ac_c" 1>&6
6635 echo "configure:6636: checking whether $CC accepts ${CFLAGS}" >&5
6636 if eval "test \"`echo '$''{'ac_guessed_cflags'+set}'`\" = set"; then
6637 echo $ac_n "(cached) $ac_c" 1>&6
6638 else
6639 echo 'void f(){}' > conftest.c
6640 if test -z "`$CC ${CFLAGS} -c conftest.c 2>&1`"; then
6641 ac_guessed_cflags=yes
6642 else
6643 ac_guessed_cflags=no
6645 rm -f conftest*
6649 echo "$ac_t""$ac_guessed_cflags" 1>&6
6650 if test "$ac_guessed_cflags" = yes; then
6653 else
6656 echo "*******************************************************************"
6657 echo "* Sorry, these optimization settings don't seem to work for *"
6658 echo "* your C compiler. Use make CFLAGS=..., or edit the top Makefile. *"
6659 echo "*******************************************************************"
6660 CFLAGS=""
6664 else
6665 echo "******************************************"
6666 echo "* Using CFLAGS from environment variable *"
6667 echo "******************************************"
6670 if test "$enable_fortran" = "yes"; then
6671 if test "$ac_test_FFLAGS" != "set"; then
6672 FFLAGS="$xFFLAGS"
6674 if test -z "$FFLAGS"; then
6675 echo "*******************************************************************"
6676 echo "* WARNING: No special optimization settings found for the fortran *"
6677 echo "* compiler. Use make FFLAGS=..., or edit the top level Makefile. *"
6678 echo "* Reverting to the default setting FFLAGS=-O3. (mail us about it) *"
6679 echo "*******************************************************************"
6680 FFLAGS="-O3"
6684 echo $ac_n "checking whether $F77 accepts ${FFLAGS}""... $ac_c" 1>&6
6685 echo "configure:6686: checking whether $F77 accepts ${FFLAGS}" >&5
6686 if eval "test \"`echo '$''{'ac_guessed_fflags'+set}'`\" = set"; then
6687 echo $ac_n "(cached) $ac_c" 1>&6
6688 else
6689 cat > conftest.f << EOF
6690 subroutine f
6691 return
6694 if test -z "`$F77 ${FFLAGS} -c conftest.f `"; then
6695 ac_guessed_fflags=yes
6696 else
6697 ac_guessed_fflags=no
6699 rm -f conftest*
6703 echo "$ac_t""$ac_guessed_fflags" 1>&6
6704 if test "$ac_guessed_fflags" = yes; then
6707 else
6710 echo "*******************************************************************"
6711 echo "* Sorry, these optimization settings don't seem to work for *"
6712 echo "* your f77 compiler. Use make FFLAGS=.., or edit the top Makefile.*"
6713 echo "*******************************************************************"
6714 FFLAGS=""
6718 else
6719 echo "******************************************"
6720 echo "* Using FFLAGS from environment variable *"
6721 echo "******************************************"
6725 # should be automatic, but doesnt seem to be?
6727 # put binaries and libraries in subdirectories named as the arch
6728 if test -n "$gmxcpu"; then
6729 bindir="\${exec_prefix}/bin/${host}/${gmxcpu}"
6730 libdir="\${exec_prefix}/lib/${host}/${gmxcpu}"
6731 else
6732 bindir="\${exec_prefix}/bin/${host}"
6733 libdir="\${exec_prefix}/lib/${host}"
6740 trap '' 1 2 15
6741 cat > confcache <<\EOF
6742 # This file is a shell script that caches the results of configure
6743 # tests run on this system so they can be shared between configure
6744 # scripts and configure runs. It is not useful on other systems.
6745 # If it contains results you don't want to keep, you may remove or edit it.
6747 # By default, configure uses ./config.cache as the cache file,
6748 # creating it if it does not exist already. You can give configure
6749 # the --cache-file=FILE option to use a different cache file; that is
6750 # what configure does when it calls configure scripts in
6751 # subdirectories, so they share the cache.
6752 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6753 # config.status only pays attention to the cache file if you give it the
6754 # --recheck option to rerun configure.
6757 # The following way of writing the cache mishandles newlines in values,
6758 # but we know of no workaround that is simple, portable, and efficient.
6759 # So, don't put newlines in cache variables' values.
6760 # Ultrix sh set writes to stderr and can't be redirected directly,
6761 # and sets the high bit in the cache file unless we assign to the vars.
6762 (set) 2>&1 |
6763 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6764 *ac_space=\ *)
6765 # `set' does not quote correctly, so add quotes (double-quote substitution
6766 # turns \\\\ into \\, and sed turns \\ into \).
6767 sed -n \
6768 -e "s/'/'\\\\''/g" \
6769 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6772 # `set' quotes correctly as required by POSIX, so do not add quotes.
6773 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6775 esac >> confcache
6776 if cmp -s $cache_file confcache; then
6778 else
6779 if test -w $cache_file; then
6780 echo "updating cache $cache_file"
6781 cat confcache > $cache_file
6782 else
6783 echo "not updating unwritable cache $cache_file"
6786 rm -f confcache
6788 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6790 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6791 # Let make expand exec_prefix.
6792 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6794 # Any assignment to VPATH causes Sun make to only execute
6795 # the first set of double-colon rules, so remove it if not needed.
6796 # If there is a colon in the path, we need to keep it.
6797 if test "x$srcdir" = x.; then
6798 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6801 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6803 DEFS=-DHAVE_CONFIG_H
6805 # Without the "./", some shells look in PATH for config.status.
6806 : ${CONFIG_STATUS=./config.status}
6808 echo creating $CONFIG_STATUS
6809 rm -f $CONFIG_STATUS
6810 cat > $CONFIG_STATUS <<EOF
6811 #! /bin/sh
6812 # Generated automatically by configure.
6813 # Run this file to recreate the current configuration.
6814 # This directory was configured as follows,
6815 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6817 # $0 $ac_configure_args
6819 # Compiler output produced by configure, useful for debugging
6820 # configure, is in ./config.log if it exists.
6822 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6823 for ac_option
6825 case "\$ac_option" in
6826 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6827 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6828 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6829 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6830 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6831 exit 0 ;;
6832 -help | --help | --hel | --he | --h)
6833 echo "\$ac_cs_usage"; exit 0 ;;
6834 *) echo "\$ac_cs_usage"; exit 1 ;;
6835 esac
6836 done
6838 ac_given_srcdir=$srcdir
6839 ac_given_INSTALL="$INSTALL"
6841 trap 'rm -fr `echo "Makefile
6842 src/Makefile
6843 src/gmxlib/Makefile
6844 src/mdlib/Makefile
6845 src/kernel/Makefile
6846 src/tools/Makefile
6847 src/ngmx/Makefile
6848 src/include/Makefile
6849 src/include/types/Makefile
6850 tutor/Makefile
6851 tutor/gmxdemo/Makefile
6852 tutor/nmr1/Makefile
6853 tutor/nmr2/Makefile
6854 tutor/water/Makefile
6855 tutor/speptide/Makefile
6856 tutor/template/Makefile
6857 tutor/template/Template.mak
6858 top/Makefile
6859 html/Makefile
6860 html/gif/Makefile
6861 html/online/Makefile src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6863 cat >> $CONFIG_STATUS <<EOF
6865 # Protect against being on the right side of a sed subst in config.status.
6866 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6867 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6868 $ac_vpsub
6869 $extrasub
6870 s%@SHELL@%$SHELL%g
6871 s%@CFLAGS@%$CFLAGS%g
6872 s%@CPPFLAGS@%$CPPFLAGS%g
6873 s%@CXXFLAGS@%$CXXFLAGS%g
6874 s%@FFLAGS@%$FFLAGS%g
6875 s%@DEFS@%$DEFS%g
6876 s%@LDFLAGS@%$LDFLAGS%g
6877 s%@LIBS@%$LIBS%g
6878 s%@exec_prefix@%$exec_prefix%g
6879 s%@prefix@%$prefix%g
6880 s%@program_transform_name@%$program_transform_name%g
6881 s%@bindir@%$bindir%g
6882 s%@sbindir@%$sbindir%g
6883 s%@libexecdir@%$libexecdir%g
6884 s%@datadir@%$datadir%g
6885 s%@sysconfdir@%$sysconfdir%g
6886 s%@sharedstatedir@%$sharedstatedir%g
6887 s%@localstatedir@%$localstatedir%g
6888 s%@libdir@%$libdir%g
6889 s%@includedir@%$includedir%g
6890 s%@oldincludedir@%$oldincludedir%g
6891 s%@infodir@%$infodir%g
6892 s%@mandir@%$mandir%g
6893 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6894 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6895 s%@INSTALL_DATA@%$INSTALL_DATA%g
6896 s%@PACKAGE@%$PACKAGE%g
6897 s%@VERSION@%$VERSION%g
6898 s%@ACLOCAL@%$ACLOCAL%g
6899 s%@AUTOCONF@%$AUTOCONF%g
6900 s%@AUTOMAKE@%$AUTOMAKE%g
6901 s%@AUTOHEADER@%$AUTOHEADER%g
6902 s%@MAKEINFO@%$MAKEINFO%g
6903 s%@AMTAR@%$AMTAR%g
6904 s%@install_sh@%$install_sh%g
6905 s%@AWK@%$AWK%g
6906 s%@SET_MAKE@%$SET_MAKE%g
6907 s%@AMDEP@%$AMDEP%g
6908 s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%g
6909 s%@DEPDIR@%$DEPDIR%g
6910 s%@host@%$host%g
6911 s%@host_alias@%$host_alias%g
6912 s%@host_cpu@%$host_cpu%g
6913 s%@host_vendor@%$host_vendor%g
6914 s%@host_os@%$host_os%g
6915 s%@F77@%$F77%g
6916 s%@CC@%$CC%g
6917 s%@CPP@%$CPP%g
6918 s%@_am_include@%$_am_include%g
6919 s%@CCDEPMODE@%$CCDEPMODE%g
6920 s%@BUILD_CC@%$BUILD_CC%g
6921 s%@FLIBS@%$FLIBS%g
6922 s%@MPICC@%$MPICC%g
6923 s%@USE_MPI_TRUE@%$USE_MPI_TRUE%g
6924 s%@USE_MPI_FALSE@%$USE_MPI_FALSE%g
6925 s%@NASM@%$NASM%g
6926 s%@NASMFLAGS@%$NASMFLAGS%g
6927 s%@IDENT@%$IDENT%g
6928 s%@RANLIB@%$RANLIB%g
6929 s%@GMX_USE_XDR_TRUE@%$GMX_USE_XDR_TRUE%g
6930 s%@GMX_USE_XDR_FALSE@%$GMX_USE_XDR_FALSE%g
6931 s%@X_CFLAGS@%$X_CFLAGS%g
6932 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6933 s%@X_LIBS@%$X_LIBS%g
6934 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6935 s%@LIBOBJS@%$LIBOBJS%g
6936 s%@USE_X11_TRUE@%$USE_X11_TRUE%g
6937 s%@USE_X11_FALSE@%$USE_X11_FALSE%g
6938 s%@USE_FORTRAN_TRUE@%$USE_FORTRAN_TRUE%g
6939 s%@USE_FORTRAN_FALSE@%$USE_FORTRAN_FALSE%g
6940 s%@USE_DOUBLE_TRUE@%$USE_DOUBLE_TRUE%g
6941 s%@USE_DOUBLE_FALSE@%$USE_DOUBLE_FALSE%g
6942 s%@PAR_OBJ@%$PAR_OBJ%g
6943 s%@INNER_F77_OBJ@%$INNER_F77_OBJ%g
6944 s%@INNER_C_OBJ@%$INNER_C_OBJ%g
6945 s%@SSE_OBJ@%$SSE_OBJ%g
6946 s%@TDN_OBJ@%$TDN_OBJ%g
6947 s%@X86_ASM_OBJ@%$X86_ASM_OBJ%g
6948 s%@MOTIF_OBJ@%$MOTIF_OBJ%g
6949 s%@XDR_OBJ@%$XDR_OBJ%g
6950 s%@AXP_ASM_OBJ@%$AXP_ASM_OBJ%g
6951 s=XXX_SUFFIX_XXX=$SUFFIX=g
6952 s%@SUFFIX@%$SUFFIX%g
6953 s%@INCLUDES@%$INCLUDES%g
6955 CEOF
6958 cat >> $CONFIG_STATUS <<\EOF
6960 # Split the substitutions into bite-sized pieces for seds with
6961 # small command number limits, like on Digital OSF/1 and HP-UX.
6962 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6963 ac_file=1 # Number of current file.
6964 ac_beg=1 # First line for current file.
6965 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6966 ac_more_lines=:
6967 ac_sed_cmds=""
6968 while $ac_more_lines; do
6969 if test $ac_beg -gt 1; then
6970 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6971 else
6972 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6974 if test ! -s conftest.s$ac_file; then
6975 ac_more_lines=false
6976 rm -f conftest.s$ac_file
6977 else
6978 if test -z "$ac_sed_cmds"; then
6979 ac_sed_cmds="sed -f conftest.s$ac_file"
6980 else
6981 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6983 ac_file=`expr $ac_file + 1`
6984 ac_beg=$ac_end
6985 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6987 done
6988 if test -z "$ac_sed_cmds"; then
6989 ac_sed_cmds=cat
6993 cat >> $CONFIG_STATUS <<EOF
6995 CONFIG_FILES=\${CONFIG_FILES-"Makefile
6996 src/Makefile
6997 src/gmxlib/Makefile
6998 src/mdlib/Makefile
6999 src/kernel/Makefile
7000 src/tools/Makefile
7001 src/ngmx/Makefile
7002 src/include/Makefile
7003 src/include/types/Makefile
7004 tutor/Makefile
7005 tutor/gmxdemo/Makefile
7006 tutor/nmr1/Makefile
7007 tutor/nmr2/Makefile
7008 tutor/water/Makefile
7009 tutor/speptide/Makefile
7010 tutor/template/Makefile
7011 tutor/template/Template.mak
7012 top/Makefile
7013 html/Makefile
7014 html/gif/Makefile
7015 html/online/Makefile"}
7017 cat >> $CONFIG_STATUS <<\EOF
7018 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7019 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7020 case "$ac_file" in
7021 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7022 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7023 *) ac_file_in="${ac_file}.in" ;;
7024 esac
7026 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7028 # Remove last slash and all that follows it. Not all systems have dirname.
7029 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7030 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7031 # The file is in a subdirectory.
7032 test ! -d "$ac_dir" && mkdir "$ac_dir"
7033 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7034 # A "../" for each directory in $ac_dir_suffix.
7035 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7036 else
7037 ac_dir_suffix= ac_dots=
7040 case "$ac_given_srcdir" in
7041 .) srcdir=.
7042 if test -z "$ac_dots"; then top_srcdir=.
7043 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7044 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7045 *) # Relative path.
7046 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7047 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7048 esac
7050 case "$ac_given_INSTALL" in
7051 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7052 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7053 esac
7055 echo creating "$ac_file"
7056 rm -f "$ac_file"
7057 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7058 case "$ac_file" in
7059 *Makefile*) ac_comsub="1i\\
7060 # $configure_input" ;;
7061 *) ac_comsub= ;;
7062 esac
7064 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7065 sed -e "$ac_comsub
7066 s%@configure_input@%$configure_input%g
7067 s%@srcdir@%$srcdir%g
7068 s%@top_srcdir@%$top_srcdir%g
7069 s%@INSTALL@%$INSTALL%g
7070 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7071 fi; done
7072 rm -f conftest.s*
7074 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7075 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7077 # ac_d sets the value in "#define NAME VALUE" lines.
7078 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7079 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7080 ac_dC='\3'
7081 ac_dD='%g'
7082 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7083 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7084 ac_uB='\([ ]\)%\1#\2define\3'
7085 ac_uC=' '
7086 ac_uD='\4%g'
7087 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7088 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7089 ac_eB='$%\1#\2define\3'
7090 ac_eC=' '
7091 ac_eD='%g'
7093 if test "${CONFIG_HEADERS+set}" != set; then
7095 cat >> $CONFIG_STATUS <<EOF
7096 CONFIG_HEADERS="src/include/config.h"
7098 cat >> $CONFIG_STATUS <<\EOF
7100 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7101 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7102 case "$ac_file" in
7103 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7104 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7105 *) ac_file_in="${ac_file}.in" ;;
7106 esac
7108 echo creating $ac_file
7110 rm -f conftest.frag conftest.in conftest.out
7111 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7112 cat $ac_file_inputs > conftest.in
7116 # Transform confdefs.h into a sed script conftest.vals that substitutes
7117 # the proper values into config.h.in to produce config.h. And first:
7118 # Protect against being on the right side of a sed subst in config.status.
7119 # Protect against being in an unquoted here document in config.status.
7120 rm -f conftest.vals
7121 cat > conftest.hdr <<\EOF
7122 s/[\\&%]/\\&/g
7123 s%[\\$`]%\\&%g
7124 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7125 s%ac_d%ac_u%gp
7126 s%ac_u%ac_e%gp
7128 sed -n -f conftest.hdr confdefs.h > conftest.vals
7129 rm -f conftest.hdr
7131 # This sed command replaces #undef with comments. This is necessary, for
7132 # example, in the case of _POSIX_SOURCE, which is predefined and required
7133 # on some systems where configure will not decide to define it.
7134 cat >> conftest.vals <<\EOF
7135 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7138 # Break up conftest.vals because some shells have a limit on
7139 # the size of here documents, and old seds have small limits too.
7141 rm -f conftest.tail
7142 while :
7144 ac_lines=`grep -c . conftest.vals`
7145 # grep -c gives empty output for an empty file on some AIX systems.
7146 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7147 # Write a limited-size here document to conftest.frag.
7148 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7149 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7150 echo 'CEOF
7151 sed -f conftest.frag conftest.in > conftest.out
7152 rm -f conftest.in
7153 mv conftest.out conftest.in
7154 ' >> $CONFIG_STATUS
7155 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7156 rm -f conftest.vals
7157 mv conftest.tail conftest.vals
7158 done
7159 rm -f conftest.vals
7161 cat >> $CONFIG_STATUS <<\EOF
7162 rm -f conftest.frag conftest.h
7163 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7164 cat conftest.in >> conftest.h
7165 rm -f conftest.in
7166 if cmp -s $ac_file conftest.h 2>/dev/null; then
7167 echo "$ac_file is unchanged"
7168 rm -f conftest.h
7169 else
7170 # Remove last slash and all that follows it. Not all systems have dirname.
7171 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7172 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7173 # The file is in a subdirectory.
7174 test ! -d "$ac_dir" && mkdir "$ac_dir"
7176 rm -f $ac_file
7177 mv conftest.h $ac_file
7179 fi; done
7182 cat >> $CONFIG_STATUS <<EOF
7183 am_indx=1
7184 for am_file in src/include/config.h; do
7185 case " $CONFIG_HEADERS " in
7186 *" $am_file "*)
7187 echo timestamp > `echo $am_file | sed 's%:.*%%;s%[^/]*$%%'`stamp-h$am_indx
7189 esac
7190 am_indx=\`expr \$am_indx + 1\`
7191 done
7192 AMDEP="$AMDEP"
7193 ac_aux_dir="$ac_aux_dir"
7196 cat >> $CONFIG_STATUS <<\EOF
7197 test -z "$CONFIG_HEADERS" || echo timestamp > src/include/stamp-h
7199 test x"$AMDEP" != x"" ||
7200 for mf in $CONFIG_FILES; do
7201 case "$mf" in
7202 Makefile) dirpart=.;;
7203 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
7204 *) continue;;
7205 esac
7206 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
7207 # Extract the definition of DEP_FILES from the Makefile without
7208 # running `make'.
7209 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
7210 test -z "$DEPDIR" && continue
7211 # When using ansi2knr, U may be empty or an underscore; expand it
7212 U=`sed -n -e '/^U = / s///p' < "$mf"`
7213 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
7214 # We invoke sed twice because it is the simplest approach to
7215 # changing $(DEPDIR) to its actual value in the expansion.
7216 for file in `sed -n -e '
7217 /^DEP_FILES = .*\\\\$/ {
7218 s/^DEP_FILES = //
7219 :loop
7220 s/\\\\$//
7223 /\\\\$/ b loop
7226 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7227 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7228 # Make sure the directory exists.
7229 test -f "$dirpart/$file" && continue
7230 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
7231 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
7232 # echo "creating $dirpart/$file"
7233 echo '# dummy' > "$dirpart/$file"
7234 done
7235 done
7238 exit 0
7240 chmod +x $CONFIG_STATUS
7241 rm -fr confdefs* $ac_clean_files
7242 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7245 echo ""
7246 echo "Gromacs is ready to compile. Summary of options used:"
7247 echo "Architecture : $host"
7248 if test "$enable_cpu_detection" = "yes"; then
7249 if test -n "$gmxcpu"; then
7250 echo "Optimize for CPU : $gmxcpu"
7251 else
7252 echo "(Extra CPU detection not necessary or unavailable on this host)"
7255 echo "MPI parallelization : $enable_mpi"
7256 if test "$enable_mpi" = "yes"; then
7257 echo "Checking MPI environment : $with_mpi_environment"
7259 echo "Vector architecture : $enable_vector"
7260 echo "Using Fortran code : $enable_fortran"
7261 echo "Double precision : $enable_double"
7262 if test "$enable_double" = "yes" -o "$enable_mpi" = "yes"; then
7263 echo "Type suffix on files : $enable_type_suffix"
7265 echo "Expanding water loops : $enable_simplewater"
7266 echo "Using water-water loops : $enable_waterwater_loops"
7267 echo "Automatically nice mdrun : $enable_nice"
7268 echo "Using x86 SSE assembly : $enable_sse"
7269 echo "Using x86 3DNow assembly : $enable_3dnow"
7270 echo "Portable trajectories (xdr) : $enable_xdr"
7271 echo "Software 1/x : $enable_softwarerecip"
7272 echo "Software 1/sqrt(x) : $enable_softwaresqrt"
7273 echo "Vectorize 1/x : $enable_vectorized_recip"
7274 echo "Vectorize 1/sqrt(x) : $list_of_vectorized_sqrt"
7275 echo "Prefetch coordinates in loops : $list_of_prefetch_x"
7276 echo "Prefetch forces in loops : $list_of_prefetch_f"
7277 echo "Hide square latency : $enable_hide_square_latency"
7278 echo "Hide table lookup latency : $enable_hide_table_latency"
7279 echo "Using X11 : $use_x11"
7280 echo "Motif support : $use_motif"
7281 echo ""